From report at bugs.python.org Thu Jul 1 00:03:48 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 30 Jun 2010 22:03:48 +0000 Subject: [issue9134] sre bug: lastmark_save/restore In-Reply-To: <1277932738.21.0.537266945796.issue9134@psf.upfronthosting.co.za> Message-ID: <1277935428.63.0.684855463898.issue9134@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: +Regular Expressions nosy: +ezio.melotti stage: -> unit test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 00:05:21 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 30 Jun 2010 22:05:21 +0000 Subject: [issue9133] Invalid UTF8 Byte sequence not raising exception/being substituted In-Reply-To: <1277928174.53.0.503418777966.issue9133@psf.upfronthosting.co.za> Message-ID: <1277935521.64.0.831188025116.issue9133@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 00:18:23 2010 From: report at bugs.python.org (Yuv Gre) Date: Wed, 30 Jun 2010 22:18:23 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> New submission from Yuv Gre : I'm using Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32. Running the following code: import profile import math import decimal def show_bug(): x = decimal.Decimal.from_float(math.e)**(-2**31) profile.run('show_bug()') And I get this stack trace: Traceback (most recent call last): File "C:/Users/Me/Documents/python/temptest", line 15, in profile.run('show_bug()') File "C:\Python31\lib\profile.py", line 70, in run prof = prof.run(statement) File "C:\Python31\lib\profile.py", line 456, in run return self.runctx(cmd, dict, dict) File "C:\Python31\lib\profile.py", line 462, in runctx exec(cmd, globals, locals) File "", line 1, in File "C:/Users/Me/Documents/python/temptest", line 8, in show_bug x = Decimal.from_float(math.e)**(-2**31) File "C:\Python31\lib\decimal.py", line 2212, in __pow__ context = getcontext() File "C:\Python31\lib\decimal.py", line 447, in getcontext context = Context() File "C:\Python31\lib\decimal.py", line 3777, in __init__ for name, val in locals().items(): RuntimeError: dictionary changed size during iteration ---------- components: Library (Lib) messages: 109023 nosy: ubershmekel priority: normal severity: normal status: open title: RuntimeError when profiling Decimal type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 00:19:48 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 30 Jun 2010 22:19:48 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1277936388.64.0.512775079968.issue9136@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, mark.dickinson stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 00:29:15 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 30 Jun 2010 22:29:15 +0000 Subject: [issue9126] errors='replace' does not work at Windows command line In-Reply-To: <1277911366.4.0.473449546724.issue9126@psf.upfronthosting.co.za> Message-ID: <1277936955.22.0.824130437647.issue9126@psf.upfronthosting.co.za> Ezio Melotti added the comment: The problem is not in the reading part, but in the print(). Since the default encoding of your terminal is cp437 and cp437 is not able to encode the "bad character" (U+2019 RIGHT SINGLE QUOTATION MARK), an error is raised. ---------- nosy: +ezio.melotti resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 01:16:19 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 30 Jun 2010 23:16:19 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1277939779.77.0.131739631807.issue9136@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 01:20:36 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 30 Jun 2010 23:20:36 +0000 Subject: [issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX) In-Reply-To: <1272979850.31.0.0455265952928.issue8611@psf.upfronthosting.co.za> Message-ID: <1277940036.51.0.740860942466.issue8611@psf.upfronthosting.co.za> STINNER Victor added the comment: See also #3080. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 01:35:26 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 30 Jun 2010 23:35:26 +0000 Subject: [issue3080] Full unicode import system In-Reply-To: <1213208697.49.0.984990811807.issue3080@psf.upfronthosting.co.za> Message-ID: <1277940926.79.0.397736445679.issue3080@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 03:02:35 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 01 Jul 2010 01:02:35 +0000 Subject: [issue9104] test_exceptions does not test pickling with pickle.py In-Reply-To: <1277741892.3.0.0849773844587.issue9104@psf.upfronthosting.co.za> Message-ID: <1277946155.38.0.754674932982.issue9104@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I would like to commit this as written. If a better mechanism for associating native implementation with a pure python module is found, it can easily be added in the future. Any objections? The patch only adds more test cases, no code is changed. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 03:02:55 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 01 Jul 2010 01:02:55 +0000 Subject: [issue9104] test_exceptions does not test pickling with pickle.py In-Reply-To: <1277741892.3.0.0849773844587.issue9104@psf.upfronthosting.co.za> Message-ID: <1277946175.89.0.690099234217.issue9104@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> belopolsky resolution: -> accepted stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 03:55:39 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Jul 2010 01:55:39 +0000 Subject: [issue7673] audioop: check that length is a multiple of the size In-Reply-To: <1263171957.43.0.71285781195.issue7673@psf.upfronthosting.co.za> Message-ID: <1277949339.45.0.152822083817.issue7673@psf.upfronthosting.co.za> STINNER Victor added the comment: @Mark: Here is the updated version of the patch including all of your remarks. I fixed 3 bugs in my patch: the checks of adpcm2lin(), alaw2lin() and audioop.ulaw2lin() were incomplete (len was not checked). I added 3.1 to the version field. ---------- versions: +Python 3.1 Added file: http://bugs.python.org/file17823/audioop_check_length-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 04:30:20 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 01 Jul 2010 02:30:20 +0000 Subject: [issue8990] array constructor and array.fromstring should accept bytearray. In-Reply-To: <1276458174.59.0.784735349158.issue8990@psf.upfronthosting.co.za> Message-ID: <1277951420.01.0.164184159322.issue8990@psf.upfronthosting.co.za> STINNER Victor added the comment: array2.diff: - can you reindent the line "Py_ssize_t old_size = Py_SIZE(self);"?(even if it's not part of your patch) - you can avoid the "char *str;" variable (use directly buffer.buf) -- > I changed "s#" to "y*". This means that str arguments are no longer > accepted by fromstring (...) it is an incompatible change It's maybe time to create .frombytes() and .tobytes() methods: - .tostring() will be a (deprecated?) alias to .tobytes() - .frombytes() only accepts bytes, bytearray and buffer compatible objects: use "y*" format - .fromstring() accepts str, bytes, bytearray and buffer compatible objects (encode str to utf-8): use "s*" format But I still don't understand why array.fromstring() accepts character strings. So an easier solution is to apply array2.diff to Python 3.2, and replace "y*" by "s*" when the patch is applied to 3.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 04:34:13 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 01 Jul 2010 02:34:13 +0000 Subject: [issue9132] Documentation for comparing dictionaries is out of date In-Reply-To: <1277927951.56.0.908504944608.issue9132@psf.upfronthosting.co.za> Message-ID: <1277951653.68.0.641787576252.issue9132@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Reference to "sorted (key, value) lists" is a bit misleading as well. Dicts' equality is defined even if key or values are not orderable. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 06:02:49 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 01 Jul 2010 04:02:49 +0000 Subject: [issue9118] help() on a property descriptor launches interactive help In-Reply-To: <1277836369.81.0.859952586368.issue9118@psf.upfronthosting.co.za> Message-ID: <1277956969.86.0.0611327381992.issue9118@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This is simply because X.foo.fset is None and help(None) is the same as help(). Now, I think help(None) should print help on None object rather than start interactive help. Please consider attached patch. ---------- keywords: +patch nosy: +belopolsky stage: needs patch -> patch review Added file: http://bugs.python.org/file17824/issue9118.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 07:31:32 2010 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 01 Jul 2010 05:31:32 +0000 Subject: [issue9120] Reduce pickle size for an empty set In-Reply-To: <1277839720.0.0.346517516652.issue9120@psf.upfronthosting.co.za> Message-ID: <1277962292.43.0.519748434807.issue9120@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: > This begs a question, however: why not use regular python bytecode in pickles? Unlike pickle protocols, the bytecode is not required to be compatible across Python versions. Furthermore, Python bytecode is designed has a general purpose object serialization mechanism. For the record, I am with Raymond about adding new opcodes for sets; pickle is complicated enough as it is. I am fine with the posted patch however. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 07:47:42 2010 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 01 Jul 2010 05:47:42 +0000 Subject: [issue9104] test_exceptions does not test pickling with pickle.py In-Reply-To: <1277741892.3.0.0849773844587.issue9104@psf.upfronthosting.co.za> Message-ID: <1277963262.25.0.376436740725.issue9104@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: > It works for pickle/_pickle and heapq/_heapq, but won't work for io/_io/_pyio. You can make the dictionary values as lists for the 'blocked' argument for import_fresh_module(). That would work. And, can you add documentation for import_module_implementations()? A description how it finds the optimized implementation of a module would be helpful too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 08:28:22 2010 From: report at bugs.python.org (Brett Cannon) Date: Thu, 01 Jul 2010 06:28:22 +0000 Subject: [issue9096] importlib doesn't handle valid marshalled data with invalid semantics In-Reply-To: <1277684900.43.0.0388442576736.issue9096@psf.upfronthosting.co.za> Message-ID: <1277965702.41.0.882944314924.issue9096@psf.upfronthosting.co.za> Brett Cannon added the comment: Turns out that an ImportError should be raised when a bytecode object contains a non-code object. My next patch which makes SourceLoader the primary loader will have the fix. ---------- components: +Library (Lib) resolution: -> accepted type: -> behavior versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 10:34:01 2010 From: report at bugs.python.org (Armin Rigo) Date: Thu, 01 Jul 2010 08:34:01 +0000 Subject: [issue9134] sre bug: lastmark_save/restore In-Reply-To: <1277932738.21.0.537266945796.issue9134@psf.upfronthosting.co.za> Message-ID: <1277973241.36.0.467896280246.issue9134@psf.upfronthosting.co.za> Armin Rigo added the comment: It's pretty trivial to turn my x.py into a unit test, of course. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 11:25:50 2010 From: report at bugs.python.org (=?utf-8?q?Ernesto_Men=C3=A9ndez?=) Date: Thu, 01 Jul 2010 09:25:50 +0000 Subject: [issue5315] signal handler never gets called In-Reply-To: <1235051228.14.0.0909837566577.issue5315@psf.upfronthosting.co.za> Message-ID: <1277976350.35.0.856279494472.issue5315@psf.upfronthosting.co.za> Changes by Ernesto Men?ndez : ---------- nosy: +Netto _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 11:27:23 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Jul 2010 09:27:23 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1277976443.47.0.29621424781.issue9136@psf.upfronthosting.co.za> Mark Dickinson added the comment: I can't reproduce this on Linux. However, I've seen an informal report of something like this happening before. It looks a lot like something threading related, but I don't see any threads in what you're doing. (Though I don't know the details of how the profile module works, on either Linux or Windows.) The use of locals() in the Context constructor is an unnecessary hack that's easy to fix; I'll do that. But it would still be good to understand exactly where this is coming from. ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 11:28:19 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Jul 2010 09:28:19 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1277976499.86.0.95213810081.issue9136@psf.upfronthosting.co.za> Mark Dickinson added the comment: BTW, is the behaviour consistent, or does it only occur on some runs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 11:28:57 2010 From: report at bugs.python.org (=?utf-8?q?Ernesto_Men=C3=A9ndez?=) Date: Thu, 01 Jul 2010 09:28:57 +0000 Subject: [issue1856] shutdown (exit) can hang or segfault with daemon threads running In-Reply-To: <1200535276.53.0.276618350299.issue1856@psf.upfronthosting.co.za> Message-ID: <1277976537.5.0.0361220701527.issue1856@psf.upfronthosting.co.za> Changes by Ernesto Men?ndez : ---------- nosy: +Netto _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 11:41:10 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Jul 2010 09:41:10 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1277977270.44.0.917356557845.issue9136@psf.upfronthosting.co.za> Mark Dickinson added the comment: Okay, I can reproduce by adding a 'time.sleep(0.01)' delay into the body of the 'for name, val in locals().items():' loop. I then get (with py3k): dickinsm at alberti:~/Source/py3k> ./python Python 3.2a0 (py3k:82413M, Jul 1 2010, 10:21:02) [GCC 4.2.1 (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import decimal, profile >>> def show_bug(): decimal.Decimal(1.2)**(-2**31) ... >>> profile.run('show_bug()') Traceback (most recent call last): File "/home/dickinsm/Source/py3k/Lib/decimal.py", line 447, in getcontext return _local.__decimal_context__ AttributeError: '_thread._local' object has no attribute '__decimal_context__' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "/home/dickinsm/Source/py3k/Lib/profile.py", line 70, in run prof = prof.run(statement) File "/home/dickinsm/Source/py3k/Lib/profile.py", line 442, in run return self.runctx(cmd, dict, dict) File "/home/dickinsm/Source/py3k/Lib/profile.py", line 448, in runctx exec(cmd, globals, locals) File "", line 1, in File "", line 1, in show_bug File "/home/dickinsm/Source/py3k/Lib/decimal.py", line 2222, in __pow__ context = getcontext() File "/home/dickinsm/Source/py3k/Lib/decimal.py", line 449, in getcontext context = Context() File "/home/dickinsm/Source/py3k/Lib/decimal.py", line 3822, in __init__ for name, val in locals().items(): RuntimeError: dictionary changed size during iteration ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 12:05:05 2010 From: report at bugs.python.org (Ralph Corderoy) Date: Thu, 01 Jul 2010 10:05:05 +0000 Subject: [issue1152248] Enhance file.readlines by making line separator selectable Message-ID: <1277978705.51.0.518987497762.issue1152248@psf.upfronthosting.co.za> Ralph Corderoy added the comment: Google has led me here because I'm trying to see how to process find(1)'s -print0 output with Python. Perl's -0 option and $/ variable makes this trivial. find -name '*.orig' -print0 | perl -n0e unlink awk(1) has its RS, record separator, variable too. There's a clear need, and it should also be possible to modify or re-open sys.stdin to change the existing separator. ---------- nosy: +ralph.corderoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 12:29:43 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 01 Jul 2010 10:29:43 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277976443.47.0.29621424781.issue9136@psf.upfronthosting.co.za> Message-ID: <20100701102911.GA20967@yoda.bytereef.org> Stefan Krah added the comment: Mark Dickinson wrote: > I can't reproduce this on Linux. However, I've seen an informal report of something like this happening before. It looks a lot like something threading related, but I don't see any threads in what you're doing. (Though I don't know the details of how the profile module works, on either Linux or Windows.) I can reproduce it consistently, also --without-threads. I'm lacking knowledge about the profile module, but it has a comment "(old profiler used to write into the frames local dictionary!!". Perhaps there's still something like that going on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 12:32:30 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Jul 2010 10:32:30 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1277980350.4.0.170802146381.issue9136@psf.upfronthosting.co.za> Mark Dickinson added the comment: Removing the decimal module from the equation, the following is enough to trigger this for me. Stefan's suggestion about the profile module writing to locals sounds right on target. import profile class Context(object): def __init__(self): for name, val in locals().items(): setattr(self, name, val) profile.run("Context()") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 12:47:23 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Jul 2010 10:47:23 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1277981243.63.0.63762409083.issue9136@psf.upfronthosting.co.za> Mark Dickinson added the comment: class Context(object): def __init__(self): for name, val in locals().items(): setattr(self, name, val) Isn't this dodgy anyway, since 'name' and 'val' end up going into locals()? I wonder why the RuntimeError *isn't* raised for a normal 'Context()' call (i.e., not via profile). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 12:53:50 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 01 Jul 2010 10:53:50 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1277981630.44.0.740885202648.issue9136@psf.upfronthosting.co.za> Stefan Krah added the comment: Still clueless about profile.py, but I think it creates a parallel stack, and overwriting of locals legitimately occurs in that stack, producing the Exception. So it would appear that by design one simply cannot iterate over locals when using the profile module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 13:10:36 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 01 Jul 2010 11:10:36 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277981243.63.0.63762409083.issue9136@psf.upfronthosting.co.za> Message-ID: <20100701111004.GA21563@yoda.bytereef.org> Stefan Krah added the comment: Mark Dickinson wrote: > > Mark Dickinson added the comment: > > class Context(object): > def __init__(self): > for name, val in locals().items(): > setattr(self, name, val) > > > Isn't this dodgy anyway, since 'name' and 'val' end up going into locals()? I wonder why the RuntimeError *isn't* raised for a normal 'Context()' call (i.e., not via profile). Indeed, and it seems to depend on how name and vals are used: ... print(locals()) ... {'name': '__builtins__', 'val': , '__builtins__': , '__package__': None, 'Context': , '__name__': '__main__', '__doc__': None} Traceback (most recent call last): File "", line 1, in RuntimeError: dictionary changed size during iteration ... pass ... >>> locals() {'name': '__doc__', 'val': None, '__builtins__': , '__package__': None, 'Context': , '__name__': '__main__', '__doc__': None} >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 13:13:42 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 01 Jul 2010 11:13:42 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1277982822.08.0.88015894359.issue9136@psf.upfronthosting.co.za> Stefan Krah added the comment: The tracker doesn't handle code when posted by mail. Here's the code again: >>> for name, val in locals().items(): ... print(locals()) ... {'name': '__builtins__', 'val': , '__builtins__': , '__package__': None, '__name__': '__main__', '__doc__': None} Traceback (most recent call last): File "", line 1, in RuntimeError: dictionary changed size during iteration >>> for name, val in locals().items(): ... pass ... >>> >>> locals() {'name': '__doc__', 'val': None, '__builtins__': , '__package__': None, '__name__': '__main__', '__doc__': None} >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 13:48:53 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Jul 2010 11:48:53 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1277984933.84.0.973053159374.issue9136@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ah, it looks like 'locals()' is somewhat magical. Its docstring says: "Update and return a dictionary containing the current scope's local variables." So I think this explains your (Stefan's) results: in either case, you evaluate locals() (as the target of the for statement) and get a dictionary back. But that dictionary isn't updated to include 'name' and 'val' until you call locals() for a second time. (And possibly there are other activities besides an explicit locals() call that would cause that dict to be updated, but I'm not sure.) I still don't understand how things work when profile is added into the mix, but I'm willing to accept that the profile module affects locals() in strange and possibly timing-dependent ways. Anyway, the fix for decimal is clear: get rid of that locals call. ---------- stage: unit test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 13:53:48 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Jul 2010 11:53:48 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1277985228.53.0.164610690997.issue9136@psf.upfronthosting.co.za> Mark Dickinson added the comment: > it looks like 'locals()' is somewhat magical ... and Objects/frameobject.c is the place to go for a full understanding. PyFrame_FastToLocals is the 'updating' function that updates the locals dict from the 'fast locals' object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 14:59:57 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Jul 2010 12:59:57 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1277989197.45.0.409453397761.issue9136@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch. It's a little ugly, but I don't see a better way that avoids locals(). Using **kwargs is an option, but would mean abandoning the current nice feature that unexpected keyword arguments raise TypeError (or alternatively, implementing that check separately). This should be backported to 2.x after 2.7 has been released; for that backport, the dictionary comprehensions should be replaced by dict(), so that the code remains valid with older Python versions. ---------- keywords: +patch stage: needs patch -> commit review versions: +Python 2.6, Python 2.7, Python 3.2 Added file: http://bugs.python.org/file17825/issue9136.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 15:42:56 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 01 Jul 2010 13:42:56 +0000 Subject: [issue8324] add a distutils test command In-Reply-To: <1270509574.31.0.218772255625.issue8324@psf.upfronthosting.co.za> Message-ID: <1277991776.83.0.200646962834.issue8324@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> accepted stage: -> needs patch versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 15:54:22 2010 From: report at bugs.python.org (John Van Praag) Date: Thu, 01 Jul 2010 13:54:22 +0000 Subject: [issue9126] errors='replace' does not work at Windows command line In-Reply-To: <1277936955.22.0.824130437647.issue9126@psf.upfronthosting.co.za> Message-ID: <1277992458.12398.1382824513@webmail.messagingengine.com> John Van Praag added the comment: According to the documentation of the open function: errors is an optional string that specifies how encoding and decoding errors are to be handled?this cannot be used in binary mode. Pass 'strict' to raise a ValueError exception if there is an encoding error (the default of None has the same effect), or pass 'ignore' to ignore errors. (Note that ignoring encoding errors can lead to data loss.) 'replace' causes a replacement marker (such as '?') to be inserted where there is malformed data. If a replacement marker such as '?' were replacing the bad characters, the print function would not have a problem. The open function is not working as described in the documentation. On Wed, 30 Jun 2010 22:29 +0000, "Ezio Melotti" wrote: > > Ezio Melotti added the comment: > > The problem is not in the reading part, but in the print(). > Since the default encoding of your terminal is cp437 and cp437 is not > able to encode the "bad character" (U+2019 RIGHT SINGLE QUOTATION MARK), > an error is raised. > > ---------- > nosy: +ezio.melotti > resolution: -> invalid > stage: -> committed/rejected > status: open -> closed > type: -> behavior > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 16:00:54 2010 From: report at bugs.python.org (Thomas Jollans) Date: Thu, 01 Jul 2010 14:00:54 +0000 Subject: [issue8990] array constructor and array.fromstring should accept bytearray. In-Reply-To: <1276458174.59.0.784735349158.issue8990@psf.upfronthosting.co.za> Message-ID: <1277992854.27.0.362824451503.issue8990@psf.upfronthosting.co.za> Thomas Jollans added the comment: Two more patches: Firstly, this patch (array_3.2_fromstring.diff) is nearly identical to array2.diff. "y*" would (again) have to be changed to "s*" to apply this to 3.1 ---------- Added file: http://bugs.python.org/file17826/array_3.2_fromstring.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 16:04:10 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 01 Jul 2010 14:04:10 +0000 Subject: [issue9126] errors='replace' does not work at Windows command line In-Reply-To: <1277911366.4.0.473449546724.issue9126@psf.upfronthosting.co.za> Message-ID: <1277993050.06.0.4980030799.issue9126@psf.upfronthosting.co.za> R. David Murray added the comment: The characters are fine when you read them (that is, they decode correctly to unicode). They are only invalid when you write them to the windows terminal, which can't handle all the valid characters that are in the file. The Idle output window uses a more capable character set, and can display those characters. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 16:09:19 2010 From: report at bugs.python.org (Thomas Jollans) Date: Thu, 01 Jul 2010 14:09:19 +0000 Subject: [issue8990] array constructor and array.fromstring should accept bytearray. In-Reply-To: <1276458174.59.0.784735349158.issue8990@psf.upfronthosting.co.za> Message-ID: <1277993359.13.0.652309160739.issue8990@psf.upfronthosting.co.za> Thomas Jollans added the comment: Secondly, this is my attempt to add the more sensibly named {to|from}bytes methods, and to deprecate {to|from}string. I doubt it's perfect, maybe there's some policy on deprecating methods that I didn't find? This may be better discussed in a separate forum, eg a separate issue or python-dev maybe? I wouldn't know. The unpatched test suite passes with the rest of this patch applied. (unless using -Werror) ---------- Added file: http://bugs.python.org/file17827/tofrombytes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 16:13:56 2010 From: report at bugs.python.org (Eric Smith) Date: Thu, 01 Jul 2010 14:13:56 +0000 Subject: [issue8595] Explain the default timeout in http-client-related libraries In-Reply-To: <1272768884.43.0.28527344604.issue8595@psf.upfronthosting.co.za> Message-ID: <1277993636.77.0.206397704703.issue8595@psf.upfronthosting.co.za> Eric Smith added the comment: I think you could preserve backward compatibility by doing something like the following (in httplib): _sentinel = object() __HTTP_DEFAULT_TIMEOUT = _sentinel In httplib.HTTPConnection.__init__(), in Python 2.6. def __init__(self, host, port=None, strict=None, timeout=None): if timeout is None: if _HTTP_DEFAULT_TIMEOUT is _sentinel: timeout = socket._GLOBAL_DEFAULT_TIMEOUT else: timeout = _HTTP_DEFAULT_TIMEOUT That way, if _HTTP_DEFAULT_TIMEOUT is never set, it will use the the socket timeout. Admittedly I'd rather see all uses of module globals go away, but I think this would be a good compromise. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 16:23:13 2010 From: report at bugs.python.org (Thomas Jollans) Date: Thu, 01 Jul 2010 14:23:13 +0000 Subject: [issue8990] array constructor and array.fromstring should accept bytearray. In-Reply-To: <1276458174.59.0.784735349158.issue8990@psf.upfronthosting.co.za> Message-ID: <1277994193.44.0.578143055149.issue8990@psf.upfronthosting.co.za> Changes by Thomas Jollans : Added file: http://bugs.python.org/file17828/tofrombytes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 16:23:18 2010 From: report at bugs.python.org (Thomas Jollans) Date: Thu, 01 Jul 2010 14:23:18 +0000 Subject: [issue8990] array constructor and array.fromstring should accept bytearray. In-Reply-To: <1276458174.59.0.784735349158.issue8990@psf.upfronthosting.co.za> Message-ID: <1277994198.16.0.141256446093.issue8990@psf.upfronthosting.co.za> Changes by Thomas Jollans : Removed file: http://bugs.python.org/file17827/tofrombytes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 16:28:58 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 01 Jul 2010 14:28:58 +0000 Subject: [issue9104] test_exceptions does not test pickling with pickle.py In-Reply-To: <1277741892.3.0.0849773844587.issue9104@psf.upfronthosting.co.za> Message-ID: <1277994538.26.0.802894816163.issue9104@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > You can make the dictionary values as lists for the 'blocked' > argument for import_fresh_module(). That would work [for io]. I don't understand how having multiple modules in the blocked list will help in io case. io.py will simply not work if _io is blocked. It does not use "define in Python, override with native if available" strategy. Instead, io.py and _pyio.py are independent complete implementations. I don't like that approach because it makes pure python code hard to discover. In the recent discussions, some people were in fact surprised to learn that pure python io implementation is still available. The io/_pyio approach also prevents io.py from bring used by alternative python implementations unmodified. What I can do, is to add an optional "blocked" argument import_module_implementations() along the lines of def import_module_implementations(name, blocked=None): if blocked is None: blocked = ('_' + name,) ... This will not solve the io issue, but will add some flexibility. Note that import_module_implementations() as designed is not very useful for tests of the named module itself. In that case you need the implementations individually rather than as a list. This is mostly useful in situations like pickle where other modules are tested for interoperability with alternative pickle implementations. Of course, I should document the mechanism once we agree on what it should be. :-) (I did not know that test.support had a reST document, but will update it for this patch.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 17:04:50 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Thu, 01 Jul 2010 15:04:50 +0000 Subject: [issue8939] Use C type names (PyUnicode etc;) in the C API docs In-Reply-To: <1276002876.44.0.334392966089.issue8939@psf.upfronthosting.co.za> Message-ID: <1277996690.81.0.0291170086689.issue8939@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: +1 on using the full name, PyUnicodeObject The shorthand "PyUnicode" is too easy to confuse with Py_UNICODE (an actual type). ---------- nosy: +stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 17:12:42 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Thu, 01 Jul 2010 15:12:42 +0000 Subject: [issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping In-Reply-To: <1277997162.2.0.246195895629.issue9137@psf.upfronthosting.co.za> Message-ID: <1277997162.2.0.246195895629.issue9137@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : Simple example, using collections.OrderedDict: >>> import collections >>> x = collections.OrderedDict() >>> x.update(red=5, blue=6, other=7) Traceback (most recent call last): File "", line 1, in File "/usr/local/bin/../stow/Python-3.1.1/lib/python3.1/_abcoll.py", line 490, in update for key, value in other: TypeError: 'int' object is not iterable In MutableMapping.update, the first argument needs to be a positional-only argument. Otherwise, it's impossible to use "other" as keyword argument to designate a key-value pair. ---------- assignee: stutzbach messages: 109055 nosy: stutzbach priority: normal severity: normal stage: needs patch status: open title: x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 17:42:58 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 01 Jul 2010 15:42:58 +0000 Subject: [issue8939] Use C type names (PyUnicode etc;) in the C API docs In-Reply-To: <1276002876.44.0.334392966089.issue8939@psf.upfronthosting.co.za> Message-ID: <1277998978.72.0.968911408057.issue8939@psf.upfronthosting.co.za> ?ric Araujo added the comment: To avoid the strange-looking ?a PyUnicodeObject object?, one can write ?an instance of PyUnicodeObject?. Victor, have you kept the ```` around 0 and 1? ---------- resolution: -> accepted stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 18:03:33 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Jul 2010 16:03:33 +0000 Subject: [issue8939] Use C type names (PyUnicode etc;) in the C API docs In-Reply-To: <1277998978.72.0.968911408057.issue8939@psf.upfronthosting.co.za> Message-ID: <1278000208.3211.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > To avoid the strange-looking ?a PyUnicodeObject object?, one can write > ?an instance of PyUnicodeObject?. Or simply "a PyUnicodeObject". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 18:09:06 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Jul 2010 16:09:06 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278000546.87.0.940295534711.issue7989@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > In any case, my threshold for moving this forward is for someone to > review the code in sandbox. Ok some comments: - I find the _cmp() and __cmp() indirection poor style in 3.x, especially when you simply end up comparing self._getstate() and other._getstate() (it is also suboptimal because it can do more comparisons than needed) - Shouldn't __eq__ and friends return NotImplemented if the other type mismatches, to give the other class a chance to implement its own comparison method? that's what built-in types do, as least (this would also make _cmperror useless) - Using assert to check arguments is bad. Either there's a risk of bad input, and you should raise a proper error (for example ValueError), or there is none and the assert can be left out. - Starting _DAYS_IN_MONTH with a None element and then iterating over _DAYS_IN_MONTH[1:] looks quirky - Using double-underscored names such as __day is generally discouraged, simple-underscored names (e.g. _day) should be preferred - Some comments about "CPython compatibility" should be removed - Some other comments should be reconsidered or removed, such as "# XXX The following should only be used as keyword args" or "XXX Buggy in 2.2.2" - Some things are inconsistent: date uses bytes for pickle support, time uses str for the same purpose ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 18:18:35 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Jul 2010 16:18:35 +0000 Subject: [issue9104] test_exceptions does not test pickling with pickle.py In-Reply-To: <1277994538.26.0.802894816163.issue9104@psf.upfronthosting.co.za> Message-ID: <1278001111.3211.9.camel@localhost.localdomain> Antoine Pitrou added the comment: > > You can make the dictionary values as lists for the 'blocked' > > argument for import_fresh_module(). That would work [for io]. > > I don't understand how having multiple modules in the blocked list > will help in io case. io.py will simply not work if _io is blocked. Which you avoid by giving an empty list of blocked modules, using Alexandre's suggestion. > I don't like that approach because it makes pure python code hard to > discover. Ok, but this code exists and it would be much better if it were supported. > The io/_pyio approach also prevents io.py from bring used by > alternative python implementations unmodified. It would be foolish to use it unmodified anyway, unless you like low-speed I/O (and a JIT isn't a magic bullet). The reason this was done like this is that the io module is imported at startup: we want to avoid unnecessary parsing of extraneous code (and unnecessary importing additional dependencies), and we also want to reduce opportunities for failing to initialize the standard I/O streams (especially stderr...). > This will not solve the io issue, but will add some flexibility. Which is pointless unless such flexibility is needed by someone. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 18:37:33 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 01 Jul 2010 16:37:33 +0000 Subject: [issue9104] test_exceptions does not test pickling with pickle.py In-Reply-To: <1277741892.3.0.0849773844587.issue9104@psf.upfronthosting.co.za> Message-ID: <1278002253.89.0.320741425014.issue9104@psf.upfronthosting.co.za> R. David Murray added the comment: Please don't update the reST document. The support module should never have been documented outside the module itself, because now we are pretty much committed to otherwise needless backward compatibility for the stuff that is documented. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 18:42:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 01 Jul 2010 16:42:40 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278002560.76.0.579280516538.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Thanks a lot for the review. Please see my replies below. On Thu, Jul 1, 2010 at 12:09 PM, Antoine Pitrou wrote: .. > - I find the _cmp() and __cmp() indirection poor style in 3.x, > especially when you simply end up comparing self._getstate() and > other._getstate() (it is also suboptimal because it can do more > comparisons than needed) > I agree. Do you think I should just define __lt__ and use functools.total_ordering decorator? Note that current implementation mimics what is done in C, but I think python should drive what is done in C and not the other way around. > - Shouldn't __eq__ and friends return NotImplemented if the other type > mismatches, to give the other class a chance to implement its own > comparison method? that's what built-in types do, as least > (this would also make _cmperror useless) This is a tricky part. See issue #5516. I would rather not touch it unless we want to revisit the whole comparison design. > > - Using assert to check arguments is bad. Either there's a risk of bad > input, and you should raise a proper error (for example ValueError), > or there is none and the assert can be left out. > I disagree. Asserts as executable documentation are good. I know, -O is disfavored in python, but still you can use it to disable asserts. Also I believe most of the asserts are the same in C version. > - Starting _DAYS_IN_MONTH with a None element and then iterating over > _DAYS_IN_MONTH[1:] looks quirky > Would you rather start with 0 and iterate over the whole list? It may be better to just define it as a literal list display. That's what C code does. > - Using double-underscored names such as __day is generally > discouraged, simple-underscored names (e.g. _day) should be preferred > I think in this case double-underscored names are justified. Pickle/cPickle experience shows that people tend to abuse the freedom that python implementations give to subclasses and then complain that C version does not work for them. I think __ name mangling will be a better deterrent than _ is private convention. > - Some comments about "CPython compatibility" should be removed > Why? The goal is to keep datetime.py in sync with datetimemodule.c, not to replace the C implementation. C implementation will still be definitive. > - Some other comments should be reconsidered or removed, such as > "# XXX The following should only be used as keyword args" This one I was actually thinking about making mandatory by changing the signature to use keyword only arguments. I am not sure if that is well supported by C API, though. > or "XXX Buggy in 2.2.2" Yes, a review of XXXs is in order. > > - Some things are inconsistent: date uses bytes for pickle support, > time uses str for the same purpose Already fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 19:52:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 01 Jul 2010 17:52:59 +0000 Subject: [issue9104] test_exceptions does not test pickling with pickle.py In-Reply-To: <1277741892.3.0.0849773844587.issue9104@psf.upfronthosting.co.za> Message-ID: <1278006779.13.0.393666567821.issue9104@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: On Thu, Jul 1, 2010 at 12:18 PM, Antoine Pitrou wrote: .. >> I don't understand how having multiple modules in the blocked list >> will help in io case. ?io.py will simply not work if _io is blocked. > > Which you avoid by giving an empty list of blocked modules, using > Alexandre's suggestion. > Yes, you can make import_module_implementations('io') return [io] this way, but what the user is likely to expect would be [io, _pyio]. I understand that there are reasons to keep io the way it is, but most of the other modules should probably follow pickle approach. In any case, testing alternative io implementations is easy. No import block trickery is needed - just import io and _pyio separately. I just don't like the idea of having test.support know details about other modules and would like to have a clear use case before doing anything more sophisticated than blocking '_' + name. If we end up with a central registry of native optimizations, it should probably not be in test.support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 20:08:33 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 01 Jul 2010 18:08:33 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278007713.08.0.154611033228.issue7989@psf.upfronthosting.co.za> R. David Murray added the comment: If they abuse the _ methods and complain that the C version doesn't work, we just say "we *told* you not to do that". It is not the Python philosophy to try to protect users from mistakes that they wilfully make. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 20:19:26 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 01 Jul 2010 18:19:26 +0000 Subject: [issue1643370] recursive urlparse Message-ID: <1278008366.16.0.595169362587.issue1643370@psf.upfronthosting.co.za> Senthil Kumaran added the comment: David, Is the stage "unit test needed" proper for this or was it by mistake? Anatoly, I thought closing this feature request was fine, because I considered that with namedtuple the desired attributes of url's were obtained as ParsedTuple object (check test_urlsplit_attributes in test_urlparse.py). But as you pointed out, I can see that the docs can be improved further. Your suggested approach of dictionary is bit different than the way it is currently implemented, a patch might have helped for evaluation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 20:32:30 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 01 Jul 2010 18:32:30 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278009150.51.0.534065680737.issue9136@psf.upfronthosting.co.za> Stefan Krah added the comment: Mark, the patch looks good. I don't find it ugly, but anyway, here's a bike shed version. :) The main point is that I'd like the flags and traps sections to be set apart visually while compressing the boilerplate. ---------- Added file: http://bugs.python.org/file17829/issue9136-blue-bikeshed.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 20:47:14 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Jul 2010 18:47:14 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278010034.76.0.599804396641.issue9136@psf.upfronthosting.co.za> Mark Dickinson added the comment: Nice shade of blue! Just a couple of red spots that I'd prefer repainted, namely: (1) please put bodies of 'try:' and 'except:' on separate lines, and (2) please use 'except NameError' instead of a bare except. And a couple of points that I think also applied to my patch: - {s: 0 for s in _signals} could also be spelt dict.fromkeys(_signals, 0) - I think dict(dc.traps) should be dc.traps.copy() instead. I can't entirely see why it would matter, except that it's conceivable that dc.traps could by a dict subclass with its own copy method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 21:06:10 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 01 Jul 2010 19:06:10 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278011170.41.0.385538421867.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > R. David Murray added the comment: > > If they abuse the _ methods and complain that the C version doesn't > work, we just say "we *told* you not to do that". ?It is not the Python > philosophy to try to protect users from mistakes that they willfully > make. Let me think some more about this. Given double underscores in special methods, changing this is not a simple s/__/_/ throughout the file. I am not sure _ clearly signals "don't use in subclasses": that's what __ is for. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 21:11:45 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Jul 2010 19:11:45 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278011505.98.0.98515007982.issue9136@psf.upfronthosting.co.za> Mark Dickinson added the comment: Stefan, one other thought: please also bear in mind that we're restricted to Python 2.3 syntax in the 2.x version of decimal, so any post-Python 2.3-isms will have to be rewritten when the patch is backported. (E.g., use of conditional expressions.) While I don't see any particular reason for the 3.x version of decimal to restrict its syntax in this manner, it might be worth sticking to simple syntax just so that the 2.x and 3.x decimal versions don't differ too much, to make maintenance easier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 21:13:49 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Jul 2010 19:13:49 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1278002560.76.0.579280516538.issue7989@psf.upfronthosting.co.za> Message-ID: <1278011624.3211.24.camel@localhost.localdomain> Antoine Pitrou added the comment: > I agree. Do you think I should just define __lt__ and use > functools.total_ordering decorator? I had forgotten about functools.total_ordering. Yes, very good idea. > Note that current implementation mimics what is done in C, but I > think python should drive what is done in C and not the other way > around. I think the Python version doesn't have to mimic every exact quirk of the C version. I think it's good if the code is idiomatic Python. > I disagree. Asserts as executable documentation are good. I am talking specifically about this kind of assert: assert 1 <= month <= 12, 'month must be in 1..12' I think it should be replaced with: if month < 1 or month > 12: raise ValueError('month must be in 1..12') I don't think it's reasonable to disable argument checking when -O is given. Furthermore, AssertionError is the wrong exception type for this. On the other hand, I do agree that most asserts in e.g. timedelta.__new__ are good. > > - Starting _DAYS_IN_MONTH with a None element and then iterating > over > > _DAYS_IN_MONTH[1:] looks quirky > > > Would you rather start with 0 and iterate over the whole list? It may > be better to just define it as a literal list display. That's what C > code does. Hmm, I wrote that comment before discovering that it is useful for actual data to start at index 1. You can forget this, sorry. > I think in this case double-underscored names are justified. > Pickle/cPickle experience shows that people tend to abuse the freedom > that python implementations give to subclasses and then complain that > C version does not work for them. Ah, but the Python datetime implementation will be automatically shadowed by the C one; you won't end up using it by mistake, so people should not ever rely on any of its implementation details. To give a point of reference, the threading module used the __attribute naming style for private attributes in 2.x, but it was converted to use the _attribute style in 3.x. (one genuine use for it, by the way, is to make it easy to test implementation-specific internal invariants in the test suite) > > - Some comments about "CPython compatibility" should be removed > > Why? The goal is to keep datetime.py in sync with datetimemodule.c, > not to replace the C implementation. Yes, but talking about CPython compatibility in the CPython source tree looks puzzling. You could reword these statements, e.g. "compatibility with the C implementation". > > - Some other comments should be reconsidered or removed, such as > > "# XXX The following should only be used as keyword args" > > This one I was actually thinking about making mandatory by changing > the signature to use keyword only arguments. That would be an API change and would break compatibility. Are you sure you want to do it? > I am not sure if that is well supported by C API, though. Not at all. You would have to analyze contents of the keywords dict manually. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 21:19:15 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 01 Jul 2010 19:19: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: <1278011955.17.0.214797195057.issue8271@psf.upfronthosting.co.za> Ezio Melotti added the comment: Ported to py3k in r82413. Some test with non-BMP characters should probably be added. The patch should still be ported to 2.6 and 3.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 22:10:13 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 01 Jul 2010 20:10:13 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278015013.2.0.399437922857.issue9136@psf.upfronthosting.co.za> Stefan Krah added the comment: Mark, good point about 2.3 compatibility. The unit tests diverge quite a bit though between 2.5, 2.6 and 2.7. I like {s: 0 for s in _signals} slightly better here (but I like dict/list comprehensions in general). So, the new patch still sets the flags/traps sections apart, doesn't use the ternary construct and uses traps.copy(). IOW, I only painted the door blue. ;) ---------- Added file: http://bugs.python.org/file17830/issue9136-blue-bikeshed-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 22:39:28 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Jul 2010 20:39:28 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278016768.52.0.833055100753.issue9136@psf.upfronthosting.co.za> Mark Dickinson added the comment: Looks good to me. Please go ahead and apply it to the 3.2 and 3.1 branches, if you want. (Or just assign back to me if you prefer.) It should also be applied to 2.7 and 2.6, eventually, but we should probably wait until after the 2.7 release this weekend for that. ---------- assignee: mark.dickinson -> skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 22:58:55 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 01 Jul 2010 20:58:55 +0000 Subject: [issue1643370] recursive urlparse Message-ID: <1278017935.61.0.0595742991852.issue1643370@psf.upfronthosting.co.za> anatoly techtonik added the comment: Too bad that request from users who are not eligible to produce a patch are not accepted by Python "community". =/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 23:16:48 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 01 Jul 2010 21:16:48 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278019008.16.0.889192745156.issue9136@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Stylistically, it would be nice to eliminate the local variable reassignment entirely: self.Emin = DefaultContext.Emin if Emin is None else Emin self.Emax = DefaultContext.Emax if Emax is None else Emax self._ignored_flags = [] if _ignored_flags is None else _ignored_flags Also, to keep the code consistent between versions, it may be better to avoid set/dict comprehensions and stick with the old: dict([(s, int(s in flags)) for s in _signals]) or slightly more modern generator comprehension: dict((s, int(s in flags)) for s in _signals) ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 23:19:32 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Jul 2010 21:19:32 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278019172.34.0.840687221954.issue9136@psf.upfronthosting.co.za> Mark Dickinson added the comment: [Raymond] > self.Emin = DefaultContext.Emin if Emin is None else Emin I agree that looks better. But we can't spell it that way in 2.x (since conditional expressions aren't 2.3 compatible), and I'd prefer to keep the 2.x and 3.x versions reasonably close, at least while 2.x is still being maintained. Still, no strong feelings either way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 23:31:50 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 01 Jul 2010 21:31:50 +0000 Subject: [issue1643370] recursive urlparse Message-ID: <1278019910.83.0.421300989798.issue1643370@psf.upfronthosting.co.za> Georg Brandl added the comment: Why shouldn't you be eligible to produce patches to Python? And yes, requests without patches will sometimes take longer, or be evaluated differently, since we're all volunteers here, and an existing patch, even if unusable it the submitted form, often makes working on a request much more straightforward. Regarding your ironic quoting of the word "community" -- do not forget that you are part of the community, and what we are doing here is exactly what a community does as compared to a company: helping each other, not because of payment, but because we care for what we do. Please do not subvert that commitment. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 23:33:36 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 01 Jul 2010 21:33:36 +0000 Subject: [issue1643370] recursive urlparse Message-ID: <1278020016.24.0.762513236046.issue1643370@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 23:35:06 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 01 Jul 2010 21:35:06 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278020106.2.0.210509508191.issue9136@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm not sure that I care about 2.3 compatibility anymore (I was the one who made the rule about 2.3 compatibility and made sure that it was just a preference, not an absolute rule -- as time goes on, it is of less and less value). ISTM, 2.5 compatible is probably good enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 23:37:30 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 01 Jul 2010 21:37:30 +0000 Subject: [issue1643370] recursive urlparse Message-ID: <1278020250.88.0.874696153434.issue1643370@psf.upfronthosting.co.za> R. David Murray added the comment: Anatoly, when I said I was closing the issue for lack of interest, I meant that you had not produced a candidate patch, and no one else had shown any interest in creating one. If you wish to produce a candidate patch we can reopen the issue (though I do think a full blow URI/IRI module would be better). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 23:41:41 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Jul 2010 21:41:41 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278020501.43.0.374907284335.issue9136@psf.upfronthosting.co.za> Mark Dickinson added the comment: > ISTM, 2.5 compatible is probably good enough. Okay; that's fine with me. Now we can finally turn that "from_float = classmethod(from_float)" into a proper "@classmethod" decorator. :) I also don't think that the 2.x-to-3.x maintenance issue is that big a deal any more; it would be surprising if the 2.x version of Decimal sees anything more than minor changes (doc fixes, etc.) from this point on. So perhaps the 3.x version of the decimal module should be free to make full use of 3.x syntax? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 23:48:54 2010 From: report at bugs.python.org (Aahz) Date: Thu, 01 Jul 2010 21:48:54 +0000 Subject: [issue9138] Tutorial: classes intro paragraph icky In-Reply-To: <1278020934.41.0.867324522486.issue9138@psf.upfronthosting.co.za> Message-ID: <1278020934.41.0.867324522486.issue9138@psf.upfronthosting.co.za> New submission from Aahz : http://docs.python.org/dev/tutorial/classes.html Chapter 9 of the Tutorial contains this intro paragraph: Python's class mechanism adds classes to the language with a minimum of new syntax and semantics. It is a mixture of the class mechanisms found in C++ and Modula-3. As is true for modules, classes in Python do not put an absolute barrier between definition and user, but rather rely on the politeness of the user not to "break into the definition." The most important features of classes are retained with full power, however: the class inheritance mechanism allows multiple base classes, a derived class can override any methods of its base class or classes, and a method can call the method of a base class with the same name. Objects can contain an arbitrary amount of data. A coworker found particularly the third sentence incomprehensible, and even with ten years of Python under my belt, I can't say that it makes much more sense to me. I know what it must be trying to say and therefore proffer this suggested rewrite: Compared with other programming languages, Python's class mechanism adds classes with a minimum of new syntax and semantics. It is a mixture of the class mechanisms found in C++ and Modula-3. Python classes provide all the standard features of Object Oriented Programming: the class inheritance mechanism allows multiple base classes, a derived class can override any methods of its base class or classes, and a method can call the method of a base class with the same name. Objects can contain arbitrary amounts and kinds of data. As is true for modules, classes partake of the dynamic nature of Python; users of a class can modify or break the class definition even without changing the source code. ---------- assignee: docs at python components: Documentation messages: 109080 nosy: aahz, docs at python priority: critical severity: normal stage: patch review status: open title: Tutorial: classes intro paragraph icky type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 1 23:52:46 2010 From: report at bugs.python.org (Yuv Gre) Date: Thu, 01 Jul 2010 21:52:46 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1278020501.43.0.374907284335.issue9136@psf.upfronthosting.co.za> Message-ID: Yuv Gre added the comment: Now that we're on the subject of "from_float", I just recalled this slight issue: Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> >>> import decimal >>> x = decimal.Decimal() >>> decimal.Decimal.from_float(x) Traceback (most recent call last): File "", line 1, in File "C:\Python31\lib\decimal.py", line 687, in from_float n, d = abs(f).as_integer_ratio() AttributeError: 'Decimal' object has no attribute 'as_integer_ratio' >>> It seems from_float doesn't like it when a Decimal arrives. Personally, I think there should be an idiomatic way of saying "this number must be a Decimal" without an "isinstance". Should I open another ticket? ---------- Added file: http://bugs.python.org/file17831/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
Now that we're on the subject of "from_float", I just recalled this slight issue:

Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import decimal
>>> x = decimal.Decimal()
>>> decimal.Decimal.from_float(x)
Traceback (most recent call last):
????File "<stdin>", line 1, in <module>
????File "C:\Python31\lib\decimal.py", line 687, in from_float
???? ??n, d = abs(f).as_integer_ratio()
AttributeError: 'Decimal' object has no attribute 'as_integer_ratio'
>>>

It seems from_float doesn't like it when a Decimal arrives. Personally, I think there should be an idiomatic way of saying "this number must be a Decimal" without an "isinstance".

Should I open another ticket?
From report at bugs.python.org Thu Jul 1 23:59:41 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 01 Jul 2010 21:59:41 +0000 Subject: [issue9104] test_exceptions does not test pickling with pickle.py In-Reply-To: <1277741892.3.0.0849773844587.issue9104@psf.upfronthosting.co.za> Message-ID: <1278021581.89.0.880017326678.issue9104@psf.upfronthosting.co.za> R. David Murray added the comment: If not in test.support, then where? Unless there's some reason for user code or other implementations (or stdlib code itself) to access that map, it seems to me that test.support is exactly where it belongs. Generic test support (that isn't specific to Python/stdlib testing) should go in unittest (and yes there is stuff currently in test.support that should move to unittest after suitable improvement and discussion...there's an issue about that.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 00:07:05 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 01 Jul 2010 22:07:05 +0000 Subject: [issue9138] Tutorial: classes intro paragraph icky In-Reply-To: <1278020934.41.0.867324522486.issue9138@psf.upfronthosting.co.za> Message-ID: <1278022025.43.0.7669022587.issue9138@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 on the new wording. Nits: * Since many OOP languages don't support multiple inheritance, I don't think we can call multiple inheritance one of the "standard features of Object Oriented Programming". * Eventhough the wording is an improvement, I don't see how this could be prioritized as "critical". ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 00:56:07 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 01 Jul 2010 22:56:07 +0000 Subject: [issue9138] Tutorial: classes intro paragraph icky In-Reply-To: <1278020934.41.0.867324522486.issue9138@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: Much better definition. I stripped it down a little to avoid "mechanism" repetition. Compared with other programming languages, Python provides object oriented approach with a minimum of new syntax and semantics. Its class mechanism is a mixture of concepts found in C++ and Modula-3. Python classes can be inherited from multiple base classes, a derived class can override any methods of its base class or classes, and a method can call the method of a base class with the same name. Objects can contain arbitrary amounts and kinds of data. As is true for modules, classes partake of the dynamic nature of Python; users of a class can modify or break the class definition even without changing the source code. However, the sentence about arbitrary amounts and kinds of data seems strange to me. I would like to see it like "In comparison to XXX where there is limitation that YYY Python objects can contain arbitrary amounts and kinds of data." "users of a class can modify or break the class definition even without changing the source code." doesn't sound right to me. How can I *break* the class definition? Maybe it was meant to The dynamic nature of Python allows new classes to be defined and existing classes modified at run-time. ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 02:18:00 2010 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 02 Jul 2010 00:18:00 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1278029880.26.0.503271748475.issue5673@psf.upfronthosting.co.za> Dave Malcolm added the comment: The patch has bitrotted somewhat; I've had a go at reworking it so it applies against the latest version of trunk (r82429). All tests pass (or are skipped) on this x86_64 Linux box --with-pydebug (Fedora 13) There are still some TODOs in the code: Popen.wait(): # TODO(rnk): Test this on Windows. Popen._communicate(): # TODO: Somebody needs to research what happens to those # threads if they are still running. Also, what happens if # you close a file descriptor on Windows in one thread? # Will it interrupt the other, or does the other keep its # own handle? ---------- nosy: +dmalcolm Added file: http://bugs.python.org/file17832/subprocess-timeout-v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 03:04:42 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 02 Jul 2010 01:04:42 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278032682.23.0.95110487935.issue9136@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I also don't think that the 2.x-to-3.x maintenance issue > is that big a deal any more; it would be surprising if > the 2.x version of Decimal sees anything more than minor > changes (doc fixes, etc.) from this point on. So perhaps > the 3.x version of the decimal module should be free to > make full use of 3.x syntax? I would like to still leave us at 2.5 compatible. The internal comments promise that spec updates will be treated as bug fixes. This is all the more likely if 2.7 is the last, but long lived version in the 2.x series. Besides, I don't think the set comprehension notation was a big win in readability over what is there now :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 04:43:09 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 02 Jul 2010 02:43:09 +0000 Subject: [issue9139] Add examples for str.format() In-Reply-To: <1278038589.68.0.873296098752.issue9139@psf.upfronthosting.co.za> Message-ID: <1278038589.68.0.873296098752.issue9139@psf.upfronthosting.co.za> New submission from Ezio Melotti : The attached patch adds a section with examples about str.format() after http://docs.python.org/library/string.html#format-specification-mini-language . The patch needs some small improvements: 1) the examples in the previous sections could be removed and/or a link to the new section could be added; 2) the last example could be improved; 3) another example using custom formats (e.g. for datetime) should be added; I'd like to have this in 2.7 (Benjamin said it's OK), please review. ---------- assignee: ezio.melotti components: Documentation files: issue9139.diff keywords: patch messages: 109087 nosy: benjamin.peterson, eric.smith, ezio.melotti priority: high severity: normal stage: patch review status: open title: Add examples for str.format() versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file17833/issue9139.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 04:59:11 2010 From: report at bugs.python.org (Craig McQueen) Date: Fri, 02 Jul 2010 02:59:11 +0000 Subject: [issue1596321] KeyError at exit after 'import threading' in other thread Message-ID: <1278039551.66.0.421353986422.issue1596321@psf.upfronthosting.co.za> Craig McQueen added the comment: A follow-on re the cx_Freeze issue: I looked at the source code, and found it doesn't seem to be doing any thread creation. But I found that in the initscripts/Console.py, there are the following lines: if sys.version_info[:2] >= (2, 5): module = sys.modules.get("threading") if module is not None: module._shutdown() If these lines are commented-out, then the error message at exit does not occur. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 06:53:43 2010 From: report at bugs.python.org (Peter Froehlich) Date: Fri, 02 Jul 2010 04:53:43 +0000 Subject: [issue9140] SocketServer.BaseRequestHandler not a new-style class? In-Reply-To: <1278046422.83.0.363442370038.issue9140@psf.upfronthosting.co.za> Message-ID: <1278046422.83.0.363442370038.issue9140@psf.upfronthosting.co.za> New submission from Peter Froehlich : I tried to do this: class Handler(SimpleHTTPRequestHandler): def do_GET(self): super(Handler, self).do_GET() print self.path However super fails: TypeError: super() argument 1 must be type, not classobj Looking up the chain of base classes, I found that SocketServer.BaseRequestHandler is defined as follows: class BaseRequestHandler: No "(object)" there to make it a new-style class. I think that's wrong? BTW, in the 3.1 library it's defined the same way, but I'd assume that all classes are "new-style" in 3.1? ---------- components: Library (Lib) messages: 109089 nosy: phf priority: normal severity: normal status: open title: SocketServer.BaseRequestHandler not a new-style class? type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 09:16:11 2010 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 02 Jul 2010 07:16:11 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1278054971.02.0.516847225419.issue2986@psf.upfronthosting.co.za> Eli Bendersky added the comment: The new "junk heuristic" has been added to difflib.py in SVN revision 26661 in 2002 (which is, incidentally, the last revision to modify difflib.py). Its commit log says: --------------------------------------------- Mostly in SequenceMatcher.{__chain_b, find_longest_match}: This now does a dynamic analysis of which elements are so frequently repeated as to constitute noise. The primary benefit is an enormous speedup in find_longest_match, as the innermost loop can have factors of 100s less potential matches to worry about, in cases where the sequences have many duplicate elements. In effect, this zooms in on sequences of non-ubiquitous elements now. While I like what I've seen of the effects so far, I still consider this experimental. Please give it a try! --------------------------------------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 09:38:05 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Jul 2010 07:38:05 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278056285.84.0.363507643525.issue9136@psf.upfronthosting.co.za> Mark Dickinson added the comment: 2.5 compatibility is fine for the 2.x version of decimal.py. For the 3.x version of decimal.py, I don't see what it buys us. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 10:52:59 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Jul 2010 08:52:59 +0000 Subject: [issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping In-Reply-To: <1277997162.2.0.246195895629.issue9137@psf.upfronthosting.co.za> Message-ID: <1278060779.77.0.053827403995.issue9137@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 11:35:28 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Jul 2010 09:35:28 +0000 Subject: [issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping In-Reply-To: <1277997162.2.0.246195895629.issue9137@psf.upfronthosting.co.za> Message-ID: <1278063328.81.0.953001030858.issue9137@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a fix. ---------- keywords: +patch nosy: +rhettinger Added file: http://bugs.python.org/file17834/issue9137.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 11:43:54 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 02 Jul 2010 09:43:54 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278063834.14.0.462069512699.issue9136@psf.upfronthosting.co.za> Changes by Stefan Krah : Removed file: http://bugs.python.org/file17831/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 11:45:20 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 02 Jul 2010 09:45:20 +0000 Subject: [issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping In-Reply-To: <1277997162.2.0.246195895629.issue9137@psf.upfronthosting.co.za> Message-ID: <1278063920.82.0.834591135102.issue9137@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: And what about this? >>> x.update(self=5) ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 11:48:03 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Jul 2010 09:48:03 +0000 Subject: [issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping In-Reply-To: <1277997162.2.0.246195895629.issue9137@psf.upfronthosting.co.za> Message-ID: <1278064083.18.0.166848883039.issue9137@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ah. Good point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 12:05:01 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Jul 2010 10:05:01 +0000 Subject: [issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping In-Reply-To: <1277997162.2.0.246195895629.issue9137@psf.upfronthosting.co.za> Message-ID: <1278065101.25.0.496086592397.issue9137@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated patch, to deal with 'self' correctly too. ---------- stage: needs patch -> patch review Added file: http://bugs.python.org/file17835/issue9137_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 12:34:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 02 Jul 2010 10:34:25 +0000 Subject: [issue9139] Add examples for str.format() In-Reply-To: <1278038589.68.0.873296098752.issue9139@psf.upfronthosting.co.za> Message-ID: <1278066865.5.0.827482355788.issue9139@psf.upfronthosting.co.za> ?ric Araujo added the comment: The examples seem good to me after a quick reading. There?s not too much but still enough. I find the phrasing of the versionchanged not easily understandable: ?The position of the arguments can now be omitted.? Clearer and probably too verbose: ?When using numeric placeholders that follow the order of the positional arguments, you can omit the numbers: '{} {!s}' is equivalent to '{0} {1!s}'? ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 12:38:13 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 02 Jul 2010 10:38:13 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278067093.62.0.439983597956.issue9136@psf.upfronthosting.co.za> Stefan Krah added the comment: In the new patches I reinstated the ternary construct. I think it would be nice to use dict comprehensions in py3k. People read the stdlib for guidance, and it would help if ultimately only the most concise idioms remained in py3k. If I'm not mistaken, quite often the unit tests already use the latest constructs available. That said, there are always issues that only become apparent after maintaining a module for years, so I guess I'll wait for a decision. ---------- Added file: http://bugs.python.org/file17836/issue9136-py3k-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 12:38:32 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 02 Jul 2010 10:38:32 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278067112.2.0.501202521484.issue9136@psf.upfronthosting.co.za> Changes by Stefan Krah : Added file: http://bugs.python.org/file17837/issue9136-trunk-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 12:41:08 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 02 Jul 2010 10:41:08 +0000 Subject: [issue1152248] Enhance file.readlines by making line separator selectable Message-ID: <1278067268.22.0.105813838702.issue1152248@psf.upfronthosting.co.za> ?ric Araujo added the comment: Ralph, core developers have not rejected this idea. It needs a patch now (even rough) to get the discussion further. ---------- components: +Library (Lib) -Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 13:30:12 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 02 Jul 2010 11:30:12 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> Message-ID: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson : The GC module currently relies only on the presence of a __del__ method to decide if an object can be safely collected at all. Also, there is a special case for generator objects. This patch allows any object to call an api during its traversal, PyObject_GC_Collectable(), to indicate whether it is fit to be collected at this time, overriding any presence of a __del__ method or not. This mechanism is being put in place in stackless python 2.7 because tasklets cannot always be collected depending on their runtime state, and I thought this might be a useful addition for regular python, especially since there already is such a dynamic special case for generator objects. ---------- components: Interpreter Core files: gc_collectable.patch keywords: needs review, patch, patch messages: 109099 nosy: krisvale priority: normal severity: normal status: open title: Allow objects to decide if they can be collected by GC type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file17838/gc_collectable.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 13:40:31 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 02 Jul 2010 11:40:31 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> Message-ID: <1278070831.6.0.537863806152.issue9141@psf.upfronthosting.co.za> Antoine Pitrou added the comment: First, what's the use case? Just backporting an internal Stackless API isn't a reasonable request. Second, this tells that there *is* a finalization function, but not what the function is. How is the GC supposed to find it? Third, the implementation looks quite suboptimal. Better define a new slot method, such as tp_needs_finalizing, or tp_get_finalizer. ---------- nosy: +pitrou, tim_one _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 13:45:27 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 02 Jul 2010 11:45:27 +0000 Subject: [issue5468] urlencode does not handle "bytes", and could easily handle alternate encodings In-Reply-To: <1236696316.6.0.478633045289.issue5468@psf.upfronthosting.co.za> Message-ID: <1278071127.56.0.460567556086.issue5468@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I see no problem in going ahead with the suggestion proposed and the patch. - I checked with RFC3986 Section 2.5 http://labs.apache.org/webarch/uri/rfc/rfc3986.html#identifying-data Relevant line: When a new URI scheme defines a component that represents textual data consisting of characters from the Universal Character Set [UCS], the data should first be encoded as octets according to the UTF-8 character encoding [STD63]; then only those octets that do not correspond to characters in the unreserved set should be percent-encoded. - This is done already in quote and quote_plus. - It just boils down to urlencode also providing the same facility for query strings and that was the point of this bug report. Jeremy, I shall go ahead with this and do the modifications, if required. ---------- assignee: jhylton -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 13:53:47 2010 From: report at bugs.python.org (Scott Dial) Date: Fri, 02 Jul 2010 11:53:47 +0000 Subject: [issue6507] Enhance dis.dis to autocompile codestrings In-Reply-To: <1247857575.21.0.389925271165.issue6507@psf.upfronthosting.co.za> Message-ID: <1278071627.46.0.121838298505.issue6507@psf.upfronthosting.co.za> Scott Dial added the comment: > disassemble_str should be private with an underscore. disassemble_string should've been private as well, while we are editing this module. ---------- nosy: +scott.dial _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 14:22:49 2010 From: report at bugs.python.org (rajesh) Date: Fri, 02 Jul 2010 12:22:49 +0000 Subject: [issue9142] while executing python In-Reply-To: <1278073368.88.0.141531066285.issue9142@psf.upfronthosting.co.za> Message-ID: <1278073368.88.0.141531066285.issue9142@psf.upfronthosting.co.za> New submission from rajesh : while executing the python file: python sercon.py It Displays the below error.kindly provide me the solution. Updated the Configparser log Exception in Tkinter callback Traceback (most recent call last): File "/usr/local/lib/python2.3/lib-tk/Tkinter.py", line 1345, in __call__ return self.func(*args) File "/ug6/RAJESH/finacle/TParty/lib/python2.3/site-packages/Pmw/Pmw_1_1/lib/PmwPanedWidget.py", line 307, in _handleConfigure self._getNaturalSizes() File "/ug6/RAJESH/finacle/TParty/lib/python2.3/site-packages/Pmw/Pmw_1_1/lib/PmwPanedWidget.py", line 338, in _getNaturalSizes bw = string.atoi(self.cget('hull_borderwidth')) File "/usr/local/lib/python2.3/string.py", line 220, in atoi return _int(s, base) TypeError: int() can't convert non-string with explicit base Traceback (most recent call last): File "sercon.py", line 264, in ? prodname,primaryIP,flag1 = displayScreen1(prodname,primaryIP) File "sercon.py", line 141, in displayScreen1 widget = screen1.screen1(root,prodname,prodprimaryIP) File "/ug6/RAJESH/finacle/app/base/sercon/tools/screen1.py", line 228, in __init__ self.panes.configurepane('IPAddresses',size = 0.35) File "/ug6/RAJESH/finacle/TParty/lib/python2.3/site-packages/Pmw/Pmw_1_1/lib/PmwPanedWidget.py", line 521, in configurepane self._handleConfigure() File "/ug6/RAJESH/finacle/TParty/lib/python2.3/site-packages/Pmw/Pmw_1_1/lib/PmwPanedWidget.py", line 307, in _handleConfigure self._getNaturalSizes() File "/ug6/RAJESH/finacle/TParty/lib/python2.3/site-packages/Pmw/Pmw_1_1/lib/PmwPanedWidget.py", line 338, in _getNaturalSizes bw = string.atoi(self.cget('hull_borderwidth')) File "/ug6/RAJESH/finacle/TParty/lib/python2.3/string.py", line 220, in atoi return _int(s, base) TypeError: int() can't convert non-string with explicit base ---------- messages: 109103 nosy: rajesh.chandran priority: normal severity: normal status: open title: while executing python type: compile error versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 14:33:32 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Jul 2010 12:33:32 +0000 Subject: [issue9142] while executing python In-Reply-To: <1278073368.88.0.141531066285.issue9142@psf.upfronthosting.co.za> Message-ID: <1278074012.49.0.444120514895.issue9142@psf.upfronthosting.co.za> Mark Dickinson added the comment: Sorry; this tracker is for reporting bugs in Python, not for getting help with your own Python code. There are other places you might be able to get help, for example the python-list mailing list[1], which is also available as a newsgroup[2], or the #python IRC channel on freenode.net[3]. [1] http://mail.python.org/mailman/listinfo/python-list [2] news:comp.lang.python [3] irc://irc.freenode.net #python ---------- nosy: +mark.dickinson resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 14:48:46 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 02 Jul 2010 12:48:46 +0000 Subject: [issue9140] SocketServer.BaseRequestHandler not a new-style class? In-Reply-To: <1278046422.83.0.363442370038.issue9140@psf.upfronthosting.co.za> Message-ID: <1278074926.14.0.210238194937.issue9140@psf.upfronthosting.co.za> Eric Smith added the comment: We can't change this for 2.6 since it's not a bug fix, and it's too late for 2.7. I doubt we would ever change it for 2.x, since it's likely to break other code is subtle ways. In 3.x all classes are new-style, so it's not at issue there. ---------- nosy: +eric.smith resolution: -> wont fix stage: -> committed/rejected status: open -> closed type: behavior -> feature request versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 14:50:28 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 02 Jul 2010 12:50:28 +0000 Subject: [issue9140] SocketServer.BaseRequestHandler not a new-style class? In-Reply-To: <1278046422.83.0.363442370038.issue9140@psf.upfronthosting.co.za> Message-ID: <1278075028.95.0.779808109151.issue9140@psf.upfronthosting.co.za> ?ric Araujo added the comment: To address the OP?s problem, super can be removed: - super(Handler, self).do_GET() + Handler.do_GET(self) ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 14:51:31 2010 From: report at bugs.python.org (Jan Engelhardt) Date: Fri, 02 Jul 2010 12:51:31 +0000 Subject: [issue9143] test_ctypes: fails on sparc64 long double In-Reply-To: <1278075091.72.0.569096323766.issue9143@psf.upfronthosting.co.za> Message-ID: <1278075091.72.0.569096323766.issue9143@psf.upfronthosting.co.za> New submission from Jan Engelhardt : When python is compiled with sparc64 settings (i.e. -m64), test_ctypes fails. I am not sure why this does not show up with -m32. ares:/usr/src/packages/BUILD/Python-2.6.5> LD_LIBRARY_PATH=/usr/src/packages/BUILD/Python-2.6.5 ./python -E -tt ./Lib/test/regrtest.py -s test_ctypes test_ctypes test test_ctypes failed -- Traceback (most recent call last): File "/usr/src/packages/BUILD/Python-2.6.5/Lib/ctypes/test/test_callbacks.py", line 81, in test_longdouble self.check_type(c_longdouble, 3.14) File "/usr/src/packages/BUILD/Python-2.6.5/Lib/ctypes/test/test_callbacks.py", line 30, in check_type self.failUnlessEqual(self.got_args, (-3, arg)) AssertionError: (-3, 0.0) != (-3, 3.1400000000000001) When using "long double x = 3.14", the constant 3.14 is taken as a double, which is then converted to long double. Of course it isn't accurate. There must be something in python that doesn't generate this correctly; it should have been "long double x = 3.14L", since only the constant 3.14L expands to the full longdouble pi. ---------- components: Tests messages: 109107 nosy: jengelh priority: normal severity: normal status: open title: test_ctypes: fails on sparc64 long double type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 15:23:05 2010 From: report at bugs.python.org (Catalin Iacob) Date: Fri, 02 Jul 2010 13:23:05 +0000 Subject: [issue459007] Document sys.path on Windows Message-ID: <1278076985.44.0.750705956754.issue459007@psf.upfronthosting.co.za> Changes by Catalin Iacob : ---------- nosy: +catalin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 15:33:19 2010 From: report at bugs.python.org (Peter Froehlich) Date: Fri, 02 Jul 2010 13:33:19 +0000 Subject: [issue9140] SocketServer.BaseRequestHandler not a new-style class? In-Reply-To: <1278075028.95.0.779808109151.issue9140@psf.upfronthosting.co.za> Message-ID: Peter Froehlich added the comment: On Fri, Jul 2, 2010 at 8:50 AM, ?ric Araujo wrote: > - ? ?super(Handler, self).do_GET() > + ? ?Handler.do_GET(self) Yep, that's how I solved it. :-D ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 15:43:15 2010 From: report at bugs.python.org (Giuseppe Ottaviano) Date: Fri, 02 Jul 2010 13:43:15 +0000 Subject: [issue9144] Import error for multiprocessing in 2.7rc2 on Windows In-Reply-To: <1278078195.79.0.768389993052.issue9144@psf.upfronthosting.co.za> Message-ID: <1278078195.79.0.768389993052.issue9144@psf.upfronthosting.co.za> New submission from Giuseppe Ottaviano : With a fresh install from python-2.7rc2.amd64.msi (rc1 is also affected) multiprocessing gives the following error: Python 2.7rc2 (r27rc2:82154, Jun 22 2010, 21:22:29) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import multiprocessing >>> multiprocessing.Pool() Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\multiprocessing\__init__.py", line 227, in Pool return Pool(processes, initializer, initargs, maxtasksperchild) File "C:\Python27\lib\multiprocessing\pool.py", line 89, in __init__ self._setup_queues() File "C:\Python27\lib\multiprocessing\pool.py", line 181, in _setup_queues from .queues import SimpleQueue File "C:\Python27\lib\multiprocessing\queues.py", line 22, in from multiprocessing.synchronize import Lock, BoundedSemaphore, Semaphore, Condition File "C:\Python27\lib\multiprocessing\synchronize.py", line 22, in from multiprocessing.forking import assert_spawning, Popen File "C:\Python27\lib\multiprocessing\forking.py", line 158, in from ._multiprocessing import win32, Connection, PipeConnection ImportError: No module named _multiprocessing I noticed that _multiprocessing.lib is not in Lib/multiprocessing/ but in libs/, so I don't know why there is a relative import here. Changing all the occurrences to from _multiprocessing import ... everything works fine. ---------- components: Library (Lib) messages: 109109 nosy: ot priority: normal severity: normal status: open title: Import error for multiprocessing in 2.7rc2 on Windows type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 15:46:46 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Jul 2010 13:46:46 +0000 Subject: [issue9143] test_ctypes: fails on sparc64 long double In-Reply-To: <1278075091.72.0.569096323766.issue9143@psf.upfronthosting.co.za> Message-ID: <1278078406.32.0.222317639569.issue9143@psf.upfronthosting.co.za> Mark Dickinson added the comment: I think this is a duplicate of issue 6029. ---------- nosy: +mark.dickinson resolution: -> duplicate status: open -> closed superseder: -> FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit] _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 15:47:05 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Jul 2010 13:47:05 +0000 Subject: [issue6029] FAIL: test_longdouble (ctypes.test.test_callbacks.Callbacks) [SPARC/64-bit] In-Reply-To: <1242377349.19.0.984337506616.issue6029@psf.upfronthosting.co.za> Message-ID: <1278078425.29.0.0772559029346.issue6029@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closed issue 9143 as a duplicate of this one. ---------- nosy: +jengelh, mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 15:59:13 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 02 Jul 2010 13:59:13 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> Message-ID: <1278079153.27.0.59964514373.issue9141@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: 1. The use case is any C extension that may need to run non-trivial code when being deleted, but where this can not be statically known. An example in the code today is generators, and the PyGen_NeedsFinalizing() function, doing exactly this. This is an attempt to make this functionality available to any C extension. 2. No, this gives a C extension the oppertunity to say: It's okay to delete me from GC, or it's not okay to delete me from GC. There is no need to specify any particular finalizing function, it will be invoked when the refcount goes to 0, just as it happens with __del__(), or as it happens with PyGen objects. 3. This code is only invoked for garbage deemed collectable. As such it is not on any critical path, most gc collections don't actually find any garbage. The cost of a few extra indirect function calls is likely to drown in the memory allocator overhead when the objects are released. Also, this is designed to be a minimum impact patch. We really shouldn't be creating new slot methods when it can be avoided. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 16:01:06 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 02 Jul 2010 14:01:06 +0000 Subject: [issue9144] Import error for multiprocessing in 2.7rc2 on Windows In-Reply-To: <1278078195.79.0.768389993052.issue9144@psf.upfronthosting.co.za> Message-ID: <1278079266.92.0.732953221303.issue9144@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 16:01:13 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 02 Jul 2010 14:01:13 +0000 Subject: [issue9144] Import error for multiprocessing in 2.7rc2 on Windows In-Reply-To: <1278078195.79.0.768389993052.issue9144@psf.upfronthosting.co.za> Message-ID: <1278079273.93.0.800804891848.issue9144@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- priority: high -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 16:02:33 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 02 Jul 2010 14:02:33 +0000 Subject: [issue9144] Import error for multiprocessing in 2.7rc2 on Windows In-Reply-To: <1278078195.79.0.768389993052.issue9144@psf.upfronthosting.co.za> Message-ID: <1278079353.23.0.460868350412.issue9144@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: +Build -Library (Lib) nosy: +merwok resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 16:04:51 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 02 Jul 2010 14:04:51 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278079153.27.0.59964514373.issue9141@psf.upfronthosting.co.za> Message-ID: <1278079487.3201.8.camel@localhost.localdomain> Antoine Pitrou added the comment: > 1. The use case is any C extension that may need to run non-trivial > code when being deleted, but where this can not be statically known. tp_del is IMO a bad place to do it. I'd recommend tp_dealloc instead, precisely so that you don't end up with uncollectable objects tied to internal OS structures or other non-trivial resources. (also, tp_del seems to have problems with subclassing. I don't remember the specifics) > 3. This code is only invoked for garbage deemed collectable. As such > it is not on any critical path, most gc collections don't actually > find any garbage. The cost of a few extra indirect function calls is > likely to drown in the memory allocator overhead when the objects are > released. Ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 16:23:42 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 02 Jul 2010 14:23:42 +0000 Subject: [issue9139] Add examples for str.format() In-Reply-To: <1278038589.68.0.873296098752.issue9139@psf.upfronthosting.co.za> Message-ID: <1278080622.06.0.825326004157.issue9139@psf.upfronthosting.co.za> Eric Smith added the comment: Thanks for taking the lead on this. In this sentence: +The new format syntax also supports new and different options, showed in the +follow examples. "showed" should be "shown". I like to use an example showing attribute access on named types. Barry Warsaw suggested using "self", which is a great tip. It's hard to come up with a complete example, but something that ends up like: "x is {self.x}, y is {self.y}".format(self=self) I think it would be a good idea to show comma formatting (even with its limitations), since there's not another easy way to do that in Python: >>> '{:,}'.format(1234567890) '1,234,567,890' For datetime, something like: >>> import datetime >>> d = datetime.datetime(2010, 7, 4, 12, 15, 58) >>> '{:%Y-%m-%d %H:%M:%S}'.format(d) '2010-07-04 12:15:58' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 16:24:49 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 02 Jul 2010 14:24:49 +0000 Subject: [issue9139] Add examples for str.format() In-Reply-To: <1278038589.68.0.873296098752.issue9139@psf.upfronthosting.co.za> Message-ID: <1278080689.22.0.229731300215.issue9139@psf.upfronthosting.co.za> Eric Smith added the comment: Instead of "named types", I meant "named arguments", of course. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 19:31:18 2010 From: report at bugs.python.org (Douglas Alan) Date: Fri, 02 Jul 2010 17:31:18 +0000 Subject: [issue1152248] Enhance file.readlines by making line separator selectable Message-ID: <1278091878.84.0.416741249003.issue1152248@psf.upfronthosting.co.za> Douglas Alan added the comment: Until this feature gets built into Python, you can use a Python-coded generator such as this one to accomplish the same effect: def fileLineIter(inputFile, inputNewline="\n", outputNewline=None, readSize=8192): """Like the normal file iter but you can set what string indicates newline. The newline string can be arbitrarily long; it need not be restricted to a single character. You can also set the read size and control whether or not the newline string is left on the end of the iterated lines. Setting newline to '\0' is particularly good for use with an input file created with something like "os.popen('find -print0')". """ if outputNewline is None: outputNewline = inputNewline partialLine = '' while True: charsJustRead = inputFile.read(readSize) if not charsJustRead: break partialLine += charsJustRead lines = partialLine.split(inputNewline) partialLine = lines.pop() for line in lines: yield line + outputNewline if partialLine: yield partialLine ---------- nosy: +Douglas.Alan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 19:35:20 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 02 Jul 2010 17:35:20 +0000 Subject: [issue9145] test_coercion fails in refleak runs In-Reply-To: <1278092119.96.0.393167431946.issue9145@psf.upfronthosting.co.za> Message-ID: <1278092119.96.0.393167431946.issue9145@psf.upfronthosting.co.za> New submission from Antoine Pitrou : $ ./python -m test.regrtest -uall -R 2:3 -v test_coercion == CPython 2.7rc2+ (trunk, Jul 2 2010, 18:50:24) [GCC 4.3.2] == Linux-2.6.27.10-grsec-xxxx-grs-ipv4-64-x86_64-with-debian-lenny-sid little-endian == /home/antoine/cpython/debug/build/test_python_19672 test_coercion test_cmptypes (test.test_coercion.CoercionTest) ... ok test_infinite_rec_classic_classes (test.test_coercion.CoercionTest) ... ok test_infix_binops (test.test_coercion.CoercionTest) ... ok test_prefix_binops (test.test_coercion.CoercionTest) ... ok ---------------------------------------------------------------------- Ran 4 tests in 0.122s OK beginning 5 repetitions 12345 test test_coercion crashed -- : local variable 'res' referenced before assignment Traceback (most recent call last): File "/home/antoine/cpython/debug/Lib/test/regrtest.py", line 873, in runtest_inner huntrleaks) File "/home/antoine/cpython/debug/Lib/test/regrtest.py", line 1003, in dash_R run_the_test() File "/home/antoine/cpython/debug/Lib/test/regrtest.py", line 989, in run_the_test indirect_test() File "/home/antoine/cpython/debug/Lib/test/test_coercion.py", line 339, in test_main process_infix_results() File "/home/antoine/cpython/debug/Lib/test/test_coercion.py", line 215, in process_infix_results if isinstance(res[i][6], tuple): UnboundLocalError: local variable 'res' referenced before assignment 1 test failed: test_coercion [55121 refs] ---------- components: Library (Lib), Tests messages: 109118 nosy: ezio.melotti, flox, pitrou priority: normal severity: normal status: open title: test_coercion fails in refleak runs type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 20:02:48 2010 From: report at bugs.python.org (Daniel Urban) Date: Fri, 02 Jul 2010 18:02:48 +0000 Subject: [issue6507] Enhance dis.dis to autocompile codestrings In-Reply-To: <1247857575.21.0.389925271165.issue6507@psf.upfronthosting.co.za> Message-ID: <1278093768.91.0.26207578605.issue6507@psf.upfronthosting.co.za> Daniel Urban added the comment: > disassemble_string should've been private as well, while we are editing this module. Attached the updated patch. ---------- Added file: http://bugs.python.org/file17839/issue6507_3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 20:09:41 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 02 Jul 2010 18:09:41 +0000 Subject: [issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping In-Reply-To: <1277997162.2.0.246195895629.issue9137@psf.upfronthosting.co.za> Message-ID: <1278094181.91.0.504925267286.issue9137@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: stutzbach -> mark.dickinson resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 20:28:40 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 02 Jul 2010 18:28:40 +0000 Subject: [issue9139] Add examples for str.format() In-Reply-To: <1278038589.68.0.873296098752.issue9139@psf.upfronthosting.co.za> Message-ID: <1278095320.67.0.593818634601.issue9139@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here is a new patch. I fixed the typos, removed the examples from the first section and added a link to the examples section. I also added the examples suggested by Eric plus an example about {:%}, and followed the suggestion of ?ric and clarified the versionchanged message. ---------- Added file: http://bugs.python.org/file17840/issue9139v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 20:32:07 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Jul 2010 18:32:07 +0000 Subject: [issue9139] Add examples for str.format() In-Reply-To: <1278038589.68.0.873296098752.issue9139@psf.upfronthosting.co.za> Message-ID: <1278095527.57.0.398604670682.issue9139@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 20:42:33 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Jul 2010 18:42:33 +0000 Subject: [issue6507] Enhance dis.dis to autocompile codestrings In-Reply-To: <1247857575.21.0.389925271165.issue6507@psf.upfronthosting.co.za> Message-ID: <1278096153.16.0.446738984983.issue6507@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 21:10:10 2010 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 02 Jul 2010 19:10:10 +0000 Subject: [issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" In-Reply-To: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> Message-ID: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> New submission from Dave Malcolm : Having run: prelink --undo --all the following works OK: OPENSSL_FORCE_FIPS_MODE=1 python -c "import hashlib; m = m = hashlib.md5(); m.update('abc')" but the following segfaults: OPENSSL_FORCE_FIPS_MODE=1 python -c "import ssl; import hashlib; m = m = hashlib.md5(); m.update('abc')" and the following gives the same segfault, in a simpler way (strictly speaking one shouldn't directly import _ssl, but this most directly reproduces the crash): OPENSSL_FORCE_FIPS_MODE=1 python -c "import _ssl; import hashlib; m = m = hashlib.md5(); m.update('abc')" (gdb) bt #0 0x0000000000000000 in ?? () #1 0x00007fffee978736 in EVP_hash (self=0xaed3c0, vp=0x95b6a4, len=3) at /home/david/coding/python-svn/trunk-fips/Modules/_hashopenssl.c:112 #2 0x00007fffee978cb5 in EVP_update (self=0xaed3c0, args=('abc',)) at /home/david/coding/python-svn/trunk-fips/Modules/_hashopenssl.c:247 #3 0x0000000000567faa in PyCFunction_Call (func=, arg=('abc',), kw=0x0) at Objects/methodobject.c:81 and the segfault is due to EVP_DigestUpdate calling through the ctx->update function pointer, which in this case is NULL. (gdb) p self->ctx $2 = {digest = 0x7ffff0c955a0, engine = 0x0, flags = 0, md_data = 0x0, pctx = 0x0, update = 0} self->ctx->update == NULL and self->ctx->digest == &bad_md, as set up by: The setup is here: (different run of gdb, so different addresses): (gdb) bt #0 EVP_DigestInit_ex (ctx=0x7fffecdc7b80, type=0x7fffefc6fc60, impl=0x0) at digest.c:249 #1 0x00007fffecbc53ce in init_hashlib () at /usr/src/debug/Python-2.6.2/Modules/_hashopenssl.c:513 #ifdef OPENSSL_FIPS if (FIPS_mode()) { if (!(type->flags & EVP_MD_FLAG_FIPS) && !(ctx->flags & EVP_MD_CTX_FLAG_NON_FIPS_ALLOW)) { EVPerr(EVP_F_EVP_DIGESTINIT_EX, EVP_R_DISABLED_FOR_FIPS); => ctx->digest = &bad_md; return 0; } } #endif (seen on x86_64 Linux; Fedora 13, with openssl-1.0.0-1.fc13.x86_64 on SVN trunk, and on other builds) Clearly, the Python process should not segfault or abort. I don't think it's clear what the behavior should be here, though - how is the Python standard library to be used in conjunction with OpenSSL's FIPS mode? >From page 18 of the OpenSSL's FIPS guide: http://ftp.openssl.org/docs/fips/UserGuide.pdf "By?design,?the?OpenSSL?API?attempts?to?disable?non?FIPS?algorithms,?when?in?FIPS?mode,?at?the? EVP?level?and?via?most?low?level?function?calls.??Failure?to?check?the?return?code?from?low?level? functions?could?result?in?unexpected?behavior.??Note?also?that?sufficiently?creative?or?unusual?use?of? the?API?may?still?allow?the?use?of?non?FIPS?algorithms.??The?non?FIPS?algorithm?disabling?is? intended?as?a?aid?to?the?developer?in?preventing?the?accidental?use?of?non?FIPS?algorithms?in?FIPS? mode,?and?not?as?an?absolute?guarantee.?It?is?the?responsibility?of?the?application?developer?to? ensure?that?no?non?FIPS?algorithms?are?used?when?in?FIPS?mode." It seems odd that the behavior of "md5" within "hashlib" can vary depending on whether "_ssl" was imported first. Reducing surprises for the programmer suggests to me that the behavior for these two cases should be harmonized. It also seems odd that SSL can refuse the usage of MD5 whilst other implementations exist and are available; my understanding of FIPS mode is that it's intended for locked-down environments that wish to ensure that only known-good crypto is used (and e.g. MD5 is known to be be broken for some uses, see: http://www.kb.cert.org/vuls/id/836068) Possible approaches: (A) change hashlib so that it continues to support md5 if ssl/_ssl is imported first, even in FIPS mode (B) change hashlib so that in FIPS mode, it fails to support md5 even if ssl/_ssl is not imported first (B.1) by not recognizing "md5" as a digest, leading to NameError exceptions and similar (I dislike this approach, as it leads to obscure failures) (B.2) by raising a new exception e.g. "ProhibitedInFIPSMode" or somesuch (so that the failure is obvious and searchable) (C.*) as per (B.*), but support an explicit override: hashlib.md5(non_fips_allow=True) Thoughts? ---------- components: Library (Lib) messages: 109121 nosy: dmalcolm priority: normal severity: normal status: open title: Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 21:27:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 02 Jul 2010 19:27:47 +0000 Subject: [issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" In-Reply-To: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> Message-ID: <1278098867.15.0.229559953481.issue9146@psf.upfronthosting.co.za> Antoine Pitrou added the comment: First, is it only with 2.7 or 2.6? Second, I don't really get the point of the FIPS mode. The PDF you linked to seems full of bureaucratic jargon. Third, I can't reproduce under Mandriva, but perhaps it's because it's using OpenSSL 1.0.0 (which the PDF says isn't supported). Fourth, if MD5 is insecure and FIPS disables insecure algorithm, then why should hashlib allow MD5 hashing when FIPS mode is enabled? Fifth, please take a look at the OpenSSL initialization routine in _sslmodule.c and try to transplant it to the hashlib initialization routine: /* Init OpenSSL */ SSL_load_error_strings(); SSL_library_init(); OpenSSL_add_all_algorithms(); ---------- nosy: +gps, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 21:46:47 2010 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 02 Jul 2010 19:46:47 +0000 Subject: [issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" In-Reply-To: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> Message-ID: <1278100007.06.0.165853361018.issue9146@psf.upfronthosting.co.za> Dave Malcolm added the comment: Thanks > First, is it only with 2.7 or 2.6? I've seen this with both 2.6 tarball builds and SVN trunk; in both cases against openssl-1.0.0-1.[ > Second, I don't really get the point of the FIPS mode. The PDF you linked to seems full of bureaucratic jargon. Agreed. > Third, I can't reproduce under Mandriva, but perhaps it's because it's using OpenSSL 1.0.0 (which the PDF says isn't supported). Thanks for the info. This is my fault, sorry. I'm using openssl-1.0.0-1 on Fedora; on doublechecking I see that we appear to be carrying various patches in our openssl packages, which I assume are a backport from a more recent version of the FIPS support: (see http://cvs.fedoraproject.org/viewvc/devel/openssl/ ); I'll see if I can get more information from other Fedorans to verify this, and on what version of openssl upstream this is equivalent to. > Fourth, if MD5 is insecure and FIPS disables insecure algorithm, then why should hashlib allow MD5 hashing when FIPS mode is enabled? My understanding is that some sites wish to prohibit the use of MD5 as an authentication mechanism, but don't need to prohibit it where the use is not "cryptography", e.g. to compute an index into a hash table where intentionally induced hash collisions can not break the application's security. > Fifth, please take a look at the OpenSSL initialization routine in _sslmodule.c and try to transplant it to the hashlib initialization routine: [snip] Done; with the attached patch to SVN trunk, I don't need the initial "import ssl" to reproduce the segfault; the following will segfault (in the same place): OPENSSL_FORCE_FIPS_MODE=1 gdb --args ./python -c "import hashlib; m = m = hashlib.md5(); m.update('abc')" ---------- keywords: +patch Added file: http://bugs.python.org/file17841/add_ssl_init_to_hashlib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 21:54:59 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 02 Jul 2010 19:54:59 +0000 Subject: [issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" In-Reply-To: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> Message-ID: <1278100499.83.0.769106389937.issue9146@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > with the attached patch to SVN trunk, I don't need the initial "import > ssl" to reproduce the segfault Nice, so at least that oddity is eliminated :) So I guess it's down to the A, B, and C approaches you suggested. Of course, if we choose to allow MD5, we must find a way for OpenSSL to accept running an MD5 hash... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 22:05:26 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 02 Jul 2010 20:05:26 +0000 Subject: [issue9144] Import error for multiprocessing in 2.7rc2 on Windows In-Reply-To: <1278078195.79.0.768389993052.issue9144@psf.upfronthosting.co.za> Message-ID: <1278101126.73.0.845357482245.issue9144@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Martin, any ideas? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 22:11:38 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Jul 2010 20:11:38 +0000 Subject: [issue7829] dis module documentation gives no indication of the dangers of bytecode inspection In-Reply-To: <1265030716.3.0.107246651396.issue7829@psf.upfronthosting.co.za> Message-ID: <1278101498.47.0.690986487268.issue7829@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Brett, should this be reassigned to docs at python? I gave a suggested text change months ago. The need for a change like this was mentioned again today on pydev in the thread "Can Python implementations reject semantically invalid expressions?". Since the current deficiency has been noted repeatedly, I think the priority should be at least normal. Unless someone suggests something even better, I think my proposed replacememt should be accepted, formatted, and applied. I think it is definitely better than the current text. ---------- priority: low -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 22:19:29 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Jul 2010 20:19:29 +0000 Subject: [issue6507] Enhance dis.dis to autocompile codestrings In-Reply-To: <1247857575.21.0.389925271165.issue6507@psf.upfronthosting.co.za> Message-ID: <1278101969.53.0.307009332512.issue6507@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Just today, someone posted the result of dis.dis('somebytes') and did not notice the error because dis blithely disassembles bytes as bytecodes, even in 3.x. (The person actually dissed a 2.x string). >>> from dis import dis >>> dis(b'cat') 0 DUP_TOPX 29793 It is a natural thing to do, so I hope this is put in 3.2. Since the undocumented 'disassemble_string' now disassembles bytes, I think it should be renamed '_disassemble_bytes' instead of '_disassemble_string'. This would accord with the general effort to remove 2.x fossils from 3.x. Aside from that, it looks ready, from a reading review, to apply and test: doc addition, added tests, new function and else case, and rename. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 22:24:10 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 02 Jul 2010 20:24:10 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278102250.9.0.169377150416.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > - I find the _cmp() and __cmp() indirection poor style in 3.x, > especially when you simply end up comparing self._getstate() and > other._getstate() (it is also suboptimal because it can do more > comparisons than needed) The best I could come up with is issue7989-cmp.diff - basically replacing _cmp(self, other) with _normalize(self, other) that returns a pair of objects that compare the same as self and other. I am not committing this in sandbox because I don't see this a big improvement. Datetime comparisons are tricky due to date/datetime inheritance. I think it is best not to touch it. ---------- Added file: http://bugs.python.org/file17842/issue7989-cmp.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 22:28:57 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 02 Jul 2010 20:28:57 +0000 Subject: [issue6507] Enhance dis.dis to autocompile codestrings In-Reply-To: <1247857575.21.0.389925271165.issue6507@psf.upfronthosting.co.za> Message-ID: <1278102537.12.0.519386752645.issue6507@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> accepted stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 22:41:41 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 02 Jul 2010 20:41:41 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278103301.45.0.452040042057.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > I am talking specifically about this kind of assert: > > assert 1 <= month <= 12, 'month must be in 1..12' > > I think it should be replaced with: > > if month < 1 or month > 12: > raise ValueError('month must be in 1..12') I reviewed the asserts. Value range checking asserts appear in non-public functions which are not called with out-of-range values by the module code. Therefore they can only be triggered if there is a bug in the future version of datetime.py. This is expressly what asserts are for. There is another type of asserts that should be either removed or modified: assert daysecondswhole == int(daysecondswhole) # can't overflow Since int is long in 3.x, this assert does not check anything. We can replace this with assert daysecondswhole.bit_length() <= 32 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 22:42:30 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 02 Jul 2010 20:42:30 +0000 Subject: [issue6824] help for a module should list supported platforms In-Reply-To: <1251909781.63.0.685022567379.issue6824@psf.upfronthosting.co.za> Message-ID: <1278103350.83.0.659146760182.issue6824@psf.upfronthosting.co.za> Terry J. Reedy added the comment: >WIth the help output that they provide, how am I supposed to know that os.fork is only supported on Unix. On windows, os.fork does not exist, so help(os.fork) fails, so it is obvious to me that it is not available on Windows ;-). help(winreg) returns "help(winreg) Help on built-in module winreg: NAME winreg - This module provides access to the Windows registry API." One could, for example, suggest "add 'Windows-only' between 'This' and 'module' in the module doc string that follows the name." This is not needed here because 'Windows' appears later. However, if you want to move this issue forward, use the quoted example as a model for a list of specific suggestions for objects specific to platforms you have access to. (For instance, I cannot easily get the os.fork doc string to see what it now says.) User suggestions are the main way existing docs get improved. In other words, check the existing doc string and see if it is deficient. If it is, quote is and suggest a change. If the suggested change is the same for several objects, list and quote several and then make the suggestion, such as "insert 'unix-only' before 'module'." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 22:43:42 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 02 Jul 2010 20:43:42 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278103422.3.0.0490412115665.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > If they abuse the _ methods and complain that the C version doesn't > work, we just say "we *told* you not to do that". It is not the Python > philosophy to try to protect users from mistakes that they willfully > make. OK. +0 from me. Patches welcome. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 22:47:08 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 02 Jul 2010 20:47:08 +0000 Subject: [issue9139] Add examples for str.format() In-Reply-To: <1278038589.68.0.873296098752.issue9139@psf.upfronthosting.co.za> Message-ID: <1278103628.1.0.359431712494.issue9139@psf.upfronthosting.co.za> Eric Smith added the comment: This looks like a definite improvement to me. When you merge to py3k, don't forget to change the versionchanged tag to 3.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 23:20:19 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 02 Jul 2010 21:20:19 +0000 Subject: [issue7829] dis module documentation gives no indication of the dangers of bytecode inspection In-Reply-To: <1265030716.3.0.107246651396.issue7829@psf.upfronthosting.co.za> Message-ID: <1278105619.49.0.149210816955.issue7829@psf.upfronthosting.co.za> Brett Cannon added the comment: Sorry, Terry, I didn't even notice the corrections in the issue since they were inlined in a comment instead of as an attached file. I will have a look right now. ---------- keywords: +needs review stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 23:23:19 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 02 Jul 2010 21:23:19 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278105799.03.0.334983474089.issue7989@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > assert daysecondswhole == int(daysecondswhole) # can't overflow > Since int is long in 3.x, this assert does not check anything Even with 2.5 int(x) cannot overflow, and returns a long when needed! This assert probably checks that the number has no fractional part. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 23:24:22 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 02 Jul 2010 21:24:22 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278105862.12.0.989714683342.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This comment in datetime.__new__ makes me +0.5 on s/__/_/: self = date.__new__(cls, year, month, day) # XXX This duplicates __year, __month, __day for convenience :-( self.__year = year self.__month = month self.__day = day Tim, Do you remember why it was a good idea to derive datetime from date? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 23:28:14 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 02 Jul 2010 21:28:14 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1278105799.03.0.334983474089.issue7989@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, Jul 2, 2010 at 5:23 PM, Amaury Forgeot d'Arc wrote: .. > Even with 2.5 int(x) cannot overflow, and returns a long when needed! > This assert probably checks that the number has no fractional part. Yes I've realized that. I thought x was coming from integer arithmetics, but apparently datetime.py loves floats! ---------- title: Add pure Python implementation of datetime module to CPython -> Add pure Python implementation of datetime module to CPython _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 23:33:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 02 Jul 2010 21:33:25 +0000 Subject: [issue9139] Add examples for str.format() In-Reply-To: <1278038589.68.0.873296098752.issue9139@psf.upfronthosting.co.za> Message-ID: <1278106405.3.0.759614635843.issue9139@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m not sure it?s good style to say ?now? twice (in the versionchanged block). I almost feel bad pointing that there is one line with bad whitespace: + >>> for align,text in ... (Space after comma) Otherwise great patch :) ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 23:41:19 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 02 Jul 2010 21:41:19 +0000 Subject: [issue9139] Add examples for str.format() In-Reply-To: <1278038589.68.0.873296098752.issue9139@psf.upfronthosting.co.za> Message-ID: <1278106879.67.0.306679575671.issue9139@psf.upfronthosting.co.za> Eric Smith added the comment: I think I'd just delete both instances of "now". And now that I read it more critically, "position" should be "positional". How's this rewording: .. versionchanged:: 2.7 The positional argument specifiers can be omitted, so ``'{} {}'`` is equivalent to ``'{0} {1}'``. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 23:51:01 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 02 Jul 2010 21:51:01 +0000 Subject: [issue9139] Add examples for str.format() In-Reply-To: <1278038589.68.0.873296098752.issue9139@psf.upfronthosting.co.za> Message-ID: <1278107461.28.0.310000080387.issue9139@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here is another patch. I also added another example that uses the fillchar. ---------- Added file: http://bugs.python.org/file17843/issue9139v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 23:58:00 2010 From: report at bugs.python.org (Tim Peters) Date: Fri, 02 Jul 2010 21:58:00 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278107880.07.0.641111545546.issue7989@psf.upfronthosting.co.za> Tim Peters added the comment: > I thought x was coming from integer > arithmetics, but apparently datetime.py loves floats! The arguments to __new__ can be floats, so it's necessary to deal with floats there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 23:58:04 2010 From: report at bugs.python.org (Tim Peters) Date: Fri, 02 Jul 2010 21:58:04 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278107884.58.0.0897004585153.issue7989@psf.upfronthosting.co.za> Tim Peters added the comment: > I thought x was coming from integer > arithmetics, but apparently datetime.py loves floats! The arguments to __new__ can be floats, so it's necessary to deal with floats there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 2 23:58:21 2010 From: report at bugs.python.org (Tim Peters) Date: Fri, 02 Jul 2010 21:58:21 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278107901.41.0.798331303416.issue7989@psf.upfronthosting.co.za> Changes by Tim Peters : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 00:00:09 2010 From: report at bugs.python.org (Tim Peters) Date: Fri, 02 Jul 2010 22:00:09 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278108009.8.0.994780999514.issue7989@psf.upfronthosting.co.za> Tim Peters added the comment: > Do you remember why it was a good idea to > derive datetime from date? Why not? A datetime is a date, but with additional behavior. Makes inheritance conceptually natural. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 00:04:44 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 02 Jul 2010 22:04:44 +0000 Subject: [issue7829] dis module documentation gives no indication of the dangers of bytecode inspection In-Reply-To: <1265030716.3.0.107246651396.issue7829@psf.upfronthosting.co.za> Message-ID: <1278108284.35.0.659270392979.issue7829@psf.upfronthosting.co.za> Brett Cannon added the comment: Fixed in r82456. I decided to make a warning directive so that it's really obvious that people should not consider the dis module and bytecode as stable. Once Python 2.7.0final is out the door I will backport the patch. ---------- resolution: -> fixed stage: patch review -> committed/rejected versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 00:14:51 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 02 Jul 2010 22:14:51 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1278108009.8.0.994780999514.issue7989@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, Jul 2, 2010 at 6:00 PM, Tim Peters wrote: > > Tim Peters added the comment: > >> Do you remember why it was a good idea to >> derive datetime from date? > > Why not? ?A datetime is a date, but with additional behavior. ?Makes inheritance conceptually natural. It is also time with additional behavior. In the face of ambiguity ... Why not? See issue #5516. Most of datetime comparison code is devoted to fighting inheritance from date. There is hardly any non-trivial method that benefits from this inheritance. To me, conceptually, datetime is a container of date, time and optionally time zone, it is not a date. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 00:23:49 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 02 Jul 2010 22:23:49 +0000 Subject: [issue9139] Add examples for str.format() In-Reply-To: <1278038589.68.0.873296098752.issue9139@psf.upfronthosting.co.za> Message-ID: <1278109429.43.0.45021335685.issue9139@psf.upfronthosting.co.za> Eric Smith added the comment: Looks good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 00:26:03 2010 From: report at bugs.python.org (Tim Peters) Date: Fri, 02 Jul 2010 22:26:03 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278109563.29.0.463513070538.issue7989@psf.upfronthosting.co.za> Tim Peters added the comment: I'm not going to argue about whether datetime "should have been" subclassed from date - fact is that it was, and since it was Guido's idea from the start, he wouldn't change it now even if his time machine weren't out for repairs ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 00:48:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 02 Jul 2010 22:48:23 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1278109563.29.0.463513070538.issue7989@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, Jul 2, 2010 at 6:26 PM, Tim Peters wrote: .. > I'm not going to argue about whether datetime "should have been" subclassed from date - fact is that it was, and since it was > Guido's idea from the start, he wouldn't change it now even if his time machine weren't out for repairs ;-) I know, he will probably accept the fact that 23:59:60 is valid time first. :-) I still very much appreciate your insights. I think I mentioned that in my other posts, but I find datetime design very elegant and when I find things that I would have done differently my first reaction is that I am probably missing something. datetime(date) inheritance is one of those things. Another is tzinfo attribute of time. With time t, t.utcoffset() is kid of useless given that you cannot subtract it from t and unless tzinfo is a fixed offset timezone, there is not enough information in t to compute the offset to begin with. Do you have any historical insight on this one? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 00:52:33 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 02 Jul 2010 22:52:33 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: Message-ID: <4C2E6DAD.1010004@egenix.com> Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Fri, Jul 2, 2010 at 6:00 PM, Tim Peters wrote: >> >> Tim Peters added the comment: >> >>> Do you remember why it was a good idea to >>> derive datetime from date? >> >> Why not? A datetime is a date, but with additional behavior. Makes inheritance conceptually natural. > > It is also time with additional behavior. In the face of ambiguity ... > > Why not? See issue #5516. Most of datetime comparison code is > devoted to fighting inheritance from date. There is hardly any > non-trivial method that benefits from this inheritance. > > To me, conceptually, datetime is a container of date, time and > optionally time zone, it is not a date. Just an aside: Conceptually, you don't need date and time, only an object to reference a point in time and another one to describe the difference between two points in time. In mxDateTime I called them DateTime and DateTimeDelta. What we commonly refer to as date is really the combination of a DateTime value pointing to the start of the day together with a DateTimeDelta value representing one full turn of the Earth. That said, I don't think redesigning the datetime module is part of this ticket, just adding a second implementation of what we already have in CPython :-) ---------- title: Add pure Python implementation of datetime module to CPython -> Add pure Python implementation of datetime module to CPython _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 01:09:24 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 02 Jul 2010 23:09:24 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <4C2E6DAD.1010004@egenix.com> Message-ID: Alexander Belopolsky added the comment: On Fri, Jul 2, 2010 at 6:52 PM, Marc-Andre Lemburg wrote: .. > That said, I don't think redesigning the datetime module is part > of this ticket, just adding a second implementation of what we > already have in CPython :-) I agree. I am just looking for an excuse not to change attributes like __year to _year. :-) ---------- title: Add pure Python implementation of datetime module to CPython -> Add pure Python implementation of datetime module to CPython _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 01:24:32 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 02 Jul 2010 23:24:32 +0000 Subject: [issue9139] Add examples for str.format() In-Reply-To: <1278038589.68.0.873296098752.issue9139@psf.upfronthosting.co.za> Message-ID: <1278113072.83.0.266238636167.issue9139@psf.upfronthosting.co.za> Ezio Melotti added the comment: Committed in r82457 and r82459 (trunk), r82460 (release26-maint), r82462 (py3k), r82463 (release31-maint). Thanks for the reviews! ---------- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 01:26:11 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 02 Jul 2010 23:26:11 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1278113171.22.0.70563476396.issue5288@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a patch against sandbox version of datetime.py. With this patch, there is a single place where subminute offset is rejected, _check_utc_offset() function. I have also added "whole minute" asserts in places where sub-minute part of the offset is discarded or assumed 0. ---------- keywords: +patch Added file: http://bugs.python.org/file17844/issue5288-proto.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 01:38:31 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 02 Jul 2010 23:38:31 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278113911.75.0.670250034664.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a patch from issue 5288 as an example of a change that I would favor more than issue7989-cmp.diff. This patch eliminates _utcoffset and _dst methods that duplicate utcoffset and dst, but return integer minutes rather than a timedelta. I am not checking these changes in sandbox because these are examples of how I plan to improve C implementation when datetime.py makes it into the main tree. I envision such changes to be discussed within context of datetime.py and if approved, implemented in C and committed simultaneously. Improving datetime.py implementation and making it diverge from C implementation defeats the purpose I see in having datetime.py in the first place. Antoine? ---------- Added file: http://bugs.python.org/file17845/issue5288-proto.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 01:57:08 2010 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 02 Jul 2010 23:57:08 +0000 Subject: [issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" In-Reply-To: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> Message-ID: <1278115028.39.0.889567440629.issue9146@psf.upfronthosting.co.za> Dave Malcolm added the comment: Attached patch checks for errors in the initialization of _hashlib, and only registers the names that are actually available. It also contains the ssl init from the first patch. I added a _hashlib._errors dict, containing errors, so that you can examine them at runtime: $ OPENSSL_FORCE_FIPS_MODE=1 ./python Python 2.7rc2+ (trunk:82445, Jul 2 2010, 14:00:30) [GCC 4.4.3 20100422 (Red Hat 4.4.3-18)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import _hashlib [35786 refs] >>> _hashlib._errors {'md5': '_hashopenssl.c:541: error:060800A0:digital envelope routines:EVP_DigestInit_ex:unknown cipher'} [35825 refs] >>> dir (_hashlib) ['__doc__', '__file__', '__name__', '__package__', '_errors', 'new', 'openssl_sha1', 'openssl_sha224', 'openssl_sha256', 'openssl_sha384', 'openssl_sha512'] [35838 refs] (note the absence of openssl_md5) Note that hashlib (as opposed to _hashlib) seems to gracefully fall back to Python's _md5 module when in this state: >>> import hashlib [36107 refs] >>> m = m = hashlib.md5(); m.update('abc\n'); print m.hexdigest() 0bee89b07a248e27c83fc3d5951213c1 [36109 refs] This seems to be option (A) from my initial message. ---------- stage: -> patch review Added file: http://bugs.python.org/file17846/remove-unusable-hashes-from-hashopenssl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 02:03:36 2010 From: report at bugs.python.org (Dave Malcolm) Date: Sat, 03 Jul 2010 00:03:36 +0000 Subject: [issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" In-Reply-To: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> Message-ID: <1278115416.37.0.677252250136.issue9146@psf.upfronthosting.co.za> Dave Malcolm added the comment: Not quite ready yet: Named methods work: $ OPENSSL_FORCE_FIPS_MODE=1 ./python -c "import hashlib; m = hashlib.md5(); m.update('abc\n'); print m.hexdigest()"0bee89b07a248e27c83fc3d5951213c1 [15741 refs] but lookup by name still fails: OPENSSL_FORCE_FIPS_MODE=1 ./python -c "import hashlib; m = hashlib.new('md5'); m.update('abc\n'); print m.hexdigest()" Segmentation fault (core dumped) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 02:49:15 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Jul 2010 00:49: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: <1278118155.31.0.497266611332.issue8271@psf.upfronthosting.co.za> Ezio Melotti added the comment: I've found a subtle corner case about 3- and 4-bytes long sequences. For example, according to http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (pages 94-95, table 3.7) the sequences in range \xe0\x80\x80-\xe0\x9f\xbf are invalid. I.e. if the first byte is \xe0 and the second byte is between \x80 (included) and \xA0 (excluded), then the second byte is invalid (this is because sequences < \xe0\xa0\x80 will result in codepoints < U+0800 and these codepoints are already represented by two-bytes-long sequences (\xdf\xbf decodes to U+07FF)). Assume that we want to decode the string b'\xe0\x61\x80\x61' (where \xe0 is the start byte of a 3-bytes-long sequence, \x61 is the letter 'a' and \x80 a valid continuation byte). This actually results in: >>> b'\xe0\x61\x80\x61'.decode('utf-8', 'replace') '?a?a' since \x61 is not a valid continuation byte in the sequence: * \xe0 is converted to ?; * \x61 is displayed correctly as 'a'; * \x80 is valid only as a continuation byte and invalid alone, so it's replaced by ?; * \x61 is displayed correctly as 'a'; Now, assume that we want to do the same with b'\xe0\x80\x81\x61': This actually results in: >>> b'\xe0\x80\x81\x61'.decode('utf-8', 'replace') '??a' in this case \x80 would be a valid continuation byte, but since it's preceded by \xe0 it's not valid. Since it's not valid, the result might be similar to the previous case, i.e.: * \xe0 is converted to ?; * \x80 is valid as a continuation byte but not in this specific case, so it's replaced by ?; * \x81 is valid only as a continuation byte and invalid alone, so it's replaced by ?; * \x61 is displayed correctly as 'a'; However for this case (and the other similar cases), the invalid bytes wouldn't be otherwise valid because they are still in range \x80-\xbf (continuation bytes), so the current behavior might be fine. This happens because the current algorithm just checks that the second byte (\x80) is in range \x80-\xbf (i.e. it's a continuation byte) and if it is it assumes that the invalid byte is the third (\x81) and replaces the first two bytes (\xe0\x80) with a single ?. That said, the algorithm could be improved to check what is the wrong byte with better accuracy (and that could also be used to give a better error message about decoding surrogates). This shouldn't affect the speed of regular decoding, because the extra check will happen only in case of error. Also note the Unicode standard doesn't seem to mention this case, and that anyway this doesn't "eat" any of the following characters as it was doing before the patch -- the only difference would be in the number of ?. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 04:21:54 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 03 Jul 2010 02:21:54 +0000 Subject: [issue8810] TZ offset description is unclear in docs In-Reply-To: <1274718021.16.0.883294684947.issue8810@psf.upfronthosting.co.za> Message-ID: <1278123714.12.0.012407984382.issue8810@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Benjamin, Is it too late to do anything about this. Apparently Sean committed wrong patch and as a result 2.7 is about to be released with an error in tzinfo.fromutc docstring. This method is confusing enough without documentation bugs. Would you mind if I revert r81681? This is a docstring only change. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 05:39:17 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 03 Jul 2010 03:39:17 +0000 Subject: [issue8810] TZ offset description is unclear in docs In-Reply-To: <1274718021.16.0.883294684947.issue8810@psf.upfronthosting.co.za> Message-ID: <1278128357.38.0.695654327181.issue8810@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Reverted r81681 and r81682 in r82466 and r82467. It looks like docstring changes intended for utcoffset() landed in a docstring for fromutc(). Given that we are very close to 2.7 release, I am not attempting to improve the docs - just reverting an obvious error. ---------- assignee: docs at python -> belopolsky versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 05:39:24 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 03 Jul 2010 03:39:24 +0000 Subject: [issue9144] Import error for multiprocessing in 2.7rc2 on Windows In-Reply-To: <1278078195.79.0.768389993052.issue9144@psf.upfronthosting.co.za> Message-ID: <1278128364.61.0.278710504599.issue9144@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 07:26:42 2010 From: report at bugs.python.org (Troy Potts) Date: Sat, 03 Jul 2010 05:26:42 +0000 Subject: [issue6818] remove/delete method for zipfile/tarfile objects In-Reply-To: <1251866532.69.0.504306670253.issue6818@psf.upfronthosting.co.za> Message-ID: <1278134802.59.0.82246408284.issue6818@psf.upfronthosting.co.za> Troy Potts added the comment: I have attempted to implement a ZipFile.remove function. It seems to work fine. I have submitted a patch. The method of implementation is: find the file's index in the file list, then sum the lengths of the file entries before it to find its location in the archive. Then simply read in all the bytes after it, write them out at that location, and truncate the file x bytes shorter, where x is the length of the record. This works because the directory listing is created when the file is closed, so there's no harm in truncating. I've also made it truncate the zip file after reading in the existing files upon creation, because the directory information is not used after this point. This could use some testing on large files. This is my first patch, so let me know if I've done anything wrong. ---------- keywords: +patch nosy: +chroipahtz Added file: http://bugs.python.org/file17847/zipfile_remove.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 07:42:09 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Jul 2010 05:42:09 +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: <1278135729.43.0.399323812128.issue8271@psf.upfronthosting.co.za> Ezio Melotti added the comment: Backported to 2.6 and 3.1 in r82470 and r82469. I'll leave this open for a while to see if anyone has any comment on my previous message. ---------- resolution: -> fixed stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 07:46:48 2010 From: report at bugs.python.org (Troy Potts) Date: Sat, 03 Jul 2010 05:46:48 +0000 Subject: [issue6818] remove/delete method for zipfile/tarfile objects In-Reply-To: <1251866532.69.0.504306670253.issue6818@psf.upfronthosting.co.za> Message-ID: <1278136008.57.0.140484749063.issue6818@psf.upfronthosting.co.za> Changes by Troy Potts : Removed file: http://bugs.python.org/file17847/zipfile_remove.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 07:47:19 2010 From: report at bugs.python.org (Troy Potts) Date: Sat, 03 Jul 2010 05:47:19 +0000 Subject: [issue6818] remove/delete method for zipfile/tarfile objects In-Reply-To: <1251866532.69.0.504306670253.issue6818@psf.upfronthosting.co.za> Message-ID: <1278136039.45.0.0804092127443.issue6818@psf.upfronthosting.co.za> Troy Potts added the comment: My patch had some bugs, I'll need to do some more testing. Sorry about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 07:50:52 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 03 Jul 2010 05:50:52 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278136252.82.0.0745221088204.issue7989@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- stage: needs patch -> patch review Added file: http://bugs.python.org/file17848/issue7989.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 09:42:42 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 03 Jul 2010 07:42:42 +0000 Subject: [issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints) In-Reply-To: <1278142962.3.0.213920811411.issue9147@psf.upfronthosting.co.za> Message-ID: <1278142962.3.0.213920811411.issue9147@psf.upfronthosting.co.za> New submission from Nick Coghlan : Add a new API in the dis module that: 1. Works like show_code() but returns a string rather than printing to stdout 2. Accepts source strings directly, similar to the dis.dis() changes for 3.2 Tentative name: get_code_info() Inspired by Yanov Aknin's ssc() utility and the issue 6507 updates to dis.dis() ---------- assignee: ncoghlan components: Library (Lib) messages: 109161 nosy: ncoghlan priority: normal severity: normal status: open title: dis.show_code() variant that accepts source strings (and returns rather than prints) type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 09:43:12 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 03 Jul 2010 07:43:12 +0000 Subject: [issue6507] Enhance dis.dis to autocompile codestrings In-Reply-To: <1247857575.21.0.389925271165.issue6507@psf.upfronthosting.co.za> Message-ID: <1278142992.57.0.934353648034.issue6507@psf.upfronthosting.co.za> Nick Coghlan added the comment: Committed (with some minor modifications) in r82471. Inspired by Yanov Aknin's ssc() tool, I've opened a new RFE (issue 9147) for a similarly enhanced show_code() implementation. ---------- stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 10:37:17 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 03 Jul 2010 08:37:17 +0000 Subject: [issue9144] Import error for multiprocessing in 2.7rc2 on Windows In-Reply-To: <1278078195.79.0.768389993052.issue9144@psf.upfronthosting.co.za> Message-ID: <1278146237.01.0.844643068548.issue9144@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Here is the problem: there is no module multiprocessing._multiprocessing; _multiprocessing is a global module. However, multiprocessing/__init__.py imports _multiprocessing, providing multiprocessing._multiprocessing as a valid attribute. sys.modules['multiprocessing._multiprocessing'] is None. Now, on Windows, for some reason, from ._multiprocessing import win32 is used. In 2.6, this used to work. In 2.7, due to r81380, it stopped working (i.e. if I revert r81380, it works again). Adding Brett to the nosy list, as he made this change. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 10:43:22 2010 From: report at bugs.python.org (Paul Moore) Date: Sat, 03 Jul 2010 08:43:22 +0000 Subject: [issue9144] Import error for multiprocessing in 2.7rc2 on Windows In-Reply-To: <1278078195.79.0.768389993052.issue9144@psf.upfronthosting.co.za> Message-ID: <1278146602.74.0.59292547015.issue9144@psf.upfronthosting.co.za> Paul Moore added the comment: Martin's analysis (and the description of the commit he refers to) indicates that the correct fix is Cuiseppe's suggestion to change the relative imports to absolute: from _multiprocessing import ... as the previous code was only working because, as a result of the bug fixed in r81380, from ._multiprocessing was falling back to this form anyway. ---------- nosy: +pmoore _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 10:58:11 2010 From: report at bugs.python.org (Paul Moore) Date: Sat, 03 Jul 2010 08:58:11 +0000 Subject: [issue9144] Import error for multiprocessing in 2.7rc2 on Windows In-Reply-To: <1278078195.79.0.768389993052.issue9144@psf.upfronthosting.co.za> Message-ID: <1278147491.46.0.865006109218.issue9144@psf.upfronthosting.co.za> Paul Moore added the comment: Here's a patch implementing the suggested change. test_multiprocessing passes. I am just running the full test suite now. ---------- keywords: +patch Added file: http://bugs.python.org/file17849/mp.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 11:04:06 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Jul 2010 09:04:06 +0000 Subject: [issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints) In-Reply-To: <1278142962.3.0.213920811411.issue9147@psf.upfronthosting.co.za> Message-ID: <1278147846.23.0.169946515183.issue9147@psf.upfronthosting.co.za> Mark Dickinson added the comment: Yes, please! ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 11:07:33 2010 From: report at bugs.python.org (gonegown) Date: Sat, 03 Jul 2010 09:07:33 +0000 Subject: [issue8988] import + coding = failure (3.1.2/win32) In-Reply-To: <1276426235.15.0.873898512927.issue8988@psf.upfronthosting.co.za> Message-ID: <1278148053.01.0.702967614657.issue8988@psf.upfronthosting.co.za> gonegown added the comment: @Amaury: Removing #coding lines or replacing them with #coding: utf-8 makes this test case working, at least on 4 computers I have been able to test this. My initial program was consisting of roughly ten files and utf-8 made it work. @haypo: "maybe"... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 11:19:06 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 03 Jul 2010 09:19:06 +0000 Subject: [issue8988] import + coding = failure (3.1.2/win32) In-Reply-To: <1276426235.15.0.873898512927.issue8988@psf.upfronthosting.co.za> Message-ID: <1278148746.36.0.260588946056.issue8988@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Here is what I did, on a machine running Windows XP, with python 3.1.1: - I used 7-zip to extract the attached zip file, in the c:\temp directory. - Then I opened a command prompt, here is an exact copy of the session: C:>cd \temp\? C:\temp\?>dir Le volume dans le lecteur C s'appelle Disque dur Le num?ro de s?rie du volume est D4BA-260C R?pertoire de C:\temp\? 03/07/2010 11:10 . 03/07/2010 11:10 .. 08/06/2010 09:13 44 a.py 08/06/2010 14:21 11 b.py 2 fichier(s) 55 octets 2 R?p(s) 58?733?801?472 octets libres C:\temp\?>c:\Python31\python.exe a.py Traceback (most recent call last): File "a.py", line 3, in import b; ImportError: No module named b C:\temp\?>notepad a.py [Replaced encoding with "utf-8", then save and quit] C:\temp\?>c:\Python31\python.exe a.py Traceback (most recent call last): File "a.py", line 2, in import b; ImportError: No module named b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 11:21:25 2010 From: report at bugs.python.org (Paul Moore) Date: Sat, 03 Jul 2010 09:21:25 +0000 Subject: [issue9144] Import error for multiprocessing in 2.7rc2 on Windows In-Reply-To: <1278078195.79.0.768389993052.issue9144@psf.upfronthosting.co.za> Message-ID: <1278148885.15.0.0831459949027.issue9144@psf.upfronthosting.co.za> Paul Moore added the comment: Full test suite also looks OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 11:36:44 2010 From: report at bugs.python.org (John Machin) Date: Sat, 03 Jul 2010 09:36:44 +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: <1278149804.94.0.297532745098.issue8271@psf.upfronthosting.co.za> John Machin added the comment: About the E0 80 81 61 problem: my interpretation is that you are correct, the 80 is not valid in the current state (start byte == E0), so no look-ahead, three FFFDs must be issued followed by 0061. I don't really care about issuing too many FFFDs so long as it doesn't munch valid sequences. However it would be very nice to get an explicit message about surrogates. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 11:56:35 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Jul 2010 09:56:35 +0000 Subject: [issue7673] audioop: check that length is a multiple of the size In-Reply-To: <1263171957.43.0.71285781195.issue7673@psf.upfronthosting.co.za> Message-ID: <1278150995.06.0.746641963456.issue7673@psf.upfronthosting.co.za> Mark Dickinson added the comment: The new patch looks fine to me. This is rather last minute for 2.7, and I'm very uncomfortable committing anything substantial this close to the release. Still, if it's really a security vulnerability then it would be good to get it in. For what it's worth, the code looks fine to me, and I've tested thoroughly; I can't see any reasons this could cause problems. Raising priority to release blocker just to alert Benjamin to the issue, and get his permission to go ahead (or not) before the release. ---------- assignee: -> mark.dickinson nosy: +benjamin.peterson priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 11:57:49 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Jul 2010 09:57:49 +0000 Subject: [issue7673] audioop: check that length is a multiple of the size In-Reply-To: <1263171957.43.0.71285781195.issue7673@psf.upfronthosting.co.za> Message-ID: <1278151069.57.0.364214456259.issue7673@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- type: crash -> security _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 12:11:23 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Jul 2010 10:11:23 +0000 Subject: [issue7673] audioop: check that length is a multiple of the size In-Reply-To: <1263171957.43.0.71285781195.issue7673@psf.upfronthosting.co.za> Message-ID: <1278151883.51.0.697713604141.issue7673@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 12:24:51 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 03 Jul 2010 10:24:51 +0000 Subject: [issue7673] audioop: check that length is a multiple of the size In-Reply-To: <1263171957.43.0.71285781195.issue7673@psf.upfronthosting.co.za> Message-ID: <1278152691.34.0.266580965343.issue7673@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The following error messages looks strange to me: + if (((len / size) & 1) != 0) { + PyErr_SetString(AudioopError, "not a whole number of frames"); + return NULL; + } Perhaps you meant "not an even number of frames"? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 12:36:19 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Jul 2010 10:36:19 +0000 Subject: [issue7673] audioop: check that length is a multiple of the size In-Reply-To: <1263171957.43.0.71285781195.issue7673@psf.upfronthosting.co.za> Message-ID: <1278153379.22.0.740877806543.issue7673@psf.upfronthosting.co.za> Mark Dickinson added the comment: Well, that would depend on how you define a 'frame', I guess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 13:01:39 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 03 Jul 2010 11:01:39 +0000 Subject: [issue4945] json checks True/False by identity, not boolean value In-Reply-To: <1231911098.49.0.621266929609.issue4945@psf.upfronthosting.co.za> Message-ID: <1278154899.11.0.34720399632.issue4945@psf.upfronthosting.co.za> Mark Lawrence added the comment: Successfully ran test_json for Python 2.6.5 on Windows Vista. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 13:03:56 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 03 Jul 2010 11:03:56 +0000 Subject: [issue4945] json checks True/False by identity, not boolean value In-Reply-To: <1231911098.49.0.621266929609.issue4945@psf.upfronthosting.co.za> Message-ID: <1278155036.08.0.92000402385.issue4945@psf.upfronthosting.co.za> Mark Lawrence added the comment: Successfully ran test_json for Python 2.6.5 on Windows Vista. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 13:29:35 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 03 Jul 2010 11:29:35 +0000 Subject: [issue9148] os.execve puts process to background on windows In-Reply-To: <1278156575.44.0.771660264126.issue9148@psf.upfronthosting.co.za> Message-ID: <1278156575.44.0.771660264126.issue9148@psf.upfronthosting.co.za> New submission from anatoly techtonik : os.execve() is said to replace current process with new program. Unfortunately, when you try to call script that contains os.execve() on windows - that script spawns background process and control is immediately returned to the calling program. Does it behave the same on Unix? Is there any way to replace current process on Windows so that references to calling parent process are not lost and it could wait for execution to complete? ---------- components: Library (Lib) messages: 109176 nosy: techtonik priority: normal severity: normal status: open title: os.execve puts process to background on windows versions: Python 2.6, Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 13:49:26 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 03 Jul 2010 11:49:26 +0000 Subject: [issue1576313] os.execvp[e] on win32 fails for current directory Message-ID: <1278157766.73.0.777747622943.issue1576313@psf.upfronthosting.co.za> anatoly techtonik added the comment: There should be one uniform behavior on all platforms if Python is crossplatoform. As far as I can understand this issue - unix os.execv() requires "./" to be present to execute anything from current directory. On windows it is enough to specify just filename, but os.execv() doesn't work in this way - is that right and the issue is to make behavior of os.execv() like on windows? The current behavior definitely needs to be documented. ---------- nosy: +docs at python, techtonik versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 14:15:45 2010 From: report at bugs.python.org (Jesse Noller) Date: Sat, 03 Jul 2010 12:15:45 +0000 Subject: [issue9144] Import error for multiprocessing in 2.7rc2 on Windows In-Reply-To: <1278078195.79.0.768389993052.issue9144@psf.upfronthosting.co.za> Message-ID: <1278159345.28.0.702336710134.issue9144@psf.upfronthosting.co.za> Jesse Noller added the comment: the patch looks good to me - unless someone beats me to it, I'm going to commit it shortly to fix 2.7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 14:16:36 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 03 Jul 2010 12:16:36 +0000 Subject: [issue9148] os.execve puts process to background on windows In-Reply-To: <1278156575.44.0.771660264126.issue9148@psf.upfronthosting.co.za> Message-ID: <1278159396.48.0.197344887491.issue9148@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: on Windows, exec() does not really replace the current process. It creates a new process (with a new pid), and exits the current one. Hence the calling program only sees that the script has terminated. I don't see any easy solution on Windows, except than using subprocess.Popen(), and exit the script when the subprocess terminates. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 14:26:48 2010 From: report at bugs.python.org (Jesse Noller) Date: Sat, 03 Jul 2010 12:26:48 +0000 Subject: [issue9144] Import error for multiprocessing in 2.7rc2 on Windows In-Reply-To: <1278078195.79.0.768389993052.issue9144@psf.upfronthosting.co.za> Message-ID: <1278160008.99.0.941233410834.issue9144@psf.upfronthosting.co.za> Jesse Noller added the comment: Pushed it in r82489 - worked for me on Linux and OS/X. Please let me know if anything else comes up. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 14:27:24 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 03 Jul 2010 12:27:24 +0000 Subject: [issue7673] audioop: check that length is a multiple of the size In-Reply-To: <1263171957.43.0.71285781195.issue7673@psf.upfronthosting.co.za> Message-ID: <1278160044.02.0.299218851427.issue7673@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file15823/audioop_check_length.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 14:33:02 2010 From: report at bugs.python.org (David Hood) Date: Sat, 03 Jul 2010 12:33:02 +0000 Subject: [issue9149] colorsys.py function rgb_to_hls In-Reply-To: <1278160382.92.0.847390863693.issue9149@psf.upfronthosting.co.za> Message-ID: <1278160382.92.0.847390863693.issue9149@psf.upfronthosting.co.za> New submission from David Hood : colorsys.py function rgb_to_hls will crash on the RGB color (0,2,1) on line 68 with a division by zero error. 68 else: s = (maxc-minc) / (2.0-maxc-minc) ---------- messages: 109181 nosy: David.Hood priority: normal severity: normal status: open title: colorsys.py function rgb_to_hls type: crash versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 15:07:40 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 03 Jul 2010 13:07:40 +0000 Subject: [issue9148] os.execve puts process to background on windows In-Reply-To: <1278156575.44.0.771660264126.issue9148@psf.upfronthosting.co.za> Message-ID: <1278162460.78.0.632088987018.issue9148@psf.upfronthosting.co.za> anatoly techtonik added the comment: Does that mean that windows doesn't allow process replacement at all? I remember the time then game NoCD loaders were somehow able to load, patch and execute main program in their address space. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 15:47:52 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 03 Jul 2010 13:47:52 +0000 Subject: [issue7673] audioop: check that length is a multiple of the size In-Reply-To: <1263171957.43.0.71285781195.issue7673@psf.upfronthosting.co.za> Message-ID: <1278164872.39.0.323311061623.issue7673@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue is a security vulnerability referenced as CVE-2010-2089. Fixed in 2.7 (r82492), 2.6 (r82494), 3.2 (r82495) and 3.1 (r82496). -- > Perhaps you meant "not an even number of frames"? Hum, no: the input data is a stereo sound track. A "frame" includes left and right channels. ---------- assignee: mark.dickinson -> haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 15:48:15 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 03 Jul 2010 13:48:15 +0000 Subject: [issue7673] audioop: check that length is a multiple of the size In-Reply-To: <1263171957.43.0.71285781195.issue7673@psf.upfronthosting.co.za> Message-ID: <1278164895.04.0.792843748049.issue7673@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 17:08:29 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 03 Jul 2010 15:08:29 +0000 Subject: [issue1576313] os.execvp[e] on win32 fails for current directory Message-ID: <1278169709.98.0.292227363321.issue1576313@psf.upfronthosting.co.za> R. David Murray added the comment: The unix model should be followed (requiring an explicit reference to the current directory if it is not already in PATH), rather than the insecure Windows behavior, and this is indeed the current situation. The current behavior is documented ("a full or relative path"), but a footnote that this differs from the msvcrt behavior would probably be a useful addition. So I'm changing this to a doc bug. (I have verified that ./ works, I have not verified the msvcrt behavior.) ---------- assignee: -> docs at python components: +Documentation -Windows nosy: +r.david.murray stage: unit test needed -> needs patch type: feature request -> behavior versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 17:11:52 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 03 Jul 2010 15:11:52 +0000 Subject: [issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints) In-Reply-To: <1278142962.3.0.213920811411.issue9147@psf.upfronthosting.co.za> Message-ID: <1278169912.87.0.490652442173.issue9147@psf.upfronthosting.co.za> Nick Coghlan added the comment: Small correction to my first message: that would be Yaniv Aknin (not Yanov) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 17:14:26 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 03 Jul 2010 15:14:26 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278170066.15.0.889822835153.issue7989@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 18:25:54 2010 From: report at bugs.python.org (Daniel Urban) Date: Sat, 03 Jul 2010 16:25:54 +0000 Subject: [issue9147] dis.show_code() variant that accepts source strings (and returns rather than prints) In-Reply-To: <1278142962.3.0.213920811411.issue9147@psf.upfronthosting.co.za> Message-ID: <1278174354.4.0.837414547061.issue9147@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +durban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 19:59:05 2010 From: report at bugs.python.org (Ryan Hodin) Date: Sat, 03 Jul 2010 17:59:05 +0000 Subject: [issue9150] IDLE should not save trailing whitespace after strip trailing whitespace has been used In-Reply-To: <1278179945.62.0.903425904075.issue9150@psf.upfronthosting.co.za> Message-ID: <1278179945.62.0.903425904075.issue9150@psf.upfronthosting.co.za> New submission from Ryan Hodin : I commonly use IDLE to create very large files. this annoys me a little, but it takes up hard disk space and is unnessesary ---------- components: IDLE messages: 109186 nosy: rhprogrammer priority: normal severity: normal status: open title: IDLE should not save trailing whitespace after strip trailing whitespace has been used type: behavior versions: Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 19:59:32 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 03 Jul 2010 17:59:32 +0000 Subject: [issue5468] urlencode does not handle "bytes" and could easily handle alternate encodings In-Reply-To: <1236696316.6.0.478633045289.issue5468@psf.upfronthosting.co.za> Message-ID: <1278179972.1.0.678124798464.issue5468@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed and Committed revision 82510 (py3k) and revision 82511 (release31-maint). This fixes urlencode issue. parse_qs and parse_qsl can have the same capabilities. It will be done subsequently (in another commit or issue) Thanks Dan for the bug report and patch. ---------- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed title: urlencode does not handle "bytes", and could easily handle alternate encodings -> urlencode does not handle "bytes" and could easily handle alternate encodings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 20:17:54 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 03 Jul 2010 18:17:54 +0000 Subject: [issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping In-Reply-To: <1277997162.2.0.246195895629.issue9137@psf.upfronthosting.co.za> Message-ID: <1278181074.0.0.30328907739.issue9137@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Just a nitpick: I think the code will be clearer if you switch on args' length rather than catch IndexError: nargs = len(args) if nargs > 2: ... self = args[0] other = args[1] if nargs == 2 else () ... ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 21:18:50 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 03 Jul 2010 19:18:50 +0000 Subject: [issue9094] Make python-m pickletools do something useful In-Reply-To: <1277680335.26.0.237686854485.issue9094@psf.upfronthosting.co.za> Message-ID: <1278184730.23.0.374821472176.issue9094@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I would like to commit this. Any objections? Changes only affect running pickletools as __main__. Does this need to be documented in pickletools.rst? I noticed that dis.rst does not describe running dis.py from command line. Similarly, I cannot find tests for any module's command line behavior to base -m pickletools testing on. ---------- nosy: +mark.dickinson resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 22:03:22 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 03 Jul 2010 20:03:22 +0000 Subject: [issue9094] Make python-m pickletools do something useful In-Reply-To: <1277680335.26.0.237686854485.issue9094@psf.upfronthosting.co.za> Message-ID: <1278187402.19.0.160171787698.issue9094@psf.upfronthosting.co.za> Antoine Pitrou added the comment: In 'run self-test suit', I suppose you mean 'suite'. Otherwise, looks ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 22:38:43 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 03 Jul 2010 20:38:43 +0000 Subject: [issue9094] Make python-m pickletools do something useful In-Reply-To: <1277680335.26.0.237686854485.issue9094@psf.upfronthosting.co.za> Message-ID: <1278189523.16.0.084371127876.issue9094@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in r82514. I don't think this appropriate for 3.1, but will not block it yet if someone thinks it should be merged. ---------- stage: patch review -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 22:52:29 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 03 Jul 2010 20:52:29 +0000 Subject: [issue9151] Demo/classes/Dates.py does not work in 3.x Message-ID: <1278190349.61.0.933581518071.issue9151@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: belopolsky components: Demos and Tools nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: Demo/classes/Dates.py does not work in 3.x type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 23:06:34 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 03 Jul 2010 21:06:34 +0000 Subject: [issue9151] Demo/classes/Dates.py does not work in 3.x In-Reply-To: <1278191194.75.0.0730521584713.issue9151@psf.upfronthosting.co.za> Message-ID: <1278191194.75.0.0730521584713.issue9151@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : I am attaching a minimal patch to make included test pass. ---------- keywords: +easy, patch stage: needs patch -> patch review Added file: http://bugs.python.org/file17850/issue9151.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 23:14:35 2010 From: report at bugs.python.org (Brian Curtin) Date: Sat, 03 Jul 2010 21:14:35 +0000 Subject: [issue9149] colorsys.py function rgb_to_hls In-Reply-To: <1278160382.92.0.847390863693.issue9149@psf.upfronthosting.co.za> Message-ID: <1278191675.09.0.623421262627.issue9149@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- components: +Library (Lib) stage: -> unit test needed type: crash -> behavior versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 23:14:36 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 03 Jul 2010 21:14:36 +0000 Subject: [issue9093] Tools/README is out of date In-Reply-To: <1277658495.23.0.15994230675.issue9093@psf.upfronthosting.co.za> Message-ID: <1278191676.02.0.868252448748.issue9093@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Non-existing tools removed by Mark in r82515. There are still tools (see '-' lines above that need a README entry.) ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 23:18:13 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 03 Jul 2010 21:18:13 +0000 Subject: [issue9093] Tools/README is out of date In-Reply-To: <1277658495.23.0.15994230675.issue9093@psf.upfronthosting.co.za> Message-ID: <1278191893.1.0.621353179717.issue9093@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Also I believe 2to3 deserves to be mentioned in README. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 23:27:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 03 Jul 2010 21:27:59 +0000 Subject: [issue9093] Tools/README is out of date In-Reply-To: <1277658495.23.0.15994230675.issue9093@psf.upfronthosting.co.za> Message-ID: <1278192479.55.0.231347303218.issue9093@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 3 23:43:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 03 Jul 2010 21:43:09 +0000 Subject: [issue9151] Demo/classes/Dates.py does not work in 3.x In-Reply-To: <1278191194.75.0.0730521584713.issue9151@psf.upfronthosting.co.za> Message-ID: <1278193389.08.0.31843837774.issue9151@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in r82517. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 00:08:27 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 03 Jul 2010 22:08:27 +0000 Subject: [issue9151] Demo/classes/Dates.py does not work in 3.x In-Reply-To: <1278191194.75.0.0730521584713.issue9151@psf.upfronthosting.co.za> Message-ID: <1278194907.81.0.271273937019.issue9151@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed some minor "modernization" changes in r82521. Given that datetime.py is in the works (see issue7989), I don't think there is any reason to polish this demo further. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 00:56:10 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Sat, 03 Jul 2010 22:56:10 +0000 Subject: [issue9020] 2.7: eval hangs on AIX In-Reply-To: <1276805828.97.0.635702088758.issue9020@psf.upfronthosting.co.za> Message-ID: <1278197770.05.0.642011969122.issue9020@psf.upfronthosting.co.za> Sridhar Ratnakumar added the comment: 2.7 final works fine on AIX. This issue can be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 01:05:42 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 03 Jul 2010 23:05:42 +0000 Subject: [issue9020] 2.7: eval hangs on AIX In-Reply-To: <1276805828.97.0.635702088758.issue9020@psf.upfronthosting.co.za> Message-ID: <1278198342.08.0.608587065134.issue9020@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > 2.7 final works fine on AIX. This issue can be closed. Ok. Thanks for your reports! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 02:25:53 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Jul 2010 00:25:53 +0000 Subject: [issue9086] Wrong linking terminology in windows FAQ In-Reply-To: <1277546739.53.0.554976149521.issue9086@psf.upfronthosting.co.za> Message-ID: <1278203153.29.0.685270843202.issue9086@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 3.1 docs say same. For *nix, I would agree with your view of 'static', but perhaps MS uses a different terminology. Martin? Or maybe the doc writer is using a local def of static simply as a terse, if potentially confusing, alternative to 'load-time linking'. But that could just be .lib linking versus .dll linking, which is crystal clear. Can you write an alternative paragraph or two that you think is better? ---------- nosy: +loewis, tjreedy versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 03:10:40 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Jul 2010 01:10:40 +0000 Subject: [issue9091] str.capitalize() should not lower the rest of the string In-Reply-To: <1277609644.85.0.417350742268.issue9091@psf.upfronthosting.co.za> Message-ID: <1278205840.02.0.203216062708.issue9091@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I disagree and recommend adding " and the rest lowered". 'lower' could be marked as a reference to the .lower method. If one interprets 'capitalized' as an adjective describing the result, then it is fairly clear. If one interprets it as describing a process applied to only the first char, then is it not clear that something else (the inverse operation) is done to the rest. This additional would complete the description of the operation. With that addition, 'only' could be removed, so it reads "Return a copy of the string with its first character capitalized and the rest lowered." or 'lower-cased' or 'lowercased' as the editor prefers. Loading 'only' to mean 'and the rest lowered' is a bit much and not necessary. ---------- keywords: +patch nosy: +tjreedy resolution: invalid -> stage: committed/rejected -> patch review status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 03:33:34 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Jul 2010 01:33:34 +0000 Subject: [issue9101] reference json format in file formats chapter In-Reply-To: <1277739443.04.0.607128047102.issue9101@psf.upfronthosting.co.za> Message-ID: <1278207214.12.0.707111478934.issue9101@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Specific suggested text and location for doc changes are more likely to get action. "File Formats is chapter 13 in 3.x. The only text now is "The modules described in this chapter parse various miscellaneous file formats that aren?t markup languages or are related to e-mail." PATCH 1: I am quite sure that 'or are related to e-mail' should be replaced by 'and are not related to email'. In any case, this is not the place to add a specific comment about json. Perhaps you meant that in 13.2. configparser ? Configuration file parser, the following could be added to the end of the first paragraph. PATCH 2: "The json module is also used for this purpose." ---------- keywords: +patch nosy: +tjreedy stage: -> patch review versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 03:47:01 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Jul 2010 01:47:01 +0000 Subject: [issue9106] remove numbers from 3-.. level entries in docs toc In-Reply-To: <1277749704.58.0.992065909356.issue9106@psf.upfronthosting.co.za> Message-ID: <1278208021.31.0.576528515018.issue9106@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 'Invalid' because invalid for this tracker and moved to sphinx tracker (there is no option for 'wrong tracker'). On Windows help-format docs, there are no numbers on the left. There are in the chapter TOC in the chapter pages. I would have to see an alternative before I would say yes to changing that. I do wish the page/section for each module had a section toc with links so I could see what subsections there are and jump without scrolling. I gather that would be a sphinx tracker issue too. ---------- nosy: +tjreedy resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 05:39:25 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Jul 2010 03:39:25 +0000 Subject: [issue9152] Dead code in datetime module In-Reply-To: <1278214765.19.0.475716851207.issue9152@psf.upfronthosting.co.za> Message-ID: <1278214765.19.0.475716851207.issue9152@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Apparently introduced by a wholesale elimination of PyString_ in r57374, the else clause in the following snippet from call_tzname is redundant: if (!PyUnicode_Check(result)) { PyErr_Format(PyExc_TypeError, "tzinfo.tzname() must " "return None or a string, not '%s'", Py_TYPE(result)->tp_name); Py_DECREF(result); result = NULL; } else if (!PyUnicode_Check(result)) { PyObject *temp = PyUnicode_FromObject(result); Py_DECREF(result); result = temp; } ---------- assignee: belopolsky components: Extension Modules keywords: easy messages: 109203 nosy: belopolsky priority: normal severity: normal status: open title: Dead code in datetime module type: resource usage versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 05:47:15 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Jul 2010 03:47:15 +0000 Subject: [issue9152] Dead code in datetime module In-Reply-To: <1278214765.19.0.475716851207.issue9152@psf.upfronthosting.co.za> Message-ID: <1278215235.1.0.701482604493.issue9152@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- keywords: +patch nosy: +mark.dickinson resolution: -> accepted stage: -> commit review Added file: http://bugs.python.org/file17851/issue9152.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 05:55:14 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Jul 2010 03:55:14 +0000 Subject: [issue9118] help() on a property descriptor launches interactive help In-Reply-To: <1277836369.81.0.859952586368.issue9118@psf.upfronthosting.co.za> Message-ID: <1278215714.46.0.106798732762.issue9118@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree that help(None) should return help on None but suggest a change to the patch. I understand that the point of changing - def __call__(self, request=None): to the somewhat opaque + def __call__(self, *args): + try: + request, = args + except ValueError: is to make help() work the same as now without defaulting request to None. However, I believe that it will change help(1,2) to being the same as help() instead raising TypeError. I do not think that that API change is desirable. This can be avoided by instead creating a private sentinel. The alternate replacement would be + __GoInteractive = object() + def __call__(self, request=__GoInteractive): + if request is not __GoInteractive: - if request is not None: with the rest of code the unchanged. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 06:11:53 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Jul 2010 04:11:53 +0000 Subject: [issue9118] help() on a property descriptor launches interactive help In-Reply-To: <1277836369.81.0.859952586368.issue9118@psf.upfronthosting.co.za> Message-ID: <1278216713.3.0.427638894777.issue9118@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Yes, I realized that 2+ arguments would be equivalent to none, but was too lazy to handle that case. (Falling into interactive help may actually be better than an error message for some users.) Terry's solution is certainly better. Attaching issue9118a.diff. ---------- assignee: -> belopolsky resolution: -> accepted stage: patch review -> commit review versions: +Python 3.2 -Python 2.6, Python 2.7 Added file: http://bugs.python.org/file17852/issue9118a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 06:20:09 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Jul 2010 04:20:09 +0000 Subject: [issue9132] Documentation for comparing dictionaries is out of date In-Reply-To: <1277927951.56.0.908504944608.issue9132@psf.upfronthosting.co.za> Message-ID: <1278217209.54.0.182052664306.issue9132@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The RefMan section is 5.9. Comparisons. The 3.x docs are by design pretty much free of 2.x references. Which is to say, they are a fresh start with 3.0 as the base. So I would also remove footnote 5. Footnote 4 is currently needed because the text suggests something that is not true. Instead fix the text and remove 4. I verified both behavior claims with 3.1: >>> d1 = {1+1j: 2, 1+2j: 3} >>> d2 = {1+1j: 2, 1+2j: 3} >>> d1 == d2 True >>> d1 < d2 Traceback (most recent call last): File "", line 1, in d1 < d2 TypeError: unorderable types: dict() < dict() PATCH suggestion: Replace the current entry with "Mappings (dictionaries) compare equal if and only if they have the same key, value) pairs. Order comparision raise TypeError." Remove footnotes 4 and 5. "Comparisons other than equality testing raise a TypeError." is not quite correct because 'comparisons' include 'is' and 'in' which do work as expected. ---------- keywords: +patch nosy: +tjreedy type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 06:42:55 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Jul 2010 04:42:55 +0000 Subject: [issue960821] Add an updating load function in pickle Message-ID: <1278218575.8.0.0336641717569.issue960821@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: On the second reading, OP's request has nothing to do with pickle.load(). In fact, there is no coherent request here. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 07:07:09 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 05:07:09 +0000 Subject: [issue9132] Documentation for comparing dictionaries is out of date In-Reply-To: <1278217209.54.0.182052664306.issue9132@psf.upfronthosting.co.za> Message-ID: <4C3016F4.3030609@netwok.org> ?ric Araujo added the comment: Thanks for tackling this Terry. Did you include a patch, i.e. a diff file? If not, the ?patch? keyword does not apply, IIUC. Plain English suggestions are helpful but they?re reviewed in a different way than a diff. ?The 3.x docs are by design pretty much free of 2.x references. Which is to say, they are a fresh start with 3.0 as the base.? True. That said, I would leave footnote 4, since it provides a useful information for people caring about performance, and may interest them in digging into the details of the implementation. It may need an explicit mention ?in CPython?, though. ?So I would also remove footnote 5.? I don?t know. It?s an historical note about an implementation detail; it does no harm (apart maybe taking space for no gain) and may be interesting to some people. Does a core dev have an opinion on that (Georg?). ?Footnote 4 is currently needed because the text suggests something that is not true.? I can?t say if the text is inaccurate or just difficultly readable. ?"Mappings (dictionaries) compare equal if and only if they have the same key, value) pairs. Order comparision raise TypeError."? I?ll even say ?the same (key, value) pairs, irregardless of their order?. Is the term ?order comparisons? used in the doc? If not, its meaning is non-obvious, and I?d like to find something clearer. ?"Comparisons other than equality testing raise a TypeError." is not quite correct because 'comparisons' include 'is' and 'in' which do work as expected.? I thought ?is? was clearly identity and ?in? membership or containement testing in the doc. Can you support your claim? Cheers ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 07:11:10 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 05:11:10 +0000 Subject: [issue9101] reference json format in file formats chapter In-Reply-To: <1278207214.12.0.707111478934.issue9101@psf.upfronthosting.co.za> Message-ID: <4C3017EA.5070303@netwok.org> ?ric Araujo added the comment: 1: Agreed. Alternate short formulation: ?nor related to email?. 2: Agreed with Anatoly. json should be linked from the File Formats section, since it?s a file format unrelated to [SGML] markup languages or email, and it?s used for a variety of purposes, not only config files. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 10:06:01 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 04 Jul 2010 08:06:01 +0000 Subject: [issue9086] Wrong linking terminology in windows FAQ In-Reply-To: <1277546739.53.0.554976149521.issue9086@psf.upfronthosting.co.za> Message-ID: <1278230761.42.0.957569697478.issue9086@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I agree with John: this paragraph is technically incorrect. See http://msdn.microsoft.com/en-us/library/ms681914%28v=VS.85%29.aspx for an "official" definition of the relevant terms. I vaguely recall objecting to that text when it got added, but in the discussion, it would have meant that I would have to rewrite the text myself, which I didn't want to (maybe I'm confusing this with something else, though). In any case, it would be possible to actually use static linking as well for Python. There are currently no VS projects defined to create a static library, and such a thing couldn't dynamically load modules (which might not be necessary for embedding). I agree with Terry that it would be best if John would produce some text he's happy with. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 11:19:46 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 04 Jul 2010 09:19:46 +0000 Subject: [issue7673] audioop: check that length is a multiple of the size In-Reply-To: <1263171957.43.0.71285781195.issue7673@psf.upfronthosting.co.za> Message-ID: <1278235186.5.0.355783803222.issue7673@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It seems you introduced a reference leak, Victor. http://mail.python.org/pipermail/python-checkins/2010-July/094756.html ---------- priority: release blocker -> high resolution: fixed -> accepted status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 12:17:10 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Jul 2010 10:17:10 +0000 Subject: [issue7673] audioop: check that length is a multiple of the size In-Reply-To: <1263171957.43.0.71285781195.issue7673@psf.upfronthosting.co.za> Message-ID: <1278238630.88.0.671115738145.issue7673@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in r82527 (py3k), r82528 (release31-maint). ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 12:36:35 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 10:36:35 +0000 Subject: =?utf-8?q?=5Bissue4640=5D_optparse_doesn=E2=80=99t_disallow_adding_one-da?= =?utf-8?b?c2ggbG9uZyBvcHRpb25zICjigJwtb3B0aW9u4oCdKQ==?= In-Reply-To: <1229091283.09.0.553967635356.issue4640@psf.upfronthosting.co.za> Message-ID: <1278239795.22.0.415599929276.issue4640@psf.upfronthosting.co.za> ?ric Araujo added the comment: David committed a unit test in r82233. Who wants to propose a patch now? ---------- resolution: -> accepted stage: unit test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 13:40:49 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sun, 04 Jul 2010 11:40:49 +0000 Subject: [issue9145] test_coercion fails in refleak runs In-Reply-To: <1278092119.96.0.393167431946.issue9145@psf.upfronthosting.co.za> Message-ID: <1278243649.19.0.177984797546.issue9145@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- assignee: -> flox components: -Library (Lib) resolution: -> accepted stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 13:46:20 2010 From: report at bugs.python.org (Daniele Varrazzo) Date: Sun, 04 Jul 2010 11:46:20 +0000 Subject: [issue5672] Implement a way to change the python process name In-Reply-To: <1238701084.1.0.0781987214897.issue5672@psf.upfronthosting.co.za> Message-ID: <1278243980.33.0.00418891440975.issue5672@psf.upfronthosting.co.za> Daniele Varrazzo added the comment: Hello everybody, I've finished porting the module to Python 3, so I think it's a good starting point for considering its inclusion into the stdlib. The source is already out; tomorrow I'll test for regressions on mac osx and release the package. I'm not going to champion a PEP for its inclusion though, as I'm not the right person to do what described in the pep approval process. I have no objection if somebody wanted to push for it anyway and to fulfill the requirements outlined by Martin. Marcelo, I think it's up to you :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 15:33:10 2010 From: report at bugs.python.org (Matthias Klose) Date: Sun, 04 Jul 2010 13:33:10 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1278250390.76.0.469515668666.issue9012@psf.upfronthosting.co.za> Matthias Klose added the comment: this breaks the build if the time and datetime extensions are built statically into the python interpreter. The build fails with a link error; adding the _time extension to Modules/Setup.dist @@ -160,6 +160,7 @@ #cmath cmathmodule.c _math.c # -lm # complex math library functions #math mathmodule.c _math.c # -lm # math library functions, e.g. sin() #_struct _struct.c # binary structure packing/unpacking +#_time _time.c # # segregated code shared between time and datetime modules #time timemodule.c # -lm # time operations and variables #operator operator.c # operator.add() and similar goodies #_weakref _weakref.c # basic weak reference support you get another link error: libpython3.2.a(config.o):(.data+0x58): undefined reference to `PyInit__time' collect2: ld returned 1 exit status because _time isn't a proper extension. raising the severity as this is a regression ---------- nosy: +doko priority: normal -> high status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 15:33:25 2010 From: report at bugs.python.org (Matthias Klose) Date: Sun, 04 Jul 2010 13:33:25 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1278250405.78.0.518977711389.issue9012@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- resolution: fixed -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 15:52:11 2010 From: report at bugs.python.org (Matthias Klose) Date: Sun, 04 Jul 2010 13:52:11 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1278251531.15.0.704651698733.issue9012@psf.upfronthosting.co.za> Matthias Klose added the comment: please find attached a patch to build as a statically linked extension, registering the empty _time module. ---------- Added file: http://bugs.python.org/file17853/time.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 16:07:41 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 04 Jul 2010 14:07:41 +0000 Subject: =?utf-8?q?=5Bissue4640=5D_optparse_doesn=E2=80=99t_disallow_adding_one-da?= =?utf-8?b?c2ggbG9uZyBvcHRpb25zICjigJwtb3B0aW9u4oCdKQ==?= In-Reply-To: <1229091283.09.0.553967635356.issue4640@psf.upfronthosting.co.za> Message-ID: <1278252461.26.0.170472506863.issue4640@psf.upfronthosting.co.za> R. David Murray added the comment: I didn't commit a unit test for the revised subject, my unit test was for the previous misunderstood diagnosis. So a unit test for disallowing single dash long options in add_option is still needed. Note that this appears (at least on a quick test) to apply to argparse as well. I've left 2.7 and 3.1 in versions, but I'm not 100% sure this should be backported since it is a behavior change. But it's hard to imagine working code using this (does it even do anything, or is the single dash option just silently ignored?) ---------- nosy: +bethard versions: +Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 16:12:32 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 14:12:32 +0000 Subject: [issue8910] Write a text file explaining why Lib/test/data exists In-Reply-To: <1275793580.19.0.611567237471.issue8910@psf.upfronthosting.co.za> Message-ID: <1278252752.45.0.752943319666.issue8910@psf.upfronthosting.co.za> ?ric Araujo added the comment: Benjamin, is it too late? ---------- nosy: +benjamin.peterson versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 16:13:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 14:13:07 +0000 Subject: [issue7829] dis module documentation gives no indication of the dangers of bytecode inspection In-Reply-To: <1265030716.3.0.107246651396.issue7829@psf.upfronthosting.co.za> Message-ID: <1278252787.36.0.867630701921.issue7829@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 16:15:10 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Jul 2010 14:15:10 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1278252910.17.0.153563120434.issue9012@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: _time.c is not supposed to be compiled into an extension. It is similar to _math.c - if you add a line _math _math.c to Setup, you get a similar compile error. What needs to be done, however, is to add _time.c to time and datetime lines. See issue9012a.diff. ---------- Added file: http://bugs.python.org/file17854/issue9012a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 16:25:30 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sun, 04 Jul 2010 14:25:30 +0000 Subject: [issue9145] test_coercion fails in refleak runs In-Reply-To: <1278092119.96.0.393167431946.issue9145@psf.upfronthosting.co.za> Message-ID: <1278253530.91.0.231753888242.issue9145@psf.upfronthosting.co.za> Florent Xicluna added the comment: Fixed with r82529 ---------- resolution: accepted -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 16:47:56 2010 From: report at bugs.python.org (Matthias Klose) Date: Sun, 04 Jul 2010 14:47:56 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1278254876.42.0.768111469965.issue9012@psf.upfronthosting.co.za> Matthias Klose added the comment: doesn't work: ranlib libpython3.2.a Modules/_time.o: In function `_PyTime_DoubleToTimet': /scratch/packages/python/3.2/python3.2-3.2~~20100704/build-shared/../Modules/_time.c:11: multiple definition of `_PyTime_DoubleToTimet' Modules/_time.o:/scratch/packages/python/3.2/python3.2-3.2~~20100704/build-shared/../Modules/_time.c:11: first defined here collect2: ld returned 1 exit status ln: accessing `libpython3.2.so.1.0': No such file or directory make[1]: *** [libpython3.2.so] Error 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 17:01:39 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Jul 2010 15:01:39 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1278255699.81.0.304010601056.issue9012@psf.upfronthosting.co.za> Mark Dickinson added the comment: Matthias, does building both the math and cmath modules statically into the interpreter fail in a similar manner? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 17:07:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 15:07:06 +0000 Subject: [issue8892] 2to3 fails with assertion failure on "from itertools import *" In-Reply-To: <1275603651.87.0.583205697426.issue8892@psf.upfronthosting.co.za> Message-ID: <1278256026.44.0.875666112638.issue8892@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 17:15:49 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 15:15:49 +0000 Subject: [issue1506122] Add "compose" function to the functools Message-ID: <1278256549.3.0.398315441381.issue1506122@psf.upfronthosting.co.za> ?ric Araujo added the comment: Gregory, any update on this? Maybe you can poll python-ideas. Collin, any download stats and feedback on your package? ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 17:17:18 2010 From: report at bugs.python.org (Matthias Klose) Date: Sun, 04 Jul 2010 15:17:18 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1278256638.32.0.669181507148.issue9012@psf.upfronthosting.co.za> Matthias Klose added the comment: yes, same issue with math/cmath. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 17:21:06 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Jul 2010 15:21:06 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1278256866.38.0.537155937505.issue9012@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks. Looks like we need a general solution to the problem of shared (non-module) dependencies in modules. So all that's needed is a way to stop _time.o showing up twice in MODOBJS in the Makefile, right? (For some reason, ranlib on OS X doesn't seem to have any problem with multiply-defined symbols; obviously Linux is different.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 17:21:38 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 15:21:38 +0000 Subject: [issue8472] itertools.filterfalse() function missing In-Reply-To: <1271781455.61.0.874507707977.issue8472@psf.upfronthosting.co.za> Message-ID: <1278256898.75.0.866686682875.issue8472@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 17:24:41 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 04 Jul 2010 15:24:41 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> Message-ID: <1278257081.73.0.16668625991.issue9141@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: I don't understand the tp_del / tp_dealloc argument here. This is really not the concern of gc. Gc only goes and finds unreachable objects, and if they are deemend collectable, makes them go away by clearing their references. GC only cares that during the final release of any objects in a reference cycle, no non-trivial code may run (for various technical reasons). So, objects deemed "sensitive" in this way, are left alone (and put in gc.garbage instead). GC has no other knowledge of how objects behave, if or when any finalizers are called. The only thing gc does is calling Py_DECREF (through the tp_clear slot). Everything else is up to the objects. The intent of this patch is for objects themselves to be able to provide better information to GC as to whether they are too "sensitive" to be cleared by GC, rather than GC relying solely on the presence of a __del__ method, or using the builtin special case knowledbe for PyGen objects. Whether finalizers are called from tp_del or tp_dealloc is beyond the scope of the gc module or, indeed, this patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 17:31:13 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 15:31:13 +0000 Subject: [issue9153] Run tests and demos as part of the test suite In-Reply-To: <1278257473.49.0.485349644123.issue9153@psf.upfronthosting.co.za> Message-ID: <1278257473.49.0.485349644123.issue9153@psf.upfronthosting.co.za> New submission from ?ric Araujo : I propose than tests and demos be run during the test suite, as a sanity check to prevent them getting badly out of sync (see ?Signs of neglect thread?? starting at http://mail.python.org/pipermail/python-dev/2010-June/101092.html) Is this a good idea? ---------- components: Demos and Tools, Tests messages: 109227 nosy: merwok priority: low severity: normal status: open title: Run tests and demos as part of the test suite versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 17:32:43 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 15:32:43 +0000 Subject: [issue9153] Run tests and demos as part of the test suite In-Reply-To: <1278257473.49.0.485349644123.issue9153@psf.upfronthosting.co.za> Message-ID: <1278257563.58.0.0461591435659.issue9153@psf.upfronthosting.co.za> ?ric Araujo added the comment: I propose that tests and demos be run during the test suite, as a sanity check to prevent them from getting badly out of sync (see ?Signs of neglect thread?? starting at http://mail.python.org/pipermail/python-dev/2010-June/101092.html) Is this a good idea? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 17:32:49 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 15:32:49 +0000 Subject: [issue9153] Run tests and demos as part of the test suite In-Reply-To: <1278257563.58.0.0461591435659.issue9153@psf.upfronthosting.co.za> Message-ID: <1278257569.32.0.054135944122.issue9153@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 17:34:27 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 04 Jul 2010 15:34:27 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278257081.73.0.16668625991.issue9141@psf.upfronthosting.co.za> Message-ID: <1278257661.3250.7.camel@localhost.localdomain> Antoine Pitrou added the comment: > GC only cares that during the final release of any objects in a > reference cycle, no non-trivial code may run (for various technical > reasons). So, objects deemed "sensitive" in this way, are left alone > (and put in gc.garbage instead). Which is really the problem, and why you should prefer tp_dealloc over tp_del. (unless you want gc.garbage to fill up too easily) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 18:13:01 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 04 Jul 2010 16:13:01 +0000 Subject: [issue8892] 2to3 fails with assertion failure on "from itertools import *" In-Reply-To: <1275603651.87.0.583205697426.issue8892@psf.upfronthosting.co.za> Message-ID: <1278259981.18.0.342517617634.issue8892@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r82530. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 18:13:39 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Jul 2010 16:13:39 +0000 Subject: [issue9149] colorsys.py function rgb_to_hls In-Reply-To: <1278160382.92.0.847390863693.issue9149@psf.upfronthosting.co.za> Message-ID: <1278260019.62.0.751962076942.issue9149@psf.upfronthosting.co.za> Mark Dickinson added the comment: I think the arguments to rgb_to_hls are supposed to be floats in the range [0.0, 1.0]. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 18:20:43 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Jul 2010 16:20:43 +0000 Subject: [issue9128] Parser module fails to validate class decorators correctly. In-Reply-To: <1277921502.31.0.321329745458.issue9128@psf.upfronthosting.co.za> Message-ID: <1278260443.41.0.0960271487151.issue9128@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 18:29:26 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Jul 2010 16:29:26 +0000 Subject: [issue9152] Dead code in datetime module In-Reply-To: <1278214765.19.0.475716851207.issue9152@psf.upfronthosting.co.za> Message-ID: <1278260966.02.0.167591903738.issue9152@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in r82533. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 18:30:46 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Jul 2010 16:30:46 +0000 Subject: [issue9128] Parser module fails to validate class decorators correctly. In-Reply-To: <1277921502.31.0.321329745458.issue9128@psf.upfronthosting.co.za> Message-ID: <1278261046.29.0.891414762994.issue9128@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in r82532 (release27-maint) and r82534 (release26-maint). ---------- versions: -Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 18:33:30 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 16:33:30 +0000 Subject: [issue7582] Use ISO timestamp in diff.py In-Reply-To: <1261929478.18.0.289329990174.issue7582@psf.upfronthosting.co.za> Message-ID: <1278261210.29.0.303544104146.issue7582@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- title: [patch] diff.py to use iso timestamp -> Use ISO timestamp in diff.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 18:37:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 16:37:59 +0000 Subject: [issue444582] Finding programs in PATH, addition to os Message-ID: <1278261479.2.0.262693709761.issue444582@psf.upfronthosting.co.za> ?ric Araujo added the comment: Is a ?which? function that useful, since we have os.exec* functions that search the PATH for us? It seems to me that wanting to know the exact path of an executable is a specialized need, and that adding this function would make beginners use it instead of the os.exec* family. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 18:39:16 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Jul 2010 16:39:16 +0000 Subject: [issue9152] Dead code in datetime module In-Reply-To: <1278214765.19.0.475716851207.issue9152@psf.upfronthosting.co.za> Message-ID: <1278261556.08.0.0618874155248.issue9152@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Merged in 3.1 in r82536. ---------- stage: commit review -> committed/rejected versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 18:40:54 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Jul 2010 16:40:54 +0000 Subject: [issue9128] Parser module fails to validate class decorators correctly. In-Reply-To: <1277921502.31.0.321329745458.issue9128@psf.upfronthosting.co.za> Message-ID: <1278261654.72.0.999125682315.issue9128@psf.upfronthosting.co.za> Mark Dickinson added the comment: and in r82537 (py3k), r82539 (release31-maint). ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 18:56:34 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 16:56:34 +0000 Subject: [issue9153] Run tests and demos as part of the test suite In-Reply-To: <1278257563.58.0.0461591435659.issue9153@psf.upfronthosting.co.za> Message-ID: <1278262594.11.0.969192951848.issue9153@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +holdenweb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 18:58:33 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 16:58:33 +0000 Subject: [issue7962] Demo and Tools need to be tested and pruned In-Reply-To: <1266531589.82.0.915519058153.issue7962@psf.upfronthosting.co.za> Message-ID: <1278262713.65.0.839961253863.issue7962@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m making this a meta-bug to record the evaluation of demos and tools, in followup with the thread ?Signs of neglect?? started on http://mail.python.org/pipermail/python-dev/2010-June/101092.html. Some of them have already been adopted or deleted. Please add yourself to Misc/maintainers.rst when you adopt one. I also propose adding either a section in the README or a new README.removed file to list the deletions; there are probably people out there using these tools (maybe not demos, though), so it?s more polite to tell them ?metaclasses is removed, see this doc for modern built-in metaclasses? than to just remove the file. Regarding testing, please comment on #9153. ---------- dependencies: +Demo/embed/demo.c use of PySys_SetArgv() is invalid, Use ISO timestamp in diff.py, replace dist/src/Tools/scripts/which.py with tmick's which, svnmerge errors in msgfmt.py nosy: +holdenweb title: Demo/ directory needs to be tested and pruned -> Demo and Tools need to be tested and pruned _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 18:58:42 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 16:58:42 +0000 Subject: [issue9083] At least some Tools utilities are still Python 2 In-Reply-To: <1277505524.04.0.87838503944.issue9083@psf.upfronthosting.co.za> Message-ID: <1278262722.56.0.893960548339.issue9083@psf.upfronthosting.co.za> ?ric Araujo added the comment: I opened a bug about testing demos and tools: #9153. There was already a bug about cleaning up demos, #7962, so I?ve made it into a meta-bug for demos and tools, superseding this one. Steve, I?m adding you to the nosy there, but I don?t feel confident enough to raise the severity or add other people to nosy. ---------- nosy: +merwok resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> Demo and Tools need to be tested and pruned versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 19:06:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Jul 2010 17:06:40 +0000 Subject: [issue9118] help() on a property descriptor launches interactive help In-Reply-To: <1277836369.81.0.859952586368.issue9118@psf.upfronthosting.co.za> Message-ID: <1278263200.39.0.0806795585833.issue9118@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in r82547. I am leaving it open to decide whether this is a 3.1-backport candidate. Also I am not sure this is NEWS-worthy. Jack, Does this address your issue? Note that >>> help(X.foo.fset) will still not return help on X.foo, but it will make it obvious that X.foo.fset is None. ---------- stage: commit review -> committed/rejected versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 19:11:05 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 04 Jul 2010 17:11:05 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> Message-ID: <1278263465.31.0.812372812479.issue9141@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: I'm confused, Antoine. _I_ am not preferring anything. I am not modifying the way finalizers are called. I'm merely providing a way for objects to signal that they _have_ (or don't have) non-trivial finalizers. A finalizer _may_ be tp_del, but it may be any code that is called as part of tp_dealloc(). This patch allows an object to say: Calling tp_dealloc() is currently unsafe from a gc.collect() run. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 19:17:15 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 04 Jul 2010 17:17:15 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278263465.31.0.812372812479.issue9141@psf.upfronthosting.co.za> Message-ID: <1278263831.3250.14.camel@localhost.localdomain> Antoine Pitrou added the comment: > A finalizer _may_ be tp_del, but it may be any code that is called as > part of tp_dealloc(). This patch allows an object to say: Calling > tp_dealloc() is currently unsafe from a gc.collect() run. Well, I don't know what you mean. tp_dealloc should always be "safe" and is never checked for by the GC. By the way, tp_del isn't even documented, which reinforces my point that it's not really for use by third-party extension types. I think we are reaching the point where, if you want this to happen, you should ask for opinions on python-dev, because I really don't understand which problem you are trying to solve. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 19:18:08 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Jul 2010 17:18:08 +0000 Subject: [issue9153] Run tests and demos as part of the test suite In-Reply-To: <1278257563.58.0.0461591435659.issue9153@psf.upfronthosting.co.za> Message-ID: <1278263888.1.0.57514081846.issue9153@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Many demos already include a self-test: $ grep '^def test(' Demo/*/*.py Demo/classes/Complex.py:def test(): Demo/classes/Dates.py:def test(firstyear, lastyear): Demo/classes/Range.py:def test(): Demo/classes/Vec.py:def test(): Demo/parser/test_parser.py:def test(): Demo/pdist/FSProxy.py:def test(): Demo/pdist/RCSProxy.py:def test(): Demo/pdist/cmdfw.py:def test(): Demo/pdist/cvslib.py:def test(): Demo/pdist/cvslock.py:def test(): Demo/rpc/mountclient.py:def test(): Demo/rpc/nfsclient.py:def test(): Demo/rpc/rnusersclient.py:def test(): Demo/rpc/rpc.py:def test(): Demo/scripts/markov.py:def test(): Demo/sockets/gopher.py:def test(): Demo/threads/Generator.py:def test(): Demo/threads/sync.py:def test(): Demo/turtle/tdemo_penrose.py:def test(l=200, n=4, fun=sun, startpos=(0,0), th=2): I think the first step should be to run those from regrtest. The next step would be to convert adhoc test functions into doctests or unit tests as appropriate. Step zero, however, should be to decide which demos are worth keeping and which should be removed. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 19:24:24 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Jul 2010 17:24:24 +0000 Subject: [issue7962] Demo and Tools need to be tested and pruned In-Reply-To: <1266531589.82.0.915519058153.issue7962@psf.upfronthosting.co.za> Message-ID: <1278264264.13.0.876363301911.issue7962@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I fixed Dates.py. See issue9151. I also committed a minimal fix for Complex.py in r82524. ---------- dependencies: +Demo/classes/Dates.py does not work in 3.x nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 19:28:59 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 04 Jul 2010 17:28:59 +0000 Subject: [issue8472] itertools.filterfalse() function missing In-Reply-To: <1271781455.61.0.874507707977.issue8472@psf.upfronthosting.co.za> Message-ID: <1278264539.61.0.792596552995.issue8472@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, applied the suggestion in r82548. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 19:43:31 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Jul 2010 17:43:31 +0000 Subject: [issue7962] Demo and Tools need to be tested and pruned In-Reply-To: <1266531589.82.0.915519058153.issue7962@psf.upfronthosting.co.za> Message-ID: <1278265411.43.0.395937775554.issue7962@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I fixed Rev.py in r82550, but I don't think it is worth keeping in the current form. Maybe it can be replaced with a pure python reimplementation of builtins.reversed. Note that slicing does not work for Rev: >>> r = Rev([1,2,3]) >>> r[:] Traceback (most recent call last): File "", line 1, in File "Demo/classes/Rev.py", line 69, in __getitem__ return self.forw[-(j + 1)] TypeError: unsupported operand type(s) for +: 'slice' and 'int' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 19:48:14 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Jul 2010 17:48:14 +0000 Subject: [issue7962] Demo and Tools need to be tested and pruned In-Reply-To: <1266531589.82.0.915519058153.issue7962@psf.upfronthosting.co.za> Message-ID: <1278265694.5.0.905888701127.issue7962@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Fixed Range.py in r82551. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 19:56:21 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 04 Jul 2010 17:56:21 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> Message-ID: <1278266181.78.0.521399186253.issue9141@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: tp_del() is generally invoked by tp_dealloc(). See for example typeobject.c:849. gc.collect() never invokes tp_del() directy, that is left for the objects themselves (as part of tp_dealloc()) Now, gc already knows that if tp_del is present, it cannot cause break the cycle, (for various technical reasons, one of them being that tp_del would be invoked with various dependency objects already nerfed by tp_clear()). But this is not always enough: 1) it may be too pessimistic. Sometimes the tp_del method doesn't do anything significant, or isn't even called, depending on runtime state, so it is safe for gc to clear the object (see for example genobject.c:30). 2) Sometimes finalization behaviour is not defined by a tp_del method at all, but rather some custom code in tp_dealloc. All this patch does, is to generalize the mechanism already provided for genobject.c (by PyGen_NeedsFinalizing()), to any object: Any object can signal to gc that: a) it is ok to collect a cycle with me in it, or b) no, it is unsafe to do so. With this patch in place, PyGen_NeedsFinalizing() no longer needs to be a special case in gcmodule.c. Yes, I'll send a message to python-dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 19:57:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 17:57:16 +0000 Subject: [issue9151] Demo/classes/Dates.py does not work in 3.x In-Reply-To: <1278191194.75.0.0730521584713.issue9151@psf.upfronthosting.co.za> Message-ID: <1278266236.57.0.627578876762.issue9151@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 19:58:00 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 17:58:00 +0000 Subject: [issue9151] Demo/classes/Dates.py does not work in 3.x In-Reply-To: <1278191194.75.0.0730521584713.issue9151@psf.upfronthosting.co.za> Message-ID: <1278266280.54.0.250771961637.issue9151@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: accepted -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 19:59:13 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 04 Jul 2010 17:59:13 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278266181.78.0.521399186253.issue9141@psf.upfronthosting.co.za> Message-ID: <1278266349.3250.17.camel@localhost.localdomain> Antoine Pitrou added the comment: > All this patch does, is to generalize the mechanism already provided > for genobject.c (by PyGen_NeedsFinalizing()), to any object: Any > object can signal to gc that: a) it is ok to collect a cycle with me > in it, or b) no, it is unsafe to do so. With this patch in place, > PyGen_NeedsFinalizing() no longer needs to be a special case in > gcmodule.c. Adding an API function and an additional traversal pass to the GC just for the sake of removing a special case doesn't seem reasonable to me. That's why I'm asking what specific problem you are trying to solve. (rather than simply trying to make things "nicer") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 19:59:38 2010 From: report at bugs.python.org (Brian Curtin) Date: Sun, 04 Jul 2010 17:59:38 +0000 Subject: [issue7962] Demo and Tools need to be tested and pruned In-Reply-To: <1266531589.82.0.915519058153.issue7962@psf.upfronthosting.co.za> Message-ID: <1278266378.82.0.441640566727.issue7962@psf.upfronthosting.co.za> Brian Curtin added the comment: I should note here that I fixed Demo/md5test/md5driver.py in r82351 (py3k) and r82352 (release31-maint). ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 20:07:31 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Jul 2010 18:07:31 +0000 Subject: [issue9118] help() on a property descriptor launches interactive help In-Reply-To: <1277836369.81.0.859952586368.issue9118@psf.upfronthosting.co.za> Message-ID: <1278266851.33.0.619058380147.issue9118@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The doc says that help takes one optional arg: No arg: interactive help system String: interpret as name of something Any other object: help page for that object [by implication, multiple args: TypeError] Not returning help for None is a bug, so I say yes, backport, including to 2.6/7 if they have same bug. I think the OP's example, which turns on the fact that None is an object that can be attached to any target, and not just a name, illustrates the bugginess of the current behavior. If NEWS includes a detailed list of bugfixes, then this could be included. If not, no. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 20:12:13 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 18:12:13 +0000 Subject: [issue9153] Run tests and demos as part of the test suite In-Reply-To: <1278257563.58.0.0461591435659.issue9153@psf.upfronthosting.co.za> Message-ID: <1278267133.37.0.857683690014.issue9153@psf.upfronthosting.co.za> ?ric Araujo added the comment: Yep, my idea was to add a really thin regrtest integration layer for these self-tests (which have no reason to move to Lib/tests, really), e.g. add a tests.test_demos_tools module that would import all these test functions and stuff them into a unittest test suite. I did not detail that in my report since I wanted first an agreement on the idea (i.e. a core dev setting resolution to accepted :) ---------- type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 20:19:40 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Jul 2010 18:19:40 +0000 Subject: [issue9130] Parser module fails on short relative imports In-Reply-To: <1277926266.72.0.295877621023.issue9130@psf.upfronthosting.co.za> Message-ID: <1278267580.76.0.788494601356.issue9130@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in revisions r82543, r82546, r82552, r82553, r82554. Leaving open because I'm suspicious that the parser module isn't handling relative imports with more than three dots correctly in py3k (since ... gets parsed as an ellipsis token). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 20:40:57 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Jul 2010 18:40:57 +0000 Subject: [issue9130] Parser module fails on short relative imports In-Reply-To: <1277926266.72.0.295877621023.issue9130@psf.upfronthosting.co.za> Message-ID: <1278268857.26.0.823670408524.issue9130@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ellipsis token validation fixed in r82555 (py3k), r82556 (release31-maint). ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 20:42:46 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 18:42:46 +0000 Subject: [issue9095] patchcheck should handle extraneous whitespace in .rst files In-Reply-To: <1277683188.13.0.698937807833.issue9095@psf.upfronthosting.co.za> Message-ID: <1278268966.62.0.0399603676635.issue9095@psf.upfronthosting.co.za> ?ric Araujo added the comment: Please apply the refactor patch in #8912 ---------- dependencies: +`make patchcheck` should check the whitespace of .c/.h files versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 21:00:49 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 19:00:49 +0000 Subject: [issue8999] Add Mercurial support to patchcheck In-Reply-To: <1276593572.4.0.720668123002.issue8999@psf.upfronthosting.co.za> Message-ID: <1278270049.54.0.0963299210107.issue8999@psf.upfronthosting.co.za> ?ric Araujo added the comment: > [...] using a simple "hg status" of the working copy will not do the right thing I think all of these workflows share a step where you have edits in your working directory that are not in the working dir?s parent changeset. Thus, I argue that hg status is helpful in a majority of cases. In the long term, it may be better to make patchcheck work on diffs rather than $vcs status (that will be an interesting challenge for me), or something else depending on the future dev policy. That is explicitly what I?m not doing here: I?m doing a straightforward patch to add support for Mercurial in a way that just mimics Subversion, doesn?t mandate one workflow, and doesn?t cost anything. Now it?s up to you to commit this or set resolution to ?later?, I won?t argue further or complain. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 21:03:24 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Jul 2010 19:03:24 +0000 Subject: [issue9154] Parser module doesn't understand function annotations. In-Reply-To: <1278270204.2.0.0990664909847.issue9154@psf.upfronthosting.co.za> Message-ID: <1278270204.2.0.0990664909847.issue9154@psf.upfronthosting.co.za> New submission from Mark Dickinson : Python 3.2a0 (py3k:82529M, Jul 4 2010, 17:35:10) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import parser [38213 refs] >>> parser.sequence2st(parser.suite("def f(a:int) -> int: pass").totuple()) Traceback (most recent call last): File "", line 1, in parser.ParserError: VALIDATION FAILURE: report this to the maintainer! [38264 refs] ---------- assignee: mark.dickinson components: Extension Modules messages: 109256 nosy: mark.dickinson priority: normal severity: normal stage: unit test needed status: open title: Parser module doesn't understand function annotations. type: behavior versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 21:07:21 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Jul 2010 19:07:21 +0000 Subject: [issue9132] Documentation for comparing dictionaries is out of date In-Reply-To: <1277927951.56.0.908504944608.issue9132@psf.upfronthosting.co.za> Message-ID: <1278270441.84.0.901724820129.issue9132@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On the 'patch' keyword: I thought the same as you (only for diff) until yesterday morning when Brett Cannon specifically told me that I should also set it for in-message text patches. This was in the context of him having not noticed for months (until I pinged him) that I had included a text patch in a message for an issue assigned to him, because he skims messages and looks for the keyword and other header changes. So until a 'higher' tracker authority tell me differently, I am following his direction. I am also highlighting the actual patch in the message to make it easy to find. The current "compare equal if and only if their sorted (key, value) lists compare equal. [4]" was written when all objects were comparable and when dict == dict *was* written that way (according to [5]). The footnote was added to assure people that the new internal implementation was faster (ie, set comparison via hash lookup) than it once had been. For a long time, that definition of dict equality has been invalid because it cannot be implemented that way; the definition is even more meaningless in Python3. So is footnote [4] saying that the meaningless definition is not the implementation. Both [4] and [5] are ancient fossils referring back to Python1. Without looking, I am confident that the actual implementation is O(1) if the dicts are unequal in size and an O(n) (key,value) set comparison if they are equal in size. My proposed revision is intended to imply that. Note that Python did not have sets when the sorted list definition was written. Also note that there is no footnote attached to set comparison (which once could have also been defined in terms of sorted lists). Dicts are sets (of pairs), not unsorted lists (of pairs) and the current docs should reflect that. The language def makes no guarantees about implementation efficiency. In 13 years of watching c.l.p/python-list, I have not seen any particular concern about dict comparison that would warrant special notice. Rather, people worry about the big-O behavior of building large lists and dicts of millions of items. The sometimes need persuading that construction is more efficient than they might imagine. That is about the only thing I can think of for which an efficiency note might be a good idea. 'Comparisons other than equality testing' include 'is' and 'in'. They work for dictionaries as expected, which is to say, as identify and containment testing, as for everything else. They do not raise TypeError. So the statement that implies that they do is not correct. PATCH REVISION: The suggested "Order comparision raise TypeError." has spelling and agreement errors in 'comparision' and should be "Order comparisons raise TypeError." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 21:15:52 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 04 Jul 2010 19:15:52 +0000 Subject: [issue9096] importlib doesn't handle valid marshalled data with invalid semantics In-Reply-To: <1277684900.43.0.0388442576736.issue9096@psf.upfronthosting.co.za> Message-ID: <1278270952.46.0.833323043203.issue9096@psf.upfronthosting.co.za> Brett Cannon added the comment: This was fixed in r82523. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 21:54:01 2010 From: report at bugs.python.org (Demur Rumed) Date: Sun, 04 Jul 2010 19:54:01 +0000 Subject: [issue9155] Reserve COMPARE_OP for RichComparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> New submission from Demur Rumed : Currently, COMPARE_OP is burdened by a needless, and unorthogonal, extra layer of indirection. I've modified it to only handle the rich comparison case, moving the other five cases to BINARY_IN, BINARY_NOT_IN, BINARY_IS, BINARY_IS_NOT, and BINARY_EXC_MATCH To consider is inlining the POP_JUMP_IF_FALSE POP_TOP which always follow BINARY_EXC_MATCH ---------- components: Interpreter Core files: cmpoppatch.diff keywords: patch messages: 109259 nosy: serprex priority: normal severity: normal status: open title: Reserve COMPARE_OP for RichComparisons type: performance versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file17855/cmpoppatch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 21:54:18 2010 From: report at bugs.python.org (Demur Rumed) Date: Sun, 04 Jul 2010 19:54:18 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278273258.4.0.494236287814.issue9155@psf.upfronthosting.co.za> Changes by Demur Rumed : ---------- title: Reserve COMPARE_OP for RichComparisons -> Reserve COMPARE_OP for rich comparisons _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 22:07:14 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 04 Jul 2010 20:07:14 +0000 Subject: [issue9132] Documentation for comparing dictionaries is out of date In-Reply-To: <1277927951.56.0.908504944608.issue9132@psf.upfronthosting.co.za> Message-ID: <1278274034.23.0.390737312556.issue9132@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the explanation of the patch keyword. Its description (click on ?Keywords?) is indeed generic (?contains patch?), http://www.python.org/dev/patches/ should probably say it too. I don?t have enough knowledge to make a useful comment on the rest of your reply. Other people most certainly will. I think two of my remarks are not addressed by your reply: - Is the term ?order comparisons? used in the doc? If not, its meaning is non-obvious, and I?d like to find something clearer. - Testing with ?is? is called identity testing, ?in? is membership or containement testing. Where are they called ?comparisons?? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 22:09:56 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Jul 2010 20:09:56 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278274196.54.0.724602254817.issue9155@psf.upfronthosting.co.za> Mark Dickinson added the comment: Any chance you could regenerate the patch without all the unnecessary whitespace changes? It's kinda hard to read right now. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 22:13:38 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Jul 2010 20:13:38 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278274418.57.0.0720000403047.issue9155@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 22:26:06 2010 From: report at bugs.python.org (Demur Rumed) Date: Sun, 04 Jul 2010 20:26:06 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278275166.55.0.0787274476029.issue9155@psf.upfronthosting.co.za> Changes by Demur Rumed : Added file: http://bugs.python.org/file17856/cmpoppatch2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 22:30:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Jul 2010 20:30:20 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1278275420.16.0.904913676204.issue5288@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a rough patch which removes timedelta -> int minutes -> timedelta round trips from utcoffset handling code. I think the result is an improvement, but needs more polishing. Mark, Do you think this is worth pursuing? I am not intending to add support for sub-minute offsets yet, just pass offsets around as timedeltas internally without unnecessary conversions to int and back. ---------- keywords: -easy, patch nosy: +mark.dickinson Added file: http://bugs.python.org/file17857/issue5288.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 22:30:39 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 04 Jul 2010 20:30:39 +0000 Subject: [issue834840] Unhelpful error message from cgi module Message-ID: <1278275439.87.0.923424387995.issue834840@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could a CGI expert pick this up, failing that why not simply close it as opened nearely 7 years ago. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 22:43:00 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 04 Jul 2010 20:43:00 +0000 Subject: [issue4727] pickle/copyreg doesn't support keyword only arguments in __new__ In-Reply-To: <1229999703.52.0.11232958698.issue4727@psf.upfronthosting.co.za> Message-ID: <1278276180.62.0.282816559661.issue4727@psf.upfronthosting.co.za> Mark Lawrence added the comment: http://bugs.python.org/issue1398 has already been fixed and closed. http://bugs.python.org/issue4331 is still open and has seen activity as recently as 2010-02-23, so can this be closed or must it remain open? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 23:12:03 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Jul 2010 21:12:03 +0000 Subject: [issue4727] pickle/copyreg doesn't support keyword only arguments in __new__ In-Reply-To: <1229999703.52.0.11232958698.issue4727@psf.upfronthosting.co.za> Message-ID: <1278277923.23.0.0837916893877.issue4727@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Please keep this open. This issue is separate from pickling partial objects. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 23:12:26 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Jul 2010 21:12:26 +0000 Subject: [issue4727] pickle/copyreg doesn't support keyword only arguments in __new__ In-Reply-To: <1229999703.52.0.11232958698.issue4727@psf.upfronthosting.co.za> Message-ID: <1278277946.54.0.190672445736.issue4727@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- stage: -> needs patch versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 4 23:31:57 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 04 Jul 2010 21:31:57 +0000 Subject: [issue4679] Fork + shelve causes shelve corruption and backtrace In-Reply-To: <1229470942.41.0.397425864374.issue4679@psf.upfronthosting.co.za> Message-ID: <1278279117.84.0.494626079204.issue4679@psf.upfronthosting.co.za> Mark Lawrence added the comment: Hi Alex, Looks like nothing will happen with this unless you do something yourself. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 00:02:20 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 04 Jul 2010 22:02:20 +0000 Subject: [issue2830] Copy cgi.escape() to html In-Reply-To: <1210563693.47.0.635782576194.issue2830@psf.upfronthosting.co.za> Message-ID: <1278280940.38.0.743666249087.issue2830@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm guessing that this has simply slipped under the radar. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 00:06:26 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 04 Jul 2010 22:06:26 +0000 Subject: [issue8912] `make patchcheck` should check the whitespace of .c/.h files In-Reply-To: <1275794679.2.0.211731721822.issue8912@psf.upfronthosting.co.za> Message-ID: <1278281186.07.0.497587330744.issue8912@psf.upfronthosting.co.za> Brett Cannon added the comment: Committed in r82567. I also cleaned up the output slightly so that "N file(s)" pluralizes "file" properly based on N. Also now list what files have their whitespace fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 00:06:37 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 04 Jul 2010 22:06:37 +0000 Subject: [issue8912] `make patchcheck` should check the whitespace of .c/.h files In-Reply-To: <1275794679.2.0.211731721822.issue8912@psf.upfronthosting.co.za> Message-ID: <1278281197.24.0.495799042934.issue8912@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 00:10:58 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 04 Jul 2010 22:10:58 +0000 Subject: [issue4679] Fork + shelve causes shelve corruption and backtrace In-Reply-To: <1229470942.41.0.397425864374.issue4679@psf.upfronthosting.co.za> Message-ID: <1278281458.9.0.5447651703.issue4679@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The wikisource file in the report is no longer available, but with latest wikisource and python 2.7, $ curl http://download.wikimedia.org/enwikisource/latest/enwikisource-latest-pages-articles.xml.bz2| bzip2 -cd | ./python.exe convert.py /tmp 8388608 went through first 50MiB without an error. I am not sure I'll have the patience to run this to completion, but it looks like this is out of date. ---------- nosy: +belopolsky resolution: -> out of date stage: -> unit test needed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 00:22:36 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 04 Jul 2010 22:22:36 +0000 Subject: [issue3461] smtplib does not fully support IPv6 in EHLO In-Reply-To: <1217282925.26.0.916204427354.issue3461@psf.upfronthosting.co.za> Message-ID: <1278282156.87.0.124194467972.issue3461@psf.upfronthosting.co.za> Mark Lawrence added the comment: I intended testing this but the patch file appears to have a dangling else at the bottom, or am I missing something? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 00:26:13 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 04 Jul 2010 22:26:13 +0000 Subject: [issue4968] Clarify inspect.is method docs In-Reply-To: <1232162769.03.0.624026715862.issue4968@psf.upfronthosting.co.za> Message-ID: <1278282373.08.0.196854530722.issue4968@psf.upfronthosting.co.za> Mark Lawrence added the comment: Has this issue simply slipped under the radar? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 00:49:34 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 04 Jul 2010 22:49:34 +0000 Subject: [issue2830] Copy cgi.escape() to html In-Reply-To: <1210563693.47.0.635782576194.issue2830@psf.upfronthosting.co.za> Message-ID: <1278283774.66.0.507576600626.issue2830@psf.upfronthosting.co.za> Brett Cannon added the comment: Yep since it is not a critical change. If someone came up with a patch to move the code and docs over, make cgi.escape use the moved code, and add a PendingDeprecationWarning then it would get done. ---------- keywords: +easy priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 00:49:46 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 04 Jul 2010 22:49:46 +0000 Subject: [issue2830] Copy cgi.escape() to html In-Reply-To: <1210563693.47.0.635782576194.issue2830@psf.upfronthosting.co.za> Message-ID: <1278283786.98.0.294802678357.issue2830@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 01:49:49 2010 From: report at bugs.python.org (Eric Wald) Date: Sun, 04 Jul 2010 23:49:49 +0000 Subject: [issue5023] Segfault in datetime.time.strftime("%z") In-Reply-To: <1232556285.78.0.999173961019.issue5023@psf.upfronthosting.co.za> Message-ID: <1278287389.02.0.421235626868.issue5023@psf.upfronthosting.co.za> Eric Wald added the comment: Reproduced again in version 2.7rc2; I had thought that it went away, but it turns out that --with-pydebug hides the problem. Compiling GDB now. ---------- status: pending -> open versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 01:55:37 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 04 Jul 2010 23:55:37 +0000 Subject: [issue9132] Documentation for comparing dictionaries is out of date In-Reply-To: <1277927951.56.0.908504944608.issue9132@psf.upfronthosting.co.za> Message-ID: <1278287737.73.0.462997000377.issue9132@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I intentionally began my first post with "The RefMan section is 5.9. Comparisons." Look there, particularly the definition of comp_operator. In this context, I think 'order comparison' is pretty clearly a comparison with an order operator, '<' and '>'. But fine with me if the editor want to list them explicitly. POSSIBLE PATCH ADDITION: "('<', '<=', '>', '>=')" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 02:01:30 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 05 Jul 2010 00:01:30 +0000 Subject: [issue7829] dis module documentation gives no indication of the dangers of bytecode inspection In-Reply-To: <1265030716.3.0.107246651396.issue7829@psf.upfronthosting.co.za> Message-ID: <1278288090.64.0.868126535604.issue7829@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I believe Brett meant to leave this open until he finished it by backporting to 2.7 (which is now reopened for patches). Otherwise, it might get forgotten. Sidenote: this is the issue I referred to in #9132 re the 'patch' keyword. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 02:28:07 2010 From: report at bugs.python.org (Brett Cannon) Date: Mon, 05 Jul 2010 00:28:07 +0000 Subject: [issue7829] dis module documentation gives no indication of the dangers of bytecode inspection In-Reply-To: <1278288090.64.0.868126535604.issue7829@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Sun, Jul 4, 2010 at 17:01, Terry J. Reedy wrote: > I believe Brett meant to leave this open until he finished it by backporting to 2.7 (which is now reopened for patches). Otherwise, it might get forgotten. Exactly right, Terry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 03:03:01 2010 From: report at bugs.python.org (Demur Rumed) Date: Mon, 05 Jul 2010 01:03:01 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278291781.57.0.742837400227.issue9155@psf.upfronthosting.co.za> Demur Rumed added the comment: I've attached the original patch without whitespace, and am also including modifications to this portion of the interpreter which remove ROT_FOUR, DUP_TOPX while adding ROT_THREE_TWO, DUP_TOP_TWO, DUP_ROT_THREE. I've seen a 5% speed increase with timeit.Timer("a[0]+=0","a=[0]") Also modified the optimizer to reject code with a size over 32767 instead of 32760. That's most likely a useless modification which may be preferred ignored ---------- Added file: http://bugs.python.org/file17858/cmpoprotdup.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 03:03:11 2010 From: report at bugs.python.org (Demur Rumed) Date: Mon, 05 Jul 2010 01:03:11 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278291791.3.0.00326656861804.issue9155@psf.upfronthosting.co.za> Demur Rumed added the comment: I've attached the original patch without whitespace, and am also including modifications to this portion of the interpreter which remove ROT_FOUR, DUP_TOPX while adding ROT_THREE_TWO, DUP_TOP_TWO, DUP_ROT_THREE. I've seen a 4% speed increase with timeit.Timer("a[0]+=0","a=[0]") Also modified the optimizer to reject code with a size over 32767 instead of 32760. That's most likely a useless modification which may be preferred ignored ---------- Added file: http://bugs.python.org/file17859/cmpoprotdup.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 03:03:37 2010 From: report at bugs.python.org (Demur Rumed) Date: Mon, 05 Jul 2010 01:03:37 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278291817.03.0.994422758422.issue9155@psf.upfronthosting.co.za> Changes by Demur Rumed : Removed file: http://bugs.python.org/file17859/cmpoprotdup.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 03:21:35 2010 From: report at bugs.python.org (=?utf-8?q?Mathias_Panzenb=C3=B6ck?=) Date: Mon, 05 Jul 2010 01:21:35 +0000 Subject: [issue9156] socket._fileobject: read raises AttributeError when closed in another thread In-Reply-To: <1278292895.39.0.187416203103.issue9156@psf.upfronthosting.co.za> Message-ID: <1278292895.39.0.187416203103.issue9156@psf.upfronthosting.co.za> New submission from Mathias Panzenb?ck : When you open a socket._fileobject through sock.makefile('rb') or similar and you read blocking in one thread and close the file object from another thread the reading thread gets an AttributeError. This is because the close method sets the underlying fileobject._sock member to None and the read/readline/... methods call recv on this member without checking if its None. I think the _sock member should not be set to None at all but a flag should be set that this file object is closed. For the time being I use the "bugfix" I attached and therefore do not call sock.makefile('rb') but FileObject(sock, 'rb'). FileObject is a subtype of socket._fileobject that overrides the close method and closed property. I don't know if this bug persists in 2.7 or 3.x. I still use Fedora 12 and that comes with Python 2.6.2. ---------- components: Library (Lib) files: FileObject.py messages: 109281 nosy: panzi priority: normal severity: normal status: open title: socket._fileobject: read raises AttributeError when closed in another thread type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file17860/FileObject.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 03:27:00 2010 From: report at bugs.python.org (Demur Rumed) Date: Mon, 05 Jul 2010 01:27:00 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278293220.39.0.988744937624.issue9155@psf.upfronthosting.co.za> Demur Rumed added the comment: Fixed regression in ROT_THREE_TWO and a missed DUP_TOP2 -> DUP_TOP_TWO. Now there are only the odd segfaults ---------- Added file: http://bugs.python.org/file17861/cmpoprotdup2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 03:28:15 2010 From: report at bugs.python.org (Mitar) Date: Mon, 05 Jul 2010 01:28:15 +0000 Subject: [issue9157] Allow inspection of used decorators on a function In-Reply-To: <1278293295.3.0.202692223524.issue9157@psf.upfronthosting.co.za> Message-ID: <1278293295.3.0.202692223524.issue9157@psf.upfronthosting.co.za> New submission from Mitar : Sometimes it is useful to be able to check which decorators are already applied to a function, especially when you are constructing them dynamically. I am proposing that for all decorators in Python would be suggested that they maintain a list of used decorators on a function. It is most useful when all decorators do this. It is the same reasoning why `inspect` module is in Python - to be able to inspect Python structures, to have this possibility. If you do not want it then you do can use Python structures as they were given to you. But you have an option to inspect them. And I would like the same to see from decorators. It is not really so important that all decorators update this. If they would not then they would be hidden from inspection. But if developer wants to use inspection then he would choose such decorators which use this (or change them in this way). If all default Python's decorators would already be such it would be much easier to use them. This could be implement by changing `wraps` function to pass over also the (for example) `__DECORATORS__` attribute of a function to a wrapped function and add this new decorator to a list, `__DECORATORS__`. By default in a list ids of decorators would be maintained, but this could be overridden by `id` attribute of `wraps` function so that decorator can represent itself in some special way, for example as a tuple of its id and some significant parameters. ---------- messages: 109283 nosy: mitar priority: normal severity: normal status: open title: Allow inspection of used decorators on a function type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 03:36:08 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 05 Jul 2010 01:36:08 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278293768.13.0.305463214209.issue9136@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: + try: + dc = DefaultContext + except NameError: + pass + + self.prec = dc.prec if prec is None else prec I don't quite understand the point of catching NameError here, but it looks like if it is caught, it will just be raised by the next line because dc will not be set. Also, I am not sure ternary expressions are a big readability win here, but if you want to keep them, consider self.prec = prec if prec is not None else dc.prec ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 03:44:42 2010 From: report at bugs.python.org (Terrence Cole) Date: Mon, 05 Jul 2010 01:44:42 +0000 Subject: [issue9158] PyArg_ParseTuple y* documentation is incorrect In-Reply-To: <1278294261.08.0.252772210981.issue9158@psf.upfronthosting.co.za> Message-ID: <1278294261.08.0.252772210981.issue9158@psf.upfronthosting.co.za> New submission from Terrence Cole : The documented C type for y* should be [Py_buffer], not [Py_buffer *], as with the documentation for z* and the convention followed by the other types. I'm not sure what 'type' this issue should have. I've set it at 'crash' initially, since that's how the bug manifested for me. ---------- assignee: docs at python components: Documentation files: PyArgs_ParseTuple_ystar_doc_fix.patch keywords: patch messages: 109285 nosy: docs at python, terrence priority: normal severity: normal status: open title: PyArg_ParseTuple y* documentation is incorrect type: crash versions: Python 3.2 Added file: http://bugs.python.org/file17862/PyArgs_ParseTuple_ystar_doc_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 03:47:50 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 05 Jul 2010 01:47:50 +0000 Subject: [issue9158] PyArg_ParseTuple y* documentation is incorrect In-Reply-To: <1278294261.08.0.252772210981.issue9158@psf.upfronthosting.co.za> Message-ID: <1278294470.53.0.0704334922789.issue9158@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +haypo stage: -> patch review type: crash -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 04:14:06 2010 From: report at bugs.python.org (Tim Peters) Date: Mon, 05 Jul 2010 02:14:06 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278296046.94.0.925956254923.issue7989@psf.upfronthosting.co.za> Tim Peters added the comment: > ... > Another is tzinfo attribute of time. With time t, > t.utcoffset() is kid of useless given that you > cannot subtract it from t Sure you can - but you have to write your code to do time arithmetic. The time implementation does so under the covers when two "aware" time objects are compared: If both [time] comparands are aware and have different tzinfo members, the comparands are first adjusted by subtracting their UTC offsets (obtained from self.utcoffset()). > and unless tzinfo is a fixed offset timezone, there > is not enough information in t to compute the offset > to begin with. The docs _suggest_ that tzinfo.utcoffset(x, None) return the "standard" UTC offset, but in the end it's up to the tzinfo subclass designer to decide what they want an aware time object to return as an offset. > Do you have any historical insight on this one? History has nothing to do with it ;-) There are several uses spelled out in the docs. In addition to "aware" time comparison (mentioned above): - Maintaining the datetime invariant d == datetime.combine(d.date(), d.timetz()) requires that an "aware" datetime's tzinfo member be attached to at least one of the date and time projections, and since raw dates are always "naive", that leaves the time projection as the only choice. - Various string format operations use an "aware" time object's tzinfo member to incorporate time zone information - at least time.isoformat() and time.strftime(). That said, would have been fine by me if the "naive" versus "aware" distinction had been limited to datetime objects (i.e., if plain date and plain time objects had no notion of time zone). If you need to know why time objects "really" support being aware, you'll have to ask Guido ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 04:20:12 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 05 Jul 2010 02:20:12 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278296412.83.0.2689684404.issue9155@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 04:26:53 2010 From: report at bugs.python.org (kimhyunkang) Date: Mon, 05 Jul 2010 02:26:53 +0000 Subject: [issue9159] asyncore.file_wrapper does not register its fd to socket_map In-Reply-To: <1278296813.27.0.585763714278.issue9159@psf.upfronthosting.co.za> Message-ID: <1278296813.27.0.585763714278.issue9159@psf.upfronthosting.co.za> New submission from kimhyunkang : In current stable python 2.6, the test code below does nothing, which is inconsistent with other default dispatcher's behavior. ======== import asyncore class test_reader(asyncore.file_wrapper) def writable(self): return False def handle_read(self): print self.recv(4096) f = open('test.dat', 'r') reader = test_reader(f.fileno()) asyncore.loop() ---------- components: Library (Lib) messages: 109287 nosy: kimhyunkang priority: normal severity: normal status: open title: asyncore.file_wrapper does not register its fd to socket_map type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 04:27:13 2010 From: report at bugs.python.org (Derek Morr) Date: Mon, 05 Jul 2010 02:27:13 +0000 Subject: [issue3461] smtplib does not fully support IPv6 in EHLO In-Reply-To: <1217282925.26.0.916204427354.issue3461@psf.upfronthosting.co.za> Message-ID: <1278296833.76.0.265705413936.issue3461@psf.upfronthosting.co.za> Derek Morr added the comment: You're right. My mistake when I made the patch. I've attached a new one without the trailing else ---------- Added file: http://bugs.python.org/file17863/smtplib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 04:40:30 2010 From: report at bugs.python.org (kimhyunkang) Date: Mon, 05 Jul 2010 02:40:30 +0000 Subject: [issue9159] asyncore.file_wrapper does not register its fd to socket_map In-Reply-To: <1278296813.27.0.585763714278.issue9159@psf.upfronthosting.co.za> Message-ID: <1278297630.52.0.752632095499.issue9159@psf.upfronthosting.co.za> Changes by kimhyunkang : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 05:27:59 2010 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 05 Jul 2010 03:27:59 +0000 Subject: [issue9160] Documentation link of 3.2 not working at docs.python.org In-Reply-To: <1278300479.72.0.619696598543.issue9160@psf.upfronthosting.co.za> Message-ID: <1278300479.72.0.619696598543.issue9160@psf.upfronthosting.co.za> New submission from Eli Bendersky : This link: http://docs.python.org/dev/py3k/ Isn't working. I have always used it to see the latest documentation from 3.2, and it is linked in the left-hand side of the screen on docs.python.org as "Python 3.2 (in development)" under "Docs for other versions" if you're, for example here: http://docs.python.org/py3k/ ---------- assignee: docs at python components: Documentation messages: 109289 nosy: docs at python, eliben priority: normal severity: normal status: open title: Documentation link of 3.2 not working at docs.python.org versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 05:28:13 2010 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 05 Jul 2010 03:28:13 +0000 Subject: [issue9160] Documentation link of 3.2 not working at docs.python.org In-Reply-To: <1278300479.72.0.619696598543.issue9160@psf.upfronthosting.co.za> Message-ID: <1278300493.63.0.829408830782.issue9160@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 05:29:36 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Jul 2010 03:29:36 +0000 Subject: [issue9158] PyArg_ParseTuple y* documentation is incorrect In-Reply-To: <1278294261.08.0.252772210981.issue9158@psf.upfronthosting.co.za> Message-ID: <1278300576.51.0.579638884987.issue9158@psf.upfronthosting.co.za> STINNER Victor added the comment: y* and z* result is a Py_buffer, but in C you have to pass a reference to the result variable using &result. Full example: static PyObject * getargs_y_star(PyObject *self, PyObject *args) { Py_buffer buffer; PyObject *bytes; if (!PyArg_ParseTuple(args, "y*", &buffer)) return NULL; bytes = PyBytes_FromStringAndSize(buffer.buf, buffer.len); PyBuffer_Release(&buffer); return bytes; } Another example: "s" format result is char* (and not char**). You also have to pass a reference using &: static PyObject * getargs_s(PyObject *self, PyObject *args) { char *str; if (!PyArg_ParseTuple(args, "s", &str)) return NULL; return PyBytes_FromString(str); } ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 05:30:02 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 05 Jul 2010 03:30:02 +0000 Subject: [issue9160] Documentation link of 3.2 not working at docs.python.org In-Reply-To: <1278300479.72.0.619696598543.issue9160@psf.upfronthosting.co.za> Message-ID: <1278300602.88.0.963745226733.issue9160@psf.upfronthosting.co.za> Ezio Melotti added the comment: Also most of the links in http://www.python.org/doc/versions/ don't work. ---------- nosy: +ezio.melotti priority: normal -> high versions: +Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 05:39:01 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Jul 2010 03:39:01 +0000 Subject: [issue1170] shlex have problems with parsing unicode In-Reply-To: <1190045833.27.0.172281845017.issue1170@psf.upfronthosting.co.za> Message-ID: <1278301141.13.0.207178490487.issue1170@psf.upfronthosting.co.za> R. David Murray added the comment: shlex may use unicode in py3k, but since the file still starts with a latin-1 coding cookie and the posix logic hasn't been changed, I suspect that it does not work correctly (ie: does not correctly identify word characters, per msg55969). It's too late for 2.7 I think, but it seems there is work still to do in py3k. ---------- nosy: +mark.dickinson, r.david.murray stage: -> unit test needed versions: +Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 05:42:35 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Jul 2010 03:42:35 +0000 Subject: [issue1170] shlex have problems with parsing unicode In-Reply-To: <1190045833.27.0.172281845017.issue1170@psf.upfronthosting.co.za> Message-ID: <1278301355.96.0.438032219003.issue1170@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 06:00:50 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 05 Jul 2010 04:00:50 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1278302450.63.0.126254040911.issue5288@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- keywords: +patch Added file: http://bugs.python.org/file17864/issue5288.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 06:00:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 05 Jul 2010 04:00:56 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1278302456.92.0.250209682849.issue5288@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17857/issue5288.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 06:01:39 2010 From: report at bugs.python.org (Shashwat Anand) Date: Mon, 05 Jul 2010 04:01:39 +0000 Subject: [issue8470] Let cmd.cmd.intro be unicode friendly In-Reply-To: <1271777349.17.0.192920763608.issue8470@psf.upfronthosting.co.za> Message-ID: <1278302499.24.0.0388986269841.issue8470@psf.upfronthosting.co.za> Shashwat Anand added the comment: Python 2.7 is already released. This is a non-issue on py3.x. Should this issue be closed or we work on it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 06:02:42 2010 From: report at bugs.python.org (Alex Roper) Date: Mon, 05 Jul 2010 04:02:42 +0000 Subject: [issue4679] Fork + shelve causes shelve corruption and backtrace In-Reply-To: <1278281458.9.0.5447651703.issue4679@psf.upfronthosting.co.za> Message-ID: <4C31595D.8000701@ugcs.caltech.edu> Alex Roper added the comment: I've just been using the sq_dict module, which is a drop-in replacement for shelve written using sqlite3. BDB is a pretty squirraly piece of software in my experience. It may or may not be stable on it's own, but its APIs are pretty poorly documented and programmers tend to misuse them without knowing it. Every job I've done with it has involved major hacks such as API interception and replacement with sqlite3, cronjobs to rebuild hte database every hour, etc. It's also nice to have databases that are platform independent, and in all the applications I use the slight slowdown for sqlite is acceptable (I mean I /am/ using Python) YMMV of course. Also I know at one point Python 3 was going to use sqlite. The sq_dict I mention is on Bugzilla somewhere, or email me if you need a copy. Alex Alexander Belopolsky wrote: > Alexander Belopolsky added the comment: > > The wikisource file in the report is no longer available, but with latest wikisource and python 2.7, > > > $ curl http://download.wikimedia.org/enwikisource/latest/enwikisource-latest-pages-articles.xml.bz2| bzip2 -cd | ./python.exe convert.py /tmp 8388608 > > went through first 50MiB without an error. I am not sure I'll have the patience to run this to completion, but it looks like this is out of date. > > ---------- > nosy: +belopolsky > resolution: -> out of date > stage: -> unit test needed > status: open -> pending > > _______________________________________ > Python tracker > > _______________________________________ ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 06:20:24 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 05 Jul 2010 04:20:24 +0000 Subject: [issue4679] Fork + shelve causes shelve corruption and backtrace In-Reply-To: <1229470942.41.0.397425864374.issue4679@psf.upfronthosting.co.za> Message-ID: <1278303624.22.0.75771733893.issue4679@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Sorry, but I don't understand the point that you are trying to make. sq_dict is indeed considered for inclusion in python: see issue 3783. For this issue, we need a confirmation that the problem is present in the current version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 06:35:00 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 05 Jul 2010 04:35:00 +0000 Subject: [issue8912] `make patchcheck` should check the whitespace of .c/.h files In-Reply-To: <1275794679.2.0.211731721822.issue8912@psf.upfronthosting.co.za> Message-ID: <1278304500.77.0.527816756085.issue8912@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Hmm, it looks like patchcheck does not fix trailing whitespace in c files: $ grep ' $' Modules/datetimemodule.c| cat -ve $ GET_TD_DAYS(offset1) * 86400 - $ Py_DECREF(offset); $ if ((offset1 != offset2) && $ $ $ make patchcheck ----------------------------------------------- Modules/Setup.dist is newer than Modules/Setup; check to make sure you have all the updates you need in your Modules/Setup file. Usually, copying Modules/Setup.dist to Modules/Setup will work. ----------------------------------------------- ./python.exe ./Tools/scripts/patchcheck.py Getting the list of files that have been added/changed ... 1 file Fixing whitespace ... 0 files Docs modified ... NO Misc/ACKS updated ... NO Misc/NEWS updated ... NO Did you run the test suite? ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 06:43:10 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 05 Jul 2010 04:43:10 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1278304990.21.0.405628665375.issue5288@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17865/issue5288.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 06:43:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 05 Jul 2010 04:43:20 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1278305000.82.0.980214776355.issue5288@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17864/issue5288.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 06:45:28 2010 From: report at bugs.python.org (David Hood) Date: Mon, 05 Jul 2010 04:45:28 +0000 Subject: [issue9149] colorsys.py function rgb_to_hls In-Reply-To: <1278160382.92.0.847390863693.issue9149@psf.upfronthosting.co.za> Message-ID: <1278305128.73.0.690801325857.issue9149@psf.upfronthosting.co.za> David Hood added the comment: And Mark would seem to be entirely correct in this. Colour me embarrassed for missing that one. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 07:21:47 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 05 Jul 2010 05:21:47 +0000 Subject: [issue2675] Curses terminal resize problems when Python is in interactive mode In-Reply-To: <1208965300.42.0.575050740888.issue2675@psf.upfronthosting.co.za> Message-ID: <1278307307.43.0.643109691424.issue2675@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could somebody witht a nix box try this out, I'd do it myself if I had such a beast. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 07:31:06 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 05 Jul 2010 05:31:06 +0000 Subject: [issue3155] Python should expose a pthread_cond_timedwait API for threading In-Reply-To: <1214004207.53.0.484694251636.issue3155@psf.upfronthosting.co.za> Message-ID: <1278307866.91.0.196985742681.issue3155@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is anybody with knowledge of the threading module likely to pick this one up? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 07:36:32 2010 From: report at bugs.python.org (Craig McQueen) Date: Mon, 05 Jul 2010 05:36:32 +0000 Subject: [issue9161] add_option in optparse no longer accepts unicode string In-Reply-To: <1278308192.07.0.362660691035.issue9161@psf.upfronthosting.co.za> Message-ID: <1278308192.07.0.362660691035.issue9161@psf.upfronthosting.co.za> New submission from Craig McQueen : Working in Japan, I find it very helpful to be able to read full Unicode arguments in Python 2.x under Windows 2000/XP. So I am using the following: http://stackoverflow.com/questions/846850/how-to-read-unicode-characters-from-command-line-arguments-in-python-on-windows/846931#846931 Brilliantly, the optparse module in Python 2.6 has worked fine with Unicode arguments. Sadly, it seems Python 2.7 is preventing this. When I try to run my program with Python 2.7, I get the following: ... File "c:\python27\lib\optparse.py", line 1018, in add_option raise TypeError, "invalid arguments" TypeError: invalid arguments It seems that the type check in optparse.py line 1018 has changed from this in 2.6: if type(args[0]) in types.StringTypes: to this in 2.7: if type(args[0]) is types.StringType: This makes it more difficult to support Unicode in 2.7, compared to 2.6. Any chance this could be reverted? ---------- messages: 109300 nosy: cmcqueen1975 priority: normal severity: normal status: open title: add_option in optparse no longer accepts unicode string versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 07:36:45 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 05 Jul 2010 05:36:45 +0000 Subject: [issue3268] Cleanup of tp_basicsize inheritance In-Reply-To: <1215066698.99.0.380668265624.issue3268@psf.upfronthosting.co.za> Message-ID: <1278308205.32.0.460517390308.issue3268@psf.upfronthosting.co.za> Mark Lawrence added the comment: This is a tiny patch against typeobject.c, could somebody please run with it? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 07:40:21 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 05 Jul 2010 05:40:21 +0000 Subject: [issue8912] `make patchcheck` should check the whitespace of .c/.h files In-Reply-To: <1275794679.2.0.211731721822.issue8912@psf.upfronthosting.co.za> Message-ID: <1278308421.02.0.80662705344.issue8912@psf.upfronthosting.co.za> ?ric Araujo added the comment: Sorry if I was unclear. Out of the four points I listed, this patch only did the refactoring (4). I have another patch to add and use a check_pep7 function, I?ll refresh it and post it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 07:52:17 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 05 Jul 2010 05:52:17 +0000 Subject: [issue9161] add_option in optparse no longer accepts unicode string In-Reply-To: <1278308192.07.0.362660691035.issue9161@psf.upfronthosting.co.za> Message-ID: <1278309137.25.0.955851951283.issue9161@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: +Library (Lib), Unicode nosy: +ezio.melotti stage: -> unit test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 07:57:01 2010 From: report at bugs.python.org (Craig McQueen) Date: Mon, 05 Jul 2010 05:57:01 +0000 Subject: [issue9161] add_option in optparse no longer accepts unicode string In-Reply-To: <1278308192.07.0.362660691035.issue9161@psf.upfronthosting.co.za> Message-ID: <1278309421.56.0.11909097972.issue9161@psf.upfronthosting.co.za> Craig McQueen added the comment: My program currently uses ASCII options, so I can change the Unicode string parameter to byte string. The optparse module still seems to match the option against the incoming Unicode argv, I guess by implicit string conversion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 08:13:22 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 05 Jul 2010 06:13:22 +0000 Subject: [issue3802] smtpd.py __getaddr insufficient handling In-Reply-To: <1220849998.55.0.777734204126.issue3802@psf.upfronthosting.co.za> Message-ID: <1278310402.59.0.919879835607.issue3802@psf.upfronthosting.co.za> Mark Lawrence added the comment: Note there is a patch inline, not sure if a doc patch is needed for this. ---------- keywords: +patch nosy: +BreamoreBoy stage: -> unit test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 08:21:16 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 05 Jul 2010 06:21:16 +0000 Subject: [issue3964] quiet the freeze makefile In-Reply-To: <1222356648.66.0.370920569039.issue3964@psf.upfronthosting.co.za> Message-ID: <1278310876.08.0.149659403842.issue3964@psf.upfronthosting.co.za> Mark Lawrence added the comment: Assuming the patch works (I don't do makefiles) would anyone use this yes or no? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 08:34:47 2010 From: report at bugs.python.org (Michael Fladischer) Date: Mon, 05 Jul 2010 06:34:47 +0000 Subject: [issue9162] License for multiprocessing files In-Reply-To: <1278311687.0.0.315948028382.issue9162@psf.upfronthosting.co.za> Message-ID: <1278311687.0.0.315948028382.issue9162@psf.upfronthosting.co.za> New submission from Michael Fladischer : The files in Lib/multiprocessing (except __init__.py) are referring to their license by point to a nonexistent file called COPYING.txt. This possibly needs clarification as if this file is missing or the license is to be found somewhere else. ---------- components: Library (Lib) messages: 109306 nosy: FladischerMichael priority: normal severity: normal status: open title: License for multiprocessing files _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 08:43:57 2010 From: report at bugs.python.org (Ask Solem) Date: Mon, 05 Jul 2010 06:43:57 +0000 Subject: [issue9162] License for multiprocessing files In-Reply-To: <1278311687.0.0.315948028382.issue9162@psf.upfronthosting.co.za> Message-ID: <1278312237.27.0.187251887121.issue9162@psf.upfronthosting.co.za> Changes by Ask Solem : ---------- nosy: +asksol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 08:49:11 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 05 Jul 2010 06:49:11 +0000 Subject: [issue9160] Documentation link of 3.2 not working at docs.python.org In-Reply-To: <1278300479.72.0.619696598543.issue9160@psf.upfronthosting.co.za> Message-ID: <1278312551.27.0.673154671276.issue9160@psf.upfronthosting.co.za> anatoly techtonik added the comment: For me only http://www.python.org/doc/3.1.1/ gives 403. Seems like all other links should be updated from http://www.python.org/doc/2.3.2/ to http://docs.python.org/release/2.3.2/ format to avoid additional redirect. ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 09:07:57 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 05 Jul 2010 07:07:57 +0000 Subject: [issue9160] Documentation link of 3.2 not working at docs.python.org In-Reply-To: <1278300479.72.0.619696598543.issue9160@psf.upfronthosting.co.za> Message-ID: <1278313677.64.0.488605555095.issue9160@psf.upfronthosting.co.za> Georg Brandl added the comment: 3.1.1 docs are fixed. Development docs will be rebuilt soon automatically; after that everything should work again. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 09:09:06 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 05 Jul 2010 07:09:06 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278313746.83.0.278857194843.issue9136@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I don't quite understand the point of catching NameError here So that the initialization of DefaultContext itself doesn't fail. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 09:12:35 2010 From: report at bugs.python.org (Craig McQueen) Date: Mon, 05 Jul 2010 07:12:35 +0000 Subject: [issue9161] add_option in optparse no longer accepts unicode string In-Reply-To: <1278308192.07.0.362660691035.issue9161@psf.upfronthosting.co.za> Message-ID: <1278313955.51.0.485701291822.issue9161@psf.upfronthosting.co.za> Craig McQueen added the comment: To further explain, I had code e.g.: parser.add_option(u'-s', u'--seqfile', dest='seq_file_name', help=u'Write sequence file output to FILE', metavar=u'FILE') I had to remove the unicode designator for the first parameter: parser.add_option('-s', u'--seqfile', dest='seq_file_name', help=u'Write sequence file output to FILE', metavar=u'FILE') On further investigation, it looks as though the optparse module has other problems with Unicode: e.g. if I try to set a non-ASCII parameter on the command line e.g.: myprog.py -? Then optparse can't handle that--it gets an encoding error on line 1396. What _does_ work is that an option's parameters can be Unicode: myprog.py -s ?.txt So I guess there are broader problems than the specific 2.6 to 2.7 change that I originally reported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 09:27:42 2010 From: report at bugs.python.org (Michael Blume) Date: Mon, 05 Jul 2010 07:27:42 +0000 Subject: [issue9163] test_gdb fails In-Reply-To: <1278314862.38.0.121904956787.issue9163@psf.upfronthosting.co.za> Message-ID: <1278314862.38.0.121904956787.issue9163@psf.upfronthosting.co.za> New submission from Michael Blume : After building Python 2.7 on two separate X68 Ubuntu boxes, test_gdb failed both times. ./configure make make test output follows: test_gdb test test_gdb failed -- Traceback (most recent call last): File "/home/mike/workspace/Python-2.7/Lib/test/test_gdb.py", line 637, in test_basic_command ''') File "/home/mike/workspace/Python-2.7/Lib/test/test_gdb.py", line 163, in assertMultilineMatches msg='%r did not match %r' % (actual, pattern)) AssertionError: 'Breakpoint 1 at 0x80957d6: file Objects/object.c, line 329.\n[Thread debugging using libthread_db enabled]\n\nBreakpoint 1, PyObject_Print (op=42, fp=0x401cf4e0, flags=1) at Objects/object.c:329\n329\t{\n#3 Frame 0x81e322c, for file /home/mike/workspace/Python-2.7/Lib/test/gdb_sample.py, line 10, in baz (args=(1, 2, 3))\n print(42)\n#7 (unable to read python frame information)\n#10 Frame 0x81d5544, for file /home/mike/workspace/Python-2.7/Lib/test/gdb_sample.py, line 7, in bar (a=1, b=2, c=3)\n baz(a, b, c)\n#13 Frame 0x81d53dc, for file /home/mike/workspace/Python-2.7/Lib/test/gdb_sample.py, line 4, in foo (a=1, b=2, c=3)\n bar(a, b, c)\n' did not match '^.*\n#[0-9]+ Frame 0x[0-9a-f]+, for file .*gdb_sample.py, line 7, in bar \\(a=1, b=2, c=3\\)\n baz\\(a, b, c\\)\n#[0-9]+ Frame 0x[0-9a-f]+, for file .*gdb_sample.py, line 4, in foo \\(a=1, b=2, c=3\\)\n bar\\(a, b, c\\)\n#[0-9]+ Frame 0x[0-9a-f]+, for file .*gdb_sample.py, line 12, in \\(\\)\nfoo\\(1, 2, 3\\)\n' machines have the following packages installed, with the following versions: gdb 7.1-1ubuntu2 libgdb-dev 7.1-1ubuntu2 ---------- components: Tests messages: 109311 nosy: Michael.Blume priority: normal severity: normal status: open title: test_gdb fails versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 09:39:01 2010 From: report at bugs.python.org (Brett Cannon) Date: Mon, 05 Jul 2010 07:39:01 +0000 Subject: [issue8912] `make patchcheck` should check the whitespace of .c/.h files In-Reply-To: <1278308421.02.0.80662705344.issue8912@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Sun, Jul 4, 2010 at 22:40, ?ric Araujo wrote: > > ?ric Araujo added the comment: > > Sorry if I was unclear. Out of the four points I listed, this patch only did the refactoring (4). I have another patch to add and use a check_pep7 function, I?ll refresh it and post it. You were clear, I just prematurely closed it by accident. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 10:23:09 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 05 Jul 2010 08:23:09 +0000 Subject: [issue9163] test_gdb fails In-Reply-To: <1278314862.38.0.121904956787.issue9163@psf.upfronthosting.co.za> Message-ID: <1278318189.83.0.124093442372.issue9163@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Dave, can you please take a look? ---------- assignee: -> dmalcolm nosy: +dmalcolm, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 11:46:59 2010 From: report at bugs.python.org (Jyrki Wahlstedt) Date: Mon, 05 Jul 2010 09:46:59 +0000 Subject: [issue9164] 2.7 sysconfig should handle arch duplicates In-Reply-To: <1278323219.73.0.148043211343.issue9164@psf.upfronthosting.co.za> Message-ID: <1278323219.73.0.148043211343.issue9164@psf.upfronthosting.co.za> New submission from Jyrki Wahlstedt : Hi, in building Python 2.7 (using MacPorts)I end up in a situation that the build stops in sysconfig.py due to duplicate arch args on compile line. Compiling stops, because there is no way to find machine value from ('i386', 'i386', 'x86_64', 'x86_64'). The duplicates should be removed so that findall-sort-tuple would give only the unique values. ---------- components: Build messages: 109314 nosy: jyrkiwahlstedt priority: normal severity: normal status: open title: 2.7 sysconfig should handle arch duplicates type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 13:44:09 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 05 Jul 2010 11:44:09 +0000 Subject: [issue9091] str.capitalize() should not lower the rest of the string In-Reply-To: <1277609644.85.0.417350742268.issue9091@psf.upfronthosting.co.za> Message-ID: <1278330249.98.0.43475994453.issue9091@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed it in r82570. Hyper linking lowered was leading to something like str.lower ed. So, I simply left it. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 13:44:53 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 05 Jul 2010 11:44:53 +0000 Subject: [issue9162] License for multiprocessing files In-Reply-To: <1278311687.0.0.315948028382.issue9162@psf.upfronthosting.co.za> Message-ID: <1278330293.71.0.583025126897.issue9162@psf.upfronthosting.co.za> ?ric Araujo added the comment: Third-party code contributed to the stdlib is covered by an agreement that allows PSF to use it under PSF license. Comments in multiprocessing files can just be removed (this happened for argparse some time ago). Thanks for noticing this! ---------- keywords: +easy nosy: +merwok resolution: -> accepted stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 13:45:39 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 05 Jul 2010 11:45:39 +0000 Subject: [issue9161] add_option in optparse no longer accepts unicode string In-Reply-To: <1278308192.07.0.362660691035.issue9161@psf.upfronthosting.co.za> Message-ID: <1278330339.18.0.856461816115.issue9161@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok stage: unit test needed -> type: behavior -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 13:45:58 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 05 Jul 2010 11:45:58 +0000 Subject: [issue9161] add_option in optparse no longer accepts unicode string In-Reply-To: <1278308192.07.0.362660691035.issue9161@psf.upfronthosting.co.za> Message-ID: <1278330358.56.0.743595354427.issue9161@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: -> unit test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 13:49:39 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 05 Jul 2010 11:49:39 +0000 Subject: [issue834840] Unhelpful error message from cgi module Message-ID: <1278330579.27.0.801437315169.issue834840@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 13:50:09 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 05 Jul 2010 11:50:09 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278330609.26.0.230141295179.issue9155@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 14:04:51 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 05 Jul 2010 12:04:51 +0000 Subject: [issue9091] str.capitalize() should not lower the rest of the string In-Reply-To: <1277609644.85.0.417350742268.issue9091@psf.upfronthosting.co.za> Message-ID: <1278331491.41.0.766333653494.issue9091@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Updated the docstrings in r82573. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 14:09:56 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 05 Jul 2010 12:09:56 +0000 Subject: [issue9162] License for multiprocessing files In-Reply-To: <1278311687.0.0.315948028382.issue9162@psf.upfronthosting.co.za> Message-ID: <1278331796.99.0.671812924473.issue9162@psf.upfronthosting.co.za> Stefan Krah added the comment: ?ric, I don't think it's that simple. The author still has the copyright, even if he licensed the files under the contributor agreement. At the very least you have to leave his name and copyright notice. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 16:01:32 2010 From: report at bugs.python.org (Geoffrey Bache) Date: Mon, 05 Jul 2010 14:01:32 +0000 Subject: [issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError In-Reply-To: <1203027793.14.0.279031432545.issue2118@psf.upfronthosting.co.za> Message-ID: <1278338492.33.0.185020255481.issue2118@psf.upfronthosting.co.za> Changes by Geoffrey Bache : ---------- nosy: +gjb1002 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 16:07:41 2010 From: report at bugs.python.org (Demur Rumed) Date: Mon, 05 Jul 2010 14:07:41 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278338861.85.0.723093385475.issue9155@psf.upfronthosting.co.za> Demur Rumed added the comment: I've fixed the segfaulting in IN and NOT_IN, though the code requires cleaning due to the obtusely cargo culted nature of those opcodes I'm also including an incrementation which completely removes COMPARE_OP, using the opcode to determine the comparison type. As a result, I found it safe to remove the PyCmp_ enum, though cpickle seems to disagree. It's also lacking performance wise ---------- Added file: http://bugs.python.org/file17866/cmpoprotdupalluny.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 16:08:43 2010 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 05 Jul 2010 14:08:43 +0000 Subject: [issue9153] Run tests and demos as part of the test suite In-Reply-To: <1278257563.58.0.0461591435659.issue9153@psf.upfronthosting.co.za> Message-ID: <1278338923.87.0.941614647743.issue9153@psf.upfronthosting.co.za> Nick Coghlan added the comment: Yep, a sanity check for these is a good idea, and doing it soon gives us plenty of time to work out the kinks with it before 3.2a1. It will also let us identify which ones are completely busted by the switch to Python 3 (syntax errors) and which have other issues (self-test failures). ---------- nosy: +ncoghlan resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 16:11:22 2010 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 05 Jul 2010 14:11:22 +0000 Subject: [issue7962] Demo and Tools need to be tested and pruned In-Reply-To: <1266531589.82.0.915519058153.issue7962@psf.upfronthosting.co.za> Message-ID: <1278339082.69.0.0245147780701.issue7962@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 16:25:43 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Jul 2010 14:25:43 +0000 Subject: [issue4679] Fork + shelve causes shelve corruption and backtrace In-Reply-To: <1229470942.41.0.397425864374.issue4679@psf.upfronthosting.co.za> Message-ID: <1278339943.42.0.437816481745.issue4679@psf.upfronthosting.co.za> R. David Murray added the comment: Also note that bsddb's version was bumped in 2.7, so this bug may indeed be out of date. Alex, if you can't reproduce it (or don't have any desire to try to do so), we will close this as out of date. ---------- nosy: +jcea, r.david.murray status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 16:38:35 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Jul 2010 14:38:35 +0000 Subject: [issue3461] smtplib does not fully support IPv6 in EHLO In-Reply-To: <1217282925.26.0.916204427354.issue3461@psf.upfronthosting.co.za> Message-ID: <1278340715.08.0.93787933171.issue3461@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 16:44:30 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Jul 2010 14:44:30 +0000 Subject: [issue3461] smtplib does not fully support IPv6 in EHLO In-Reply-To: <1217282925.26.0.916204427354.issue3461@psf.upfronthosting.co.za> Message-ID: <1278341070.97.0.694769346376.issue3461@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 16:44:39 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Jul 2010 14:44:39 +0000 Subject: [issue3461] smtplib does not fully support IPv6 in EHLO In-Reply-To: <1217282925.26.0.916204427354.issue3461@psf.upfronthosting.co.za> Message-ID: <1278341079.64.0.542064760777.issue3461@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 17:01:40 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 05 Jul 2010 15:01:40 +0000 Subject: [issue3268] Cleanup of tp_basicsize inheritance In-Reply-To: <1215066698.99.0.380668265624.issue3268@psf.upfronthosting.co.za> Message-ID: <1278342100.4.0.0651227302363.issue3268@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks. r82577. ---------- nosy: +benjamin.peterson resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 17:07:37 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Jul 2010 15:07:37 +0000 Subject: [issue8470] Let cmd.cmd.intro be unicode friendly In-Reply-To: <1271777349.17.0.192920763608.issue8470@psf.upfronthosting.co.za> Message-ID: <1278342457.97.0.322637294648.issue8470@psf.upfronthosting.co.za> R. David Murray added the comment: If someone wants to try arguing that this is a bug fix (and can provide a patch that does not change existing behavior), then we could reopen it, but as a feature request it is closed for 2.7. ---------- components: +Library (Lib) nosy: +r.david.murray resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 17:16:49 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 05 Jul 2010 15:16:49 +0000 Subject: [issue9165] Add math.isfinite() In-Reply-To: <1278343008.96.0.366805630513.issue9165@psf.upfronthosting.co.za> Message-ID: <1278343008.96.0.366805630513.issue9165@psf.upfronthosting.co.za> New submission from Benjamin Peterson : It would be equivalent to "not isinf(x) and not isnan(x)". ---------- components: Extension Modules messages: 109324 nosy: benjamin.peterson priority: low severity: normal status: open title: Add math.isfinite() versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 17:21:50 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Jul 2010 15:21:50 +0000 Subject: [issue2675] Curses terminal resize problems when Python is in interactive mode In-Reply-To: <1208965300.42.0.575050740888.issue2675@psf.upfronthosting.co.za> Message-ID: <1278343310.84.0.993594377657.issue2675@psf.upfronthosting.co.za> R. David Murray added the comment: Well, I can run it, but I have no idea what it is telling me or how it demonstrates a bug. Pavel, is this still a problem in 2.6/2.7? ---------- components: +Extension Modules -None nosy: +akuchling, r.david.murray stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 17:26:39 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 05 Jul 2010 15:26:39 +0000 Subject: [issue9165] Add math.isfinite() In-Reply-To: <1278343008.96.0.366805630513.issue9165@psf.upfronthosting.co.za> Message-ID: <1278343599.69.0.0867124769917.issue9165@psf.upfronthosting.co.za> Mark Dickinson added the comment: +1. This is natural counterpart to math.isinf and math.isnan. In fact, it's quite surprising to have those two functions available and not math.isfinite. Here's a patch. ---------- assignee: -> mark.dickinson keywords: +patch nosy: +mark.dickinson stage: -> patch review type: -> feature request Added file: http://bugs.python.org/file17867/isfinite.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 17:32:31 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Mon, 05 Jul 2010 15:32:31 +0000 Subject: [issue9166] minor misstatement in What's New in 2.7 In-Reply-To: <1278343951.02.0.221627534967.issue9166@psf.upfronthosting.co.za> Message-ID: <1278343951.02.0.221627534967.issue9166@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : "Finally, the Mapping abstract base class now raises a NotImplemented exception..." should read "returns" instead of "raises" Here's the relevant code patch: http://svn.python.org/view/python/trunk/Lib/_abcoll.py?r1=78800&r2=81414&pathrev=81414 ---------- assignee: docs at python components: Documentation keywords: patch messages: 109327 nosy: docs at python, stutzbach priority: normal severity: normal stage: patch review status: open title: minor misstatement in What's New in 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 17:43:43 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 05 Jul 2010 15:43:43 +0000 Subject: [issue9165] Add math.isfinite() In-Reply-To: <1278343008.96.0.366805630513.issue9165@psf.upfronthosting.co.za> Message-ID: <1278344623.94.0.601698534869.issue9165@psf.upfronthosting.co.za> Mark Dickinson added the comment: Version 2 of patch adds cmath.isfinite, and changes doc markup to use ``True`` instead of :const:`True` (thanks Benjamin!). ---------- Added file: http://bugs.python.org/file17868/isfinite_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 17:46:41 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 05 Jul 2010 15:46:41 +0000 Subject: [issue9005] Year range in timetuple In-Reply-To: <1276660627.85.0.364876080456.issue9005@psf.upfronthosting.co.za> Message-ID: <1278344801.58.0.348028113076.issue9005@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Reopening to consider removing a special case in days_before_year(..). After r82128, year cannot be <= 0. ---------- stage: committed/rejected -> commit review status: closed -> open Added file: http://bugs.python.org/file17869/issue9005c.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 17:49:11 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 05 Jul 2010 15:49:11 +0000 Subject: [issue9165] Add math.isfinite() In-Reply-To: <1278343008.96.0.366805630513.issue9165@psf.upfronthosting.co.za> Message-ID: <1278344951.47.0.760600947541.issue9165@psf.upfronthosting.co.za> Changes by Mark Dickinson : Added file: http://bugs.python.org/file17870/isfinite_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 17:49:16 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 05 Jul 2010 15:49:16 +0000 Subject: [issue9165] Add math.isfinite() In-Reply-To: <1278343008.96.0.366805630513.issue9165@psf.upfronthosting.co.za> Message-ID: <1278344956.37.0.687467205709.issue9165@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file17868/isfinite_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 17:51:37 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 05 Jul 2010 15:51:37 +0000 Subject: [issue9165] Add math.isfinite() In-Reply-To: <1278343008.96.0.366805630513.issue9165@psf.upfronthosting.co.za> Message-ID: <1278345097.58.0.306623375067.issue9165@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 17:52:51 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Jul 2010 15:52:51 +0000 Subject: [issue9161] add_option in optparse no longer accepts unicode string In-Reply-To: <1278308192.07.0.362660691035.issue9161@psf.upfronthosting.co.za> Message-ID: <1278345171.12.0.499561348096.issue9161@psf.upfronthosting.co.za> R. David Murray added the comment: Too bad you didn't find this on one of the RCs. The fix will have to wait for 2.7.1 now. The line you originally quote as changing was, as far as I can tell, the original code (it enters our repository on 2006-04-22 in r45654 when optparse was upgraded to version 1.5.1 of optik). The change to the plural form in that line was made for 2.6rc1 in r71345, possibly inadvertently since that changeset was the bump to rc1. It would seem reasonable to change this to match 2.6 for 2.7.1, since as far as I know no bugs have been reported against it in 2.6, and it is unlikely to break working code in 2.7. As for the more extensive problems, now that argparse is part of the standard library it would seem better to devote any development resources to it. Can you test your issues against argparse, and open a new issue if it also has problems? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 17:55:17 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 05 Jul 2010 15:55:17 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278345317.42.0.0146012142577.issue9136@psf.upfronthosting.co.za> Stefan Krah added the comment: Alexander, for me the ternary expressions have the advantage that they take up less vertical space and you have to keep less state in mind. Mark, I'm sidestepping the dict syntax question and reassign to you :) ---------- assignee: skrah -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 18:07:57 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Jul 2010 16:07:57 +0000 Subject: [issue9161] add_option in optparse no longer accepts unicode string In-Reply-To: <1278308192.07.0.362660691035.issue9161@psf.upfronthosting.co.za> Message-ID: <1278346077.57.0.989627118567.issue9161@psf.upfronthosting.co.za> R. David Murray added the comment: Regression fixed in r82581. It would be nice to have a unit test, so I'm leaving this open to see if anyone wants to contribute one (it could probably be reused for argparse if argparse doesn't already have such a test). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 18:07:57 2010 From: report at bugs.python.org (Daniele Varrazzo) Date: Mon, 05 Jul 2010 16:07:57 +0000 Subject: [issue9167] argv double encoding on OSX In-Reply-To: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> Message-ID: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> New submission from Daniele Varrazzo : Looks like the wchar_t* array returned by Py_GetArgcArgv() on OSX suffers by double encoding. This can affect sys.argv, sys.executable and C code relying on the above function of course. On Linux: $ python3 Python 3.0rc1+ (py3k, Oct 28 2008, 09:22:29) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os, sys >>> snowman = '\u2603' >>> os.system(sys.executable + " -c 'import sys; [print(a.encode(\"utf8\")) for a in sys.argv]' foo bar " + snowman) b'-c' b'foo' b'bar' b'\xe2\x98\x83' 0 On OSX (uname -a is Darwin comicbookguy.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386) $ python3 Python 3.1.2 (r312:79147, Jul 5 2010, 11:57:14) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os, sys >>> snowman = '\u2603' >>> os.system(sys.executable + " -c 'import sys; [print(a.encode(\"utf8\")) for a in sys.argv]' foo bar " + snowman) b'-c' b'foo' b'bar' b'\xc3\xa2\xc2\x98\xc2\x83' 0 Is this a known limitation of the platform? I don't know much about OSX, just found it testing for regressions in setproctitle Reported correctly working on Windows. ---------- components: Interpreter Core messages: 109333 nosy: piro priority: normal severity: normal status: open title: argv double encoding on OSX type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 18:14:36 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Jul 2010 16:14:36 +0000 Subject: [issue3964] quiet the freeze makefile In-Reply-To: <1222356648.66.0.370920569039.issue3964@psf.upfronthosting.co.za> Message-ID: <1278346476.77.0.0150263308671.issue3964@psf.upfronthosting.co.za> R. David Murray added the comment: In my experience makes are generally pretty noisy, so I doubt it. But I don't use freeze, so we'd really need a review from someone who does. ---------- nosy: +r.david.murray stage: -> patch review versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 18:20:41 2010 From: report at bugs.python.org (Alberto Trevino) Date: Mon, 05 Jul 2010 16:20:41 +0000 Subject: [issue9168] setuid in smtp.py sheds privileges before binding port In-Reply-To: <1278346841.06.0.147409219565.issue9168@psf.upfronthosting.co.za> Message-ID: <1278346841.06.0.147409219565.issue9168@psf.upfronthosting.co.za> New submission from Alberto Trevino : The SMTP proxy server in Python (smtpd.py) allows you to shed privileges and run as user nobody. However, if you are trying to use port 25, the server will shed privileges before binding the port, causing a bind failure. By moving the setuid code between the creation of the proxy server and the aysncore loop, we can bind a port below 1024 and run as nobody. ---------- components: Library (Lib) files: smtpd.py-0.2-setuid-fix.diff keywords: patch messages: 109336 nosy: alfmel, barry priority: normal severity: normal status: open title: setuid in smtp.py sheds privileges before binding port versions: Python 3.2 Added file: http://bugs.python.org/file17871/smtpd.py-0.2-setuid-fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 18:25:16 2010 From: report at bugs.python.org (Alberto Trevino) Date: Mon, 05 Jul 2010 16:25:16 +0000 Subject: [issue8739] Update to smtpd.py to RFC 5321 In-Reply-To: <1274103249.44.0.284620021799.issue8739@psf.upfronthosting.co.za> Message-ID: <1278347116.87.0.684119299986.issue8739@psf.upfronthosting.co.za> Alberto Trevino added the comment: What is the status of this patch? Is there anything else I need to do? Any remaining concerns that would stop this patch from being merged? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 18:32:48 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Jul 2010 16:32:48 +0000 Subject: [issue9167] argv double encoding on OSX In-Reply-To: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> Message-ID: <1278347568.79.0.954667215625.issue9167@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 18:41:27 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Jul 2010 16:41:27 +0000 Subject: [issue8739] Update to smtpd.py to RFC 5321 In-Reply-To: <1274103249.44.0.284620021799.issue8739@psf.upfronthosting.co.za> Message-ID: <1278348087.92.0.639592233428.issue8739@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, the fact that there are no unit tests for the new functionality. As far as I can see the existing smtpd tests (which don't appear to be too extensive...but this module probably dates from before we had a firm unit test policy), are in test_smtplib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 18:47:40 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 05 Jul 2010 16:47:40 +0000 Subject: [issue9167] argv double encoding on OSX In-Reply-To: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> Message-ID: <1278348460.58.0.930082290736.issue9167@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: -> ronaldoussoren components: +Macintosh, Unicode nosy: +ezio.melotti, ronaldoussoren stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 19:07:31 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 05 Jul 2010 17:07:31 +0000 Subject: [issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor In-Reply-To: <1278349650.72.0.868837064663.issue9169@psf.upfronthosting.co.za> Message-ID: <1278349650.72.0.868837064663.issue9169@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Prior to r82454, python implementation of timedelta had the following comment: class timedelta: def __new__(cls, days=0, seconds=0, microseconds=0, # XXX The following should only be used as keyword args: milliseconds=0, minutes=0, hours=0, weeks=0): This suggests that these arguments were intended to be keyword only, but at the time there was no language support for that. In 3.x, the above can be rewritten as class timedelta: def __new__(cls, days=0, seconds=0, microseconds=0, *, milliseconds=0, minutes=0, hours=0, weeks=0): to require that milliseconds, minutes, etc, be used only positionally. This would be a backward incompatible change, so it would need to go through a deprecation process, but I think someone writing HOUR = timedelta(0, 0, 0, 0, 0, 1) or WEEK = timedelta(0, 0, 0, 0, 0, 0, 1) deserves a deprecation warning. ---------- assignee: belopolsky messages: 109339 nosy: belopolsky, mark.dickinson, pitrou, tim_one priority: normal severity: normal stage: unit test needed status: open title: Deprecate use of more than 3 positional arguments in timedelta constructor type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 19:10:38 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 05 Jul 2010 17:10:38 +0000 Subject: [issue9162] License for multiprocessing files In-Reply-To: <1278311687.0.0.315948028382.issue9162@psf.upfronthosting.co.za> Message-ID: <1278349838.11.0.977300221.issue9162@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: +roudkerk resolution: accepted -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 19:23:51 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 05 Jul 2010 17:23:51 +0000 Subject: [issue9005] Year range in timetuple In-Reply-To: <1276660627.85.0.364876080456.issue9005@psf.upfronthosting.co.za> Message-ID: <1278350631.91.0.0204066285015.issue9005@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Similarly, it appears that if (*m < 1 || *m > 12) { --*m; normalize_pair(y, m, 12); ++*m; /* |y| can't be bigger than about * |original y| + |original m|/12 now. */ } in normalize_y_m_d(int *y, int *m, int *d) is a dead branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 19:27:32 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 05 Jul 2010 17:27:32 +0000 Subject: [issue9168] setuid in smtp.py sheds privileges before binding port In-Reply-To: <1278346841.06.0.147409219565.issue9168@psf.upfronthosting.co.za> Message-ID: <1278350852.77.0.373241698628.issue9168@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 19:39:23 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Jul 2010 17:39:23 +0000 Subject: [issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor In-Reply-To: <1278349650.72.0.868837064663.issue9169@psf.upfronthosting.co.za> Message-ID: <1278351557.3146.2.camel@localhost.localdomain> Antoine Pitrou added the comment: > This would be a backward incompatible change, so it would need to go > through a deprecation process, but I think someone writing > > HOUR = timedelta(0, 0, 0, 0, 0, 1) > > or > > WEEK = timedelta(0, 0, 0, 0, 0, 0, 1) > > deserves a deprecation warning. -1 from me. Deprecating correct code should be done for serious reasons, not aesthetical (i.e. gratuitous) ones. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 19:42:23 2010 From: report at bugs.python.org (Andrew Miller) Date: Mon, 05 Jul 2010 17:42:23 +0000 Subject: [issue9170] zipfile.extractall raises runtime error on correct password In-Reply-To: <1278351743.73.0.460439084815.issue9170@psf.upfronthosting.co.za> Message-ID: <1278351743.73.0.460439084815.issue9170@psf.upfronthosting.co.za> New submission from Andrew Miller : On a WinZip AES-256 encrypted zip, zipfile.extractall raises a RuntimeError for "Bad password for file" when given the correct password. Command line example below: Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from zipfile import ZipFile >>> zip = ZipFile("example.zip", "r") >>> zip.extractall(".", pwd="cat") Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/zipfile.py", line 935, in extractall self.extract(zipinfo, path, pwd) File "/usr/lib/python2.6/zipfile.py", line 923, in extract return self._extract_member(member, path, pwd) File "/usr/lib/python2.6/zipfile.py", line 963, in _extract_member source = self.open(member, pwd=pwd) File "/usr/lib/python2.6/zipfile.py", line 898, in open raise RuntimeError("Bad password for file", name) RuntimeError: ('Bad password for file', ) >>> ---------- components: Library (Lib) files: example.zip messages: 109342 nosy: aymill priority: normal severity: normal status: open title: zipfile.extractall raises runtime error on correct password type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file17872/example.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 19:45:10 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 05 Jul 2010 17:45:10 +0000 Subject: [issue9171] sysconfig module does not support -m option In-Reply-To: <1278351910.01.0.446224296064.issue9171@psf.upfronthosting.co.za> Message-ID: <1278351910.01.0.446224296064.issue9171@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : http://docs.python.org/dev/library/sysconfig.html#using-sysconfig-as-a-script The doc states that sysconfig module con be used with python's -m option but this doesn't work: giampaolo at ubuntu:~/svn/python-2.7$ python -m sysconfig giampaolo at ubuntu:~/svn/python-2.7$ By taking a look at the code it seems that the module doesn't contain any main() or similar function. ---------- messages: 109343 nosy: giampaolo.rodola, tarek, tarek-ziade priority: normal severity: normal status: open title: sysconfig module does not support -m option versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 19:48:57 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 05 Jul 2010 17:48:57 +0000 Subject: [issue9166] minor misstatement in What's New in 2.7 In-Reply-To: <1278343951.02.0.221627534967.issue9166@psf.upfronthosting.co.za> Message-ID: <1278352137.38.0.673625282017.issue9166@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r82587. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 20:16:33 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 05 Jul 2010 18:16:33 +0000 Subject: [issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor In-Reply-To: <1278349650.72.0.868837064663.issue9169@psf.upfronthosting.co.za> Message-ID: <1278353793.39.0.623781976888.issue9169@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: On Mon, Jul 5, 2010 at 1:39 PM, Antoine Pitrou wrote: .. > -1 from me. Deprecating correct code should be done for serious > reasons, not aesthetical (i.e. gratuitous) ones. I would think that deprecating error-prone constructs is well within normal library evolution. For example, several interfaces that accepted floats by truncating them to ints were deprecated in the past. PS: "aesthetical" != "gratuitous" Someone using more than 3 positional arguments to timedelta most likely expects timedelta(days, hours, minutes, seconds, microseconds) rather than timedelta(days, seconds, microseconds, milliseconds, minutes, ...) Has anyone seen (non-buggy) code in the wild that used > 3 positional arguments to timedelta? (Mark just asked me not to use 2!) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 20:19:30 2010 From: report at bugs.python.org (Shashwat Anand) Date: Mon, 05 Jul 2010 18:19:30 +0000 Subject: [issue9153] Run tests and demos as part of the test suite In-Reply-To: <1278257563.58.0.0461591435659.issue9153@psf.upfronthosting.co.za> Message-ID: <1278353970.52.0.484533327905.issue9153@psf.upfronthosting.co.za> Changes by Shashwat Anand : ---------- nosy: +l0nwlf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 20:19:33 2010 From: report at bugs.python.org (Shashwat Anand) Date: Mon, 05 Jul 2010 18:19:33 +0000 Subject: [issue9161] add_option in optparse no longer accepts unicode string In-Reply-To: <1278308192.07.0.362660691035.issue9161@psf.upfronthosting.co.za> Message-ID: <1278353973.64.0.347147789408.issue9161@psf.upfronthosting.co.za> Changes by Shashwat Anand : ---------- nosy: +l0nwlf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 20:37:11 2010 From: report at bugs.python.org (Andrew Miller) Date: Mon, 05 Jul 2010 18:37:11 +0000 Subject: [issue9172] zipfile.extractall always raises an OSError after successfully unzipping all files In-Reply-To: <1278355031.26.0.155948134842.issue9172@psf.upfronthosting.co.za> Message-ID: <1278355031.26.0.155948134842.issue9172@psf.upfronthosting.co.za> New submission from Andrew Miller : Tried it with a variety of unencrypted zips. Zipped with WinZip 11.1. Looks like it tries to unzip a second time after it completes the first unzip. Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) [GCC 4.3.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from zipfile import ZipFile >>> zip = ZipFile("example_1.zip") >>> zip.extractall() Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/zipfile.py", line 935, in extractall self.extract(zipinfo, path, pwd) File "/usr/lib/python2.6/zipfile.py", line 923, in extract return self._extract_member(member, path, pwd) File "/usr/lib/python2.6/zipfile.py", line 960, in _extract_member os.mkdir(targetpath) OSError: [Errno 17] File exists: '/home/andy/projects/codedropvalidator/testdata/example' >>> ---------- files: example_1.zip messages: 109346 nosy: aymill priority: normal severity: normal status: open title: zipfile.extractall always raises an OSError after successfully unzipping all files type: behavior Added file: http://bugs.python.org/file17873/example_1.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 20:43:01 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 05 Jul 2010 18:43:01 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1278355381.62.0.825784567015.issue5288@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a test coverage file for the patched datetimemodule.c. ---------- Added file: http://bugs.python.org/file17874/datetimemodule.c.gcov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 20:48:55 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 05 Jul 2010 18:48:55 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1278355735.72.0.595463896996.issue5288@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It looks like I attached coverage for the original file. See new-datetimemodule.c.gcov for coverage after the change. ---------- Added file: http://bugs.python.org/file17875/new-datetimemodule.c.gcov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 21:29:47 2010 From: report at bugs.python.org (Terrence Cole) Date: Mon, 05 Jul 2010 19:29:47 +0000 Subject: [issue9158] PyArg_ParseTuple y* documentation is incorrect In-Reply-To: <1278294261.08.0.252772210981.issue9158@psf.upfronthosting.co.za> Message-ID: <1278358187.35.0.147496140342.issue9158@psf.upfronthosting.co.za> Terrence Cole added the comment: @Victor: "y* and z* result is a Py_buffer" Correct, so why is z* documented as [Py_buffer] and y* documented as [Py_buffer*]? If I make 'buffer' from your example a Py_buffer*, as documented, then python puts writes sizeof(Py_buffer) bytes into a random spot in memory. Thus the attached patch. Thanks for giving this a look, but I don't think this issue is closed -- the documentation for y* is still wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 21:35:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 05 Jul 2010 19:35:32 +0000 Subject: [issue9004] datetime.utctimetuple() should not set tm_isdst flag to 0 In-Reply-To: <1276659404.06.0.425467293989.issue9004@psf.upfronthosting.co.za> Message-ID: <1278358532.7.0.256905456039.issue9004@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 21:47:50 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 05 Jul 2010 19:47:50 +0000 Subject: [issue8930] messed up formatting after reindenting In-Reply-To: <1275862117.51.0.974367285734.issue8930@psf.upfronthosting.co.za> Message-ID: <1278359270.04.0.0489385957898.issue8930@psf.upfronthosting.co.za> Benjamin Peterson added the comment: There is also some unpretty formatting in _math.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 21:52:25 2010 From: report at bugs.python.org (Alex Roper) Date: Mon, 05 Jul 2010 19:52:25 +0000 Subject: [issue4679] Fork + shelve causes shelve corruption and backtrace In-Reply-To: <1229470942.41.0.397425864374.issue4679@psf.upfronthosting.co.za> Message-ID: <3nqq6sv2680n8dc0bp8bds5q.1278359535620@email.android.com> Alex Roper added the comment: Go ahead "R. David Murray" wrote: > >R. David Murray added the comment: > >Also note that bsddb's version was bumped in 2.7, so this bug may indeed be out of date. Alex, if you can't reproduce it (or don't have any desire to try to do so), we will close this as out of date. > >---------- >nosy: +jcea, r.david.murray >status: open -> pending > >_______________________________________ >Python tracker > >_______________________________________ ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 21:56:36 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 05 Jul 2010 19:56:36 +0000 Subject: [issue4679] Fork + shelve causes shelve corruption and backtrace In-Reply-To: <1229470942.41.0.397425864374.issue4679@psf.upfronthosting.co.za> Message-ID: <1278359796.07.0.171073433138.issue4679@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 22:15:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 05 Jul 2010 20:15:56 +0000 Subject: [issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input In-Reply-To: <1236786647.39.0.745171492116.issue5476@psf.upfronthosting.co.za> Message-ID: <1278360956.36.0.654977017763.issue5476@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This is a bit strange. timedelta is accepting int subclass instances: >>> class I(int): ... pass ... >>> timedelta(days = I(36)) datetime.timedelta(36) but not numpy.unt_: >>> timedelta(days = int_(36)) Traceback (most recent call last): File "", line 1, in TypeError: unsupported type for timedelta days component: numpy.int64 which is also a subclass of int: >>> isinstance(int_(36), int) True This is probably a numpy quirk rather than python issue, but is probably worth another look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 22:18:57 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 05 Jul 2010 20:18:57 +0000 Subject: [issue8930] messed up formatting after reindenting In-Reply-To: <1275862117.51.0.974367285734.issue8930@psf.upfronthosting.co.za> Message-ID: <1278361137.84.0.82174003567.issue8930@psf.upfronthosting.co.za> Mark Dickinson added the comment: I've fixed the _math.c formatting (r82595, r82596). ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 22:35:31 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 05 Jul 2010 20:35:31 +0000 Subject: [issue1571170] Some numeric characters are still not recognized Message-ID: <1278362131.6.0.590749459989.issue1571170@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 22:57:36 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 05 Jul 2010 20:57:36 +0000 Subject: [issue9171] sysconfig module does not support -m option In-Reply-To: <1278351910.01.0.446224296064.issue9171@psf.upfronthosting.co.za> Message-ID: <1278363456.18.0.044426608852.issue9171@psf.upfronthosting.co.za> ?ric Araujo added the comment: Nice catch. I found nothing in the VCS log, nor in distutils2._backport.sysconfig, so it doesn?t seem to have been removed but just overlooked. ---------- assignee: -> tarek components: +Library (Lib) keywords: +easy nosy: +merwok -tarek-ziade resolution: -> accepted stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 23:10:45 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 05 Jul 2010 21:10:45 +0000 Subject: [issue9171] sysconfig module does not support -m option In-Reply-To: <1278351910.01.0.446224296064.issue9171@psf.upfronthosting.co.za> Message-ID: <1278364245.42.0.534910602677.issue9171@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Remove the statement from the doc for now and get it back along a module fix in 2.7.1: can it be a reasonable solution? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 23:18:24 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 05 Jul 2010 21:18:24 +0000 Subject: [issue8905] difflib should accept arbitrary line iterators In-Reply-To: <1275738341.19.0.989231664853.issue8905@psf.upfronthosting.co.za> Message-ID: <1278364704.7.0.872302844033.issue8905@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 23:19:08 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 05 Jul 2010 21:19:08 +0000 Subject: [issue7582] Use ISO timestamp in diff.py In-Reply-To: <1261929478.18.0.289329990174.issue7582@psf.upfronthosting.co.za> Message-ID: <1278364748.57.0.215283900239.issue7582@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 23:26:54 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 05 Jul 2010 21:26:54 +0000 Subject: [issue9165] Add math.isfinite() In-Reply-To: <1278343008.96.0.366805630513.issue9165@psf.upfronthosting.co.za> Message-ID: <1278365214.47.0.53266825113.issue9165@psf.upfronthosting.co.za> Eric Smith added the comment: +1 from me, too. You might want to reference this issue in the Misc/NEWS entry. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 23:39:08 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 05 Jul 2010 21:39:08 +0000 Subject: [issue9158] PyArg_ParseTuple y* documentation is incorrect In-Reply-To: <1278294261.08.0.252772210981.issue9158@psf.upfronthosting.co.za> Message-ID: <1278365948.87.0.129683521224.issue9158@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh ok, sorry. Fixed in r82597 (3.x) and r82598 (3.1). ---------- resolution: invalid -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 23:42:30 2010 From: report at bugs.python.org (Vlastimil Brom) Date: Mon, 05 Jul 2010 21:42:30 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1278366150.56.0.330158956411.issue2636@psf.upfronthosting.co.za> Vlastimil Brom added the comment: I just noticed a somehow strange behaviour in matching character sets or alternate matches which contain some more "advanced" unicode characters, if they are in the search pattern with some "simpler" ones. The former seem to be ignored and not matched (the original re engine matches all of them); (win XPh SP3 Czech, Python 2.7; regex issue2636-20100414) >>> print u"".join(regex.findall(u".", u"e???????")) e??????? >>> print u"".join(regex.findall(u"[e???????]", u"e???????")) e????? >>> print u"".join(regex.findall(u"e|?|?|?|?|?|?|?", u"e???????")) e????? >>> print u"".join(re.findall(u"[e???????]", u"e???????")) e??????? >>> print u"".join(re.findall(u"e|?|?|?|?|?|?|?", u"e???????")) e??????? even stranger, if the pattern contains only these "higher" unicode characters, everything works ok: >>> print u"".join(regex.findall(u"?|?|?", u"e???????")) ??? >>> print u"".join(regex.findall(u"[???]", u"e???????")) ??? The characters in question are some accented latin letters (here in ascending codepoints), but it can be other scripts as well. >>> print regex.findall(u".", u"e???????") [u'e', u'\xe8', u'\xe9', u'\xea', u'\xeb', u'\u0113', u'\u011b', u'\u0117'] The threshold isn't obvious to me, at first I thought, the characters represented as unicode escapes are problematic, whereas those with hexadecimal escapes are ok; however ? - u'\u0113' seems ok too. (python 3.1 behaves identically: >>> regex.findall("[e???????]", "e???????") ['e', '?', '?', '?', '?', '?'] >>> regex.findall("[???]", "e???????") ['?', '?', '?'] ) vbr ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 5 23:57:26 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 05 Jul 2010 21:57:26 +0000 Subject: [issue9171] sysconfig module does not support -m option In-Reply-To: <1278351910.01.0.446224296064.issue9171@psf.upfronthosting.co.za> Message-ID: <1278367046.13.0.515436844838.issue9171@psf.upfronthosting.co.za> ?ric Araujo added the comment: Found: r81513 Made sysconfig a script that displays useful information - #8770 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 00:47:47 2010 From: report at bugs.python.org (Demur Rumed) Date: Mon, 05 Jul 2010 22:47:47 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278370067.59.0.723994644956.issue9155@psf.upfronthosting.co.za> Demur Rumed added the comment: It seems the lack of benefits from replacing COMPARE_OP with a set of aliased bytecodes was repairable through TARGET_WITH_IMPL.?Also fixed was the lack of amendments to dis ---------- versions: -Python 3.3 Added file: http://bugs.python.org/file17876/cmpoprotdupalluny2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 00:51:13 2010 From: report at bugs.python.org (Terrence Cole) Date: Mon, 05 Jul 2010 22:51:13 +0000 Subject: [issue9158] PyArg_ParseTuple y* documentation is incorrect In-Reply-To: <1278294261.08.0.252772210981.issue9158@psf.upfronthosting.co.za> Message-ID: <1278370273.35.0.479896319924.issue9158@psf.upfronthosting.co.za> Terrence Cole added the comment: Awesome! Thanks, and sorry for communicating the problem so poorly initially. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 01:38:58 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Jul 2010 23:38:58 +0000 Subject: [issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor In-Reply-To: <1278353793.39.0.623781976888.issue9169@psf.upfronthosting.co.za> Message-ID: <1278373133.3460.6.camel@localhost.localdomain> Antoine Pitrou added the comment: > I would think that deprecating error-prone constructs is well within > normal library evolution. For example, several interfaces that > accepted floats by truncating them to ints were deprecated in the > past. That's because silent truncation to int will lead to possible loss of precision, or (worse) to poorly defined behaviour. For example, if you call file.read(3.5), should it try to read 3 bytes or 4 bytes? Deprecating such use is perfectly reasonable, because it disambiguizes the API and avoids the use of a wrong type. On the other hand, using positional arguments presents none of these problems. There is no reason to deprecate it except your own aesthetical preferences. Therefore I'm still -1. > Has anyone seen (non-buggy) code in the wild that used > 3 positional > arguments to timedelta? Why do you think such code doesn't exist? It's not like timedelta() is an extremely difficult API to use, even without keyword arguments. Using Google Code Search, you will find snippets such as: FIVE_MINUTES = datetime.timedelta(0, 0, 0, 0, 5) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 02:02:33 2010 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 06 Jul 2010 00:02:33 +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: <1278374553.55.0.497554665478.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-20100706.zip is a new version of the regex module. I've added your examples to the unit tests. The module now passes. Keep up the good work! :-) ---------- Added file: http://bugs.python.org/file17877/issue2636-20100706.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 02:05:00 2010 From: report at bugs.python.org (Paul Smith) Date: Tue, 06 Jul 2010 00:05:00 +0000 Subject: [issue9173] logger statement not guarded in shutil._make_tarball In-Reply-To: <1278374700.0.0.888108186461.issue9173@psf.upfronthosting.co.za> Message-ID: <1278374700.0.0.888108186461.issue9173@psf.upfronthosting.co.za> New submission from Paul Smith : A called to logger.info() in shutil._make_tarball is not guarded against the logger being None, and therefore raises an AttributeError if that is the case. ---------- components: Library (Lib) files: shutil_logger_py27.patch keywords: patch messages: 109364 nosy: paulsmith priority: normal severity: normal status: open title: logger statement not guarded in shutil._make_tarball type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file17878/shutil_logger_py27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 06:02:18 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 06 Jul 2010 04:02:18 +0000 Subject: [issue9174] unittest assertEqual error output sub-optimal for single strings In-Reply-To: <1278388937.66.0.26708370086.issue9174@psf.upfronthosting.co.za> Message-ID: <1278388937.66.0.26708370086.issue9174@psf.upfronthosting.co.za> New submission from R. David Murray : When assertEqual is called on a pair of strings, then in Python3 assertMultiLineEqual is called. This function calls ndiff to display a nicely formatted multiline comparison of the strings, which would make it very easy to spot the differences...if it worked. However, ndiff does not add newlines where they do not exist, so the output is not correctly formatted when strings without newlines are compared. Attached is a unit test and patch. This fix should be backported to 2.7, since assertMultiLineEqual is used there for unicode strings. Assigning to Michael Foord for review. Michael, you can assign it back to me if you'd like me to commit it. ---------- assignee: michael.foord components: Library (Lib) files: unittest_assertEquals.patch keywords: patch messages: 109365 nosy: michael.foord, r.david.murray priority: normal severity: normal stage: patch review status: open title: unittest assertEqual error output sub-optimal for single strings type: behavior versions: Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file17879/unittest_assertEquals.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 06:44:38 2010 From: report at bugs.python.org (Peter Wolf) Date: Tue, 06 Jul 2010 04:44:38 +0000 Subject: [issue7899] MemoryError While Executing Python Code In-Reply-To: <1265813909.95.0.996847795707.issue7899@psf.upfronthosting.co.za> Message-ID: <1278391478.07.0.661371968474.issue7899@psf.upfronthosting.co.za> Peter Wolf added the comment: I am new to this so apologies if I posting this in the wrong spot. I am also getting a memory error on an 86MB python data file.It is one long list.As far as I can tell the data file is valid python code.My computer has 3.4 GB of ram. When I type the following in a terminal > python mydatafile.py On the following line I get MemoryError That is all. ---------- components: -Windows nosy: +freakcycle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 09:24:52 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 06 Jul 2010 07:24:52 +0000 Subject: [issue9167] argv double encoding on OSX In-Reply-To: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> Message-ID: <1278401092.2.0.745592240059.issue9167@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I cannot reproduce this with both 3.1.2 and 3.2a (py3k:80693), in both cases I get the same output as you do on Linux. This is on OSX 10.6 though, I haven't tested on 10.4 yet. What is the output of the locale command on your OSX system? Mine says: $ locale LANG="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_CTYPE="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_ALL= And what is the value of "__CF_USER_TEXT_ENCODING"? My is: $ echo ${__CF_USER_TEXT_ENCODING} 0x1F6:0:0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 09:25:44 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 06 Jul 2010 07:25:44 +0000 Subject: [issue9167] argv double encoding on OSX In-Reply-To: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> Message-ID: <1278401144.01.0.848430827981.issue9167@psf.upfronthosting.co.za> Ronald Oussoren added the comment: BTW. My 3.1 build is: release31-maint:80235M, which is slightly newer that the 3.1.2 release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 09:43:28 2010 From: report at bugs.python.org (Jyrki Wahlstedt) Date: Tue, 06 Jul 2010 07:43:28 +0000 Subject: [issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X In-Reply-To: <1278323219.73.0.148043211343.issue9164@psf.upfronthosting.co.za> Message-ID: <1278402208.11.0.686143702978.issue9164@psf.upfronthosting.co.za> Jyrki Wahlstedt added the comment: The fix could be something like replace line 649 in sysconfig.py: archs = tuple(archs) with: archs = tuple(sorted(list(set(archs)))) This removes the duplicates, but as transforming the list to set does not seem to keep order, it is necessary to sort the list (hence the previous line sorting the list could be dropped perhaps). ---------- title: 2.7 sysconfig should handle arch duplicates -> 2.7 sysconfig should handle arch duplicates while building universal on OS X _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 09:55:07 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Jul 2010 07:55:07 +0000 Subject: [issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X In-Reply-To: <1278323219.73.0.148043211343.issue9164@psf.upfronthosting.co.za> Message-ID: <1278402907.46.0.383833371721.issue9164@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> ronaldoussoren components: +Macintosh nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 10:22:47 2010 From: report at bugs.python.org (Nicolas Dumazet) Date: Tue, 06 Jul 2010 08:22:47 +0000 Subject: [issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header In-Reply-To: <1201704485.29.0.575687789495.issue1974@psf.upfronthosting.co.za> Message-ID: <1278404567.19.0.655403431058.issue1974@psf.upfronthosting.co.za> Nicolas Dumazet added the comment: Hello folks. (stumbling on this bug with Python2.7 release, noting that a few Mercurial tests broke with 2.7) I have no problem whatsoever with the fix itself (you know emails better than me), but you broke backwards compatibility for email.generator.Generator here, without propagating the changes to previous versions. 1) It would have been nice to flag this somewhere in the release notes, and/or the documentation for email.generator.Generator. Finding the reason of the Mercurial failures was... a bit trickier than necessary :) 2) What durable solutions can you propose for those of us that have to support several Python versions and share a similar behaviour? In a perfect world, I would simply do this: class CompatibleHeader(email.Header.Header.__class__): """ Python2.7 introduces a backwards incompatible change (Python issue1974, r70772) in email.generaor.Generator code: pre-2.7 code passed "continuation_ws='\t'" to the Header constructor, and 2.7 removed this parameter. Default argument is continuation_ws=' ', which means that the behaviour is different in <2.7 and 2.7 We consider the 2.7 behaviour to be preferable, but need to have an unified behaviour for versions 2.4 to 2.7 """ def __init__(self, **kw): # override continuation_ws kw['continuation_ws'] = ' ' email.Header.Header.__init__(self, **kw) email.Header.Header.__class__ = CompatibleHeader and get over it, but you'll notice that Header is still an old-style class... so that's not possible. Any suggestions? Thanks! ---------- nosy: +djc, nicdumz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 10:30:04 2010 From: report at bugs.python.org (Chris Withers) Date: Tue, 06 Jul 2010 08:30:04 +0000 Subject: [issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header In-Reply-To: <1201704485.29.0.575687789495.issue1974@psf.upfronthosting.co.za> Message-ID: <1278405004.98.0.851517987742.issue1974@psf.upfronthosting.co.za> Chris Withers added the comment: Maybe an old-fashioned monkey-patch would be the way to go? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 10:43:01 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 06 Jul 2010 08:43:01 +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: <1278405781.78.0.964478618838.issue2636@psf.upfronthosting.co.za> Ezio Melotti added the comment: Matthew, I'd like to see at least some of these features in 3.2, but ISTM that after more than 2 years this issue is not going anywhere. Is the module still under active development? Is it "ready"? Is it waiting for reviews and to be added to the stdlib? Is it waiting for more people to test it on PyPI? If the final goal is adding it to the stdlib, are you planning to add it as a new module or to replace the current 're' module? (or is 'regex' just the 're' module with improvements that could be merged?) Another alternative would be to split it in smaller patches (ideally one per feature) and integrate them one by one, but IIRC several of the patches depend on each other so it can't be done easily. Unless there is already a plan about this (and I'm not aware of it), I'd suggest to bring this up to python-dev and decide what to do with the 'regex' module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 11:14:45 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Jul 2010 09:14:45 +0000 Subject: [issue9154] Parser module doesn't understand function annotations. In-Reply-To: <1278270204.2.0.0990664909847.issue9154@psf.upfronthosting.co.za> Message-ID: <1278407685.6.0.895922164798.issue9154@psf.upfronthosting.co.za> Mark Dickinson added the comment: Patch fixing validation of function annotations and keyword-only arguments. There's still the issue of false positives: annotations on lambda arguments should raise an exception, but don't. ---------- keywords: +patch Added file: http://bugs.python.org/file17880/parser_annotations_kwonly.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 11:14:54 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Jul 2010 09:14:54 +0000 Subject: [issue9154] Parser module doesn't understand function annotations. In-Reply-To: <1278270204.2.0.0990664909847.issue9154@psf.upfronthosting.co.za> Message-ID: <1278407694.19.0.631743714674.issue9154@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- stage: unit test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 11:15:36 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 06 Jul 2010 09:15:36 +0000 Subject: [issue9175] ctypes doesn't build on hp-ux In-Reply-To: <1278407736.6.0.642117116261.issue9175@psf.upfronthosting.co.za> Message-ID: <1278407736.6.0.642117116261.issue9175@psf.upfronthosting.co.za> New submission from Ronald Oussoren : During the build of python2.7 on a HP-UX machine I get this compile error when building the ctypes extension: cc -Ae +z -Olimit 1500 -g -DNDEBUG -O -Ibuild/temp.hp-ux-B.11.23-9000-800-2.7/libffi/include -Ibuild/temp.hp-ux-B.11.23-9000-800-2.7/libffi -I/home/xsupport/bld/Python-2.7/Modules/_ctypes/libffi/src -I/opt/python2.7/include -I. -IInclude -I./Include -I/home/xsupport/bld/Python-2.7/Include -I/home/xsupport/bld/Python-2.7 -c /home/xsupport/bld/Python-2.7/Modules/_ctypes/_ctypes.c -o build/temp.hp-ux-B.11.23-9000-800-2.7/home/xsupport/bld/Python-2.7/Modules/_ctypes/_ctypes.o cpp: "build/temp.hp-ux-B.11.23-9000-800-2.7/libffi/include/ffi.h", line 133: error 4044: Constant literal too large. cpp: "build/temp.hp-ux-B.11.23-9000-800-2.7/libffi/include/ffi.h", line 134: error 4062: "no 64-bit data type supported" Compiler version: B9007AA C.11.23.12 HP C/aC++ Developer's Bundle System info: HP-UX ah006b02 B.11.23 U 9000/800 2284397887 unlimited-user license ---------- assignee: theller components: Build, ctypes messages: 109374 nosy: ronaldoussoren, theller priority: normal severity: normal status: open title: ctypes doesn't build on hp-ux type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 11:32:04 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Jul 2010 09:32:04 +0000 Subject: [issue7899] MemoryError While Executing Python Code In-Reply-To: <1265813909.95.0.996847795707.issue7899@psf.upfronthosting.co.za> Message-ID: <1278408724.91.0.853545781947.issue7899@psf.upfronthosting.co.za> Mark Dickinson added the comment: Peter, this looks like a different problem; please could you open a new issue? When/if you do, please could you also report: - what version of Python you're using - your system details (what OS? 32-bit or 64-bit?) If you can give us a better idea of what's in your 86Mb file, that would also help: perhaps post the first few and last few lines. What's in this list? Integers? Floats? Strings? It's not totally implausible that Python really *does* need gigabytes of memory to process a list in an 86Mb file. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 11:40:58 2010 From: report at bugs.python.org (Nicolas Dumazet) Date: Tue, 06 Jul 2010 09:40:58 +0000 Subject: [issue1974] email.MIMEText.MIMEText.as_string incorrectly folding long subject header In-Reply-To: <1201704485.29.0.575687789495.issue1974@psf.upfronthosting.co.za> Message-ID: <1278409258.94.0.660433696526.issue1974@psf.upfronthosting.co.za> Nicolas Dumazet added the comment: Sure, where was my head. So, a simple patch like this one: _oldheaderinit = email.Header.Header.__init__ def _unifiedheaderinit(self, *args, **kw): # override continuation_ws kw['continuation_ws'] = ' ' _oldheaderinit(self, *args, **kw) email.Header.Header.__dict__['__init__'] = _unifiedheaderinit fixes the issue for us, and might be helpful to others. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 11:43:13 2010 From: report at bugs.python.org (Daniele Varrazzo) Date: Tue, 06 Jul 2010 09:43:13 +0000 Subject: [issue9167] argv double encoding on OSX In-Reply-To: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> Message-ID: <1278409393.7.0.601990359876.issue9167@psf.upfronthosting.co.za> Daniele Varrazzo added the comment: Attached patch with test cases to check sys.argv and sys.executable. The tests fail against the daily snapshot, so adding python 3.2 to the affected versions. Variable __CF_USER_TEXT_ENCODING is undefined. Locale of the system is C: $ locale LANG= LC_COLLATE="C" LC_CTYPE="C" LC_MESSAGES="C" LC_MONETARY="C" LC_NUMERIC="C" LC_TIME="C" LC_ALL= ---------- keywords: +patch versions: +Python 3.2 Added file: http://bugs.python.org/file17881/test-argv.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 11:51:26 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 06 Jul 2010 09:51:26 +0000 Subject: [issue9176] module termios doesn't build on HP-UX In-Reply-To: <1278409886.91.0.742762759895.issue9176@psf.upfronthosting.co.za> Message-ID: <1278409886.91.0.742762759895.issue9176@psf.upfronthosting.co.za> New submission from Ronald Oussoren : I get the following error when building the termios module on HP-UX: cc -Ae +z -Olimit 1500 -g -DNDEBUG -O -I/opt/python2.7/include -I. -IInclude -I./Include -I/home/xsupport/bld/Python-2.7/Include -I/home/xsupport/bld/Python-2.7 -c /home/xsupport/bld/Python-2.7/Modules/termios.c -o build/temp.hp-ux-B.11.23-9000-800-2.7/home/xsupport/bld/Python-2.7/Modules/termios.o cc: "/home/xsupport/bld/Python-2.7/Modules/termios.c", line 75: error 1574: Unknown size for "mode". cc: "/home/xsupport/bld/Python-2.7/Modules/termios.c", line 96: error 1530: Undefined struct or union. cc: "/home/xsupport/bld/Python-2.7/Modules/termios.c", line 96: error 1527: Incompatible types in cast: Must cast from scalar to scalar or to void type. cc: "/home/xsupport/bld/Python-2.7/Modules/termios.c", line 106: error 1530: Undefined struct or union. (The line numbers are off by 3 due to an experiment that doesn't affect the error message beyond the linenumbers). Compiler version: B9007AA C.11.23.12 HP C/aC++ Developer's Bundle System info: HP-UX ah006b02 B.11.23 U 9000/800 2284397887 unlimited-user license ---------- components: Build messages: 109378 nosy: ronaldoussoren priority: normal severity: normal status: open title: module termios doesn't build on HP-UX type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 11:53:00 2010 From: report at bugs.python.org (Cyril) Date: Tue, 06 Jul 2010 09:53:00 +0000 Subject: [issue9177] ssl.read/write on closed socket raises AttributeError In-Reply-To: <1278409980.47.0.00506027612669.issue9177@psf.upfronthosting.co.za> Message-ID: <1278409980.47.0.00506027612669.issue9177@psf.upfronthosting.co.za> New submission from Cyril : This: import socket, ssl s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) ssl_sock = ssl.wrap_socket(s) ssl_sock.connect(('www.verisign.com', 443)) ssl_sock.close() ssl_sock.read(1024) raises: Traceback (most recent call last): File "/tmp/bug.py", line 10, in ssl_sock.read(1024) File "/path/to/lib/python2.7/ssl.py", line 138, in read return self._sslobj.read(len) AttributeError: 'NoneType' object has no attribute 'read' I would expect a socket.error instead, which mimics the way regular sockets behave. Indeed, this code: import socket, ssl s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('www.verisign.com', 80)) s.close() s.recv(1024) raises: Traceback (most recent call last): File "/tmp/bug.py", line 6, in s.recv(1024) File "/path/to/lib/python2.7/socket.py", line 170, in _dummy raise error(EBADF, 'Bad file descriptor') socket.error: [Errno 9] Bad file descriptor I've tested on the latest trunks on both 2.7 and 3.2. I've also tested on 2.6 and 3.1. I can write a patch that fixes it if the bug is accepted. ---------- components: Library (Lib) messages: 109379 nosy: cbay priority: normal severity: normal status: open title: ssl.read/write on closed socket raises AttributeError type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 11:59:13 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 06 Jul 2010 09:59:13 +0000 Subject: [issue9178] Compile problem on HP-UX 11 In-Reply-To: <1278410353.61.0.423846104588.issue9178@psf.upfronthosting.co.za> Message-ID: <1278410353.61.0.423846104588.issue9178@psf.upfronthosting.co.za> New submission from Ronald Oussoren : I get a segmentation fault in the compiler when building python 2.7 on an HP-UX machine. Compiler version: B9007AA C.11.23.12 HP C/aC++ Developer's Bundle System info: HP-UX ah006b02 B.11.23 U 9000/800 2284397887 unlimited-user license Last bit of the output of make: cc -Ae -c -Olimit 1500 -g -DNDEBUG -O -I. -IInclude -I./Include -DPy_BUILD_CORE -o Objects/exceptions.o Objects/exceptions.c ( 0) 0x002012ac Call_exit + 0x58 [/opt/ansic/lbin/ccom] ( 1) 0x001f3938 catch_signal + 0x1c [/opt/ansic/lbin/ccom] ( 2) 0x00967fb8 _sigreturn [/opt/ansic/lbin/ccom] ( 3) 0x008759ec doc_assign_range_bounds + 0x1430 [/opt/ansic/lbin/ccom] ( 4) 0x008730cc doc_process_ranges + 0xdc [/opt/ansic/lbin/ccom] ( 5) 0x0063b2d0 opt_driver + 0x1e20 [/opt/ansic/lbin/ccom] ( 6) 0x00547cc8 process_sllic_graph + 0x1a8 [/opt/ansic/lbin/ccom] ( 7) 0x00545320 pass2_ucode + 0x47c [/opt/ansic/lbin/ccom] ( 8) 0x005818b0 cg_end + 0x38c [/opt/ansic/lbin/ccom] ( 9) 0x002875fc be_end + 0x1c [/opt/ansic/lbin/ccom] (10) 0x00271df0 fl_defn + 0x5fc [/opt/ansic/lbin/ccom] (11) 0x0025e74c fl_stmt + 0x25c [/opt/ansic/lbin/ccom] (12) 0x001fa2ac cpx_Process_tree + 0xc18 [/opt/ansic/lbin/ccom] (13) 0x00213378 Process_tree_received_as_output + 0x474 [/opt/ansic/lbin/ccom] (14) 0x00212ea0 P_build_non_leaf + 0x8c [/opt/ansic/lbin/ccom] (15) 0x00205690 Faster_parser + 0x4bc [/opt/ansic/lbin/ccom] (16) 0x00202168 LR_parser + 0x10 [/opt/ansic/lbin/ccom] (17) 0x002015a0 Do_MW + 0x18 [/opt/ansic/lbin/ccom] (18) 0x001f4244 main + 0x7a0 [/opt/ansic/lbin/ccom] (19) 0x0090fa40 _start + 0x98 [/opt/ansic/lbin/ccom] (20) 0x001f2000 $START$ + 0x178 [/opt/ansic/lbin/ccom] cc: error 1405: "/opt/ansic/lbin/ccom" terminated abnormally with signal 11. *** Error exit code 9 I can finish the build by compiling this file and "Modules/_io/_iomodule.o" without the '-O' flag (the latter took some tweaking) It is unlikely that this is a Python bug, but I'm filing it here anyway just in case anyone else runs into it. see also: Issue9176, Issue9175 ---------- components: Build messages: 109380 nosy: ronaldoussoren priority: normal severity: normal status: open title: Compile problem on HP-UX 11 type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 12:01:48 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Jul 2010 10:01:48 +0000 Subject: [issue7899] MemoryError While Executing Python Code In-Reply-To: <1265813909.95.0.996847795707.issue7899@psf.upfronthosting.co.za> Message-ID: <1278410508.45.0.680789593593.issue7899@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing the original issue: there's insufficient information to reproduce or analyze the problem. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 12:23:35 2010 From: report at bugs.python.org (andrew cooke) Date: Tue, 06 Jul 2010 10:23:35 +0000 Subject: [issue9179] Lookback with group references incorrect (two issues?) In-Reply-To: <1278411814.72.0.368411829683.issue9179@psf.upfronthosting.co.za> Message-ID: <1278411814.72.0.368411829683.issue9179@psf.upfronthosting.co.za> New submission from andrew cooke : from re import compile # these work as expected assert compile('(a)b(?<=b)(c)').match('abc') assert not compile('(a)b(?<=c)(c)').match('abc') assert compile('(a)b(?=c)(c)').match('abc') assert not compile('(a)b(?=b)(c)').match('abc') # but when you add groups, you get bugs assert not compile('(?:(a)|(x))b(?<=(?(2)x|c))c').match('abc') # matches! assert not compile('(?:(a)|(x))b(?<=(?(2)b|x))c').match('abc') assert compile('(?:(a)|(x))b(?<=(?(2)x|b))c').match('abc') # fails! assert not compile('(?:(a)|(x))b(?<=(?(1)c|x))c').match('abc') # matches! assert compile('(?:(a)|(x))b(?<=(?(1)b|x))c').match('abc') # fails! # but lookahead works as expected assert compile('(?:(a)|(x))b(?=(?(2)x|c))c').match('abc') assert not compile('(?:(a)|(x))b(?=(?(2)c|x))c').match('abc') assert compile('(?:(a)|(x))b(?=(?(2)x|c))c').match('abc') assert not compile('(?:(a)|(x))b(?=(?(1)b|x))c').match('abc') assert compile('(?:(a)|(x))b(?=(?(1)c|x))c').match('abc') # these are similar but, in my opinion, shouldn't even compile # (group used before defined) assert not compile('(a)b(?<=(?(2)x|c))(c)').match('abc') # matches! assert not compile('(a)b(?<=(?(2)b|x))(c)').match('abc') assert not compile('(a)b(?<=(?(1)c|x))(c)').match('abc') # matches! assert compile('(a)b(?<=(?(1)b|x))(c)').match('abc') # fails! assert compile('(a)b(?=(?(2)x|c))(c)').match('abc') assert not compile('(a)b(?=(?(2)b|x))(c)').match('abc') assert compile('(a)b(?=(?(1)c|x))(c)').match('abc') # this is the error we should see above try: compile('(a)\\2(b)') assert False, 'expected error' except: pass ---------- components: Library (Lib) messages: 109382 nosy: acooke priority: normal severity: normal status: open title: Lookback with group references incorrect (two issues?) type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 12:30:30 2010 From: report at bugs.python.org (andrew cooke) Date: Tue, 06 Jul 2010 10:30:30 +0000 Subject: [issue9179] Lookback with group references incorrect (two issues?) In-Reply-To: <1278411814.72.0.368411829683.issue9179@psf.upfronthosting.co.za> Message-ID: <1278412230.01.0.231086269384.issue9179@psf.upfronthosting.co.za> andrew cooke added the comment: I hope the above is clear enough (you need to stare at the regexps for a time) - basically, lookback with a group conditional is not as expected (it appears to be evaluated as lookahead?). Also, some patterns compile that probably shouldn't. The re package only supports (according to the docs) lookback on expressions whose length is known. So I guess it's also possible that (?(n)pat1|pat2) should always fail that, even when len(pat1) = len(pat2)? Also, the generally excellent unit tests for the re package don't have much coverage for lookback (I am writing my own regexp lib and it passes all the re unit tests but had a similar bug - that's how I found this one...). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 13:25:57 2010 From: report at bugs.python.org (Alex Willmer) Date: Tue, 06 Jul 2010 11:25:57 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1278405781.78.0.964478618838.issue2636@psf.upfronthosting.co.za> Message-ID: Alex Willmer added the comment: I've packaged Matthew's latest revision and uploaded it to PyPI. This version will build for Python 2 and Python 3, parallel installs will coexist on the same machine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 13:32:03 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 06 Jul 2010 11:32:03 +0000 Subject: [issue9170] zipfile cannot read AES encrypted files In-Reply-To: <1278351743.73.0.460439084815.issue9170@psf.upfronthosting.co.za> Message-ID: <1278415923.79.0.387125694843.issue9170@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: zipfile only supports the "Traditional PKWARE Encryption" method. Support for other encryption methods would be useful. ---------- nosy: +amaury.forgeotdarc stage: -> needs patch title: zipfile.extractall raises runtime error on correct password -> zipfile cannot read AES encrypted files type: behavior -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 14:16:53 2010 From: report at bugs.python.org (Daniele Varrazzo) Date: Tue, 06 Jul 2010 12:16:53 +0000 Subject: [issue9167] argv double encoding on OSX In-Reply-To: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> Message-ID: <1278418613.43.0.267624770475.issue9167@psf.upfronthosting.co.za> Daniele Varrazzo added the comment: I've made some other test with LANG=C on other platforms. It seems resulting in a clean error on Linux: $ LANG=C ./here/bin/python3 Python 3.2a0 (py3k, Jul 6 2010, 12:40:29) [GCC 4.3.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys, os >>> snowman = '\u2603' >>> os.system((sys.executable + " -c 'import sys; print(sys.argv[-1].encode(\"utf8\"))' " + snowman).encode(sys.getdefaultencoding())) Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'utf-8' codec can't encode character '\udce2' in position 0: surrogates not allowed 256 Notice that I had to use an explicit encoding or os.system would have tried to encode using ascii and barf, probably because of bug #8775. I've also been reported about issue #4388: I've checked and test_run_code() fails as described. So I think this bug can be considered a #4388 duplicate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 15:08:31 2010 From: report at bugs.python.org (andrew cooke) Date: Tue, 06 Jul 2010 13:08:31 +0000 Subject: [issue9179] Lookback with group references incorrect (two issues?) In-Reply-To: <1278411814.72.0.368411829683.issue9179@psf.upfronthosting.co.za> Message-ID: <1278421711.18.0.516700948673.issue9179@psf.upfronthosting.co.za> andrew cooke added the comment: If it's any help, these are the equivalent tests as I think they should be (you'll need to translate engine(parse(... to compile(...) http://code.google.com/p/rxpy/source/browse/rxpy/src/rxpy/engine/backtrack/_test/engine.py?r=fc52f6959a0cfabdddc6960f47d7380128bb3584#284 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 15:30:22 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Jul 2010 13:30:22 +0000 Subject: [issue9179] Lookback with group references incorrect (two issues?) In-Reply-To: <1278411814.72.0.368411829683.issue9179@psf.upfronthosting.co.za> Message-ID: <1278423022.03.0.183532727321.issue9179@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks very much for the reports. > So I guess it's also possible that (?(n)pat1|pat2) should always fail > that, even when len(pat1) = len(pat2)? Yes, this seems likely to me. Possibly even the compile stage should fail, though I've no idea how feasible it is to make that happen. Unfortunately I'm not sure that any of the currently active Python developers is particularly well versed in the intricacies of the re module. The most realistic option here may be just to document the restrictions on lookbehind assertions more clearly. Unless you're able to provide a patch? ---------- nosy: +mark.dickinson, mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 15:31:43 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Jul 2010 13:31:43 +0000 Subject: [issue9179] Lookback with group references incorrect (two issues?) In-Reply-To: <1278411814.72.0.368411829683.issue9179@psf.upfronthosting.co.za> Message-ID: <1278423103.24.0.10325157064.issue9179@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 15:35:41 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 06 Jul 2010 13:35:41 +0000 Subject: [issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor In-Reply-To: <1278349650.72.0.868837064663.issue9169@psf.upfronthosting.co.za> Message-ID: <1278423341.5.0.462857984481.issue9169@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- priority: normal -> low resolution: -> rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 15:47:55 2010 From: report at bugs.python.org (andrew cooke) Date: Tue, 06 Jul 2010 13:47:55 +0000 Subject: [issue9179] Lookback with group references incorrect (two issues?) In-Reply-To: <1278411814.72.0.368411829683.issue9179@psf.upfronthosting.co.za> Message-ID: <1278424075.6.0.633798598856.issue9179@psf.upfronthosting.co.za> andrew cooke added the comment: I thought someone was working on the re module these days? I thought there I'd seen some issues with patches etc? Anyway, short term, sorry - no patch. Medium/long term, yes it's possible, but please don't rely on it. The simplest way to document it is as you suggest, I think - just extend the qualifier on lookback requiring fixed length to exclude references to groups (it does seem to *bind* groups correctly on lookback, so there's no need to exclude them completely). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 15:56:18 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Jul 2010 13:56:18 +0000 Subject: [issue9179] Lookback with group references incorrect (two issues?) In-Reply-To: <1278411814.72.0.368411829683.issue9179@psf.upfronthosting.co.za> Message-ID: <1278424578.08.0.74356064051.issue9179@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I thought someone was working on the re module these days? Well, there's issue 2636. It doesn't seem likely that that work will land in core Python any time soon, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 16:03:22 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Jul 2010 14:03:22 +0000 Subject: [issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor In-Reply-To: <1278349650.72.0.868837064663.issue9169@psf.upfronthosting.co.za> Message-ID: <1278425002.88.0.304252684719.issue9169@psf.upfronthosting.co.za> Mark Dickinson added the comment: I supported this idea when Alexander brought it up in IRC. On reflection, I think Antoine is right, though: deprecations aren't something to be done lightly. As a matter of good style, though, I'd still like to see all uses of timedelta in the standard library and documentation use the keywords explicitly: "timedelta(minutes=10)" is instantly understandable, while "timedelta(0, 0, 0, 0, 10)" requires some effort to understand (well, on my part, anyway). ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 16:03:45 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Jul 2010 14:03:45 +0000 Subject: [issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor In-Reply-To: <1278349650.72.0.868837064663.issue9169@psf.upfronthosting.co.za> Message-ID: <1278425025.61.0.854351679161.issue9169@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 16:14:53 2010 From: report at bugs.python.org (Peter Wolf) Date: Tue, 06 Jul 2010 14:14:53 +0000 Subject: [issue9180] Memory Error In-Reply-To: <1278425693.24.0.842654269147.issue9180@psf.upfronthosting.co.za> Message-ID: <1278425693.24.0.842654269147.issue9180@psf.upfronthosting.co.za> New submission from Peter Wolf : I am using Ubuntu 10.04 32 bit and python 2.6.When I type the following line in a terminal >python mydatafile.py I get the following error message on the next line MemoryError That is all. File details : It is a 2d list of floating point numbers 86Mb in size. Here is the start -> mydata=[[1.51386,1.51399,1.51386,1.51399], [1.51386,1.51401,1.51401,1.51386], [1.51391,1.51406,1.51395,1.51401], [1.51392,1.514,1.51397,1.51395], [1.51377,1.5142,1.51387,1.51397], here is the end -> [1.5631,1.5633,1.5631,1.5631], [1.5631,1.5632,1.5631,1.5631], [1.5631,1.5633,1.5631,1.5631], [1.563,1.5631,1.5631,1.5631]] I will add that exactly the same type of file but 49MB in size compiled with 1GB of ram although there was a lot of disk activity and the CPU seemed to be working very hard.The 86MB file produced the above error.I upgraded to 3.4GB and still the same error. ---------- components: None messages: 109392 nosy: freakcycle priority: normal severity: normal status: open title: Memory Error type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 16:29:01 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 06 Jul 2010 14:29:01 +0000 Subject: [issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor In-Reply-To: <1278349650.72.0.868837064663.issue9169@psf.upfronthosting.co.za> Message-ID: <1278426541.09.0.0250147554995.issue9169@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > As a matter of good style, though, I'd still like to see all uses of > timedelta in the standard library and documentation use the keywords > explicitly ... It is a bit of a shame, but there are exactly 3 places using timedelta in stdlib: Lib/_strptime.py:492: tzdelta = datetime_timedelta(seconds=gmtoff) Lib/calendar.py:160: date -= datetime.timedelta(days=days) Lib/calendar.py:161: oneday = datetime.timedelta(days=1) The later two uses of keywords I don't necessarily approve, particularly timedelta(days=days). I find timedelta(n) meaning n days fairly easy to remember. Two arguments, timedelta(days, secs) is borderline. I would approve it if the meaning is clear from context as in MINUTE = timedelta(0, 60) or from the the argument name as in timedelta(0, seconds). I would certainly reject the abominations like FIVE_MINUTES = datetime.timedelta(0, 0, 0, 0, 5) in any code review. I checked datetime.rst and it looks like it only uses positional arguments for timedelta(0), which is pretty uncontroversial and in output displays. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 16:30:17 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Jul 2010 14:30:17 +0000 Subject: [issue9180] Memory Error In-Reply-To: <1278425693.24.0.842654269147.issue9180@psf.upfronthosting.co.za> Message-ID: <1278426617.54.0.494099049771.issue9180@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for the extra information; that helps a lot. I think this is expected behaviour: Python really does need that much memory to parse the file (as a Python file). Partly this is because Python objects actually do take up a fair amount of space: a length-4 list of floats on my (64-bit) machine takes 200 bytes, though on 32-bit machine this number should be a bit smaller. But partly it's that the compilation stage itself uses a lot of memory: for example, each of the floats in your input gets put into a dict during compilation; this dict is used to recognize multiple references to the same float, so that only one float object needs to be created for each distinct float value. And those dicts are going to get pretty big. I don't think that storing huge amounts of data in a .py file like this is usual practice, so I'm not particularly worried that importing a huge .py file can cause a MemoryError. For your case, I'd suggest parsing your datafile manually: reading the file line by line from within Python. Suggest closing this issue as "won't fix". ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 16:51:19 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Jul 2010 14:51:19 +0000 Subject: [issue9180] Memory Error In-Reply-To: <1278425693.24.0.842654269147.issue9180@psf.upfronthosting.co.za> Message-ID: <1278427879.46.0.305399010027.issue9180@psf.upfronthosting.co.za> Mark Dickinson added the comment: Just an additional note: have you considered using the pickle or json modules? ---------- resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 17:17:13 2010 From: report at bugs.python.org (Charles Solar) Date: Tue, 06 Jul 2010 15:17:13 +0000 Subject: [issue9181] Solaris extension building does not work with 64 bit python In-Reply-To: <1278429433.49.0.398235894568.issue9181@psf.upfronthosting.co.za> Message-ID: <1278429433.49.0.398235894568.issue9181@psf.upfronthosting.co.za> New submission from Charles Solar : On solaris, if you build a 64 bit python and use it to build an extension, it will not properly link the module. Apparently solaris requires the -m64 flag in the linker as well as the compile steps. Python distutils successfully compiles all the object files using -m64, but it fails to link with -m64 causing the entire build to fail if the extension needs a 64 bit library dependency ( will get 'incompatible library' errors from the linker ). To reproduce: build python with CFLAGS="-m64 -O3" LDFLAGS="-m64" build a C extension that depends on a 64 bit library (python setup.py install) I assume that it would work if the C extension does not need a specific 64 bit library as the linker will not go and look for the wrong version of file. So its a very uncommon but annoying bug. > ld --version GNU ld (GNU Binutils) 2.20.1.20100303 Copyright 2009 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) a later version. This program has absolutely no warranty. ---------- assignee: tarek components: Distutils, Distutils2, Extension Modules messages: 109396 nosy: redcomet, tarek priority: normal severity: normal status: open title: Solaris extension building does not work with 64 bit python type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 17:21:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 06 Jul 2010 15:21:40 +0000 Subject: [issue9000] Provide parseable repr to datetime.timezone In-Reply-To: <1276617170.01.0.394704824446.issue9000@psf.upfronthosting.co.za> Message-ID: <1278429700.52.0.703762306655.issue9000@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a python prototype. I am following the convention in place for the other datetime classes of prepending the repr with 'datetime.'. This may not be ideal, but better than to introduce an inconsistency. The only question I think is worth considering is the representation of timezone.utc. I would like to have repr(timezone(timedelta(0))) == 'datetime.timezone.utc' even though currently timezone(timedelta(0)) and timezone.utc are different but equal objects. This is going to change, however. See issue9051. [1] http://bugs.python.org/issue5094#msg106411 ---------- keywords: +patch Added file: http://bugs.python.org/file17882/issue9000-proto.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 17:25:31 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Jul 2010 15:25:31 +0000 Subject: [issue9009] Improve quality of Python/dtoa.c In-Reply-To: <1276696848.05.0.800225334902.issue9009@psf.upfronthosting.co.za> Message-ID: <1278429931.5.0.457478230723.issue9009@psf.upfronthosting.co.za> Mark Dickinson added the comment: Second version of the strtod rewrite; has some additional documentation and comment fixes. No other significant changes from the first version. This is still a work in progress. ---------- Added file: http://bugs.python.org/file17883/rewrite_strtod_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 17:52:07 2010 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 06 Jul 2010 15:52:07 +0000 Subject: [issue9179] Lookback with group references incorrect (two issues?) In-Reply-To: <1278411814.72.0.368411829683.issue9179@psf.upfronthosting.co.za> Message-ID: <1278431527.98.0.270570171929.issue9179@psf.upfronthosting.co.za> Matthew Barnett added the comment: Should a regex compile if a group is referenced before it's defined? Consider this: (?:(?(2)(a)|(b))+ Other regex implementations permit forward references to groups. BTW, I had a look at the re module, found it too difficult, and so started on my own implementation of the matching engine (available on PyPI). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 18:02:42 2010 From: report at bugs.python.org (andrew cooke) Date: Tue, 06 Jul 2010 16:02:42 +0000 Subject: [issue9179] Lookback with group references incorrect (two issues?) In-Reply-To: <1278411814.72.0.368411829683.issue9179@psf.upfronthosting.co.za> Message-ID: <1278432162.84.0.497646561074.issue9179@psf.upfronthosting.co.za> andrew cooke added the comment: Ah good point, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 18:17:41 2010 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 06 Jul 2010 16:17:41 +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: <1278433061.22.0.656892551766.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: I started with trying to modify the existing re module, but I wanted to make too many changes, so in the end I decided to make a clean break and start on a new implementation which was compatible with the existing re module and which could replace the existing implementation, even under the same name. Apart from the recent bug fix, I haven't done any further work since April on it because I think it's pretty much ready. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 18:24:41 2010 From: report at bugs.python.org (Sergey Konoplev) Date: Tue, 06 Jul 2010 16:24:41 +0000 Subject: [issue9182] argparse: optional argument w/ narg='+' conflicts w/ positional argsument In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> New submission from Sergey Konoplev : Hello, I am starting to use argparse package and faced the problem where an optional argument w/ nargs='+' conflicts w/ a positional argument. Here is the test case: >>> import argparse >>> p = argparse.ArgumentParser() >>> p.add_argument('foo', type=str) _StoreAction(option_strings=[], dest='foo', nargs=None, const=None, default=None, type=, choices=None, help=None, metavar=None) >>> p.add_argument('-b', '--bar', type=int, nargs='+') _StoreAction(option_strings=['-b', '--bar'], dest='bar', nargs='+', const=None, default=None, type=, choices=None, help=None, metavar=None) >>> p.print_help() usage: [-h] [-b BAR [BAR ...]] foo positional arguments: foo optional arguments: -h, --help show this help message and exit -b BAR [BAR ...], --bar BAR [BAR ...] >>> p.parse_args('-b 123 456 bla'.split()) usage: [-h] [-b BAR [BAR ...]] foo : error: argument -b/--bar: invalid int value: 'bla' It prints this usage string "usage: [-h] [-b BAR [BAR ...]] foo" so it is assumed that I could use this " -b 123 456 bla" but it does not works. How could it be and how to solve it? Thank you in advance. ---------- components: Library (Lib) messages: 109402 nosy: gray_hemp priority: normal severity: normal status: open title: argparse: optional argument w/ narg='+' conflicts w/ positional argsument type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 18:27:48 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 06 Jul 2010 16:27:48 +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: <1278433668.6.0.78863818691.issue2636@psf.upfronthosting.co.za> Ezio Melotti added the comment: So, if it's pretty much ready, do you think it could be included already in 3.2? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 18:29:30 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 06 Jul 2010 16:29:30 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1278433770.54.0.857380766607.issue2636@psf.upfronthosting.co.za> Brian Curtin added the comment: Before anything else is done with it, it should probably be announced in some way. I'm not sure if anyone has opened any of these zip files, reviewed anything, ran anything, or if anyone even knows this whole thing has been going on. ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 18:38:32 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 06 Jul 2010 16:38:32 +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: <1278434312.15.0.76137258543.issue2636@psf.upfronthosting.co.za> Ezio Melotti added the comment: Yes, as I said in the previous message it should probably be announced on python-dev and see what the others think. I don't know how much the module has been used in the wild, but since there has been a PyPI package available for a few months now and since people reported here issues I assume someone is using it (however I don't know how many persons and if they used it with real applications or just played around with it). I don't want to rush the things, but if the module is "ready" I do want to start moving the things forward, so that after all the necessary decisions and reviews it eventually gets merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 19:03:42 2010 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 06 Jul 2010 17:03:42 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1278435822.6.0.0937241063976.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: The file at: http://pypi.python.org/pypi/regex was downloaded 75 times, if that's any help. (Now reset to 0 because of the bug fix.) If it's included in 3.2 then there's the question of whether it should replace the re module and be called "re". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 19:07:07 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 06 Jul 2010 17:07:07 +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: <1278436027.74.0.560884995114.issue2636@psf.upfronthosting.co.za> Ezio Melotti added the comment: If it's backward-compatible with the 're' module, all the tests of the test suite pass and it just improves it and add features I don't see why not. (That's just my personal opinion though, other people might (and probably will) disagree.) Try to send an email on python-dev and see what they say. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 19:16:26 2010 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Tue, 06 Jul 2010 17:16:26 +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: <1278436586.61.0.573952934497.issue2636@psf.upfronthosting.co.za> Jeffrey C. Jacobs added the comment: My only addition opinion is that re is very much used in deployed python applications and was written not just for correctness but also speed. As such, regex should be benchmarked fairly to show that it is commensurately speedy. I wouldn't not personally object to a slightly slower module, though not one that is noticeably slower and if it can be proven faster in the average case, it's one more check in the box for favorable inclusion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 19:30:35 2010 From: report at bugs.python.org (Vlastimil Brom) Date: Tue, 06 Jul 2010 17:30:35 +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: <1278437435.44.0.454397330903.issue2636@psf.upfronthosting.co.za> Vlastimil Brom added the comment: Thanks for the prompt fix! It would indeed be nice to see this enhanced re module in the standard library e.g. in 3.2, but I also really appreciate, that also multiple 2.x versions are supported (as my current main usage of this library involves py2-only wx gui). As for the usage statistics, I for one always downloaded the updates from here rather than pypi, but maybe it is not a regular case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 19:34:16 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 06 Jul 2010 17:34:16 +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: <1278437656.74.0.106037607937.issue2636@psf.upfronthosting.co.za> Georg Brandl added the comment: FWIW, I'd love seeing the updated regex module in 3.2. Please do bring it up on python-dev. Looking at the latest module on PyPI, I noted that the regex.py file is very long (~3500 lines), even though it is quite compressed (e.g. no blank lines between methods). It would be good to split it up. This would also remove the need for underscore-prefixing most of the identifiers, since they would simply live in another (private) module. Things like the _create_header_file function should be put into utility scripts. The C file is also very long, but I think we all know why :) It would also be nice to see some performance comparisons -- where is the new engine faster, where does it return matches while re just loops forever, and where is the new engine slower? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 19:44:57 2010 From: report at bugs.python.org (Dave Malcolm) Date: Tue, 06 Jul 2010 17:44:57 +0000 Subject: [issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" In-Reply-To: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> Message-ID: <1278438297.64.0.363556333718.issue9146@psf.upfronthosting.co.za> Dave Malcolm added the comment: I'm attaching an updated patch which: - adds error checking to the various places where EVP_DigestInit is called - adds a test to test_hashlib to ensure that hashlib still works gracefully when OPENSSL_FORCE_FIPS_MODE=1 is set in the environment Note that in this mode: >>> _hashlib.new('md5') Traceback (most recent call last): File "", line 1, in ValueError: error:060800A0:digital envelope routines:EVP_DigestInit_ex:unknown cipher [57670 refs] but hashlib falls back to using the "md5" module instead. I started writing a test for _hashlib (as opposed to hashlib), but it's too hard to express a runtime conditional on whether OPENSSL_FORCE_FIPS_MODE will actually affect the behavior of EVP_DigestInit across the versions of openssl that might be installed on the system. I'm still waiting to hear back from the Fedora OpenSSL packager for info on how to reproduce this on a vanilla OpenSSL. ---------- Added file: http://bugs.python.org/file17884/hashopenssl-fips-mode-errors-v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 19:46:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 06 Jul 2010 17:46:11 +0000 Subject: [issue9182] argparse: optional argument w/ narg='+' conflicts w/ positional argsument In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1278438371.69.0.376900372786.issue9182@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the bug report. Can you try separating option arguments from positional arguments with ?--?? If yes, this would be a doc bug. Also, can you reproduce it with Python 2.7? ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 19:50:58 2010 From: report at bugs.python.org (Alex Willmer) Date: Tue, 06 Jul 2010 17:50:58 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1278435822.6.0.0937241063976.issue2636@psf.upfronthosting.co.za> Message-ID: Alex Willmer added the comment: On 6 July 2010 18:03, Matthew Barnett wrote: > The file at http://pypi.python.org/pypi/regex/ was downloaded 75 times, if that's any help. (Now reset to 0 because of the bug fix.) > Each release was downloaded between 50 and 100 times. Matthew let me know if you'd like control of the package, or maintainer access. Other than the odd tweet I haven't publicized the releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 20:15:42 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 06 Jul 2010 18:15:42 +0000 Subject: [issue3461] smtplib does not fully support IPv6 in EHLO In-Reply-To: <1217282925.26.0.916204427354.issue3461@psf.upfronthosting.co.za> Message-ID: <1278440142.21.0.884243150189.issue3461@psf.upfronthosting.co.za> Mark Lawrence added the comment: Ran test_smtplib.py for Python 2.7 and 3.1.2 on Windows Vista all tests passed. ---------- stage: unit test needed -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 20:31:22 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 06 Jul 2010 18:31:22 +0000 Subject: [issue9094] Make python-m pickletools do something useful In-Reply-To: <1277680335.26.0.237686854485.issue9094@psf.upfronthosting.co.za> Message-ID: <1278441082.51.0.785757966935.issue9094@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: On the second thought, this is clearly not a bug fix. Not a backport candidate. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 21:16:21 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Jul 2010 19:16:21 +0000 Subject: [issue9009] Improve quality of Python/dtoa.c In-Reply-To: <1276696848.05.0.800225334902.issue9009@psf.upfronthosting.co.za> Message-ID: <1278443781.67.0.145535463031.issue9009@psf.upfronthosting.co.za> Mark Dickinson added the comment: r82614: add functionality to change FPU rounding mode (via float.__setround__ and float.__getround__ functions), on platforms that support the standard C99 fesetround and fegetround functions: >>> float.__getround__() 'tonearest' >>> 1e300 * 1e300 inf >>> float.__setround__("downward") >>> 1e300 * 1e300 1.7976931348623157e+308 This is just temporary, so that I can test that FPU rounding mode doesn't affect results of string-to-float and float-to-string conversions. I'm not planning to merge any of r82614 back to py3k. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 22:15:12 2010 From: report at bugs.python.org (Dave Malcolm) Date: Tue, 06 Jul 2010 20:15:12 +0000 Subject: [issue9163] test_gdb fails In-Reply-To: <1278314862.38.0.121904956787.issue9163@psf.upfronthosting.co.za> Message-ID: <1278447312.37.0.0570174431443.issue9163@psf.upfronthosting.co.za> Dave Malcolm added the comment: Deciphering the output from the assertion, the stdout from gdb when running the test was: --- BEGIN --- Breakpoint 1, PyObject_Print (op=42, fp=0x401cf4e0, flags=1) at Objects/object.c:329 329 { #3 Frame 0x81e322c, for file /home/mike/workspace/Python-2.7/Lib/test/gdb_sample.py, line 10, in baz (args=(1, 2, 3)) print(42) #7 (unable to read python frame information) #10 Frame 0x81d5544, for file /home/mike/workspace/Python-2.7/Lib/test/gdb_sample.py, line 7, in bar (a=1, b=2, c=3) baz(a, b, c) #13 Frame 0x81d53dc, for file /home/mike/workspace/Python-2.7/Lib/test/gdb_sample.py, line 4, in foo (a=1, b=2, c=3) bar(a, b, c) --- END --- but the expected output was: --- BEGIN --- ^.* #[0-9]+ Frame 0x[0-9a-f]+, for file .*gdb_sample.py, line 7, in bar \(a=1, b=2, c=3\) baz\(a, b, c\) #[0-9]+ Frame 0x[0-9a-f]+, for file .*gdb_sample.py, line 4, in foo \(a=1, b=2, c=3\) bar\(a, b, c\) #[0-9]+ Frame 0x[0-9a-f]+, for file .*gdb_sample.py, line 12, in \(\) foo\(1, 2, 3\) --- END --- There are various tests named "test_basic_command". From the linenumber and assertion, it's clear that this one is PyBtTests.test_basic_command. This looks a lot like issue 8482. What compiler options did you use when building Python? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 22:17:28 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 06 Jul 2010 20:17:28 +0000 Subject: [issue9175] ctypes doesn't build on hp-ux In-Reply-To: <1278407736.6.0.642117116261.issue9175@psf.upfronthosting.co.za> Message-ID: <1278447448.73.0.846254919546.issue9175@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't think ctypes supports acc; try gcc instead. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 22:20:07 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 06 Jul 2010 20:20:07 +0000 Subject: [issue9176] module termios doesn't build on HP-UX In-Reply-To: <1278409886.91.0.742762759895.issue9176@psf.upfronthosting.co.za> Message-ID: <1278447607.77.0.512022896208.issue9176@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can you provide a patch? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 22:22:09 2010 From: report at bugs.python.org (Eric Smith) Date: Tue, 06 Jul 2010 20:22:09 +0000 Subject: [issue9182] argparse: optional argument w/ narg='+' conflicts w/ positional argsument In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1278447729.03.0.846367232528.issue9182@psf.upfronthosting.co.za> Eric Smith added the comment: I get the same behavior in 2.7. Adding '--', I get: >>> p.parse_args('-b 123 456 -- bla'.split()) Namespace(bar=[123, 456], foo='bla') Which is what I expect. ?ric: From your comment, I'm not sure if you think it's a doc bug because '--' does work, or because it doesn't work without it. But I think it's working as designed. I'm closing this. If you think it's a doc bug, please reopen and change to the Documentation component. ---------- nosy: +eric.smith resolution: -> invalid status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 22:22:15 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 06 Jul 2010 20:22:15 +0000 Subject: [issue9178] Compile problem on HP-UX 11 In-Reply-To: <1278410353.61.0.423846104588.issue9178@psf.upfronthosting.co.za> Message-ID: <1278447735.9.0.0540171958118.issue9178@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Closing the report as third-party bug, then. A compiler crash is most definitely not a bug in Python. ---------- nosy: +loewis resolution: -> invalid status: open -> closed versions: +3rd party -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 22:32:33 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 06 Jul 2010 20:32:33 +0000 Subject: [issue3461] smtplib does not fully support IPv6 in EHLO In-Reply-To: <1217282925.26.0.916204427354.issue3461@psf.upfronthosting.co.za> Message-ID: <1278448353.42.0.900635280891.issue3461@psf.upfronthosting.co.za> R. David Murray added the comment: The patch still needs unit tests. ---------- nosy: +r.david.murray stage: commit review -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 22:33:54 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 06 Jul 2010 20:33:54 +0000 Subject: [issue9182] argparse: optional argument w/ narg='+' conflicts w/ positional argsument In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1278448434.78.0.706047220029.issue9182@psf.upfronthosting.co.za> ?ric Araujo added the comment: I was suggesting a doc bug only if the current doc didn?t advertise clearly this way of combining nargs with positional arguments. Using ?--? is most certainly standard and right, Using ?--? to explicitly signal positional arguments is most certainly right and standard, but people have to read about that for the first time somewhere. In a perfect world, that would be in their shell?s man page, but better add a word about it in the reference. The ?--? marker is actually mentioned in one section: http://docs.python.org/dev/library/argparse#arguments-containing I?m reopening, suggesting that a line be added to explain the standard ?--? separator for use cases like Sergey?s. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python resolution: invalid -> stage: -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 22:34:28 2010 From: report at bugs.python.org (Dave Malcolm) Date: Tue, 06 Jul 2010 20:34:28 +0000 Subject: [issue8605] test_gdb can fail with compiler opts In-Reply-To: <1272903293.59.0.249639149559.issue8605@psf.upfronthosting.co.za> Message-ID: <1278448468.55.0.00494163884537.issue8605@psf.upfronthosting.co.za> Dave Malcolm added the comment: Thanks. The patch looks good to me, and appears to also fix issue 8482 and issue 9163: compiler optimization across all different compilers and configurations can somewhat arbitrarily break the ability for the debugger to work, and skipping the test in the face of optimization seems the sanest course of action. Minor nit: given that final_opt is set to "" at the start of the loop, the first conditional in: if final_opt and final_opt != '-O0': appears to be redundant. Setting "Stage" to "commit review" - I'd commit it (modulo the above nit), but I don't have rights to do so; looking for a committer to review this. ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 22:34:50 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 06 Jul 2010 20:34:50 +0000 Subject: [issue9182] argparse: optional argument w/ narg='+' conflicts w/ positional argsument In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1278448490.4.0.390461868102.issue9182@psf.upfronthosting.co.za> ?ric Araujo added the comment: Duh, please ignore the first two lines, I forgot to remove them after rephrasing my comment. Sorry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 22:40:59 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Tue, 06 Jul 2010 20:40:59 +0000 Subject: [issue9182] argparse: optional argument w/ narg='+' conflicts w/ positional argsument In-Reply-To: <1278448434.78.0.706047220029.issue9182@psf.upfronthosting.co.za> Message-ID: Fred L. Drake, Jr. added the comment: On Tue, Jul 6, 2010 at 4:33 PM, ?ric Araujo wrote: > Using ?--? to explicitly signal positional arguments is most certainly > right and standard, but people have to read about that for the first > time somewhere. In a perfect world, that would be in their shell?s man > page, but better add a word about it in the reference. It's a convention; not all applications in the larger world support it at all. It needs to be documented for argparse, and also for specific applications (which may or may not be built using argparse or Python. This does not belong in the shell documentation unless needed for the shell itself. ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 22:43:19 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 06 Jul 2010 20:43:19 +0000 Subject: =?utf-8?q?=5Bissue9182=5D_document_=E2=80=9C--=E2=80=9D_as_a_way_to_disti?= =?utf-8?q?nguish_option_w/_narg=3D=27+=27_from_positional_argument_in_arg?= =?utf-8?q?parse?= In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1278448999.28.0.670092311549.issue9182@psf.upfronthosting.co.za> ?ric Araujo added the comment: I always forget that not all programs follow getopt-style parsing rules, thanks for the reminder. ---------- keywords: +easy resolution: -> accepted title: argparse: optional argument w/ narg='+' conflicts w/ positional argsument -> document ?--? as a way to distinguish option w/ narg='+' from positional argument in argparse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 23:25:09 2010 From: report at bugs.python.org (Michael Blume) Date: Tue, 06 Jul 2010 21:25:09 +0000 Subject: [issue9163] test_gdb fails In-Reply-To: <1278314862.38.0.121904956787.issue9163@psf.upfronthosting.co.za> Message-ID: <1278451509.35.0.84997792603.issue9163@psf.upfronthosting.co.za> Michael Blume added the comment: The commands I issued to build were just ./configure make make install These machines were both fairly vanilla setups, so I don't think there should have been any strange flags going to the compiler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 23:29:28 2010 From: report at bugs.python.org (Dave Malcolm) Date: Tue, 06 Jul 2010 21:29:28 +0000 Subject: [issue9163] test_gdb fails In-Reply-To: <1278314862.38.0.121904956787.issue9163@psf.upfronthosting.co.za> Message-ID: <1278451768.7.0.667546260795.issue9163@psf.upfronthosting.co.za> Dave Malcolm added the comment: Thanks. Just to clarify, what's the output of: ./python -c "import sysconfig; print sysconfig.get_config_vars()['PY_CFLAGS']" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 23:35:00 2010 From: report at bugs.python.org (Michael Blume) Date: Tue, 06 Jul 2010 21:35:00 +0000 Subject: [issue9163] test_gdb fails In-Reply-To: <1278314862.38.0.121904956787.issue9163@psf.upfronthosting.co.za> Message-ID: <1278452100.79.0.0832047948059.issue9163@psf.upfronthosting.co.za> Michael Blume added the comment: -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 23:51:23 2010 From: report at bugs.python.org (Sergey Konoplev) Date: Tue, 06 Jul 2010 21:51:23 +0000 Subject: =?utf-8?q?=5Bissue9182=5D_document_=E2=80=9C--=E2=80=9D_as_a_way_to_disti?= =?utf-8?q?nguish_option_w/_narg=3D=27+=27_from_positional_argument_in_arg?= =?utf-8?q?parse?= In-Reply-To: <1278433481.81.0.201692715302.issue9182@psf.upfronthosting.co.za> Message-ID: <1278453083.2.0.875087333566.issue9182@psf.upfronthosting.co.za> Sergey Konoplev added the comment: Thank you for the hint. It is realy not so obvious. May be it is worth to add "--" into the usage string this way usage: [-h] [-b BAR [BAR ...]] -- foo Otherwise it leads to misunderstanding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 23:55:53 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 06 Jul 2010 21:55:53 +0000 Subject: [issue9183] Intern UTC timezone In-Reply-To: <1278453353.29.0.0260229757511.issue9183@psf.upfronthosting.co.za> Message-ID: <1278453353.29.0.0260229757511.issue9183@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Attached patch makes timezone(timedelta(0)) always return the same instance as timezone.utc. See issue9051 for pure python implementation. With this patch, manipulation of aware datetime objects will be as efficient as that of naive datetime objects. Note that having timezone.utc is not enough to assure that the same tzinfo object is used because aware objects can be produced by datetime.strptime(). With this patch, >>> datetime.strptime('2010-07-06 21:39:55 +0000', "%Y-%m-%d %H:%M:%S %z").tzinfo is timezone.utc True ---------- assignee: belopolsky components: Extension Modules files: intern-utc.diff keywords: easy, patch messages: 109432 nosy: belopolsky, mark.dickinson priority: normal severity: normal stage: commit review status: open title: Intern UTC timezone type: resource usage versions: Python 3.2 Added file: http://bugs.python.org/file17885/intern-utc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 23:57:32 2010 From: report at bugs.python.org (Dave Malcolm) Date: Tue, 06 Jul 2010 21:57:32 +0000 Subject: [issue9163] test_gdb fails In-Reply-To: <1278314862.38.0.121904956787.issue9163@psf.upfronthosting.co.za> Message-ID: <1278453452.24.0.172162511327.issue9163@psf.upfronthosting.co.za> Dave Malcolm added the comment: Thanks for the info. The final optimization option passed to gcc is the "-O3", so the build was done with optimization. It's not going to be possible to determine if and when gdb will be able to work in an optimized build across all different compilers and configurations. Issue 8605 has a patch to skip test_gdb if optimization was present in the compilation flags, and I think we should apply it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 6 23:58:09 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 06 Jul 2010 21:58:09 +0000 Subject: [issue9184] open() doc: default value for buffering is -1, not None In-Reply-To: <1278453489.46.0.972678242141.issue9184@psf.upfronthosting.co.za> Message-ID: <1278453489.46.0.972678242141.issue9184@psf.upfronthosting.co.za> New submission from STINNER Victor : Examples: * open(filename) works * open(filename, buffering=-1) works * open(filename, buffering=None) fails In the code: * _pyio.open(): default value is -1, type is int, no default value in the docstring * _io.open(): default value is not specified (C function), type is int, default value in the docstring is None In the doc: * open() default value is None The default value should be -1 everywhere. None is rejected by io.open (_io) and _pyio.open. Attached patch fixes _io.open() docstring Python documentation. ---------- assignee: docs at python components: Documentation, IO, Interpreter Core files: open_doc_buffering.patch keywords: patch messages: 109434 nosy: docs at python, haypo, pitrou priority: normal severity: normal status: open title: open() doc: default value for buffering is -1, not None versions: Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file17886/open_doc_buffering.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 00:23:32 2010 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 06 Jul 2010 22:23:32 +0000 Subject: [issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6 In-Reply-To: <1199635442.3.0.37215467231.issue1745@psf.upfronthosting.co.za> Message-ID: <1278455012.67.0.0735078952011.issue1745@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Now, that 2.7 is out we won't able to commit this anymore. It is sad to abandon a good patch like this. ---------- resolution: -> wont fix stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 00:42:02 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 06 Jul 2010 22:42:02 +0000 Subject: [issue9000] Provide parseable repr to datetime.timezone In-Reply-To: <1276617170.01.0.394704824446.issue9000@psf.upfronthosting.co.za> Message-ID: <1278456122.57.0.169262239082.issue9000@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Attaching a C patch. ---------- resolution: -> accepted stage: unit test needed -> commit review Added file: http://bugs.python.org/file17887/issue9000.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 00:48:18 2010 From: report at bugs.python.org (Alexandre Vassalotti) Date: Tue, 06 Jul 2010 22:48:18 +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: <1278456498.18.0.620242421602.issue2570@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Closing this since Python 2.7 is out now. ---------- nosy: +alexandre.vassalotti resolution: -> wont fix stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 00:48:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 06 Jul 2010 22:48:56 +0000 Subject: [issue9000] Provide parseable repr to datetime.timezone In-Reply-To: <1276617170.01.0.394704824446.issue9000@psf.upfronthosting.co.za> Message-ID: <1278456536.4.0.630759605572.issue9000@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Replacing the patch. The previously attached patch reverted issue9051 a bit too aggressively. ---------- Added file: http://bugs.python.org/file17888/issue9000.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 00:49:02 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 06 Jul 2010 22:49:02 +0000 Subject: [issue9000] Provide parseable repr to datetime.timezone In-Reply-To: <1276617170.01.0.394704824446.issue9000@psf.upfronthosting.co.za> Message-ID: <1278456542.71.0.817810754877.issue9000@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17887/issue9000.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 00:53:54 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 06 Jul 2010 22:53:54 +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: <1278456834.74.0.347213226199.issue2570@psf.upfronthosting.co.za> Ezio Melotti added the comment: Isn't this a bug that could be fixed in 2.7.1? ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 01:02:52 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 06 Jul 2010 23:02:52 +0000 Subject: [issue7716] IPv6 detection, don't assume existence of /usr/xpg4/bin/grep In-Reply-To: <1263666299.94.0.843434843075.issue7716@psf.upfronthosting.co.za> Message-ID: <1278457372.99.0.652225157069.issue7716@psf.upfronthosting.co.za> Mark Lawrence added the comment: This is a miniscule patch to configure.in could someone please run with this. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 01:05:37 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 06 Jul 2010 23:05:37 +0000 Subject: [issue7576] Avoid warnings in PyModuleDef_HEAD_INIT In-Reply-To: <1261744819.66.0.987087888755.issue7576@psf.upfronthosting.co.za> Message-ID: <1278457537.32.0.619243476729.issue7576@psf.upfronthosting.co.za> Mark Lawrence added the comment: This is a miniscule patch to moduleobject.h could someone with the relevant knowledge please review it, thanks. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 01:18:24 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 06 Jul 2010 23:18:24 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1278458304.94.0.760078714631.issue2986@psf.upfronthosting.co.za> Terry J. Reedy added the comment: [Also posted to pydev for additional input, with Subject line Issue 2986: difflib.SequenceMatcher is partly broken Developed with input from Eli Bendersky, who will write patchfile(s) for whichever change option is chosen.] Summary: difflib.SeqeunceMatcher was developed, documented, and originally operated as "a flexible class for comparing pairs of sequences of any [hashable] type". An "experimental" heuristic was added in 2.3a1 to speed up its application to sequences of code lines, which are selected from an unbounded set of possibilities. As explained below, this heuristic partly to completely disables SequenceMatcher for realistic-length sequences from a small finite alphabet. The regression is easy to fix. The docs were never changed to reflect the effect of the heuristic, but should be, with whatever additional change is made. In the commit message for revision 26661, which added the heuristic, Tim Peters wrote "While I like what I've seen of the effects so far, I still consider this experimental. Please give it a try!" Several people who have tried it discovered the problem with small alphabets and posted to the tracker. Issues #1528074, #1678339. #1678345, and #4622 are now-closed duplicates of #2986. The heuristic needs revision. Open questions (discussed after the examples): what exactly to do, which versions to do it too, and who will do it. --- Some minimal difference examples: from difflib import SequenceMatcher as SM # base example print(SM(None, 'x' + 'y'*199, 'y'*199).ratio()) # should be and is 0.9975 (rounded) # make 'y' junk print(SM(lambda c:c=='y', 'x' + 'y'*199, 'y'*199).ratio()) # should be and is 0.0 # Increment b by 1 char print(SM(None, 'x' + 'y'*199, 'y'*200).ratio()) # should be .995, but now is 0.0 because y is treated as junk # Reverse a and b, which increments b print(SM(None, 'y'*199, 'x' + 'y'*199).ratio()) # should be .9975, as before, but now is 0.0 because y is junked The reason for the bug is the heuristic: if the second sequence is at least 200 items long then any item occurring more than one percent of the time in the second sequence is treated as junk. This was aimed at recurring code lines like 'else:' and 'return', but can be fatal for small alphabets where common items are necessary content. A more realistic example than the above is comparing DNA gene sequences. Without the heuristic SequenceMatcher.get_opcodes() reports an appropriate sequence of matches and edits and .ratio works as documented and expected. For 1000/2000/6000 bases, the times on a old Athlon 2800 machine are <1/2/12 seconds. Since 6000 is longer than most genes, this is a realistic and practical use. With the heuristic, everything is junk and there is only one match, ''=='' augmented by the initial prefix of matching bases. This is followed by one edit: replace the rest of the first sequence with the rest of the second sequence. A much faster way to find the first mismatch would be i = 0 while first[i] == second[i]: i+=1 The match ratio, based on the initial matching prefix only, is spuriously low. --- Questions: 1: what change should be make. Proposed fix: Disentangle the heuristic from the calculation of the internal b2j dict that maps items to indexes in the second sequence b. Only apply the heuristic (or not) afterward. Version A: Modify the heuristic to only eliminate common items when there are more than, say, 100 items (when len(b2j)> 100 where b2j is first calculated without popularity deletions). The would leave DNA, protein, and printable ascii+[\n\r\t] sequences alone. On the other hand, realistic sequences of more than 200 code lines should have at least 100 different lines, and so the heuristic should continue to be applied when it (mostly?) 'should' be. This change leaves the API unchanged and does not require a user decision. Version B: add a parameter to .__init__ to make the heuristic optional. If the default were True ('use it'), then the code would run the same as now (even when bad). With the heuristic turned off, users would be able to get the .ratio they may expect and need. On the other hand, users would have to understand the heuristic to know when and when not to use it. Version C: A more radical alternative would be to make one or more of the tuning parameters user settable, with one setting turning it off. 2. What type of issue is this, and what version get changed. I see the proposal as partial reversion of a change that sometimes causes a regression, in order to fix the regression. Such would usually be called a bugfix. Other tracker reviewers claim this issue is a feature request, not a bugfix. Either way, 3.2 gets the fix. The practical issue is whether at least 2.7(.1) should get the fix, or whether the bug should forever continue in 2.x. 3. Who will make the change. Eli will write a patch and I will check it. However, Georg Brandel assigned the issue to Tim Peters, with a request for comment, but Tim never responded. Is there an active committer who will grab the issue and do a commit review when a patch is ready? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 01:21:39 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 06 Jul 2010 23:21:39 +0000 Subject: [issue9000] Provide parseable repr to datetime.timezone In-Reply-To: <1276617170.01.0.394704824446.issue9000@psf.upfronthosting.co.za> Message-ID: <1278458499.35.0.701103678674.issue9000@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in r82617. Python version committed to sandbox in r82616. ---------- stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 02:06:07 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 07 Jul 2010 00:06:07 +0000 Subject: [issue9183] Intern UTC timezone In-Reply-To: <1278453353.29.0.0260229757511.issue9183@psf.upfronthosting.co.za> Message-ID: <1278461167.3.0.362660535328.issue9183@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Python implementation of UTC interning can be done better than the one in issue9051. See attached issue9183-proto.diff. ---------- Added file: http://bugs.python.org/file17889/issue9183-proto.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 02:30:05 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 07 Jul 2010 00:30:05 +0000 Subject: [issue8413] String interpolation doesn't work with sys.version_info In-Reply-To: <1271381290.83.0.815567007844.issue8413@psf.upfronthosting.co.za> Message-ID: <1278462605.13.0.219816399382.issue8413@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Here's a patch. It makes structseq a subclass of tuple and along the way deletes tons of code. Please review. ---------- assignee: eric.smith -> benjamin.peterson keywords: +patch Added file: http://bugs.python.org/file17890/structseq-inheritance.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 02:51:05 2010 From: report at bugs.python.org (Alexandre Vassalotti) Date: Wed, 07 Jul 2010 00:51:05 +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: <1278463865.29.0.943808661959.issue2570@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Actually, you are right. This could be added as bug fix. ---------- resolution: wont fix -> stage: committed/rejected -> needs patch status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 03:45:22 2010 From: report at bugs.python.org (Matthew Barnett) Date: Wed, 07 Jul 2010 01:45:22 +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: <1278467122.97.0.305436163336.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: As a crude guide of the speed difference, here's Python 2.6: re regex bm_regex_compile.py 86.53secs 260.19secs bm_regex_effbot.py 13.70secs 8.94secs bm_regex_v8.py 15.66secs 9.09secs Note that compiling regexes is a lot slower. I concentrated my efforts on the matching speed because regexes tend to be compiled only once, so it's not as important. Matching speed should _at worst_ be comparable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 03:57:51 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 07 Jul 2010 01:57:51 +0000 Subject: [issue4080] pyunit - display time of each test case - patch In-Reply-To: <1223497696.14.0.913391715353.issue4080@psf.upfronthosting.co.za> Message-ID: <1278467871.6.0.839657411635.issue4080@psf.upfronthosting.co.za> Ezio Melotti added the comment: The idea is interesting, but I would prefer to have a way to enable/disable this feature (and maybe even specify its format, e.g. the number of decimals). Moving the logic to an external function (possibly used as a decorator) might avoid some code duplication, but OTOH it would probably slow down the execution and the timing a little (I'm not sure that matters though). ---------- nosy: +ezio.melotti stage: unit test needed -> patch review versions: -3rd party, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 04:01:45 2010 From: report at bugs.python.org (Daniele Varrazzo) Date: Wed, 07 Jul 2010 02:01:45 +0000 Subject: [issue4388] test_cmd_line fails on MacOS X In-Reply-To: <1227329681.44.0.462897262909.issue4388@psf.upfronthosting.co.za> Message-ID: <1278468105.03.0.945663003064.issue4388@psf.upfronthosting.co.za> Changes by Daniele Varrazzo : ---------- nosy: +piro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 04:02:28 2010 From: report at bugs.python.org (Daniele Varrazzo) Date: Wed, 07 Jul 2010 02:02:28 +0000 Subject: [issue8775] Use locale encoding to encode command line arguments (subprocess, os.exec*(), etc.) In-Reply-To: <1274357365.37.0.0731450159524.issue8775@psf.upfronthosting.co.za> Message-ID: <1278468148.59.0.932958961939.issue8775@psf.upfronthosting.co.za> Changes by Daniele Varrazzo : ---------- nosy: +piro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 04:40:12 2010 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 07 Jul 2010 02:40:12 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1278458304.94.0.760078714631.issue2986@psf.upfronthosting.co.za> Message-ID: Eli Bendersky added the comment: Thanks! Now let's see what the other devs say. The first response seems not to have understood what you meant completely :-) Eli On Wed, Jul 7, 2010 at 01:18, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > [Also posted to pydev for additional input, with Subject line > Issue 2986: difflib.SequenceMatcher is partly broken > Developed with input from Eli Bendersky, who will write patchfile(s) for > whichever change option is chosen.] > > Summary: difflib.SeqeunceMatcher was developed, documented, and originally > operated as "a flexible class for comparing pairs of sequences of any > [hashable] type". An "experimental" heuristic was added in 2.3a1 to speed up > its application to sequences of code lines, which are selected from an > unbounded set of possibilities. As explained below, this heuristic partly to > completely disables SequenceMatcher for realistic-length sequences from a > small finite alphabet. The regression is easy to fix. The docs were never > changed to reflect the effect of the heuristic, but should be, with whatever > additional change is made. > > In the commit message for revision 26661, which added the heuristic, Tim > Peters wrote "While I like what I've seen of the effects so far, I still > consider this experimental. Please give it a try!" Several people who have > tried it discovered the problem with small alphabets and posted to the > tracker. Issues #1528074, #1678339. #1678345, and #4622 are now-closed > duplicates of #2986. The heuristic needs revision. > > Open questions (discussed after the examples): what exactly to do, which > versions to do it too, and who will do it. > > --- > Some minimal difference examples: > > from difflib import SequenceMatcher as SM > > # base example > print(SM(None, 'x' + 'y'*199, 'y'*199).ratio()) > # should be and is 0.9975 (rounded) > > # make 'y' junk > print(SM(lambda c:c=='y', 'x' + 'y'*199, 'y'*199).ratio()) > # should be and is 0.0 > > # Increment b by 1 char > print(SM(None, 'x' + 'y'*199, 'y'*200).ratio()) > # should be .995, but now is 0.0 because y is treated as junk > > # Reverse a and b, which increments b > print(SM(None, 'y'*199, 'x' + 'y'*199).ratio()) > # should be .9975, as before, but now is 0.0 because y is junked > > The reason for the bug is the heuristic: if the second sequence is at least > 200 items long then any item occurring more than one percent of the time in > the second sequence is treated as junk. This was aimed at recurring code > lines like 'else:' and 'return', but can be fatal for small alphabets where > common items are necessary content. > > A more realistic example than the above is comparing DNA gene sequences. > Without the heuristic SequenceMatcher.get_opcodes() reports an appropriate > sequence of matches and edits and .ratio works as documented and expected. > For 1000/2000/6000 bases, the times on a old Athlon 2800 machine are > <1/2/12 seconds. Since 6000 is longer than most genes, this is a realistic > and practical use. > > With the heuristic, everything is junk and there is only one match, ''=='' > augmented by the initial prefix of matching bases. This is followed by one > edit: replace the rest of the first sequence with the rest of the second > sequence. A much faster way to find the first mismatch would be > i = 0 > while first[i] == second[i]: > i+=1 > The match ratio, based on the initial matching prefix only, is spuriously > low. > > --- > Questions: > > 1: what change should be make. > > Proposed fix: Disentangle the heuristic from the calculation of the > internal b2j dict that maps items to indexes in the second sequence b. Only > apply the heuristic (or not) afterward. > > Version A: Modify the heuristic to only eliminate common items when there > are more than, say, 100 items (when len(b2j)> 100 where b2j is first > calculated without popularity deletions). > > The would leave DNA, protein, and printable ascii+[\n\r\t] sequences alone. > On the other hand, realistic sequences of more than 200 code lines should > have at least 100 different lines, and so the heuristic should continue to > be applied when it (mostly?) 'should' be. This change leaves the API > unchanged and does not require a user decision. > > Version B: add a parameter to .__init__ to make the heuristic optional. If > the default were True ('use it'), then the code would run the same as now > (even when bad). With the heuristic turned off, users would be able to get > the .ratio they may expect and need. On the other hand, users would have to > understand the heuristic to know when and when not to use it. > > Version C: A more radical alternative would be to make one or more of the > tuning parameters user settable, with one setting turning it off. > > 2. What type of issue is this, and what version get changed. > > I see the proposal as partial reversion of a change that sometimes causes a > regression, in order to fix the regression. Such would usually be called a > bugfix. Other tracker reviewers claim this issue is a feature request, not a > bugfix. Either way, 3.2 gets the fix. The practical issue is whether at > least 2.7(.1) should get the fix, or whether the bug should forever continue > in 2.x. > > 3. Who will make the change. > > Eli will write a patch and I will check it. However, Georg Brandel assigned > the issue to Tim Peters, with a request for comment, but Tim never > responded. Is there an active committer who will grab the issue and do a > commit review when a patch is ready? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file17891/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
Thanks!
Now let's see what the other devs say. The first response seems not to have understood what you meant completely :-)

Eli


On Wed, Jul 7, 2010 at 01:18, Terry J. Reedy <report at bugs.python.org> wrote:

Terry J. Reedy <tjreedy at udel.edu> added the comment:

[Also posted to pydev for additional input, with Subject line
Issue 2986: difflib.SequenceMatcher is partly broken
Developed with input from Eli Bendersky, who will write patchfile(s) for whichever change option is chosen.]

Summary: difflib.SeqeunceMatcher was developed, documented, and originally operated as "a flexible class for comparing pairs of sequences of any [hashable] type". An "experimental" heuristic was added in 2.3a1 to speed up its application to sequences of code lines, which are selected from an unbounded set of possibilities. As explained below, this heuristic partly to completely disables SequenceMatcher for realistic-length sequences from a small finite alphabet. The regression is easy to fix. The docs were never changed to reflect the effect of the heuristic, but should be, with whatever additional change is made.

In the commit message for revision 26661, which added the heuristic, Tim Peters wrote "While I like what I've seen of the effects so far, I still consider this experimental. ??Please give it a try!" Several people who have tried it discovered the problem with small alphabets and posted to the tracker. Issues #1528074, #1678339. #1678345, and #4622 are now-closed duplicates of #2986. The heuristic needs revision.

Open questions (discussed after the examples): what exactly to do, which versions to do it too, and who will do it.

---
Some minimal difference examples:

from difflib import SequenceMatcher as SM

# base example
print(SM(None, 'x' + 'y'*199, 'y'*199).ratio())
# should be and is 0.9975 (rounded)

# make 'y' junk
print(SM(lambda c:c=='y', 'x' + 'y'*199, 'y'*199).ratio())
# should be and is 0.0

# Increment b by 1 char
print(SM(None, 'x' + 'y'*199, 'y'*200).ratio())
# should be .995, but now is 0.0 because y is treated as junk

# Reverse a and b, which increments b
print(SM(None, 'y'*199, 'x' + 'y'*199).ratio())
# should be .9975, as before, but now is 0.0 because y is junked

The reason for the bug is the heuristic: if the second sequence is at least 200 items long then any item occurring more than one percent of the time in the second sequence is treated as junk. This was aimed at recurring code lines like 'else:' and 'return', but can be fatal for small alphabets where common items are necessary content.

A more realistic example than the above is comparing DNA gene sequences. Without the heuristic SequenceMatcher.get_opcodes() reports an appropriate sequence of matches and edits and .ratio works as documented and expected. ??For 1000/2000/6000 bases, the times on a old Athlon 2800 machine are <1/2/12 seconds. Since 6000 is longer than most genes, this is a realistic and practical use.

With the heuristic, everything is junk and there is only one match, ''=='' augmented by the initial prefix of matching bases. This is followed by one edit: replace the rest of the first sequence with the rest of the second sequence. A much faster way to find the first mismatch would be
?? i = 0
?? while first[i] == second[i]:
?? ?? ??i+=1
The match ratio, based on the initial matching prefix only, is spuriously low.

---
Questions:

1: what change should be make.

Proposed fix: Disentangle the heuristic from the calculation of the internal b2j dict that maps items to indexes in the second sequence b. Only apply the heuristic (or not) afterward.

Version A: Modify the heuristic to only eliminate common items when there are more than, say, 100 items (when len(b2j)> 100 where b2j is first calculated without popularity deletions).

The would leave DNA, protein, and printable ascii+[\n\r\t] sequences alone. On the other hand, realistic sequences of more than 200 code lines should have at least 100 different lines, and so the heuristic should continue to be applied when it (mostly?) 'should' be. This change leaves the API unchanged and does not require a user decision.

Version B: add a parameter to .__init__ to make the heuristic optional. If the default were True ('use it'), then the code would run the same as now (even when bad). With the heuristic turned off, users would be able to get the .ratio they may expect and need. On the other hand, users would have to understand the heuristic to know when and when not to use it.

Version C: A more radical alternative would be to make one or more of the tuning parameters user settable, with one setting turning it off.

2. What type of issue is this, and what version get changed.

I see the proposal as partial reversion of a change that sometimes causes a regression, in order to fix the regression. Such would usually be called a bugfix. Other tracker reviewers claim this issue is a feature request, not a bugfix. Either way, 3.2 gets the fix. The practical issue is whether at least 2.7(.1) should get the fix, or whether the bug should forever continue in 2.x.

3. Who will make the change.

Eli will write a patch and I will check it. However, Georg Brandel assigned the issue to Tim Peters, with a request for comment, but Tim never responded. Is there an active committer who will grab the issue and do a commit review when a patch is ready?

----------

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

From report at bugs.python.org Wed Jul 7 04:43:07 2010 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 07 Jul 2010 02:43:07 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1278470587.65.0.258959398927.issue2986@psf.upfronthosting.co.za> Changes by Eli Bendersky : Removed file: http://bugs.python.org/file17891/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 04:46:21 2010 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 07 Jul 2010 02:46:21 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1278470781.99.0.227448830523.issue2986@psf.upfronthosting.co.za> Eli Bendersky added the comment: I apologize for the previous message. It was created by mistake - by replying to Terry's mail which came from the bugtracker. I wish I knew how to remove it from here - is this possible and I'm missing the relevant priveleges? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 06:35:34 2010 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 07 Jul 2010 04:35:34 +0000 Subject: [issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" In-Reply-To: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> Message-ID: <1278477334.09.0.103056704548.issue9146@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I'm pretty sure Python setup.py does not build the non-openssl md5, sha1, sha256 and sha512 extension modules at all when openssl is present. So falling back on them is not likely to work unless anyone who wants this crazy force fips mode thing to not prevent them from existing in Python goes to the extra effort to compile them. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 06:36:00 2010 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 07 Jul 2010 04:36:00 +0000 Subject: [issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" In-Reply-To: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> Message-ID: <1278477360.46.0.627307436349.issue9146@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: -gps _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 06:49:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 07 Jul 2010 04:49:23 +0000 Subject: [issue9063] TZ examples in datetime.rst are incorrect In-Reply-To: <1277313287.04.0.19115846548.issue9063@psf.upfronthosting.co.za> Message-ID: <1278478163.74.0.970570412156.issue9063@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: There is nothing we can do about misreporting of UTC offset. Unlike time tuples, datetime objects do not store the DST flag and thus have no means to disambiguate between standard and DST during the hour after the clock is set back for DST to standard transition. Nevertheless, dt = datetime.fromtimestamp(t) is a well defined operation, it is dt.dst() and dt.utcoffset() which are not so well defined. According to the comment at the end of Modules/datetimemodule.c, in order for the default implementation of tzinfo.fromutc() to operate correctly, the concrete implementation of tzinfo.dst(dt) must treat dt that falls into the ambiguous hour (where it can be ether DST or standard time) as the standard time. This is precisely what is done in the implementation of USTimeZone class. The Local class, however, relies on mktime to choose between DST and standard and apparently, at least on OSX, mktime does not do what Python's tzinfo.fromutc() expects. The attached patch for Doc/includes/tzinfo-examples.py fixes this problem by passing is_dst=0 instead of -1 to mktime and also adds __repr__ to LocalTimezone class. With this patch, >>> x = datetime(2010, 11, 7, 5) >>> s = (x - datetime(1970, 1, 1))//timedelta(seconds=1) >>> for i in range(-3600, 5000, 3600): ... datetime.fromtimestamp(s + i, Local) ... datetime.datetime(2010, 11, 7, 0, 0, tzinfo=EST/EDT) datetime.datetime(2010, 11, 7, 1, 0, tzinfo=EST/EDT) datetime.datetime(2010, 11, 7, 1, 0, tzinfo=EST/EDT) which is correct and consistent with Easter timezone: >>> for i in range(-3600, 5000, 3600): ... datetime.fromtimestamp(s + i, Eastern) ... datetime.datetime(2010, 11, 7, 0, 0, tzinfo=Eastern) datetime.datetime(2010, 11, 7, 1, 0, tzinfo=Eastern) datetime.datetime(2010, 11, 7, 1, 0, tzinfo=Eastern) ---------- keywords: +patch nosy: +mark.dickinson stage: needs patch -> commit review type: -> behavior Added file: http://bugs.python.org/file17892/issue9063.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 08:10:24 2010 From: report at bugs.python.org (Jyrki Wahlstedt) Date: Wed, 07 Jul 2010 06:10:24 +0000 Subject: [issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X In-Reply-To: <1278323219.73.0.148043211343.issue9164@psf.upfronthosting.co.za> Message-ID: <1278483024.89.0.4837863242.issue9164@psf.upfronthosting.co.za> Jyrki Wahlstedt added the comment: The same line appears in Lib/distutils/util.py, line 148, and requires to be treated the same. These are the changes I had to make to get the build done for both 32- and 64-bit architectures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 08:10:38 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 07 Jul 2010 06:10:38 +0000 Subject: [issue9176] module termios doesn't build on HP-UX In-Reply-To: <1278409886.91.0.742762759895.issue9176@psf.upfronthosting.co.za> Message-ID: <1278483038.09.0.908856415736.issue9176@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Maybe. I don't know when I'll have time to research the issue though. The code looks correct and the HP-UX system headers do include the definition for the type of 'mode' but for some reason that definition doesn't get picked up. That's probably because some feature macro is set or isn't set. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 08:12:00 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 07 Jul 2010 06:12:00 +0000 Subject: [issue9175] ctypes doesn't build on hp-ux In-Reply-To: <1278407736.6.0.642117116261.issue9175@psf.upfronthosting.co.za> Message-ID: <1278483120.97.0.820081033831.issue9175@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I don't think installing GCC will be possible on the machine I did the build on (for non-technical reasons). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 08:13:55 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 07 Jul 2010 06:13:55 +0000 Subject: [issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X In-Reply-To: <1278323219.73.0.148043211343.issue9164@psf.upfronthosting.co.za> Message-ID: <1278483235.11.0.71639202036.issue9164@psf.upfronthosting.co.za> Ronald Oussoren added the comment: How do you build the univeral binary. I regularly build multiple arch builds using the builtin support for that (--enable-universalsdk=/ --enable-univeral-archs=3-way) and don't need a patch for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 08:21:21 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 07 Jul 2010 06:21:21 +0000 Subject: [issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X In-Reply-To: <1278323219.73.0.148043211343.issue9164@psf.upfronthosting.co.za> Message-ID: <1278483681.32.0.304477007428.issue9164@psf.upfronthosting.co.za> Ronald Oussoren added the comment: BTW. A cleaner replacement is: archs = tuple(sorted(set(archs))) (That is, sorted works on arbitrary iterables) Tarek: is using "set()" acceptable in the distutils sources? ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 10:51:39 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Jul 2010 08:51:39 +0000 Subject: [issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X In-Reply-To: <1278323219.73.0.148043211343.issue9164@psf.upfronthosting.co.za> Message-ID: <1278492699.18.0.26279887227.issue9164@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: sorted() and set() were introduced in Python 2.4. If your code will not run in Python 2.3 anyway, then using those should be fine. The only other place currently using set() is the MSVC9 compiler code. sorted() is not used at all in distutils. list.sort() should do the trick as well in your code - I'm not sure why you need a tuple for the args. Note that Python 2.3 did have the set type, however, it was only available through the "sets" module as "Set". Using a conditional import "from sets import Set as set" for Python 2.3 would get you the set() builtin in Python 2.3 as well. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 10:56:37 2010 From: report at bugs.python.org (Zsolt Cserna) Date: Wed, 07 Jul 2010 08:56:37 +0000 Subject: [issue9185] os.getcwd causes infinite loop on solaris In-Reply-To: <1278492997.35.0.523630408468.issue9185@psf.upfronthosting.co.za> Message-ID: <1278492997.35.0.523630408468.issue9185@psf.upfronthosting.co.za> New submission from Zsolt Cserna : os.getcwd() causes infinite loop on solaris10 when the length of the current directory is greater than 1024 (them limit of the maximum absolute path). os.getcwd is implemented by a while loop in python, see the function posix_getcwd in posixmodule.c. That while loop loops forever because on solaris it sets errno to ERANGE and res to NULL - even if there will be no positive results from getcwd due to the extra long path. This infinite while cycle also causes eating up the memory. I think the solution would be implementing a hard limit for this while loop. It could be either fixed (16k for example), or dymanic: comparing the MAXPATHLEN macro to the size of the allocated buffer and if the size of the buffer is greater than MAXLPATHLEN then raise an OSError exception with the current errno. That bug was triggered by test_posix unittest. ---------- components: Library (Lib) messages: 109459 nosy: csernazs priority: normal severity: normal status: open title: os.getcwd causes infinite loop on solaris type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 10:57:06 2010 From: report at bugs.python.org (Mark Summerfield) Date: Wed, 07 Jul 2010 08:57:06 +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: <1278493026.58.0.490015396368.issue2636@psf.upfronthosting.co.za> Mark Summerfield added the comment: On the PyPI page: http://pypi.python.org/pypi/regex/0.1.20100706.1 in the "Subscripting for groups" bullet it gives this pattern: r"(?.*?)(?\\d+)(?.*)" Shouldn't this be: r"(?P.*?)(?P\\d+)(?P.*)" Or has a new syntax been introduced? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 11:13:41 2010 From: report at bugs.python.org (Mark Summerfield) Date: Wed, 07 Jul 2010 09:13:41 +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: <1278494021.28.0.145375425868.issue2636@psf.upfronthosting.co.za> Mark Summerfield added the comment: If you do: >>> import regex as re >>> dir(re) you get over 160 items, many of which begin with an underscore and so are private. Couldn't __dir__ be reimplemented to eliminate them. (I know that the current re module's dir() also returns private items, but I guess this is a legacy of not having the __dir__ special method?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 11:18:35 2010 From: report at bugs.python.org (Zsolt Cserna) Date: Wed, 07 Jul 2010 09:18:35 +0000 Subject: [issue9185] os.getcwd causes infinite loop on solaris In-Reply-To: <1278492997.35.0.523630408468.issue9185@psf.upfronthosting.co.za> Message-ID: <1278494315.45.0.423286305002.issue9185@psf.upfronthosting.co.za> Zsolt Cserna added the comment: There would be also a solution to allocate a fix buffer with MAXLPATHLEN size and call the getcwd function only one time - if MAXLPATHLEN is available. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 11:29:57 2010 From: report at bugs.python.org (Mark Summerfield) Date: Wed, 07 Jul 2010 09:29:57 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1278494997.13.0.134850245008.issue2636@psf.upfronthosting.co.za> Mark Summerfield added the comment: I was wrong about r"(?.*)". It is valid in the new engine. And the PyPI docs do say so immediately _following_ the example. I've tried all the examples in "Programming in Python 3 second edition" using "import regex as re" and they all worked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 11:40:38 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 07 Jul 2010 09:40:38 +0000 Subject: [issue9185] os.getcwd causes infinite loop on solaris In-Reply-To: <1278492997.35.0.523630408468.issue9185@psf.upfronthosting.co.za> Message-ID: <1278495638.77.0.901683910124.issue9185@psf.upfronthosting.co.za> Stefan Krah added the comment: I've encountered this a while ago on OpenSolaris. According to the man page http://docs.sun.com/app/docs/doc/816-5168/getcwd-3c?a=view this would be a bug in getcwd(): ERANGE The size argument is greater than 0 and less than the length of the pathname plus 1. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 11:48:04 2010 From: report at bugs.python.org (Zsolt Cserna) Date: Wed, 07 Jul 2010 09:48:04 +0000 Subject: [issue9185] os.getcwd causes infinite loop on solaris In-Reply-To: <1278492997.35.0.523630408468.issue9185@psf.upfronthosting.co.za> Message-ID: <1278496084.18.0.689990648205.issue9185@psf.upfronthosting.co.za> Zsolt Cserna added the comment: You are right, but this bug could be easily avoided by using one of the suggested solutions. In my experience a fix sized buffer (whose size is MAXLPATHLEN - or 1024 if not defined) is usually passed to getcwd and the errno is propagated back to the caller if the result is NULL. While getcwd() is buggy on solaris I think it's not the correct behavior from python to get to an infinite loop and eat up the memory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 11:59:08 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 07 Jul 2010 09:59:08 +0000 Subject: [issue9185] os.getcwd causes infinite loop on solaris In-Reply-To: <1278492997.35.0.523630408468.issue9185@psf.upfronthosting.co.za> Message-ID: <1278496748.15.0.850832246512.issue9185@psf.upfronthosting.co.za> Stefan Krah added the comment: I agree that there should be a workaround. In py3k the function is implemented like you suggest. ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 12:06:00 2010 From: report at bugs.python.org (Ryan Kelly) Date: Wed, 07 Jul 2010 10:06:00 +0000 Subject: [issue8400] zipimporter find_module fullname mis-documented In-Reply-To: <1271258442.34.0.660774695694.issue8400@psf.upfronthosting.co.za> Message-ID: <1278497160.48.0.422045214552.issue8400@psf.upfronthosting.co.za> Ryan Kelly added the comment: Was also just bitten by this, trying to muck with PEP-302-style import hooks. Note that the documented behaviour of zipimporter is also the behaviour required by PEP 302, i.e. full dotted module name. ---------- nosy: +rfk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 12:10:32 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 07 Jul 2010 10:10:32 +0000 Subject: [issue9186] math.log1p(-1.0) produces OverflowError; should be ValueError In-Reply-To: <1278497432.77.0.860958326747.issue9186@psf.upfronthosting.co.za> Message-ID: <1278497432.77.0.860958326747.issue9186@psf.upfronthosting.co.za> New submission from Mark Dickinson : >>> from math import log1p >>> log1p(-1.0) Traceback (most recent call last): File "", line 1, in OverflowError: math range error This should be a ValueError instead. (Thanks Benjamin for noticing this.) ---------- assignee: mark.dickinson components: Extension Modules files: log1p_neg1.patch keywords: patch messages: 109468 nosy: benjamin.peterson, mark.dickinson priority: normal severity: normal status: open title: math.log1p(-1.0) produces OverflowError; should be ValueError type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file17893/log1p_neg1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 12:19:58 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 07 Jul 2010 10:19:58 +0000 Subject: [issue9186] math.log1p(-1.0) produces OverflowError; should be ValueError In-Reply-To: <1278497432.77.0.860958326747.issue9186@psf.upfronthosting.co.za> Message-ID: <1278497998.05.0.688636890987.issue9186@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 13:06:08 2010 From: report at bugs.python.org (Lloyd Sheng) Date: Wed, 07 Jul 2010 11:06:08 +0000 Subject: [issue9187] Can't find file "vcvars64.bat" In-Reply-To: <1278500768.36.0.603333056157.issue9187@psf.upfronthosting.co.za> Message-ID: <1278500768.36.0.603333056157.issue9187@psf.upfronthosting.co.za> New submission from Lloyd Sheng : While I install Pymongo,Error shows that: running install running bdist_egg running egg_info writing pymongo.egg-info\PKG-INFO writing top-level names to pymongo.egg-info\top_level.txt writing dependency_links to pymongo.egg-info\dependency_links.txt reading manifest file 'pymongo.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' writing manifest file 'pymongo.egg-info\SOURCES.txt' installing library code to build\bdist.win-amd64\egg running install_lib running build_py running build_ext building 'pymongo._cbson' extension Traceback (most recent call last): File "setup.py", line 176, in "doc": doc}) File "C:\Python26\lib\distutils\core.py", line 152, in setup dist.run_commands() File "C:\Python26\lib\distutils\dist.py", line 975, in run_commands self.run_command(cmd) File "C:\Python26\lib\distutils\dist.py", line 995, in run_command cmd_obj.run() File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\install.py", line 76, in run File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\install.py", line 96, in do_egg_install File "C:\Python26\lib\distutils\cmd.py", line 333, in run_command self.distribution.run_command(command) File "C:\Python26\lib\distutils\dist.py", line 995, in run_command cmd_obj.run() File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\bdist_egg.py", line 175, in run File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\bdist_egg.py", line 161, in call_command File "C:\Python26\lib\distutils\cmd.py", line 333, in run_command self.distribution.run_command(command) File "C:\Python26\lib\distutils\dist.py", line 995, in run_command cmd_obj.run() File "C:\Python26\lib\site-packages\setuptools-0.6c11-py2.6.egg\setuptools\command\install_lib.py", line 20, in run File "C:\Python26\lib\distutils\command\install_lib.py", line 115, in build self.run_command('build_ext') File "C:\Python26\lib\distutils\cmd.py", line 333, in run_command self.distribution.run_command(command) File "C:\Python26\lib\distutils\dist.py", line 995, in run_command cmd_obj.run() File "setup.py", line 108, in run build_ext.run(self) File "C:\Python26\lib\distutils\command\build_ext.py", line 340, in run self.build_extensions() File "C:\Python26\lib\distutils\command\build_ext.py", line 449, in build_extensions self.build_extension(ext) File "setup.py", line 118, in build_extension build_ext.build_extension(self, ext) File "C:\Python26\lib\distutils\command\build_ext.py", line 499, in build_extension depends=ext.depends) File "C:\Python26\lib\distutils\msvc9compiler.py", line 449, in compile self.initialize() File "C:\Python26\lib\distutils\msvc9compiler.py", line 359, in initialize vc_env = query_vcvarsall(VERSION, plat_spec) File "C:\Python26\lib\distutils\msvc9compiler.py", line 275, in query_vcvarsall raise ValueError(str(list(result.keys()))) ValueError: [u'path'] There error info is same as Issue7511 . Here is info about my machine: OS: Windows Server 2008 R2(64bit) I have installed both VS2010 and VS2008 in my machine.But VS2010 intalled before VS2008. Also. I can found vcvars64.bat at dir:C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\amd64, but i don't know why Python can't found it. There is a temporarily way to avoid the error ,we can manual execute vcvars64.bat before intall python module, But I think it's a python bug. ---------- components: Library (Lib) messages: 109469 nosy: Lloyd.Sheng priority: normal severity: normal status: open title: Can't find file "vcvars64.bat" versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 13:57:43 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 07 Jul 2010 11:57:43 +0000 Subject: [issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X In-Reply-To: <1217610966.27.0.918507533161.issue3485@psf.upfronthosting.co.za> Message-ID: <1278503863.43.0.55591245347.issue3485@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Note that this does not just affect MacOSX, this even affects Linux (although the behaviour on the default filesystems is different). On Linux the default is case-sensitive filesystems, but you can use network filesystems that have case-insensitive behavior, for example by using a CIFS share. This means that /mnt/myserver-share/foo/bar and /mnt/myserver-share/FOO/BAR may or may not refer to the same "object": there aren't the same if /mnt/myserver-share is a regular Linux filesystem but will be when /mnt/myserver-share is a mount from a CIFS server. In short: os.path.normcase is hopelessly naive in its assumptions about system behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 14:49:21 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 07 Jul 2010 12:49:21 +0000 Subject: [issue9187] Can't find file "vcvars64.bat" In-Reply-To: <1278500768.36.0.603333056157.issue9187@psf.upfronthosting.co.za> Message-ID: <1278506961.48.0.307630040441.issue9187@psf.upfronthosting.co.za> Stefan Krah added the comment: > There error info is same as Issue7511. Yes. Issue 7511 will be fixed at some point in distutils2. Closing this as a duplicate. ---------- nosy: +skrah resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> msvc9compiler.py: ValueError: [u'path'] type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 15:09:05 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 07 Jul 2010 13:09:05 +0000 Subject: [issue8605] test_gdb can fail with compiler opts In-Reply-To: <1272903293.59.0.249639149559.issue8605@psf.upfronthosting.co.za> Message-ID: <1278508145.67.0.132465439624.issue8605@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Minor nit: given that final_opt is set to "" at the start of the loop, > the first conditional in: > if final_opt and final_opt != '-O0': > appears to be redundant. I don't think it is (the empty string is false, but "" != "-O0" is true). ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 15:17:49 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 07 Jul 2010 13:17:49 +0000 Subject: [issue9188] test_gdb fails on narrow unicode builds In-Reply-To: <1278508669.56.0.292835810608.issue9188@psf.upfronthosting.co.za> Message-ID: <1278508669.56.0.292835810608.issue9188@psf.upfronthosting.co.za> New submission from Antoine Pitrou : ====================================================================== FAIL: test_unicode (test.test_gdb.PrettyPrintTests) Verify the pretty-printing of unicode values ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/cpython/27/Lib/test/test_gdb.py", line 247, in test_unicode self.assertGdbRepr(u"\U0001D121") File "/home/antoine/cpython/27/Lib/test/test_gdb.py", line 178, in assertGdbRepr self.assertEquals(gdb_repr, repr(val), gdb_output) AssertionError: Breakpoint 1 at 0x45cde8: file Objects/object.c, line 330. [Thread debugging using libthread_db enabled] Breakpoint 1, PyObject_Print (op=Traceback (most recent call last): File "/home/antoine/cpython/27/python-gdb.py", line 1084, in to_string return pyop.get_truncated_repr(MAX_OUTPUT_LEN) File "/home/antoine/cpython/27/python-gdb.py", line 183, in get_truncated_repr self.write_repr(out, set()) File "/home/antoine/cpython/27/python-gdb.py", line 1054, in write_repr proxy2.append(unichr(code)) ValueError: unichr() arg not in range(0x10000) (narrow Python build) , fp=0x7ffff7535780, flags=1) at Objects/object.c:330 330 return internal_print(op, fp, flags, 0); #0 PyObject_Print (op=Traceback (most recent call last): File "/home/antoine/cpython/27/python-gdb.py", line 1084, in to_string return pyop.get_truncated_repr(MAX_OUTPUT_LEN) File "/home/antoine/cpython/27/python-gdb.py", line 183, in get_truncated_repr self.write_repr(out, set()) File "/home/antoine/cpython/27/python-gdb.py", line 1054, in write_repr proxy2.append(unichr(code)) ValueError: unichr() arg not in range(0x10000) (narrow Python build) , fp=0x7ffff7535780, flags=1) at Objects/object.c:330 #1 0x0000000000431744 in file_PyObject_Print (op=Traceback (most recent call last): File "/home/antoine/cpython/27/python-gdb.py", line 1084, in to_string return pyop.get_truncated_repr(MAX_OUTPUT_LEN) File "/home/antoine/cpython/27/python-gdb.py", line 183, in get_truncated_repr self.write_repr(out, set()) File "/home/antoine/cpython/27/python-gdb.py", line 1054, in write_repr proxy2.append(unichr(code)) ValueError: unichr() arg not in range(0x10000) (narrow Python build) , f=0x7ffff7fc1280, flags=1) at Objects/fileobject.c:110 #2 0x00000000004369e2 in PyFile_WriteObject (v=Traceback (most recent call last): File "/home/antoine/cpython/27/python-gdb.py", line 1084, in to_string return pyop.get_truncated_repr(MAX_OUTPUT_LEN) File "/home/antoine/cpython/27/python-gdb.py", line 183, in get_truncated_repr self.write_repr(out, set()) File "/home/antoine/cpython/27/python-gdb.py", line 1054, in write_repr proxy2.append(unichr(code)) ValueError: unichr() arg not in range(0x10000) (narrow Python build) , f=, flags=1) at Objects/fileobject.c:2472 #3 0x00000000004c9709 in PyEval_EvalFrameEx (f=Frame 0x9190f0, for file , line 1, in (), throwflag=0) at Python/ceval.c:1769 #4 0x00000000004cfd36 in PyEval_EvalCodeEx (co=0x7ffff7fb8930, 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:3252 #5 0x00000000004c5dc4 in PyEval_EvalCode (co=0x7ffff7fb8930, globals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}) at Python/ceval.c:666 #6 0x0000000000500a4c in run_mod (mod=0x903828, filename=0x5a1bbd "", globals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, flags=0x7fffffffdbc0, arena=0x8bc5f0) at Python/pythonrun.c:1346 #7 0x00000000005008eb in PyRun_StringFlags (str=0x82a010 "print u'\\U0001d121'\n", start=257, globals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, flags=0x7fffffffdbc0) at Python/pythonrun.c:1309 #8 0x00000000004ff3f5 in PyRun_SimpleStringFlags (command=0x82a010 "print u'\\U0001d121'\n", flags= 0x7fffffffdbc0) at Python/pythonrun.c:962 #9 0x00000000004155a4 in Py_Main (argc=4, argv=0x7fffffffdd48) at Modules/main.c:543 #10 0x0000000000414484 in main (argc=4, argv=0x7fffffffdd48) at ./Modules/python.c:23 ---------- components: Library (Lib), Tests messages: 109473 nosy: dmalcolm, pitrou priority: normal severity: normal status: open title: test_gdb fails on narrow unicode builds type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 15:48:18 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 07 Jul 2010 13:48:18 +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: <1278510498.22.0.484360390986.issue2636@psf.upfronthosting.co.za> Georg Brandl added the comment: Mark, __dir__ as a special method only works when defined on types, so you'd have to use a module subclass for the "regex" module :) As I already suggested, it is probably best to move most of the private stuff into a separate module, and only import the really needed entry points into the regex module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 16:01:25 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 07 Jul 2010 14:01:25 +0000 Subject: [issue2744] Fix test_cProfile In-Reply-To: <1209770110.61.0.304892387875.issue2744@psf.upfronthosting.co.za> Message-ID: <1278511285.94.0.663952654102.issue2744@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is there anybody who can run with this as it's been in limbo for over two years? ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 16:08:24 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 07 Jul 2010 14:08:24 +0000 Subject: [issue4724] setting f_exc_traceback aborts in debug builds In-Reply-To: <1229966419.5.0.164799717047.issue4724@psf.upfronthosting.co.za> Message-ID: <1278511704.94.0.571802822967.issue4724@psf.upfronthosting.co.za> Mark Lawrence added the comment: Anybody willing and able to run with this? ---------- nosy: +BreamoreBoy stage: -> needs patch type: -> crash versions: +Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 16:15:54 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 07 Jul 2010 14:15:54 +0000 Subject: [issue4928] Problem with tempfile.NamedTemporaryFile on Solaris 10 In-Reply-To: <1231838566.25.0.143957228078.issue4928@psf.upfronthosting.co.za> Message-ID: <1278512154.43.0.933659785446.issue4928@psf.upfronthosting.co.za> Mark Lawrence added the comment: Shouldn't this get looked at as it's high priority, albeit over a year old? ---------- nosy: +BreamoreBoy versions: +Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 16:26:19 2010 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 07 Jul 2010 14:26:19 +0000 Subject: [issue8605] test_gdb can fail with compiler opts In-Reply-To: <1272903293.59.0.249639149559.issue8605@psf.upfronthosting.co.za> Message-ID: <1278512779.19.0.728062225227.issue8605@psf.upfronthosting.co.za> Dave Malcolm added the comment: Oops, my bad. Patch looks good as is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 16:46:50 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 07 Jul 2010 14:46:50 +0000 Subject: [issue4928] Problem with tempfile.NamedTemporaryFile on Solaris 10 In-Reply-To: <1231838566.25.0.143957228078.issue4928@psf.upfronthosting.co.za> Message-ID: <1278514010.16.0.575501020622.issue4928@psf.upfronthosting.co.za> Stefan Krah added the comment: I can reproduce this on Ubuntu with Python 2.7 and 3.2. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 16:47:26 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 07 Jul 2010 14:47:26 +0000 Subject: [issue4928] Problem with tempfile.NamedTemporaryFile In-Reply-To: <1231838566.25.0.143957228078.issue4928@psf.upfronthosting.co.za> Message-ID: <1278514046.46.0.458760547929.issue4928@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- title: Problem with tempfile.NamedTemporaryFile on Solaris 10 -> Problem with tempfile.NamedTemporaryFile _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 17:27:32 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Wed, 07 Jul 2010 15:27:32 +0000 Subject: [issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X In-Reply-To: <1278323219.73.0.148043211343.issue9164@psf.upfronthosting.co.za> Message-ID: <1278516452.99.0.161997872603.issue9164@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Since there will be no standalone release of this code, no worries ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 17:51:13 2010 From: report at bugs.python.org (Jeffrey Yasskin) Date: Wed, 07 Jul 2010 15:51:13 +0000 Subject: [issue9189] Improve CFLAGS handling In-Reply-To: <1278517873.84.0.191654592449.issue9189@psf.upfronthosting.co.za> Message-ID: <1278517873.84.0.191654592449.issue9189@psf.upfronthosting.co.za> New submission from Jeffrey Yasskin : Patch at http://codereview.appspot.com/1749042. The idea here is to let the user set CFLAGS on either configure or make (or both), and have later settings appear later in the $CC command line. I left OPT, BASECFLAGS, and EXTRA_CFLAGS around in case people have written scripts using them, but I think they're superfluous as user-visible knobs after this patch. I prevented AC_PROG_CC from setting a default $CFLAGS value because the values it would set are already put into $BASECFLAGS when appropriate, and @CFLAGS@ needs to appear after @BASECFLAGS@ to allow the user to override Python's defaults at configure time. We could also accomplish this by removing BASECFLAGS and OPT entirely and instead prepending their contents to $CFLAGS in configure. That's a bigger patch, but if any of you feel strongly about it I can do that instead. I made the same changes for CPPFLAGS and LDFLAGS but no other user-settable variables. I don't have strong opinions about the exact set we support this for, as long as it includes CFLAGS, but these three seemed like a sensible set. ---------- messages: 109481 nosy: brett.cannon, jyasskin, lemburg, loewis, pitrou priority: normal severity: normal status: open title: Improve CFLAGS handling versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 17:55:04 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 07 Jul 2010 15:55:04 +0000 Subject: [issue9189] Improve CFLAGS handling In-Reply-To: <1278517873.84.0.191654592449.issue9189@psf.upfronthosting.co.za> Message-ID: <1278518104.43.0.429231407451.issue9189@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 18:23:21 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 07 Jul 2010 16:23:21 +0000 Subject: [issue9186] math.log1p(-1.0) produces OverflowError; should be ValueError In-Reply-To: <1278497432.77.0.860958326747.issue9186@psf.upfronthosting.co.za> Message-ID: <1278519801.05.0.853774828321.issue9186@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in py3k in r82626. I'm going to leave this as a 'won't fix' for the maintenance branches, on the basis that the risk of breaking code by changing the exception type exceeds the benefit from the fix. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 18:42:25 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 07 Jul 2010 16:42:25 +0000 Subject: [issue9190] Undefined behaviour in _PyFloat_Pack4 In-Reply-To: <1278520945.21.0.807868550373.issue9190@psf.upfronthosting.co.za> Message-ID: <1278520945.21.0.807868550373.issue9190@psf.upfronthosting.co.za> New submission from Mark Dickinson : _PyFloat_Pack4 does a double-to-float cast, without first checking that the value being converted is within the range of a float. According to C99 6.3.1.5p2, this results in undefined behaviour. It should be fixed (probably via comparison with FLT_MAX before casting.) np_float in the struct module also has this problem. ---------- assignee: mark.dickinson messages: 109483 nosy: mark.dickinson priority: normal severity: normal stage: needs patch status: open title: Undefined behaviour in _PyFloat_Pack4 type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 19:02:14 2010 From: report at bugs.python.org (Mickey Killianey) Date: Wed, 07 Jul 2010 17:02:14 +0000 Subject: [issue876421] logging handlers raise exception on level Message-ID: <1278522134.5.0.861082258644.issue876421@psf.upfronthosting.co.za> Mickey Killianey added the comment: Would you be willing to consider supporting the level keyword as a convenience for the most simple/common Handlers? (For example, maybe just StreamHandler and FileHandler?) ---------- nosy: +Mickey.Killianey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 19:19:03 2010 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 07 Jul 2010 17:19:03 +0000 Subject: [issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" In-Reply-To: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> Message-ID: <1278523143.29.0.127727264491.issue9146@psf.upfronthosting.co.za> Dave Malcolm added the comment: Thanks. The relevant code in setup.py is all wrapped with --pydebug: if COMPILED_WITH_PYDEBUG or not have_usable_openssl: All of my testing had been --with-pydebug. Rebuilding without --with-pydebug leads to some interesting failures; as you say, if OpenSSL has md5 support disabled, this isn't going to work unless the _md5 module is manually enabled. Notes on some of the failures seen: $ OPENSSL_FORCE_FIPS_MODE=1 ./python Python 2.7.0+ (trunk:82622M, Jul 7 2010, 12:08:16) [GCC 4.4.3 20100422 (Red Hat 4.4.3-18)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import md5 Traceback (most recent call last): File "", line 1, in File "/home/david/coding/python-svn/2.7-fips/Lib/md5.py", line 10, in from hashlib import md5 File "/home/david/coding/python-svn/2.7-fips/Lib/hashlib.py", line 136, in globals()[__func_name] = __get_hash(__func_name) File "/home/david/coding/python-svn/2.7-fips/Lib/hashlib.py", line 100, in __get_openssl_constructor return __get_builtin_constructor(name) File "/home/david/coding/python-svn/2.7-fips/Lib/hashlib.py", line 71, in __get_builtin_constructor import _md5 ImportError: No module named _md5 >>> import hashlib Traceback (most recent call last): File "", line 1, in File "/home/david/coding/python-svn/2.7-fips/Lib/hashlib.py", line 136, in globals()[__func_name] = __get_hash(__func_name) File "/home/david/coding/python-svn/2.7-fips/Lib/hashlib.py", line 100, in __get_openssl_constructor return __get_builtin_constructor(name) File "/home/david/coding/python-svn/2.7-fips/Lib/hashlib.py", line 71, in __get_builtin_constructor import _md5 ImportError: No module named _md5 Changing: Index: Lib/hashlib.py =================================================================== --- Lib/hashlib.py (revision 82622) +++ Lib/hashlib.py (working copy) @@ -134,7 +134,7 @@ # version not supporting that algorithm. try: globals()[__func_name] = __get_hash(__func_name) - except ValueError: + except (ValueError, ImportError): import logging logging.exception('code for hash %s was not found.', __func_name) indicates that it's just md5 that's not found, and enables "import hashlib" to work, albeit with a traceback upon import: ERROR:root:code for hash md5 was not found. Traceback (most recent call last): File "/home/david/coding/python-svn/2.7-fips/Lib/hashlib.py", line 136, in globals()[__func_name] = __get_hash(__func_name) File "/home/david/coding/python-svn/2.7-fips/Lib/hashlib.py", line 100, in __get_openssl_constructor return __get_builtin_constructor(name) File "/home/david/coding/python-svn/2.7-fips/Lib/hashlib.py", line 71, in __get_builtin_constructor import _md5 ImportError: No module named _md5 "import md5" also then fails in an obscure way: >>> import md5 Traceback (most recent call last): File "", line 1, in File "/home/david/coding/python-svn/2.7-fips/Lib/md5.py", line 10, in from hashlib import md5 ImportError: cannot import name md5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 19:52:46 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Wed, 07 Jul 2010 17:52:46 +0000 Subject: [issue9191] winreg.c:Reg2Py() may leak memory (in unusual circumstances) In-Reply-To: <1278525166.4.0.0879298798846.issue9191@psf.upfronthosting.co.za> Message-ID: <1278525166.4.0.0879298798846.issue9191@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : In Reg2Py() in winreg.c, in the REG_MULTI_SZ case, there's the following: wchar_t **str = (wchar_t **)malloc(sizeof(wchar_t *)*s); if (str == NULL) return PyErr_NoMemory(); However, not all of the return paths after that point call free(str). The leaking paths are pretty unusual, so I'm setting the priority to low. The leaking paths occur when PyList_New returns NULL or if the registry entry contains more than INT_MAX characters. Two other things I noticed and I'm not sure about: Is INT_MAX really the maximum number of characters for a Python unicode string? Should this be using PyMem functions instead of malloc/free? ---------- assignee: stutzbach components: Windows messages: 109486 nosy: stutzbach priority: low severity: normal stage: needs patch status: open title: winreg.c:Reg2Py() may leak memory (in unusual circumstances) type: resource usage versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 20:20:26 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 07 Jul 2010 18:20:26 +0000 Subject: [issue9191] winreg.c:Reg2Py() may leak memory (in unusual circumstances) In-Reply-To: <1278525166.4.0.0879298798846.issue9191@psf.upfronthosting.co.za> Message-ID: <1278526826.45.0.182547972215.issue9191@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 20:24:04 2010 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 07 Jul 2010 18:24:04 +0000 Subject: [issue9188] test_gdb fails for UCS2 builds with UCS2 gdb In-Reply-To: <1278508669.56.0.292835810608.issue9188@psf.upfronthosting.co.za> Message-ID: <1278527044.12.0.754366993337.issue9188@psf.upfronthosting.co.za> Dave Malcolm added the comment: The traceback is Traceback (most recent call last): File "/home/antoine/cpython/27/python-gdb.py", line 1084, in to_string return pyop.get_truncated_repr(MAX_OUTPUT_LEN) File "/home/antoine/cpython/27/python-gdb.py", line 183, in get_truncated_repr self.write_repr(out, set()) File "/home/antoine/cpython/27/python-gdb.py", line 1054, in write_repr proxy2.append(unichr(code)) ValueError: unichr() arg not in range(0x10000) (narrow Python build) and occurs within the gdb process whilst trying to pretty-print a PyUnicodeObject whilst running "print u'\\U0001d121'\n" It looks like the gdb you're using has been built against a python built with narrow unicode, and the python being debugged is also built with narrow unicode. The code in question was introduced in r81377 and replaces surrogate pairs with their UCS4 equivalent, converting UCS2 characters from the inferior process into UCS4 characters for use in the gdb process. It appears to assume that the gdb executable was linked against a UCS4-build of python. The attached patch (against release27-maint) tries to turn off this joining of surrogates, except in the case where inferior is UCS2 and gdb is UCS4. Tested successfully with: - inferior:UCS2 gdb:UCS4 - inferior:UCS4 gdb:UCS4 Not yet tested with gdb UCS2 Antoine, does the above sound sane? Can you test this on your UCS2 gdb please? ---------- keywords: +patch stage: -> patch review title: test_gdb fails on narrow unicode builds -> test_gdb fails for UCS2 builds with UCS2 gdb Added file: http://bugs.python.org/file17894/only-join-surrogate-pairs-when-widths-vary.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 20:25:59 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 07 Jul 2010 18:25:59 +0000 Subject: [issue9192] Add a a way to determine float format In-Reply-To: <1278527159.47.0.497382000521.issue9192@psf.upfronthosting.co.za> Message-ID: <1278527159.47.0.497382000521.issue9192@psf.upfronthosting.co.za> New submission from Benjamin Peterson : At the moment, the only way is float.__getformat__() which is unpleasant and unofficial. Perhaps we could add a member to sys.float_info. ---------- components: Interpreter Core messages: 109488 nosy: benjamin.peterson, mark.dickinson priority: low severity: normal status: open title: Add a a way to determine float format type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 20:33:28 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 07 Jul 2010 18:33:28 +0000 Subject: [issue9193] Versioned .so files In-Reply-To: <1278527607.97.0.766712002778.issue9193@psf.upfronthosting.co.za> Message-ID: <1278527607.97.0.766712002778.issue9193@psf.upfronthosting.co.za> New submission from Barry A. Warsaw : As described in the thread started here: http://mail.python.org/pipermail/python-dev/2010-June/100998.html this bug requests that a new configure option called --with-so-abi-tag be added to Python 3.2 to support sharing of .so files for different versions of Python. ---------- assignee: barry components: Build keywords: patch messages: 109489 nosy: barry priority: normal severity: normal status: open title: Versioned .so files type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 20:33:45 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 07 Jul 2010 18:33:45 +0000 Subject: [issue9193] Versioned .so files In-Reply-To: <1278527607.97.0.766712002778.issue9193@psf.upfronthosting.co.za> Message-ID: <1278527625.25.0.0107225882091.issue9193@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 20:36:35 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 07 Jul 2010 18:36:35 +0000 Subject: [issue9193] Versioned .so files In-Reply-To: <1278527607.97.0.766712002778.issue9193@psf.upfronthosting.co.za> Message-ID: <1278527795.33.0.159408459138.issue9193@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Attaching patch from live branch living here: https://code.edge.launchpad.net/~barry/python/sovers ---------- Added file: http://bugs.python.org/file17895/preview.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 20:37:15 2010 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 07 Jul 2010 18:37:15 +0000 Subject: [issue9193] Versioned .so files In-Reply-To: <1278527607.97.0.766712002778.issue9193@psf.upfronthosting.co.za> Message-ID: <1278527835.96.0.0866976714135.issue9193@psf.upfronthosting.co.za> Changes by Dave Malcolm : ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 20:46:28 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 07 Jul 2010 18:46:28 +0000 Subject: [issue4928] Problem with tempfile.NamedTemporaryFile In-Reply-To: <1231838566.25.0.143957228078.issue4928@psf.upfronthosting.co.za> Message-ID: <1278528388.72.0.479959473313.issue4928@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Unfortunately, I typically don't have time to consider the priority of issues. However, in the specific case, I also fail to see the bug. Where does it say that they are supposed to be deleted when the process is killed, and what mechanism specifically is supposed to actually perform the deletion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 20:52:01 2010 From: report at bugs.python.org (Jean-Paul Calderone) Date: Wed, 07 Jul 2010 18:52:01 +0000 Subject: [issue4928] Problem with tempfile.NamedTemporaryFile In-Reply-To: <1231838566.25.0.143957228078.issue4928@psf.upfronthosting.co.za> Message-ID: <1278528721.89.0.0683268746278.issue4928@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: I can't think of any way that you might be able to implement the behavior being requested here. Instead, if you don't want to leave files lying around, use TemporaryFile instead of NamedTemporaryFile. Perhaps the documentation for NamedTemporary file could be updated to explain this limitation, though. ---------- nosy: +exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 20:55:54 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 07 Jul 2010 18:55:54 +0000 Subject: [issue4928] Problem with tempfile.NamedTemporaryFile In-Reply-To: <1231838566.25.0.143957228078.issue4928@psf.upfronthosting.co.za> Message-ID: <1278528954.64.0.640878497342.issue4928@psf.upfronthosting.co.za> Martin v. L?wis added the comment: > I can't think of any way that you might be able to implement the behavior being requested here. Thanks for the confirmation; lowering the priority then. It would, of course, be possible to improve quality by registering an atexit handler. Which, of course, would be futile in case of a SIGKILL or system crash. ---------- priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 21:25:27 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 07 Jul 2010 19:25:27 +0000 Subject: [issue5907] repr of time.struct_time type does not eval In-Reply-To: <1241281843.36.0.110450032545.issue5907@psf.upfronthosting.co.za> Message-ID: <1278530727.85.0.109587024052.issue5907@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- dependencies: +String interpolation doesn't work with sys.version_info _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 21:45:57 2010 From: report at bugs.python.org (Brett Cannon) Date: Wed, 07 Jul 2010 19:45:57 +0000 Subject: [issue9189] Improve CFLAGS handling In-Reply-To: <1278517873.84.0.191654592449.issue9189@psf.upfronthosting.co.za> Message-ID: <1278531957.18.0.975743733578.issue9189@psf.upfronthosting.co.za> Brett Cannon added the comment: Just to say what I said in my Rietveld review of the patch: I support the approach Jeffrey is taking and the patch looks good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 21:56:27 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 07 Jul 2010 19:56:27 +0000 Subject: [issue8413] String interpolation doesn't work with sys.version_info In-Reply-To: <1271381290.83.0.815567007844.issue8413@psf.upfronthosting.co.za> Message-ID: <1278532587.85.0.224897434528.issue8413@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This is definitely the right way to do it. I expect that I will have only minor nit-picks as I go through the patch. 1. You can probably just do #define PyStructSequence_SET_ITEM PyTuple_SET_ITEM #define PyStructSequence_GET_ITEM PyTuple_GET_ITEM there is no need to repeat the argument lists. 2. I am comparing PyStructSequence_New and PyTuple_New: - PyStructSequence_New does not fill ob_item array with NULLs. - PyStructSequence_New does not call _PyObject_GC_TRACK I believe tp_free gets inherited, so structseq tp_new should follow what tuple's tp_new does. I am not 100% sure on the second point, though _PyObject_GC_TRACK may be redundant after PyObject_GC_NewVar. 3. In structseq_repr, do you need PyTuple_GetItem? I think you can get away with PyTuple_GET_ITEM, or better PyStructSequence_GET_ITEM. ---------- nosy: +belopolsky -Alexander.Belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 22:00:18 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 07 Jul 2010 20:00:18 +0000 Subject: [issue9189] Improve CFLAGS handling In-Reply-To: <1278517873.84.0.191654592449.issue9189@psf.upfronthosting.co.za> Message-ID: <1278532818.14.0.571212351846.issue9189@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 22:01:33 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 07 Jul 2010 20:01:33 +0000 Subject: [issue9193] Versioned .so files In-Reply-To: <1278527607.97.0.766712002778.issue9193@psf.upfronthosting.co.za> Message-ID: <1278532893.91.0.766113237404.issue9193@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 22:19:01 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 07 Jul 2010 20:19:01 +0000 Subject: [issue8413] String interpolation doesn't work with sys.version_info In-Reply-To: <1278532587.85.0.224897434528.issue8413@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: 2010/7/7 Alexander Belopolsky : > > Alexander Belopolsky added the comment: > > This is definitely the right way to do it. ?I expect that I will have only minor nit-picks as I go through the patch. > > 1. You can probably just do > > #define PyStructSequence_SET_ITEM PyTuple_SET_ITEM > #define PyStructSequence_GET_ITEM PyTuple_GET_ITEM > > there is no need to repeat the argument lists. I think the preprocessor requires this. (Anyway it fails without.) > > 2. I am comparing PyStructSequence_New and PyTuple_New: > ?- PyStructSequence_New does not fill ob_item array with NULLs. I'm not sure it really matters, since the fields should always be filled in, but I suppose it can't hurt... > ?- PyStructSequence_New does not call _PyObject_GC_TRACK > > I believe tp_free gets inherited, so structseq tp_new should follow what tuple's tp_new does. ?I am not 100% sure on the second point, though _PyObject_GC_TRACK may be redundant after PyObject_GC_NewVar. This is only needed when doing freelist magic in tupleobject.c. > > 3. In structseq_repr, do you need PyTuple_GetItem? ?I think you can get away with PyTuple_GET_ITEM, or better PyStructSequence_GET_ITEM. Yeah, that's fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 22:19:37 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 07 Jul 2010 20:19:37 +0000 Subject: [issue8413] String interpolation doesn't work with sys.version_info In-Reply-To: <1271381290.83.0.815567007844.issue8413@psf.upfronthosting.co.za> Message-ID: <1278533977.96.0.923163062147.issue8413@psf.upfronthosting.co.za> Changes by Benjamin Peterson : Added file: http://bugs.python.org/file17896/structseq-inheritance2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 22:28:05 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 07 Jul 2010 20:28:05 +0000 Subject: [issue8413] String interpolation doesn't work with sys.version_info In-Reply-To: Message-ID: Alexander Belopolsky added the comment: On Wed, Jul 7, 2010 at 4:19 PM, Benjamin Peterson wrote: >> ?- PyStructSequence_New does not fill ob_item array with NULLs. > > I'm not sure it really matters, since the fields should always be > filled in, but I suppose it can't hurt... The following pattern is quite common: tuple = PyTuple_New(size): for (i = 0; i < size; ++i) { item = create_item(...); if (item == NULL) goto fail; } ... fail: Py_DECREF(tuple); I don't think this should be outlawed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 22:30:38 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 07 Jul 2010 20:30:38 +0000 Subject: [issue8413] String interpolation doesn't work with sys.version_info In-Reply-To: <1271381290.83.0.815567007844.issue8413@psf.upfronthosting.co.za> Message-ID: <1278534638.62.0.0918536438339.issue8413@psf.upfronthosting.co.za> Benjamin Peterson added the comment: (New patch addresses review.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 22:43:30 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 07 Jul 2010 20:43:30 +0000 Subject: [issue8413] String interpolation doesn't work with sys.version_info In-Reply-To: <1271381290.83.0.815567007844.issue8413@psf.upfronthosting.co.za> Message-ID: <1278535410.36.0.503773633914.issue8413@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Looks great. I love the patches where few '+'s are drowning in a sea of '-'s! A gratuitous nitpick (feel free to ignore). In + val = PyStructSequence_GET_ITEM(obj, i); if (cname == NULL || val == NULL) { The null check for val is now redundant, but won't hurt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 22:54:28 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 07 Jul 2010 20:54:28 +0000 Subject: [issue8413] String interpolation doesn't work with sys.version_info In-Reply-To: <1271381290.83.0.815567007844.issue8413@psf.upfronthosting.co.za> Message-ID: <1278536068.77.0.876263766.issue8413@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Applied in r82636. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 23:02:30 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 07 Jul 2010 21:02:30 +0000 Subject: [issue8413] String interpolation doesn't work with sys.version_info In-Reply-To: <1271381290.83.0.815567007844.issue8413@psf.upfronthosting.co.za> Message-ID: <1278536550.93.0.0491677671321.issue8413@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: I would suggest to document changed behavior of string interpolation with sys.version_info and sys.getwindowsversion() in "What?s New in Python 2.7" page and maybe "What?s New In Python 3.1" page. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 23:08:35 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 07 Jul 2010 21:08:35 +0000 Subject: [issue8413] String interpolation doesn't work with sys.version_info In-Reply-To: <1271381290.83.0.815567007844.issue8413@psf.upfronthosting.co.za> Message-ID: <1278536915.16.0.986519258677.issue8413@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: unit test needed -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 23:20:10 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 07 Jul 2010 21:20:10 +0000 Subject: [issue8413] String interpolation doesn't work with sys.version_info In-Reply-To: <1271381290.83.0.815567007844.issue8413@psf.upfronthosting.co.za> Message-ID: <1278537610.33.0.553426695577.issue8413@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This was a fantastic check-in. Thanks Benjamin. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 23:31:37 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 07 Jul 2010 21:31:37 +0000 Subject: [issue1820] Enhance Object/structseq.c to match namedtuple and tuple api In-Reply-To: <1200284428.58.0.762384814897.issue1820@psf.upfronthosting.co.za> Message-ID: <1278538297.76.0.11842940482.issue1820@psf.upfronthosting.co.za> Benjamin Peterson added the comment: structseq now does subclass tuple, so if there's any interest in adding namedtuple APIs, now it should be easier. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 23:35:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 07 Jul 2010 21:35:40 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1278538540.52.0.318175583106.issue5288@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Uploaded issue5288.diff to Rietveld: http://codereview.appspot.com/1698050 ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 7 23:39:43 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 07 Jul 2010 21:39:43 +0000 Subject: [issue4928] Problem with tempfile.NamedTemporaryFile In-Reply-To: <1231838566.25.0.143957228078.issue4928@psf.upfronthosting.co.za> Message-ID: <1278538783.57.0.903574900121.issue4928@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Where does it say that they are supposed to be deleted when the process > is killed, Well, it is more of a "natural expectation" I guess. > and what mechanism specifically is supposed to actually perform the > deletion? That's not the kind of questions users ask themselves. If the process shutdown is greatful, either __del__ or a weakref callback is adequate. We probably can't do anything for brutal killings, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 00:21:21 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Jul 2010 22:21:21 +0000 Subject: [issue9189] Improve CFLAGS handling In-Reply-To: <1278517873.84.0.191654592449.issue9189@psf.upfronthosting.co.za> Message-ID: <4C34FDDD.90604@egenix.com> Marc-Andre Lemburg added the comment: Jeffrey Yasskin wrote: > > New submission from Jeffrey Yasskin : > > Patch at http://codereview.appspot.com/1749042. > > The idea here is to let the user set CFLAGS on either configure or make (or both), and have later settings appear later in the $CC command line. I left OPT, BASECFLAGS, and EXTRA_CFLAGS around in case people have written scripts using them, but I think they're superfluous as user-visible knobs after this patch. Passing in user values to CFLAGS on configure should already work without the patch. I'm not sure why you'd want to modify CFLAGS on Makefile. > I prevented AC_PROG_CC from setting a default $CFLAGS value because the values it would set are already put into $BASECFLAGS when appropriate, and @CFLAGS@ needs to appear after @BASECFLAGS@ to allow the user to override Python's defaults at configure time. We could also accomplish this by removing BASECFLAGS and OPT entirely and instead prepending their contents to $CFLAGS in configure. That's a bigger patch, but if any of you feel strongly about it I can do that instead. We've already had a long discussion about the use of AC_PROG_CC on another ticket. We are you trying to remove the default setting again ? BASECFLAGS is not supported by autoconf, it's a Python invention. Do you really want to put all the logic that autoconf uses to setup CFLAGS currently and in the future into our own configure code ? Are you willing to maintain that code ? We've also discussed switching the order of $(OPT) and $(CFLAGS): that doesn't work, since $(OPT) is meant to override the $(CFLAGS) settings. > I made the same changes for CPPFLAGS and LDFLAGS but no other user-settable variables. I don't have strong opinions about the exact set we support this for, as long as it includes CFLAGS, but these three seemed like a sensible set. Some more comments: I don't really like the approach you've taken with the variable naming. It's better to stick to Makefile all caps standards and instead prepend Python specific variables with a PY or PY_ prefix. The already existing PY_CFLAGS should then be renamed to PY_RUNTIME_CFLAGS or just PYTHON_CFLAGS. Please also keep the default values for CFLAGS et al around, ie. CFLAGS = @CFLAGS@ PY_CFLAGS = $(BASECFLAGS) $(CFLAGS) $(OPT) $(EXTRA_CFLAGS) Note that using ":=" will cause trouble with non-GNU makes. Why do you need this ? In summary: While we're breaking Makefile parsing anyway, we might as well go for the big patch and remove the whole BASECFLAGS, OPT and EXTRA_CFLAGS cruft. These cause all sorts of problem when building extensions for Python and not even distutils always gets them right (distutils needs to mimic the CFLAGS setup when setting up the compiler, so it has to replicate what's going on in the Makefile in distutils.utils.ccompiler.customize_compiler()). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 00:56:37 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 07 Jul 2010 22:56:37 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1278543397.94.0.745735776119.issue5127@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- assignee: -> amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 01:17:03 2010 From: report at bugs.python.org (Vlastimil Brom) Date: Wed, 07 Jul 2010 23:17:03 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1278544623.2.0.0638716174364.issue2986@psf.upfronthosting.co.za> Vlastimil Brom added the comment: I guess, I am not supposed to post to python-dev - not being a python developer, hopefully it is appropriate to add a comment here - only based on my current usage of (a modified) difflib.SequenceMatcher. It seems, the mentions of text comparison in that thread, e.g. http://mail.python.org/pipermail/python-dev/2010-July/101515.html etc. rather imply line-by-line comparison, and possibly character comparison of matched lines. For me the direct character-wise comparison is more useful in most cases. With the popular heuristics disabled the results look pretty well. (the script only involves changing the background colour of the compared texts - based on the SequenceMatcher - get_opcodes() ) Just now, I only need to disable the popular check, currently I use a monkey-patched subclass of SequenceMatcher with extended signature and modified __chain_b function. cf. http://mail.python.org/pipermail/python-list/2010-June/1247907.html I would vote for extending the SequenceMatcher API to enable adjustments (leaving the default values as the current ones) - enable/disable popular check, set the thresholds for string length and "popular" frequency (and eventually other parameters, which might be added). Are there some restrictions on API changes in a library due to a moratorium - even if the default behaviour remains unchanged? Otherwise, what might be the disadvantages of this approach? If the current behaviour is considered appropriate for the original usecases, other uses would be also made possible/easier - only at the cost of learning the meaning of the added parameters - from the enhanced docs, of course. vbr ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 01:38:27 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 07 Jul 2010 23:38:27 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1278545907.12.0.587056471919.issue5288@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: issue5288a.diff addressed comments from Rietveld. ---------- stage: unit test needed -> commit review Added file: http://bugs.python.org/file17897/issue5288a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 01:44:46 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 07 Jul 2010 23:44:46 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1278546286.84.0.608235012486.issue5127@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Now I wonder whether it's reasonable to consider this character U+10000 (LINEAR B SYLLABLE B008 A) as printable with repr(). Yes, its category is "Lo", but is there a font which can display it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 02:06:08 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 08 Jul 2010 00:06:08 +0000 Subject: [issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28) In-Reply-To: <1234845206.93.0.372909555036.issue5288@psf.upfronthosting.co.za> Message-ID: <1278547568.64.0.437682297885.issue5288@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: C code changes eliminating round-trips between timdelta and int offsets committed in r82642 and Python code changes committed to sandbox in r82641. Now the requested behavior change is easy and I am about +0.5 on relaxing the offset checks to allow seconds in the offsets and about +0.1 on removing the checks altogether and allowing arbitrary timedeltas even over 1 day. The only substantive question in my mind is how to handle printing in formats like %z which only provide 4 digits for UTC offset. Two options seem reasonable: a) truncate sub-minute offsets; and b) follow RFC 3339 recommendation and translate the time into the nearest whole-minute timezone. I am slightly is favor of (a), but this whole problem may be a reason to reject this RFE. ---------- keywords: +easy -patch priority: normal -> low stage: commit review -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 04:18:04 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 08 Jul 2010 02:18:04 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1278555484.42.0.684572353585.issue2986@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 04:18:21 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 08 Jul 2010 02:18:21 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1278555501.1.0.826161417863.issue2986@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 05:06:47 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Thu, 08 Jul 2010 03:06:47 +0000 Subject: [issue9194] winreg:fixupMultiSZ should check that P < Q in the inner loop In-Reply-To: <1278558407.29.0.39315930303.issue9194@psf.upfronthosting.co.za> Message-ID: <1278558407.29.0.39315930303.issue9194@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : The comment before fixupMultiSZ and countString states: ** Note that fixupMultiSZ and countString have both had changes ** made to support "incorrect strings". The registry specification ** calls for strings to be terminated with 2 null bytes. It seems ** some commercial packages install strings which don't conform, ** causing this code to fail - however, "regedit" etc still work ** with these strings (ie only we don't!). As indicated in the comments, the two functions dutifully check the supplied length parameter and do not trust the data to be in the correct format. ... except for the inner loop in fixupMultiSZ, which reads: for(; *P != '\0'; P++) ; It should be the same as the inner loop of countStrings: for (; P < Q && *P != '\0'; P++) ; ---------- messages: 109511 nosy: stutzbach priority: normal severity: normal status: open title: winreg:fixupMultiSZ should check that P < Q in the inner loop versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 06:45:51 2010 From: report at bugs.python.org (Jeffrey Yasskin) Date: Thu, 08 Jul 2010 04:45:51 +0000 Subject: [issue9189] Improve CFLAGS handling In-Reply-To: <4C34FDDD.90604@egenix.com> Message-ID: Jeffrey Yasskin added the comment: > Passing in user values to CFLAGS on configure should already work > without the patch. Since the user's CFLAGS settings are overridden by Python's OPT settings, it doesn't already work without the patch. > I'm not sure why you'd want to modify CFLAGS on Makefile. If I run `make clean; make CFLAGS=-Werror`, I expect that to add -Werror to the compilation line. I don't expect it to replace all of the flags configure set up, and I don't expect to have to re-run configure to add the -Werror. Doing this won't affect distutils' behavior and won't automatically cause all of Python to get recompiled, so it's not something people should do when installing Python, but it's helpful during development. > We've already had a long discussion about the use of AC_PROG_CC on another > ticket. We are you trying to remove the default setting again ? > > BASECFLAGS is not supported by autoconf, it's a Python invention. Do you > really want to put all the logic that autoconf uses to setup CFLAGS currently > and in the future into our own configure code ? Are you willing to maintain > that code ? Given that AC_PROG_CC, in its entire history, has only grown the ability to check for -g and -O2, I'm not too worried. Our configure code already uses $ac_cv_prog_cc_g to take advantage of AC_PROG_CC's detection of -g, and we have more sophisticated logic around -O2 than it does. (Check the configure source if you don't believe that AC_PROG_CC's CFLAGS handling is pretty simple.) > We've also discussed switching the order of $(OPT) and $(CFLAGS): that doesn't > work, since $(OPT) is meant to override the $(CFLAGS) settings. It's meant to override AC_PROG_CC's bad CFLAGS settings. Once those are out of the way, we don't need to surprise users with a non-working CFLAGS anymore. >> I made the same changes for CPPFLAGS and LDFLAGS but no other user-settable variables. I don't have strong opinions about the exact set we support this for, as long as it includes CFLAGS, but these three seemed like a sensible set. > > Some more comments: > > I don't really like the approach you've taken with the variable naming. > It's better to stick to Makefile all caps standards and instead prepend > Python specific variables with a PY or PY_ prefix. The already existing > PY_CFLAGS should then be renamed to PY_RUNTIME_CFLAGS or just PYTHON_CFLAGS. Sure. > Please also keep the default values for CFLAGS et al around, ie. > > CFLAGS = @CFLAGS@ > PY_CFLAGS = $(BASECFLAGS) $(CFLAGS) $(OPT) $(EXTRA_CFLAGS) This doesn't quite work, since the make command line overrides that CFLAGS assignment. I've saved the configure-provided values into CONFIGURE_CFLAGS, etc. > Note that using ":=" will cause trouble with non-GNU makes. Why do > you need this ? http://www.openbsd.org/cgi-bin/man.cgi?query=make and http://www.freebsd.org/doc/en/books/pmake/variables.html say bsd make supports :=. I'm not sure where to find docs for other makes. I don't need := anymore, though, since I found another way to fix sysconfig. Removed. > In summary: While we're breaking Makefile parsing anyway, we might as > well go for the big patch and remove the whole BASECFLAGS, OPT and > EXTRA_CFLAGS cruft. These cause all sorts of problem when building > extensions for Python and not even distutils always gets them > right (distutils needs to mimic the CFLAGS setup when setting up > the compiler, so it has to replicate what's going on in the Makefile > in distutils.utils.ccompiler.customize_compiler()). Makefile parsing isn't the only thing we care about compatibility with. I kept them around for people who've been setting them through build scripts or who are just used to setting them on the command line. Maybe they should go away too, but I think that's orthogonal to this patch, and should happen with a lag (maybe a whole release) to let people get used to CFLAGS first. That is, unless you can point out practical problems with the change around AC_PROG_CC. I've uploaded the new patch to http://codereview.appspot.com/1749042. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 07:19:25 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Jul 2010 05:19:25 +0000 Subject: [issue9194] winreg:fixupMultiSZ should check that P < Q in the inner loop In-Reply-To: <1278558407.29.0.39315930303.issue9194@psf.upfronthosting.co.za> Message-ID: <1278566365.8.0.826635830308.issue9194@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- components: +Extension Modules, Windows nosy: +brian.curtin stage: -> unit test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 07:29:02 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Jul 2010 05:29:02 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1278566942.93.0.870225600864.issue5127@psf.upfronthosting.co.za> Ezio Melotti added the comment: Given that '\U00010000'.isprintable() returns True, I would say yes. If someone needs to print this char and has an appropriate font to do it, I don't see why it shouldn't work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 07:50:11 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 08 Jul 2010 05:50:11 +0000 Subject: [issue9189] Improve CFLAGS handling In-Reply-To: <1278517873.84.0.191654592449.issue9189@psf.upfronthosting.co.za> Message-ID: <1278568211.45.0.488390930807.issue9189@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 07:56:17 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 08 Jul 2010 05:56:17 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278568577.89.0.954568631355.issue9155@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Be sure to consider the impact on the peephole optimizer. Also consider that adding volume inside the ceval.c loop may have unintended slowing effects on various compilers -- supposedly, this has been a serious issue in that past and there has been concern about growing the body of the loop. I presume that the thrust of the efforts is directed at eliminating the an unpredictable switch branch inside the COMPARE_OP opcode. If so, there's not much fat to be shed here. The cost of the opcode switch is small relative the time it takes to dispatch to an object's rich comparison methods. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 08:36:47 2010 From: report at bugs.python.org (Craig McQueen) Date: Thu, 08 Jul 2010 06:36:47 +0000 Subject: [issue9195] Link in docs from "String Formatting Operations" to "Template Strings" In-Reply-To: <1278571007.55.0.304215462236.issue9195@psf.upfronthosting.co.za> Message-ID: <1278571007.55.0.304215462236.issue9195@psf.upfronthosting.co.za> New submission from Craig McQueen : I stumbled across "Template Strings" of PEP 292 by accident recently. I'd never heard of it before. I'm familiar with the "string interpolation" aka "String Formatting Operations", and I know to find that in the docs under "Standard Types", i.e. http://docs.python.org/library/stdtypes.html#string-formatting-operations http://docs.python.org/py3k/library/stdtypes.html#old-string-formatting-operations It would be good for that documentation to mention "Template Strings", and include a cross-reference to the docs for it, since it was created as an alternative string formatting. I.e. cross-reference to http://docs.python.org/library/string.html#template-strings http://docs.python.org/py3k/library/string.html#template-strings ---------- assignee: docs at python components: Documentation messages: 109515 nosy: cmcqueen1975, docs at python priority: normal severity: normal status: open title: Link in docs from "String Formatting Operations" to "Template Strings" versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 08:38:00 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Jul 2010 06:38:00 +0000 Subject: [issue9195] Link in docs from "String Formatting Operations" to "Template Strings" In-Reply-To: <1278571007.55.0.304215462236.issue9195@psf.upfronthosting.co.za> Message-ID: <1278571080.89.0.108813606376.issue9195@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 09:07:10 2010 From: report at bugs.python.org (Craig McQueen) Date: Thu, 08 Jul 2010 07:07:10 +0000 Subject: [issue9196] Improve docs for string interpolation "%s" re Unicode strings In-Reply-To: <1278572830.17.0.148747735024.issue9196@psf.upfronthosting.co.za> Message-ID: <1278572830.17.0.148747735024.issue9196@psf.upfronthosting.co.za> New submission from Craig McQueen : I have just been trying to figure out how string interpolation works for "%s", when Unicode strings are involved. It seems it's a bit complicated, but the Python documentation doesn't really describe it. It just says %s "converts any Python object using str()". Here is what I have found (I think), and it could be worth improving the documentation of this somehow. Example 1: "%s" % test_object >From what I can tell, in this case: 1. test_object.__str__() is called. 2. If test_object.__str__() returns a string object, then that is substituted. 3. If test_object.__str__() returns a Unicode object (for some reason), then test_object.__unicode__() is called, then _that_ is substituted instead. The output string is turned into Unicode. This behaviour is surprising. [Note that the call to test_object.__str__() is not the same as str(test_object), because the former can return a Unicode object without causing an error, while the latter, if it gets a Unicode object, will then try to encode('ascii') to a string, possibly generating a UnicodeEncodeError exception.] Example 2: u"%s" % test_object In this case: 1. test_object.__unicode__() is called, if it exists, and the result is substituted. The output string is Unicode. 2. If test_object.__unicode__() doesn't exist, then test_object.__str__() is called instead, converted to Unicode, and substituted. The output string is Unicode. Example 3: "%s %s" % (u'unicode', test_object) In this case: 1. The first substitution causes the output string to be Unicode. 2. It seems that (1) causes the second substitution to follow the same rules as Example 2. This is a little surprising. ---------- assignee: docs at python components: Documentation messages: 109516 nosy: cmcqueen1975, docs at python priority: normal severity: normal status: open title: Improve docs for string interpolation "%s" re Unicode strings versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 09:09:09 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Jul 2010 07:09:09 +0000 Subject: [issue9196] Improve docs for string interpolation "%s" re Unicode strings In-Reply-To: <1278572830.17.0.148747735024.issue9196@psf.upfronthosting.co.za> Message-ID: <1278572949.14.0.954997544751.issue9196@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 09:15:46 2010 From: report at bugs.python.org (Craig McQueen) Date: Thu, 08 Jul 2010 07:15:46 +0000 Subject: [issue9196] Improve docs for string interpolation "%s" re Unicode strings In-Reply-To: <1278572830.17.0.148747735024.issue9196@psf.upfronthosting.co.za> Message-ID: <1278573346.24.0.0257542666296.issue9196@psf.upfronthosting.co.za> Craig McQueen added the comment: Another thing I discovered, for Example 1: 4. If test_object.__str__() returns a Unicode object (for some reason), and test_object.__unicode__() does not exist, then the Unicode value from the __str__() call is used as-is (no conversion to string, no encoding errors). This is also a little surprising [in this situation unicode(test_object) also returns the Unicode object returned by __str__() as-is, so I guess there's some consistency there]. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 09:50:49 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 08 Jul 2010 07:50:49 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1278566942.93.0.870225600864.issue5127@psf.upfronthosting.co.za> Message-ID: <4C358355.7060707@egenix.com> Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > Given that '\U00010000'.isprintable() returns True, I would say yes. If someone needs to print this char and has an appropriate font to do it, I don't see why it shouldn't work. Note that Python3 will send printable code points as-is to the console, so whether or not a code point is considered printable should take the common availability of fonts being able to display the code point into account. Otherwise, a user would just see a square box instead of the much more useful escape sequence. The "printable" property is a Python invention, not a Unicode property, so we do have some freedom is deciding what is printable and what is not. In recent years the situation has just started clearing up for fonts covering the assigned BMP range, mostly due to Microsoft actively working to get their fonts cover the Unicode 2.0 assigned code points (BMP only): http://support.microsoft.com/kb/287247 The only font set I know of that tries to go beyond BMP is this shareware one: http://code2000.net/ Most other fonts just cover small parts of the Unicode assigned code point ranges: http://unicode.org/resources/fonts.html http://www.wazu.jp/ http://www.unifont.org/fontguide/ I suppose that in a few years we'll see OS and GUIs mix and match the available fonts to display Unicode code points. Given the font situation, I don't think we should have repr() pass through printable non-BMP code points as is. Perhaps we shouldn't give those code points the printable property to begin with. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 10:16:40 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Jul 2010 08:16:40 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1278577000.33.0.00795425454255.issue5127@psf.upfronthosting.co.za> Ezio Melotti added the comment: [This should probably be discussed on python-dev or in another issue, so feel free to move the conversation there.] The current implementation considers printable """all the characters except those characters defined in the Unicode character database as following categories are considered printable. * Cc (Other, Control) * Cf (Other, Format) * Cs (Other, Surrogate) * Co (Other, Private Use) * Cn (Other, Not Assigned) * Zl Separator, Line ('\u2028', LINE SEPARATOR) * Zp Separator, Paragraph ('\u2029', PARAGRAPH SEPARATOR) * Zs (Separator, Space) other than ASCII space('\x20').""" We could also arbitrary exclude all the non-BMP chars, but that shouldn't be based on the availability of the fonts IMHO. > Note that Python3 will send printable code points as-is to the > console, so whether or not a code point is considered printable > should take the common availability of fonts being able to display > the code point into account. Otherwise, a user would just see a > square box instead of the much more useful escape sequence If the concern is about the usefulness of repr() in the console, note that on the Windows terminal trying to display most of the characters results in an error (see #5110), and that makes repr() barely usable. ascii() might be an alternative if the user wants to see the escape sequence instead of a square box. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 10:50:50 2010 From: report at bugs.python.org (Palluat de Besset) Date: Thu, 08 Jul 2010 08:50:50 +0000 Subject: [issue9197] subprocess module causing crash Message-ID: <1278579050.72.0.400216710661.issue9197@psf.upfronthosting.co.za> Changes by Palluat de Besset : ---------- assignee: ronaldoussoren components: Macintosh nosy: mpalluat, ronaldoussoren priority: normal severity: normal status: open title: subprocess module causing crash type: crash versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 10:53:07 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 08 Jul 2010 08:53:07 +0000 Subject: [issue9198] Should repr() print unicode characters outside the BMP? In-Reply-To: <1278579187.34.0.662391507791.issue9198@psf.upfronthosting.co.za> Message-ID: <1278579187.34.0.662391507791.issue9198@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc : On wide unicode builds, '\U00010000'.isprintable() returns True, and repr() returns the character unmodified. Is it a good behavior, given that very few fonts have can display this character? Marc-Andre Lemburg wrote: > The "printable" property is a Python invention, not a Unicode property, > so we do have some freedom is deciding what is printable and what > is not. The current implementation considers printable """all the characters except those characters defined in the Unicode character database as following categories are considered printable. * Cc (Other, Control) * Cf (Other, Format) * Cs (Other, Surrogate) * Co (Other, Private Use) * Cn (Other, Not Assigned) * Zl Separator, Line ('\u2028', LINE SEPARATOR) * Zp Separator, Paragraph ('\u2029', PARAGRAPH SEPARATOR) * Zs (Separator, Space) other than ASCII space('\x20'). """ We could also arbitrarily exclude all the non-BMP chars. ---------- components: Unicode messages: 109520 nosy: amaury.forgeotdarc, ezio.melotti, lemburg priority: normal severity: normal status: open title: Should repr() print unicode characters outside the BMP? type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 10:53:57 2010 From: report at bugs.python.org (Palluat de Besset) Date: Thu, 08 Jul 2010 08:53:57 +0000 Subject: [issue9197] subprocess module causing crash In-Reply-To: <1278579237.82.0.673928899274.issue9197@psf.upfronthosting.co.za> Message-ID: <1278579237.82.0.673928899274.issue9197@psf.upfronthosting.co.za> New submission from Palluat de Besset : there is a crash log inside the archive ---------- Added file: http://bugs.python.org/file17898/OSDP2.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 10:56:12 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 08 Jul 2010 08:56:12 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1278579372.8.0.395460382019.issue5127@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I suggest to go ahead and apply this patch, at least it correctly selects "printable" characters, whatever this means. I filed issue9198 to decide whether chr(0x10000) should be printable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 11:16:03 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 08 Jul 2010 09:16:03 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1278577000.33.0.00795425454255.issue5127@psf.upfronthosting.co.za> Message-ID: <4C35974D.7020309@egenix.com> Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > [This should probably be discussed on python-dev or in another issue, so feel free to move the conversation there.] > > The current implementation considers printable """all the characters except those characters defined in the Unicode character database as following categories are considered printable. > * Cc (Other, Control) > * Cf (Other, Format) > * Cs (Other, Surrogate) > * Co (Other, Private Use) > * Cn (Other, Not Assigned) > * Zl Separator, Line ('\u2028', LINE SEPARATOR) > * Zp Separator, Paragraph ('\u2029', PARAGRAPH SEPARATOR) > * Zs (Separator, Space) other than ASCII space('\x20').""" > > We could also arbitrary exclude all the non-BMP chars, but that shouldn't be based on the availability of the fonts IMHO. Without fonts, you can't print the code points, even if the Unicode database defines the code point as not having one of the above classes. And that's probably also the reason why the Unicode database doesn't define a printable property :-) I also find the use of Zl, Zp and Zs in the definition somewhat arbitrary: whitespace is certainly printable. This also doesn't match the isprint() C lib API: http://www.cplusplus.com/reference/clibrary/cctype/isprint/ "A printable character is any character that is not a control character." >> Note that Python3 will send printable code points as-is to the >> console, so whether or not a code point is considered printable >> should take the common availability of fonts being able to display >> the code point into account. Otherwise, a user would just see a >> square box instead of the much more useful escape sequence > > If the concern is about the usefulness of repr() in the console, note that on the Windows terminal trying to display most of the characters results in an error (see #5110), and that makes repr() barely usable. > ascii() might be an alternative if the user wants to see the escape sequence instead of a square box. That's a different problem, but indeed also related to the printable property which was introduced as part of the Unicode repr() change: if the console encoding cannot represent the printable code points, you get an error. I was never a fan of the Unicode repr() change to begin with. The repr() of an object should work in almost all cases. Being able to read the repr() of an object in clear text is only secondary. IMHO, allowing all printable code points to pass through unescaped was not beneficial. We have str() for getting readable representations of objects. Anyway, we're stuck with it now, so have to work around the issues... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 11:18:21 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 08 Jul 2010 09:18:21 +0000 Subject: [issue9197] subprocess module causing crash In-Reply-To: <1278579237.82.0.673928899274.issue9197@psf.upfronthosting.co.za> Message-ID: <1278580701.49.0.389675981134.issue9197@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The title is somewhat misleading, this is a C program that uses dlopen to load the python framework. I will look into this, but it is just as likely that code that loads or uses the python framework has a problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 11:23:02 2010 From: report at bugs.python.org (Palluat de Besset) Date: Thu, 08 Jul 2010 09:23:02 +0000 Subject: [issue9197] subprocess module causing crash In-Reply-To: <1278580701.49.0.389675981134.issue9197@psf.upfronthosting.co.za> Message-ID: <1333E4C9-42AD-4586-AAC2-DCB51434464B@Sophos.com> Palluat de Besset added the comment: Hi Ronald, Thank you for looking into it, and sorry for the misleading title. You will find a crash log and some instructions on how to reproduce the problem inside the archive. Thanks, Marc On 8 Jul 2010, at 10:18, Ronald Oussoren wrote: Ronald Oussoren > added the comment: The title is somewhat misleading, this is a C program that uses dlopen to load the python framework. I will look into this, but it is just as likely that code that loads or uses the python framework has a problem. ---------- _______________________________________ Python tracker > _______________________________________ Marc Palluat de Besset Mac Software Engineer email : marc.palluatdebesset at sophos.com tel : +44 1235 544056 loc : E2 floor 2 SOPHOS - simply secure ________________________________ Sophos Plc, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom. Company Reg No 2096520. VAT Reg No GB 348 3873 20. ---------- Added file: http://bugs.python.org/file17899/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
Hi Ronald,

Thank you for looking into it, and sorry for the misleading title.

You will find a crash log and some instructions on how to reproduce the problem inside the archive.

Thanks,

Marc


On 8 Jul 2010, at 10:18, Ronald Oussoren wrote:


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

The title is somewhat misleading, this is a C program that uses dlopen to load the python framework.

I will look into this, but it is just as likely that code that loads or uses the python framework has a problem.

----------

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



Marc Palluat de Besset
Mac Software Engineer

tel : +44 1235 544056
loc : E2 floor 2

SOPHOS - simply secure






Sophos Plc, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.
Company Reg No 2096520. VAT Reg No GB 348 3873 20.
From report at bugs.python.org Thu Jul 8 11:26:03 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 08 Jul 2010 09:26:03 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1278579372.8.0.395460382019.issue5127@psf.upfronthosting.co.za> Message-ID: <4C3599A8.60005@egenix.com> Marc-Andre Lemburg added the comment: Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > I suggest to go ahead and apply this patch, at least it correctly selects "printable" characters, whatever this means. > I filed issue9198 to decide whether chr(0x10000) should be printable. +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 11:33:51 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Jul 2010 09:33:51 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1278581631.38.0.0167017263352.issue5127@psf.upfronthosting.co.za> Ezio Melotti added the comment: Amaury, before applying the patch consider replacing the tab characters before the comments with spaces. The use of tabs is discouraged. Marc-Andre Lemburg wrote: > I was never a fan of the Unicode repr() change to begin with. The > repr() of an object should work in almost all cases. I still think that #5110 should be fixed (there's also a patch to fix the issue on Windows). If you agree please comment there and/or reopen that issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 11:34:52 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 08 Jul 2010 09:34:52 +0000 Subject: [issue9198] Should repr() print unicode characters outside the BMP? In-Reply-To: <1278579187.34.0.662391507791.issue9198@psf.upfronthosting.co.za> Message-ID: <4C359BB8.6050508@egenix.com> Marc-Andre Lemburg added the comment: [Adding some bits from the discussion on #5127 for better context] """ Ezio Melotti wrote: > > > > Ezio Melotti added the comment: > > > > [This should probably be discussed on python-dev or in another issue, so feel free to move the conversation there.] > > > > The current implementation considers printable """all the characters except those characters defined in the Unicode character database as following categories are considered printable. > > * Cc (Other, Control) > > * Cf (Other, Format) > > * Cs (Other, Surrogate) > > * Co (Other, Private Use) > > * Cn (Other, Not Assigned) > > * Zl Separator, Line ('\u2028', LINE SEPARATOR) > > * Zp Separator, Paragraph ('\u2029', PARAGRAPH SEPARATOR) > > * Zs (Separator, Space) other than ASCII space('\x20').""" > > > > We could also arbitrary exclude all the non-BMP chars, but that shouldn't be based on the availability of the fonts IMHO. Without fonts, you can't print the code points, even if the Unicode database defines the code point as not having one of the above classes. And that's probably also the reason why the Unicode database doesn't define a printable property :-) I also find the use of Zl, Zp and Zs in the definition somewhat arbitrary: whitespace is certainly printable. This also doesn't match the isprint() C lib API: http://www.cplusplus.com/reference/clibrary/cctype/isprint/ "A printable character is any character that is not a control character." """ There are two aspects: * What to call a printable code point ? I'd suggest to follow the C lib approach: all non-control characters. * Which criteria to use for Unicode repr() ? Given the original intent of the extension to allow printable code points to pass through unescaped, it may be better to define "printable" based on the sys.stdout/sys.stderr encoding: A code points may pass through unescaped, if it is printable per the above definition, and does not cause problems with the sys.stdout/sys.stderr encoding. Since we can't apply this check based on a per character basis, I think we should only allow non-ASCII code points to pass through if sys.stdout/sys.stderr is set to utf-8, utf-16 or utf-32. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 11:35:50 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 08 Jul 2010 09:35:50 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1278581631.38.0.0167017263352.issue5127@psf.upfronthosting.co.za> Message-ID: <4C359BF3.9000804@egenix.com> Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > Marc-Andre Lemburg wrote: >> I was never a fan of the Unicode repr() change to begin with. The >> repr() of an object should work in almost all cases. > > I still think that #5110 should be fixed (there's also a patch to fix the issue on Windows). If you agree please comment there and/or reopen that issue. Let's discuss this on #9198. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 11:56:37 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 08 Jul 2010 09:56:37 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1278582997.22.0.0319091482463.issue5127@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > consider replacing the tab characters before the comments with spaces It's actually already the case in my working copy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 12:24:25 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Jul 2010 10:24:25 +0000 Subject: [issue9198] Should repr() print unicode characters outside the BMP? In-Reply-To: <1278579187.34.0.662391507791.issue9198@psf.upfronthosting.co.za> Message-ID: <1278584665.89.0.440340057357.issue9198@psf.upfronthosting.co.za> Ezio Melotti added the comment: Regarding the fonts, I think that who actually uses or needs to use characters outside the BMP might have (now or in a few months/years) a font able to display them. I also tried to print the printable chars from U+FFFF to U+1FFFF on my linux terminal and about half of them were rendered correctly (the default font is DejaVu Sans Mono). The question is then if we do more harm hiding these chars behind escape sequence to the people who use them or hiding the escape sequence behind boxes for the people who don't and don't have the right font. Regarding the categories that should be considered printable, I agree that the Zx categories could be considered printable, so the non printable chars could be limited to the Cx categories. > Since we can't apply this check based on a per character basis, > I think we should only allow non-ASCII code points to pass through > if sys.stdout/sys.stderr is set to utf-8, utf-16 or utf-32. If I understood correctly, you are suggesting to look at the sys.stdout/sys.stderr encoding and: * if it's a UTF-* encoding: allow all the non-ASCII (printable) codepoints (because they are the only encodings that can represent all the Unicode characters); * if it's not a UTF-* encoding: allow only ASCII (printable) codepoints. This would however introduce a regression. For example on Windows (where the encoding is usually not a UTF-* one) I would expect accented characters (at least the ones in the codepage I'm using -- and usually it matches the native language of the user) to be displayed correctly. A more accurate approach would be to actually try to encode the string and escape only the chars that can't be encoded (and also the one that are not printable of course), but this can't be done in repr() because repr() returns a Unicode string (in #5110 I did it in sys.displayhook), and encode the string there would mean doing it twice. Also note that I might want to use repr() to get a representation of the object without necessarily send it through sys.stdout. For example I could write it on a file or send it via mail (Roundup reports errors via mail showing a repr of the variables) and in both the cases I might use/want UTF-8 even if sys.stdout is ASCII. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 12:47:07 2010 From: report at bugs.python.org (Andrew Clegg) Date: Thu, 08 Jul 2010 10:47:07 +0000 Subject: [issue7846] Fnmatch cache is never cleared during usage In-Reply-To: <1265209336.56.0.865162695939.issue7846@psf.upfronthosting.co.za> Message-ID: <1278586027.92.0.631686229768.issue7846@psf.upfronthosting.co.za> Andrew Clegg added the comment: Hi, This bug seems to have stalled - how can I get it moved forward? There don't seem to be any objections with the patch as-is, and the problem seems clear. Cheers ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 13:02:23 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 08 Jul 2010 11:02:23 +0000 Subject: [issue9198] Should repr() print unicode characters outside the BMP? In-Reply-To: <1278579187.34.0.662391507791.issue9198@psf.upfronthosting.co.za> Message-ID: <1278586943.84.0.984113217925.issue9198@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > A more accurate approach would be to actually try to encode the string > and escape only the chars that can't be encoded This is already the case with sys.stderr, it uses the "backslashreplace" error handler. Do you suggest the same for sys.stdout? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 13:03:58 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 08 Jul 2010 11:03:58 +0000 Subject: [issue9198] Should repr() print unicode characters outside the BMP? In-Reply-To: <1278579187.34.0.662391507791.issue9198@psf.upfronthosting.co.za> Message-ID: <1278587038.94.0.625593194642.issue9198@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Yes, repr() should not depend on the user's terminal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 13:10:15 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Jul 2010 11:10:15 +0000 Subject: [issue9198] Should repr() print unicode characters outside the BMP? In-Reply-To: <1278579187.34.0.662391507791.issue9198@psf.upfronthosting.co.za> Message-ID: <1278587415.58.0.997830128149.issue9198@psf.upfronthosting.co.za> Ezio Melotti added the comment: > This is already the case with sys.stderr, it uses the "backslashreplace" > error handler. Do you suggest the same for sys.stdout? See http://bugs.python.org/issue5110#msg84965 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 13:11:47 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 08 Jul 2010 11:11:47 +0000 Subject: [issue9198] Should repr() print unicode characters outside the BMP? In-Reply-To: <1278579187.34.0.662391507791.issue9198@psf.upfronthosting.co.za> Message-ID: <1278587507.72.0.0928296544649.issue9198@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The chapter "Rationale" in PEP3138 explains why sys.stdout uses "strict" encoding, when sys.stderr uses "backslashreplace". It would be possible to use "backslashreplace" for stdout as well for interactive sessions, but the PEP also rejected this because it '''may add confusion of the kind "it works in interactive mode but not when redirecting to a file".''' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 13:41:22 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 08 Jul 2010 11:41:22 +0000 Subject: [issue9197] subprocess module causing crash In-Reply-To: <1278579237.82.0.673928899274.issue9197@psf.upfronthosting.co.za> Message-ID: <1278589282.88.0.109153607706.issue9197@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I reproduce the problem on Linux (./configure --enable-shared), after I modified the source code a bit to directly use Python.h and to link with libpython3.2.so (no call to dlopen). In gdb the stack trace has exactly the same symbols as the attached crash log, so the issue is not specific to Mac frameworks. The crash is inside _PyImport_LoadDynamicModule("_pickle"), when _PyImport_FixupExtension() calls Py_DECREF(def->m_base.m_copy), this certainly frees objects allocated in a previous incarnation of the interpreter, and segfaults in type_dealloc(): _PyObject_GC_UNTRACK(type). In import.c::_PyImport_FixupExtension(), the Py_DECREF is preceded by a comment: """ /* Somebody already imported the module, likely under a different name. XXX this should really not happen. */ Py_DECREF(def->m_base.m_copy); """ I removed this statement, and the program now runs correctly. I don't know about memory leaks though... ---------- nosy: +amaury.forgeotdarc, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 15:14:52 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 08 Jul 2010 13:14:52 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278594892.95.0.0707342034763.issue9155@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I would like any such change to show what it improves through benchmarks. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 15:23:04 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 08 Jul 2010 13:23:04 +0000 Subject: [issue9197] subprocess module causing crash In-Reply-To: <1278579237.82.0.673928899274.issue9197@psf.upfronthosting.co.za> Message-ID: <1278595384.79.0.0433210724478.issue9197@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Removing the call to Py_DECREF is fishy. The cleanup of the interpreter state in Py_Finalize doesn't clean up all state when m_copy refers to a version from a previous instance of the interpreter. Maybe the tp_dealloc of a module object clean up m_copy? I don't know enough of this code and its intended behavior to know if that would be a valid change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 15:24:32 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Jul 2010 13:24:32 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278595472.27.0.299338109207.issue9155@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +jyasskin, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 15:29:15 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 08 Jul 2010 13:29:15 +0000 Subject: [issue9197] subprocess module causing crash In-Reply-To: <1278579237.82.0.673928899274.issue9197@psf.upfronthosting.co.za> Message-ID: <1278595755.69.0.0995917007212.issue9197@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: We definitely need unit tests about embedded python interpreter, I think there are none. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 15:38:09 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 08 Jul 2010 13:38:09 +0000 Subject: [issue9198] Should repr() print unicode characters outside the BMP? In-Reply-To: <1278579187.34.0.662391507791.issue9198@psf.upfronthosting.co.za> Message-ID: <1278596289.7.0.656514650379.issue9198@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 15:38:54 2010 From: report at bugs.python.org (Phillip J. Eby) Date: Thu, 08 Jul 2010 13:38:54 +0000 Subject: [issue9199] distutil upload command crashes when displaying server response In-Reply-To: <1278596334.3.0.531936724428.issue9199@psf.upfronthosting.co.za> Message-ID: <1278596334.3.0.531936724428.issue9199@psf.upfronthosting.co.za> New submission from Phillip J. Eby : When showing a server response (--show-response), the upload command crashes with the following traceback: Traceback (most recent call last): File "setup.py", line 94, in scripts = scripts, File "/usr/lib/python2.7/distutils/core.py", line 152, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/lib/python2.7/distutils/command/upload.py", line 60, in run self.upload_file(command, pyversion, filename) File "/usr/lib/python2.7/distutils/command/upload.py", line 189, in upload_file self.announce('-'*75, result.read(), '-'*75) TypeError: announce() takes at most 3 arguments (4 given) This is apparently due to the change made in r70889, which replaced a "print" statement with a call to self.announce(), but did not change the parameters appropriately. (The announce() method takes a string and a log level, not an arbitrary number of string arguments.) I don't know what versions of Python this is in besides 2.7; it may exist in a 2.6.x release or 3.x as well, but it is definitely in the 2.7 release. ---------- assignee: tarek components: Distutils messages: 109541 nosy: pje, tarek priority: normal severity: normal status: open title: distutil upload command crashes when displaying server response versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 15:50:03 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 08 Jul 2010 13:50:03 +0000 Subject: [issue9200] str.isprintable() is always False for large code points In-Reply-To: <1278597003.49.0.847714220976.issue9200@psf.upfronthosting.co.za> Message-ID: <1278597003.49.0.847714220976.issue9200@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc : On narrow unicode builds: unicodedata.category(chr(0x10000)) == 'Lo' # correct Py_UNICODE_ISPRINTABLE(0x10000) == 1 # correct str.isprintable(chr(0x10000)) == False # inconsistent On narrow unicode builds, large code points are stored with a surrogate pair. But str.isprintable() simply loops over the Py_UNICODE array, and test the surrogates separately. There should be a way to walk a unicode string in C, character by character, and the str methods (str.is*, str.to*) should use it. ---------- components: Unicode messages: 109542 nosy: amaury.forgeotdarc, ezio.melotti, lemburg priority: normal severity: normal status: open title: str.isprintable() is always False for large code points versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 15:53:24 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 08 Jul 2010 13:53:24 +0000 Subject: [issue7846] Fnmatch cache is never cleared during usage In-Reply-To: <1265209336.56.0.865162695939.issue7846@psf.upfronthosting.co.za> Message-ID: <1278597204.14.0.875713700945.issue7846@psf.upfronthosting.co.za> R. David Murray added the comment: OK, I've looked at the patch now. (1) it needs unit tests. (2) a py3k port would be helpful, since the code is very different in py3k, and we are now applying patches first to the py3k branch and then backporting. I think this can be considered a bug (the ever-expanding cache), so I'm OK with applying this in 2.7.1 once it has unit tests. Note that using _MAXCACHE (leading underscore) and not documenting it follows the 're' model, so that is the best choice. ---------- resolution: -> accepted versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 16:40:15 2010 From: report at bugs.python.org (Matthias Klose) Date: Thu, 08 Jul 2010 14:40:15 +0000 Subject: [issue9201] IDLE: raises Exception TclError in a special case In-Reply-To: <1278600015.52.0.587656960584.issue9201@psf.upfronthosting.co.za> Message-ID: <1278600015.52.0.587656960584.issue9201@psf.upfronthosting.co.za> New submission from Matthias Klose : [forwarded from https://launchpad.net/bugs/597763] seen with all version, built with Tcl8.5 To reproduce the bug, use the following class: class x(object): TEST = "hello" THE_MAXIMUM = 55 def __init__(self, a, b): self.a = 3 self.b = "test" and set the cursor behind "test". After that use SHIFT + UP (so from 3 to incl. "test" will be marked) and after that use SHIFT + POS1, which will produce this exception: >>> Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1413, in __call__ return self.func(*args) File "/usr/lib/python2.6/idlelib/MultiCall.py", line 151, in handler r = l[i](event) File "/usr/lib/python2.6/idlelib/EditorWindow.py", line 335, in home_callback if self.text.compare(first,">",last): File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 2863, in compare self._w, 'compare', index1, op, index2)) TclError: expected boolean value but got "" ---------- components: Tkinter messages: 109544 nosy: doko priority: normal severity: normal status: open title: IDLE: raises Exception TclError in a special case versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 16:45:11 2010 From: report at bugs.python.org (=?utf-8?q?Matthieu_Labb=C3=A9?=) Date: Thu, 08 Jul 2010 14:45:11 +0000 Subject: [issue1524639] Fix Tkinter Tcl-commands memory-leaks Message-ID: <1278600311.77.0.131824165243.issue1524639@psf.upfronthosting.co.za> Changes by Matthieu Labb? : ---------- nosy: +matthieu.labbe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 16:50:59 2010 From: report at bugs.python.org (Andrew Clegg) Date: Thu, 08 Jul 2010 14:50:59 +0000 Subject: [issue7846] Fnmatch cache is never cleared during usage In-Reply-To: <1265209336.56.0.865162695939.issue7846@psf.upfronthosting.co.za> Message-ID: <1278600659.77.0.83523428089.issue7846@psf.upfronthosting.co.za> Andrew Clegg added the comment: Attached is the Py3K version of the patch, and a unit test (Py3K only). ---------- Added file: http://bugs.python.org/file17900/py3k-fnmatch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 16:52:52 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 08 Jul 2010 14:52:52 +0000 Subject: [issue9202] Update platform.win32_ver() to account for change to #8413 In-Reply-To: <1278600772.14.0.212036343969.issue9202@psf.upfronthosting.co.za> Message-ID: <1278600772.14.0.212036343969.issue9202@psf.upfronthosting.co.za> New submission from Brian Curtin : The change to #8413 broke the use of sys.getwindowsversion() in platform.platform() calls on Windows, which subsequently breaks all runs of regrtest (e.g. buildbots) since it outputs platform info at the start. Now that structseq subclasses tuple, every field of sys.getwindowsversion() is returned, rather than only the specific ones inserted into the structseq (for backwards compatibility). Since platform.py needs to maintain backwards compatibility with older versions, the change will need to handle both the new and old way. ---------- assignee: brian.curtin components: None messages: 109546 nosy: benjamin.peterson, brian.curtin, lemburg priority: high severity: normal stage: needs patch status: open title: Update platform.win32_ver() to account for change to #8413 type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 17:00:50 2010 From: report at bugs.python.org (=?utf-8?q?Matthieu_Labb=C3=A9?=) Date: Thu, 08 Jul 2010 15:00:50 +0000 Subject: [issue3485] os.path.normcase documentation/behaviour unclear on Mac OS X In-Reply-To: <1217610966.27.0.918507533161.issue3485@psf.upfronthosting.co.za> Message-ID: <1278601250.64.0.873218855729.issue3485@psf.upfronthosting.co.za> Changes by Matthieu Labb? : ---------- nosy: +matthieu.labbe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 17:04:07 2010 From: report at bugs.python.org (Andrew Clegg) Date: Thu, 08 Jul 2010 15:04:07 +0000 Subject: [issue7846] Fnmatch cache is never cleared during usage In-Reply-To: <1265209336.56.0.865162695939.issue7846@psf.upfronthosting.co.za> Message-ID: <1278601447.33.0.380324227954.issue7846@psf.upfronthosting.co.za> Changes by Andrew Clegg : Removed file: http://bugs.python.org/file17900/py3k-fnmatch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 17:04:27 2010 From: report at bugs.python.org (Andrew Clegg) Date: Thu, 08 Jul 2010 15:04:27 +0000 Subject: [issue7846] Fnmatch cache is never cleared during usage In-Reply-To: <1265209336.56.0.865162695939.issue7846@psf.upfronthosting.co.za> Message-ID: <1278601467.59.0.293322247802.issue7846@psf.upfronthosting.co.za> Andrew Clegg added the comment: Sorry, messed up indentation on last patch, trying again... ---------- Added file: http://bugs.python.org/file17901/py3k-fnmatch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 17:05:03 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 08 Jul 2010 15:05:03 +0000 Subject: [issue9202] Update platform.win32_ver() to account for change to #8413 In-Reply-To: <1278600772.14.0.212036343969.issue9202@psf.upfronthosting.co.za> Message-ID: <1278601503.05.0.875398564799.issue9202@psf.upfronthosting.co.za> Brian Curtin added the comment: The following little patch could do the trick. --- platform.py (revision 82643) +++ platform.py (working copy) @@ -606,7 +606,9 @@ # Find out the registry key and some general version infos winver = GetVersionEx() - maj,min,buildno,plat,csd = winver + # If sys.getwindowsversion in 3.2 gets used, it contains extra fields + # which don't get used. Always use slicing in order to stay compatible. + maj,min,buildno,plat,csd = winver[:5] version = '%i.%i.%i' % (maj,min,buildno & 0xFFFF) if hasattr(winver, "service_pack"): if winver.service_pack != "": ---------- components: +Library (Lib) -None keywords: +needs review, patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 17:08:19 2010 From: report at bugs.python.org (Andrew Clegg) Date: Thu, 08 Jul 2010 15:08:19 +0000 Subject: [issue7846] Fnmatch cache is never cleared during usage In-Reply-To: <1265209336.56.0.865162695939.issue7846@psf.upfronthosting.co.za> Message-ID: <1278601699.01.0.11463983492.issue7846@psf.upfronthosting.co.za> Andrew Clegg added the comment: Attached is a patch and unit test against release27-maint. ---------- Added file: http://bugs.python.org/file17902/py27-fnmatch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 17:08:47 2010 From: report at bugs.python.org (Andrew Clegg) Date: Thu, 08 Jul 2010 15:08:47 +0000 Subject: [issue7846] Fnmatch cache is never cleared during usage In-Reply-To: <1265209336.56.0.865162695939.issue7846@psf.upfronthosting.co.za> Message-ID: <1278601727.26.0.765993955705.issue7846@psf.upfronthosting.co.za> Changes by Andrew Clegg : Removed file: http://bugs.python.org/file16116/fnmatch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 17:35:53 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Jul 2010 15:35:53 +0000 Subject: [issue9198] Should repr() print unicode characters outside the BMP? In-Reply-To: <1278579187.34.0.662391507791.issue9198@psf.upfronthosting.co.za> Message-ID: <1278603353.96.0.392957722127.issue9198@psf.upfronthosting.co.za> Ezio Melotti added the comment: Yes, but as I said in the message I linked, that's *not* what I want to do. I want to change only the behavior of the interactive interpreter and only when the string sent to stdout is not encodable (so only when the encoding is not UTF-*). This can be done changing sys.displayhook, but I haven't figured out yet how to do it. The default displayhook (Python/sysmodule.c:71) calls PyFile_WriteObject (Objects/fileobject.c:139) passing the object as is and the stdout. PyFile_WriteObject then does the equivalent of sys.stdout.write(repr(obj)). This is all done passing around unicode strings. Ideally we should try to encode the repr of the objects in displayhook using sys.stdout.encoding and 'backslashreplace', but then: 1) we would have to decode the resulting byte string again before passing it to PyFile_WriteObject; 2) we would have to find a way to write to sys.stdout a bytestring but I don't think that's possible (keep in mind that sys.stdout could also be some other object). OTOH even if the intermediate step of encoding/decoding looks redundant it shouldn't affect performances too much, because it's not that common to print lot of text in the interactive interpreter and even in those cases probably performances are not so important. It would anyway be better to find another way to do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 17:36:23 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 08 Jul 2010 15:36:23 +0000 Subject: [issue7766] sys.getwindowsversion as PyStructSequence In-Reply-To: <1264276632.05.0.210165677499.issue7766@psf.upfronthosting.co.za> Message-ID: <1278603383.31.0.0760734388633.issue7766@psf.upfronthosting.co.za> Brian Curtin added the comment: The previously mentioned comments about backwards incompatibility with the number of items in the sequence are now a problem, since structseq now inherits from tuple. It seems that n_in_sequence gets ignored and we have a 9 item tuple. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 18:14:48 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 08 Jul 2010 16:14:48 +0000 Subject: [issue7846] Fnmatch cache is never cleared during usage In-Reply-To: <1265209336.56.0.865162695939.issue7846@psf.upfronthosting.co.za> Message-ID: <1278605688.68.0.105529025995.issue7846@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for working on this. I tried the py3k patch but it doesn't apply cleanly. Patch says "patch: **** malformed patch at line 57:" followed by an apparently blank line. Also, could you please generate the patches from the top level of the checkout? It makes it easier to apply patches if they all have the same starting point. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 18:25:41 2010 From: report at bugs.python.org (Demur Rumed) Date: Thu, 08 Jul 2010 16:25:41 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278606341.84.0.885316250639.issue9155@psf.upfronthosting.co.za> Demur Rumed added the comment: The seperation of COMPARE_OP into multiple opcodes shouldn't affect cache size since the opcodes are aliased. Spreading out the switch statement shouldn't cause issue from flattening, since GCC would inline the single use of cmp_outcome. Thus the only bloat is the wrapper overhead, which I believe the C code is relatively large with respect to the macros. As for DUP_TOP_TWO, that's smaller than DUP_TOPX It may be suitable to benchmark on other systems besides my own due to the subversive nature of caches; I've seen improvement in any code that uses comparisons. To consider, however, is that ceval.o dropped from 268592B to 267448B. This is reflected in that the interpreter's executable dropped from 6721842B to 6719866B Raymond, what do you mean with respect to the peepholer? I believe my changes there have shown it to be a simplification of the code ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 19:08:39 2010 From: report at bugs.python.org (Andy Buckley) Date: Thu, 08 Jul 2010 17:08:39 +0000 Subject: [issue444582] Finding programs in PATH, addition to os Message-ID: <1278608919.18.0.184939810438.issue444582@psf.upfronthosting.co.za> Andy Buckley added the comment: Personally I think it's a very useful feature: the purpose for running which may not be to get the full path to the executable and then run it, but rather that that path prefix is important for something else. I'm sure when I joined this issue I had some need like that -- after all, as you say, if you just want to run it then there are better ways. In general, once users have a need (for whatever reason) to start firing off subprocesses from their Python scripts, things can get ugly. Providing a portable path search function provides a way to keep one kind of that ugliness inside Python for the cases where it really is needed. As for abuse... well, people will always find a way to abuse bits of the library: I think that's an issue for them, rather than a reason to block this functionality ;) My $0.02, Andy ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 19:17:07 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 08 Jul 2010 17:17:07 +0000 Subject: [issue9198] Should repr() print unicode characters outside the BMP? In-Reply-To: <1278579187.34.0.662391507791.issue9198@psf.upfronthosting.co.za> Message-ID: <1278609427.26.0.886742907798.issue9198@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think if you change it stop considering non-BMP characters as printable, somebody will complain. If you change it in any other way, somebody will complain. Somebody will always complain - so you might as well leave things the way they are. Or you change it in a way that you think most users would consider useful - but don't expect consensus. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 19:22:44 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 08 Jul 2010 17:22:44 +0000 Subject: [issue8413] String interpolation doesn't work with sys.version_info In-Reply-To: <1271381290.83.0.815567007844.issue8413@psf.upfronthosting.co.za> Message-ID: <1278609764.77.0.0893414402298.issue8413@psf.upfronthosting.co.za> Brian Curtin added the comment: A side effect of this change is that it kills the ability to have a PyStructSequence which has a smaller visible size than the total number of items. For example, sys.getwindowsversion used to have 5 items in the sequence and 4 items accessible by name only (for backwards compatibility) -- now it's a 9 item tuple. ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 19:33:06 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Jul 2010 17:33:06 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278610386.43.0.120533152601.issue9155@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch fails compiling with --with-computed-gotos: Python/ceval.c: In function ?PyEval_EvalFrameEx?: Python/opcode_targets.h:101: erreur: label ?TARGET_DUP_TOPX? used but not defined make: *** [Python/ceval.o] Erreur 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 19:35:04 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Jul 2010 17:35:04 +0000 Subject: [issue9203] Use computed gotos by default In-Reply-To: <1278610504.41.0.538912852234.issue9203@psf.upfronthosting.co.za> Message-ID: <1278610504.41.0.538912852234.issue9203@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Now that the option has probably been extensively tested, it would be nice to enable computed gotos by default on systems that support them. Perhaps this needs a dedicated test in the configure script. ---------- components: Build, Interpreter Core messages: 109558 nosy: jyasskin, lemburg, loewis, pitrou priority: normal severity: normal stage: needs patch status: open title: Use computed gotos by default type: performance versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 19:54:35 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Jul 2010 17:54:35 +0000 Subject: [issue4928] Problem with tempfile.NamedTemporaryFile In-Reply-To: <1231838566.25.0.143957228078.issue4928@psf.upfronthosting.co.za> Message-ID: <1278611675.34.0.571208291146.issue4928@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, my bad. The implementation already has a __del__ method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 20:09:56 2010 From: report at bugs.python.org (Daniel Urban) Date: Thu, 08 Jul 2010 18:09:56 +0000 Subject: [issue9204] The documentation of PyType_Type in py3k mentions types.TypeType In-Reply-To: <1278612596.78.0.246474788536.issue9204@psf.upfronthosting.co.za> Message-ID: <1278612596.78.0.246474788536.issue9204@psf.upfronthosting.co.za> New submission from Daniel Urban : The documentation of PyType_Type (http://docs.python.org/dev/py3k/c-api/type.html#PyType_Type) is this: "This is the type object for type objects; it is the same object as type and types.TypeType in the Python layer." But in py3k there is no types.TypeType object. ---------- assignee: docs at python components: Documentation messages: 109560 nosy: docs at python, durban priority: normal severity: normal status: open title: The documentation of PyType_Type in py3k mentions types.TypeType versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 20:10:16 2010 From: report at bugs.python.org (Demur Rumed) Date: Thu, 08 Jul 2010 18:10:16 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278612616.34.0.778304606922.issue9155@psf.upfronthosting.co.za> Demur Rumed added the comment: Replaced TARGET_DUP_TOPX with _unknown_opcode I recompiled with --with-computed-gotos, and the results remain promising, though the interpreter instead grows from 6756023B to 6765167B ---------- Added file: http://bugs.python.org/file17903/cmpoprotdupalluny3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 20:12:29 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 18:12:29 +0000 Subject: [issue3839] wsgi.simple_server resets 'Content-Length' header on empty content even if app defined it. In-Reply-To: <1221156514.39.0.145827705782.issue3839@psf.upfronthosting.co.za> Message-ID: <1278612749.45.0.439941722718.issue3839@psf.upfronthosting.co.za> Mark Lawrence added the comment: As the patch is a one liner couldn't someone pick this up? I would have done it myself but just don't understand wsgi at all. ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 20:20:41 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 18:20:41 +0000 Subject: [issue3701] test_ntpath.test_relpath fails when launched from a different Windows drive In-Reply-To: <1219845584.1.0.97722173565.issue3701@psf.upfronthosting.co.za> Message-ID: <1278613241.5.0.751056378959.issue3701@psf.upfronthosting.co.za> Mark Lawrence added the comment: Presumably this is still valid? ---------- nosy: +BreamoreBoy, loewis versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 20:32:00 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Jul 2010 18:32:00 +0000 Subject: [issue9155] Reserve COMPARE_OP for rich comparisons In-Reply-To: <1278273241.45.0.419435390146.issue9155@psf.upfronthosting.co.za> Message-ID: <1278613920.04.0.729180088182.issue9155@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here, your patch actually show a slowdown on pybench with computed gotos. Results attached. ---------- Added file: http://bugs.python.org/file17904/pybench.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 20:35:19 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 18:35:19 +0000 Subject: [issue4044] test_output_textcalendar fails on non-englisch locale In-Reply-To: <1223209182.04.0.559787210329.issue4044@psf.upfronthosting.co.za> Message-ID: <1278614119.46.0.584898347296.issue4044@psf.upfronthosting.co.za> Mark Lawrence added the comment: It would be a lot of work to fix this as the month names are hardcoded in English in test_calendar.py ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 20:45:47 2010 From: report at bugs.python.org (Eric Smith) Date: Thu, 08 Jul 2010 18:45:47 +0000 Subject: [issue9202] Update platform.win32_ver() to account for change to #8413 In-Reply-To: <1278600772.14.0.212036343969.issue9202@psf.upfronthosting.co.za> Message-ID: <1278614747.21.0.376046469511.issue9202@psf.upfronthosting.co.za> Eric Smith added the comment: Surely we don't want to find every place that uses structseq and fix them. This will no doubt break user code as well. I think we'll need to fix structseq to somehow have its old behavior. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 20:54:45 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Jul 2010 18:54:45 +0000 Subject: [issue8605] test_gdb can fail with compiler opts In-Reply-To: <1272903293.59.0.249639149559.issue8605@psf.upfronthosting.co.za> Message-ID: <1278615285.12.0.515017649539.issue8605@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Patch committed in 82647 (3.2) and 82648 (2.7). Thanks! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:01:34 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 08 Jul 2010 19:01:34 +0000 Subject: [issue8482] test_gdb, gdb/libpython.py: Unable to read information on python frame In-Reply-To: <1271844769.16.0.663071395235.issue8482@psf.upfronthosting.co.za> Message-ID: <1278615694.19.0.446316507479.issue8482@psf.upfronthosting.co.za> Dave Malcolm added the comment: > test_gdb fails (Unable to read information on python frame) on my i386 > computer (32 bits) with -O1 (but it doesn't with -O0). I'm using Debian > Sid: gcc 4.4.3 and gdb 7.1. This should be fixed now that issue 8605 is resolved: we now skip test_gdb if the compiler optimization level is above -O0 ---------- resolution: -> fixed stage: needs patch -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:02:00 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Jul 2010 19:02:00 +0000 Subject: [issue9188] test_gdb fails for UCS2 builds with UCS2 gdb In-Reply-To: <1278508669.56.0.292835810608.issue9188@psf.upfronthosting.co.za> Message-ID: <1278615720.49.0.0357897658458.issue9188@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch works ok on 2.7 but fails to apply on 3.2. Can you provide a 3.2 patch as well? Also, instead of `sys.maxunicode == 0x10ffff`, it would be better to use something more future-proof such as `sys.maxunicode >= 0x10000`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:02:20 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 08 Jul 2010 19:02:20 +0000 Subject: [issue3701] test_ntpath.test_relpath fails when launched from a different Windows drive In-Reply-To: <1219845584.1.0.97722173565.issue3701@psf.upfronthosting.co.za> Message-ID: <1278615740.3.0.286155282459.issue3701@psf.upfronthosting.co.za> Brian Curtin added the comment: This is only an issue on release31-maint. py3k and release27-maint passed this test when I ran from H:\ with my source on C:\. ---------- nosy: +brian.curtin stage: -> needs patch versions: -Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:02:48 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 08 Jul 2010 19:02:48 +0000 Subject: [issue9163] test_gdb fails In-Reply-To: <1278314862.38.0.121904956787.issue9163@psf.upfronthosting.co.za> Message-ID: <1278615768.86.0.757096399493.issue9163@psf.upfronthosting.co.za> Dave Malcolm added the comment: This should be fixed now that issue 8605 is resolved: we now skip test_gdb if the compiler optimization level is above -O0 ---------- resolution: -> fixed stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:04:01 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 08 Jul 2010 19:04:01 +0000 Subject: [issue9163] test_gdb fails In-Reply-To: <1278314862.38.0.121904956787.issue9163@psf.upfronthosting.co.za> Message-ID: <1278615841.51.0.675283839022.issue9163@psf.upfronthosting.co.za> Changes by Dave Malcolm : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:04:12 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 08 Jul 2010 19:04:12 +0000 Subject: [issue8482] test_gdb, gdb/libpython.py: Unable to read information on python frame In-Reply-To: <1271844769.16.0.663071395235.issue8482@psf.upfronthosting.co.za> Message-ID: <1278615852.07.0.511073706498.issue8482@psf.upfronthosting.co.za> Changes by Dave Malcolm : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:05:36 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 19:05:36 +0000 Subject: [issue4045] test_mboxmmdf_to_maildir fails on non-englisch locale In-Reply-To: <1223210018.98.0.954404111319.issue4045@psf.upfronthosting.co.za> Message-ID: <1278615936.57.0.0150191058382.issue4045@psf.upfronthosting.co.za> Mark Lawrence added the comment: I can't reproduce this on Windows Vista despite setting the system locale to Dutch. Is the problem Mac OSx specific? ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:20:48 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 19:20:48 +0000 Subject: [issue4184] Remove use of private attributes in smtpd In-Reply-To: <1224724634.09.0.0444621109477.issue4184@psf.upfronthosting.co.za> Message-ID: <1278616848.66.0.586486366586.issue4184@psf.upfronthosting.co.za> Mark Lawrence added the comment: Would this patch be acceptable, yes or no? ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:26:07 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 19:26:07 +0000 Subject: [issue4297] Add error_log attribute to optparse.OptionParser In-Reply-To: <1226413379.99.0.188665223227.issue4297@psf.upfronthosting.co.za> Message-ID: <1278617167.34.0.0641550122295.issue4297@psf.upfronthosting.co.za> Mark Lawrence added the comment: To move this forward would need patches against py3k, assuming that the original patch is agreed upon in principle. ---------- nosy: +BreamoreBoy versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:28:02 2010 From: report at bugs.python.org (Greg Brockman) Date: Thu, 08 Jul 2010 19:28:02 +0000 Subject: [issue4106] multiprocessing occasionally spits out exception during shutdown In-Reply-To: <1223695822.85.0.145044917765.issue4106@psf.upfronthosting.co.za> Message-ID: <1278617282.68.0.992505687561.issue4106@psf.upfronthosting.co.za> Greg Brockman added the comment: For what it's worth, I think I have a simpler reproducer of this issue. Using freshly-compiled python-from-trunk (as well as multiprocessing-from-trunk), I get tracebacks from the following about 30% of the time: """ import multiprocessing, time def foo(x): time.sleep(3) multiprocessing.Pool(1).apply(foo, [1]) """ My tracebacks are of the form: """ Exception in thread Thread-1 (most likely raised during interpreter shutdown): Traceback (most recent call last): File "/usr/local/lib/python2.7/threading.py", line 530, in __bootstrap_inner File "/usr/local/lib/python2.7/threading.py", line 483, in run File "/usr/local/lib/python2.7/multiprocessing/pool.py", line 272, in _handle_workers : 'NoneType' object is not callable """ ---------- nosy: +gdb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:31:21 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 19:31:21 +0000 Subject: [issue4304] build mode which fails for build failures in extensions In-Reply-To: <1226482481.6.0.943122034161.issue4304@psf.upfronthosting.co.za> Message-ID: <1278617481.24.0.404355923712.issue4304@psf.upfronthosting.co.za> Mark Lawrence added the comment: Would someone with knowledge of the buildbots like to comment please. ---------- keywords: +buildbot nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:33:05 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 08 Jul 2010 19:33:05 +0000 Subject: [issue8413] String interpolation doesn't work with sys.version_info In-Reply-To: <1271381290.83.0.815567007844.issue8413@psf.upfronthosting.co.za> Message-ID: <1278617585.26.0.490780546624.issue8413@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > A side effect of this change is that it kills the ability to have a > PyStructSequence which has a smaller visible size than the total > number of items. Hmm. I was looking for this precise issue when I was reviewing the code and it appeared right to me. I know, I should have tested instead. This should be easy to fix, though. I'll look into it now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:35:09 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Jul 2010 19:35:09 +0000 Subject: [issue3155] Python should expose a pthread_cond_timedwait API for threading In-Reply-To: <1214004207.53.0.484694251636.issue3155@psf.upfronthosting.co.za> Message-ID: <1278617709.21.0.907310206046.issue3155@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I hadn't seen this issue existed. This has been done in r80071 (see issue #7316). ---------- nosy: +pitrou resolution: -> out of date status: open -> closed superseder: -> Add a timeout functionality to common locking operations _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:40:59 2010 From: report at bugs.python.org (Jesse Noller) Date: Thu, 08 Jul 2010 19:40:59 +0000 Subject: [issue4106] multiprocessing occasionally spits out exception during shutdown In-Reply-To: <1223695822.85.0.145044917765.issue4106@psf.upfronthosting.co.za> Message-ID: <1278618059.25.0.50349930732.issue4106@psf.upfronthosting.co.za> Jesse Noller added the comment: Greg - what platform? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:43:59 2010 From: report at bugs.python.org (Greg Brockman) Date: Thu, 08 Jul 2010 19:43:59 +0000 Subject: [issue4106] multiprocessing occasionally spits out exception during shutdown In-Reply-To: <1223695822.85.0.145044917765.issue4106@psf.upfronthosting.co.za> Message-ID: <1278618239.5.0.478296499341.issue4106@psf.upfronthosting.co.za> Greg Brockman added the comment: I'm on Ubuntu 10.04, 64 bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:45:28 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 08 Jul 2010 19:45:28 +0000 Subject: [issue9202] Update platform.win32_ver() to account for change to #8413 In-Reply-To: <1278600772.14.0.212036343969.issue9202@psf.upfronthosting.co.za> Message-ID: <1278618328.65.0.53122420225.issue9202@psf.upfronthosting.co.za> Brian Curtin added the comment: Agreed. This started out as a knee-jerk reaction to regrtest not working, but the problem is deeper. Closing this. The structseq stuff is being dealt with elsewhere. ---------- resolution: -> rejected stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:47:24 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 08 Jul 2010 19:47:24 +0000 Subject: [issue4184] Remove use of private attributes in smtpd In-Reply-To: <1224724634.09.0.0444621109477.issue4184@psf.upfronthosting.co.za> Message-ID: <1278618444.69.0.699488300255.issue4184@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: The patch as-is can't be accepted if not for Python 4.x maybe, obviously because it's just too breaking. A proper patch would provide aliases for the removed attributes and raise a DeprecationWarning in case they are accessed. It would be suitable for the the next major release (3.2 at the current time) and the total removal of the deprecated attributes would happen only in 3.3 if not later. Also, I see no reason in turning public attributes like self.__line, self.__state and self.__greeting. They should just be private (one underscore) and their name kept the same (e.g. no __server -> smtp_server, __greeting -> seen_greting, etc...). Finally, tests should definitively be written. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:48:27 2010 From: report at bugs.python.org (Erik Demaine) Date: Thu, 08 Jul 2010 19:48:27 +0000 Subject: [issue444582] Finding programs in PATH, addition to os Message-ID: <1278618507.68.0.0047697707657.issue444582@psf.upfronthosting.co.za> Erik Demaine added the comment: As mentioned in the original request, there are at least two motivations for "which" functionality that are distinct from running the program (these days, with the subprocess module). #1 was detecting existence of a program. #2 was finding the *second* instance of a program on the path. After 9 years, I'm certainly not holding my breath... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:48:59 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 08 Jul 2010 19:48:59 +0000 Subject: [issue4184] Remove use of private attributes in smtpd In-Reply-To: <1224724634.09.0.0444621109477.issue4184@psf.upfronthosting.co.za> Message-ID: <1278618539.67.0.590334009409.issue4184@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- versions: -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 21:50:53 2010 From: report at bugs.python.org (Jesse Noller) Date: Thu, 08 Jul 2010 19:50:53 +0000 Subject: [issue4106] multiprocessing occasionally spits out exception during shutdown In-Reply-To: <1223695822.85.0.145044917765.issue4106@psf.upfronthosting.co.za> Message-ID: <1278618653.7.0.723089665429.issue4106@psf.upfronthosting.co.za> Jesse Noller added the comment: Greg - this is actually a different exception then the original bug report; could you please file a new issue with the information you've provided? I'm going to need to find a 64bit ubuntu box as I don't have one right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:00:51 2010 From: report at bugs.python.org (Greg Brockman) Date: Thu, 08 Jul 2010 20:00:51 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> New submission from Greg Brockman : I have recently begun using multiprocessing for a variety of batch jobs. It's a great library, and it's been quite useful. However, I have been bitten several times by situations where a worker process in a Pool will unexpectedly die, leaving multiprocessing hanging in a wait. A simple example of this is produced by the following: """ #!/usr/bin/env python import multiprocessing, sys def foo(x): sys.exit(1) multiprocessing.Pool(1).apply(foo, [1]) """ The child will exit and the parent will hang forever. A similar occurrence happens if one pushes C-c while a child process is running (this special case is noted in http://bugs.python.org/issue8296) or killed by a signal. Attached is a patch to handle unexpected terminations of children processes and prevent the parent process from hanging. A test case is included. (Developed and tested on 64-bit Ubuntu.) Please let me know what you think. Thanks! ---------- components: Library (Lib) files: termination.patch keywords: patch messages: 109585 nosy: gdb priority: normal severity: normal status: open title: Parent process hanging in multiprocessing if children terminate unexpectedly type: behavior versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file17905/termination.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:01:48 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 08 Jul 2010 20:01:48 +0000 Subject: [issue9206] os.stat() is broken In-Reply-To: <1278619308.76.0.418560838526.issue9206@psf.upfronthosting.co.za> Message-ID: <1278619308.76.0.418560838526.issue9206@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Most likely the same underlying problem as in issue 9202, but can be seen on a non-windows platform. >>> from os import * >>> stat('/') Traceback (most recent call last): File "", line 1, in SystemError: NULL result without error in PyObject_Call With attached patch, the error message is clearer: >>> stat('.') Traceback (most recent call last): File "", line 1, in ValueError: In structseq_repr() member 15 name is NULL ---------- assignee: belopolsky messages: 109586 nosy: belopolsky priority: high severity: normal stage: unit test needed status: open title: os.stat() is broken type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:02:34 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 08 Jul 2010 20:02:34 +0000 Subject: [issue9206] os.stat() is broken In-Reply-To: <1278619308.76.0.418560838526.issue9206@psf.upfronthosting.co.za> Message-ID: <1278619354.23.0.896648952934.issue9206@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- keywords: +patch Added file: http://bugs.python.org/file17906/issue9206.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:03:34 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 08 Jul 2010 20:03:34 +0000 Subject: [issue9206] os.stat() is broken In-Reply-To: <1278619308.76.0.418560838526.issue9206@psf.upfronthosting.co.za> Message-ID: <1278619414.05.0.571401324669.issue9206@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +benjamin.peterson, brian.curtin, eric.smith Added file: http://bugs.python.org/file17907/issue9206.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:03:47 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 08 Jul 2010 20:03:47 +0000 Subject: [issue9206] os.stat() is broken In-Reply-To: <1278619308.76.0.418560838526.issue9206@psf.upfronthosting.co.za> Message-ID: <1278619427.64.0.56064560816.issue9206@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17907/issue9206.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:03:51 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 08 Jul 2010 20:03:51 +0000 Subject: [issue444582] Finding programs in PATH, addition to os In-Reply-To: <1278618507.68.0.0047697707657.issue444582@psf.upfronthosting.co.za> Message-ID: <4C362F25.3040608@netwok.org> ?ric Araujo added the comment: I apologize for not reading the first post more carefully, thank you for restating the use cases. I?m +1 now and I?ll review the patches to make it up :) Bugs may take years to get fixed. Now that Tarek has expressed interest, be sure that this won?t get lost again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:05:33 2010 From: report at bugs.python.org (Greg Brockman) Date: Thu, 08 Jul 2010 20:05:33 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> New submission from Greg Brockman : On Ubuntu 10.04, using freshly-compiled python-from-trunk (as well as multiprocessing-from-trunk), I get tracebacks from the following about 30% of the time: """ import multiprocessing, time def foo(x): time.sleep(3) multiprocessing.Pool(1).apply(foo, [1]) """ My tracebacks are of the form: """ Exception in thread Thread-1 (most likely raised during interpreter shutdown): Traceback (most recent call last): File "/usr/local/lib/python2.7/threading.py", line 530, in __bootstrap_inner File "/usr/local/lib/python2.7/threading.py", line 483, in run File "/usr/local/lib/python2.7/multiprocessing/pool.py", line 272, in _handle_workers : 'NoneType' object is not callable """ This information was originally posted to http://bugs.python.org/issue4106. ---------- components: Library (Lib) messages: 109588 nosy: gdb priority: normal severity: normal status: open title: multiprocessing occasionally spits out exception during shutdown type: behavior versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:05:37 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 08 Jul 2010 20:05:37 +0000 Subject: [issue444582] Finding programs in PATH, adding shutil.which Message-ID: <1278619537.34.0.494001146276.issue444582@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> accepted title: Finding programs in PATH, addition to os -> Finding programs in PATH, adding shutil.which versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:08:31 2010 From: report at bugs.python.org (Greg Brockman) Date: Thu, 08 Jul 2010 20:08:31 +0000 Subject: [issue4106] multiprocessing occasionally spits out exception during shutdown In-Reply-To: <1223695822.85.0.145044917765.issue4106@psf.upfronthosting.co.za> Message-ID: <1278619711.75.0.993831488053.issue4106@psf.upfronthosting.co.za> Greg Brockman added the comment: Sure thing. See http://bugs.python.org/issue9207. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:19:41 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 20:19:41 +0000 Subject: [issue4028] Problem compiling the multiprocessing module on sunos5 In-Reply-To: <1223039660.71.0.470025758339.issue4028@psf.upfronthosting.co.za> Message-ID: <1278620381.51.0.406706349981.issue4028@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is this still an issue with more recent versions of Python? ---------- components: +Build -Extension Modules nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:26:30 2010 From: report at bugs.python.org (Jesse Noller) Date: Thu, 08 Jul 2010 20:26:30 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278620790.41.0.476447749353.issue9207@psf.upfronthosting.co.za> Jesse Noller added the comment: Thanks greg; so this affects 2.6 as well (not using the backport at all) ---------- assignee: -> jnoller nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:29:20 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 20:29:20 +0000 Subject: [issue4112] Subprocess: Popen'ed children hang due to open pipes In-Reply-To: <1223894179.31.0.303015562598.issue4112@psf.upfronthosting.co.za> Message-ID: <1278620960.79.0.652424778384.issue4112@psf.upfronthosting.co.za> Mark Lawrence added the comment: Would someone with knowledge of subprocess please comment on this. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:30:27 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 08 Jul 2010 20:30:27 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1278621027.6.0.125418932986.issue7900@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I got some time and did an experiment to deduce how multiple groups behave. This comment is rather long, a very short summary of the results is that OSX behaves oddly. What I did: * This is on OSX 10.6 * Create 18 groups named group1 to group18 * Create a user testuser that is a member of those groups: $ id testuser uid=504(testuser) gid=20(staff) groups=20(staff),514(group10),512(group8),513(group9),511(group7),515(group11),520(group16),516(group12),507(group3),517(group13),61(localaccounts),12(everyone),509(group5),505(group1),518(group14),510(group6),508(group4),521(group17),506(group2),402(com.apple.sharepoint.group.1),519(group15),522(group18) The user is actually a member of over 18 groups, it is a member of a number of system groups as well (but note: not the admin group) * Create 18 files named 1 to 18, echo is owned by the group with the same number, contains its sequence number ('1' in 'group1') and has mode '0060': $ ls -l total 144 ----rw---- 1 ronald group1 2 Jul 8 21:56 1 ----rw---- 1 ronald group10 3 Jul 8 21:56 10 ----rw---- 1 ronald group11 3 Jul 8 21:56 11 ----rw---- 1 ronald group12 3 Jul 8 21:56 12 ----rw---- 1 ronald group13 3 Jul 8 21:56 13 ----rw---- 1 ronald group14 3 Jul 8 21:56 14 ----rw---- 1 ronald group15 3 Jul 8 21:56 15 ----rw---- 1 ronald group16 3 Jul 8 21:56 16 ----rw---- 1 ronald group17 3 Jul 8 21:56 17 ----rw---- 1 ronald group18 3 Jul 8 21:56 18 ----rw---- 1 ronald group2 2 Jul 8 21:56 2 ----rw---- 1 ronald group3 2 Jul 8 21:56 3 ----rw---- 1 ronald group4 2 Jul 8 21:56 4 ----rw---- 1 ronald group5 2 Jul 8 21:56 5 ----rw---- 1 ronald group6 2 Jul 8 21:56 6 ----rw---- 1 ronald group7 2 Jul 8 21:56 7 ----rw---- 1 ronald group8 2 Jul 8 21:56 8 ----rw---- 1 ronald group9 2 Jul 8 21:56 9 * Log in as that user, I used fast user switching for that * The user can read all files, that which means that the user is a member of all 18 groups as far as filesystem access is concerned * My own account is not a member of the 18 groups and can not read the files (tested just in case access control is totally broken) * Removing testuser from a group has no effect for running processes, but does affect new Terminal windows. This is different than what I had expected, I expected that the new window would have the same permissions as the already opened one. * I also added a new group (group19) and made testuser a member of that group. Using the same technique as before I observed that a shell in a new Terminal window had group19 in its effective group list. According to an engineer I had an e-mail conversation with this behaviour is intentional, which is why they patched /usr/bin/python in OSX 10.6 to use the new getgroups implementation. IMO for most users the new getgroups (the one you get when _DARWIN_C_SOURCE is defined) more closely matches system behavior (that is, it returns the effective group list for regular processes). The only users that will see the odd behavior w.r.t. os.setgroups are those running scripts as root that use both os.setgroups and os.getgroups. Note that explicitly setting the effective uid and gid of processes is somewhat frowned upon by Apple, they'd prefer if all daemon processes where started using launchd and used launchd to start them using the correct permissions. A tool like ssh should use initgroup to initialize the effective group list, and that will do the right thing (which appearently is the odd behaviour I saw in new Terminal sessions). I therefore propose to both keep _DARWIN_C_SOURCE and enhance the posix.getgroups implementation to deal with the fact that getgroups(3) may return more groups than we'd expect. An earlier comment noted that such code might even be useful on Linux where MAX_GROUPS is 2**16 and the current implementation therefore uses a mostly unnecessarily large buffer on the stack, which may cause stack overflows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:32:18 2010 From: report at bugs.python.org (Jesse Noller) Date: Thu, 08 Jul 2010 20:32:18 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278621138.99.0.392571113931.issue9207@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- title: multiprocessing occasionally spits out exception during shutdown -> multiprocessing occasionally spits out exception during shutdown (_handle_workers) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:33:04 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 08 Jul 2010 20:33:04 +0000 Subject: [issue8946] PyBuffer_Release signature in 3.1 documentation is incorrect In-Reply-To: <1276028746.19.0.698782351102.issue8946@psf.upfronthosting.co.za> Message-ID: <1278621184.54.0.046166589819.issue8946@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: The documentation issue appears present in 2.7 (and 2.6). Further, the Py_buffer member 'obj' is undocumented, and the in-line comment in object.h falsely states that it is a "borrowed" reference, whereas PyBuffer_Release() Py_XDECREFs it and clears it. Thus, it is also safe to call PyBuffer_Release() more than once, something that can be useful for certain error scenarios. PEP 3118 also has not been updated to reflect the above. ---------- nosy: +krisvale _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:34:17 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 08 Jul 2010 20:34:17 +0000 Subject: [issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X In-Reply-To: <1278323219.73.0.148043211343.issue9164@psf.upfronthosting.co.za> Message-ID: <1278621257.43.0.7700689701.issue9164@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Jyrki: could you please explain how you build Python to get the behavior you're seeing? The most important bit: what is the exact command-line that is used to run the configure script, and what is the contents of the environment while doing that. I'm adding 3.2 to the version list because that uses the same code. I'll apply the patch soon, but would prefer to know how to correctly reproduce the issue before doing so. ---------- versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:34:19 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 20:34:19 +0000 Subject: [issue4179] pdb: Allow the "list" command to return to the currently debugged line In-Reply-To: <1224709654.06.0.420157536807.issue4179@psf.upfronthosting.co.za> Message-ID: <1278621259.87.0.654479510411.issue4179@psf.upfronthosting.co.za> Mark Lawrence added the comment: Even if the patch is acceptable it would need to be updated for Python 3.2. ---------- nosy: +BreamoreBoy versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:39:00 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 08 Jul 2010 20:39:00 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1278621027.6.0.125418932986.issue7900@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Thu, Jul 8, 2010 at 4:30 PM, Ronald Oussoren wrote: .. > Note that explicitly setting the effective uid and gid of processes is somewhat frowned upon by Apple, they'd prefer if all daemon processes where started using launchd and used launchd to start them using the correct permissions. A tool like ssh should use initgroup to initialize the effective group list, and that will do the right thing (which appearently is the odd behaviour I saw in new Terminal sessions). IIRC, the tests for initgroup in one of my patches also break with _DARWIN_C_SOURCE on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:42:52 2010 From: report at bugs.python.org (Greg Brockman) Date: Thu, 08 Jul 2010 20:42:52 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278621772.48.0.150952011961.issue9207@psf.upfronthosting.co.za> Greg Brockman added the comment: That's likely a mistake on my part. I'm not observing this using the stock version of multiprocessing on my Ubuntu machine(after running O(100) times). I do, however, observe it when using either python2.7 or python2.6 with multiprocessing-from-trunk, if that's interesting. I'm not really sure what the convention is here; should this be filed just under Python 2.7? Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:52:13 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 08 Jul 2010 20:52:13 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1278622333.99.0.917083890955.issue7900@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Your test might expect different behaviour than what OSX actually does (this is an annoying limitation of unittests for wrappers of system behaviour, you'll implicitly test system behaviour as well as the wreappers themselves) The behaviour w.r.t. secondairy groups is rather different than what I'd expect on a Unix system. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:57:55 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 20:57:55 +0000 Subject: [issue4499] redefinition of TILDE macro on AIX platform In-Reply-To: <1228258808.76.0.068417078821.issue4499@psf.upfronthosting.co.za> Message-ID: <1278622675.53.0.732133926285.issue4499@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is this still a problem or can the issue be closed? ---------- components: +Build -None nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 22:58:17 2010 From: report at bugs.python.org (Jesse Noller) Date: Thu, 08 Jul 2010 20:58:17 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278622697.23.0.196799559911.issue9207@psf.upfronthosting.co.za> Jesse Noller added the comment: Oh, you mean the backport from google code? The person who stepped up to maintain that has not refreshed that in some time. I need to decide what to do with it long term. I'm pretty sure it's badly out of date. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 23:03:18 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 21:03:18 +0000 Subject: [issue4802] detect_tkinter for cygwin In-Reply-To: <1230840510.49.0.878061128691.issue4802@psf.upfronthosting.co.za> Message-ID: <1278622998.56.0.25822309986.issue4802@psf.upfronthosting.co.za> Mark Lawrence added the comment: This is a one line patch against setup.py, can someone with cygwin please try it. ---------- nosy: +BreamoreBoy stage: -> patch review type: -> feature request versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 23:06:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 08 Jul 2010 21:06:59 +0000 Subject: [issue9206] repr(os.stat(..)) is broken by the structseq change In-Reply-To: <1278619308.76.0.418560838526.issue9206@psf.upfronthosting.co.za> Message-ID: <1278623219.03.0.589871689227.issue9206@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Attached patch, issue9206a.diff seems to fix the os.stat() issue. Brian, can you check if it fixes issue 9202 as well? I planned to finish some other stuff tonight, so I am reassigning this to Benjamin. ---------- assignee: belopolsky -> benjamin.peterson components: +Interpreter Core title: os.stat() is broken -> repr(os.stat(..)) is broken by the structseq change Added file: http://bugs.python.org/file17908/issue9206a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 23:09:06 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 21:09:06 +0000 Subject: [issue4813] On OS-X the directories searched by setup.py for Tk are in the wrong order. In-Reply-To: <1230940206.74.0.201449731913.issue4813@psf.upfronthosting.co.za> Message-ID: <1278623346.76.0.148693684152.issue4813@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've no idea whether this is still a problem. ---------- nosy: +BreamoreBoy, ronaldoussoren stage: -> needs patch versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 23:09:51 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 08 Jul 2010 21:09:51 +0000 Subject: [issue9203] Use computed gotos by default In-Reply-To: <1278610504.41.0.538912852234.issue9203@psf.upfronthosting.co.za> Message-ID: <4C363E9A.8090407@egenix.com> Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > New submission from Antoine Pitrou : > > Now that the option has probably been extensively tested, it would be nice to enable computed gotos by default on systems that support them. > Perhaps this needs a dedicated test in the configure script. I doubt that it has been tested enough, but enabling it for those platform/compiler where we know it works, should be fine. Have you tried testing this using the buildbots ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 23:17:05 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 21:17:05 +0000 Subject: [issue4851] xml.dom.minidom.Element.cloneNode fails with AttributeError In-Reply-To: <1231192810.66.0.263343969898.issue4851@psf.upfronthosting.co.za> Message-ID: <1278623825.9.0.470241694971.issue4851@psf.upfronthosting.co.za> Mark Lawrence added the comment: Has this simply slipped under the radar? ---------- nosy: +BreamoreBoy, loewis stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 23:18:16 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 08 Jul 2010 21:18:16 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1278622333.99.0.917083890955.issue7900@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: This whole thing is a mess. Great analysis, by the way. I started a similar experiment some time ago, but gave up when I discovered that a member of the admin group can read any file regardless of permissions settings. Your solution is probably the best we can do for 2.7, but for 3.x I still believe it is better to add os.getgrouplist and document that on OSX users should use it in preference of os.getgroups. (A better explanation of the difference between the two will probably be even better.) On Thu, Jul 8, 2010 at 4:52 PM, Ronald Oussoren wrote: .. > The behaviour w.r.t. secondairy groups is rather different than what I'd expect on a Unix system. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 23:19:13 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 08 Jul 2010 21:19:13 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1278623953.81.0.698824175109.issue7900@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: s/2.7/2.7.1/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 23:20:54 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 08 Jul 2010 21:20:54 +0000 Subject: [issue9203] Use computed gotos by default In-Reply-To: <4C363E9A.8090407@egenix.com> Message-ID: <4C364132.8070806@egenix.com> Marc-Andre Lemburg added the comment: Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > Antoine Pitrou wrote: >> >> New submission from Antoine Pitrou : >> >> Now that the option has probably been extensively tested, it would be nice to enable computed gotos by default on systems that support them. >> Perhaps this needs a dedicated test in the configure script. > > I doubt that it has been tested enough, but enabling it > for those platform/compiler where we know it works, should be > fine. Here's a compiler/platform combination where it should not be used per default: gcc 4.4.2 on AMD processors ... http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42621 The fix will go into gcc 4.5, the report doesn't say whether it was also backported to 4.4.x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 23:21:25 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 21:21:25 +0000 Subject: [issue4877] xml.parsers.expat ParseFile() causes segmentation fault when passed a closed file object In-Reply-To: <1231390876.07.0.554090447949.issue4877@psf.upfronthosting.co.za> Message-ID: <1278624085.37.0.508441265206.issue4877@psf.upfronthosting.co.za> Mark Lawrence added the comment: It seems that this is ok in py3k in which case it could be backported to 2.7, or has this already been done? ---------- nosy: +BreamoreBoy, loewis versions: +Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 23:27:20 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 21:27:20 +0000 Subject: [issue4878] post installer script's message is not shown to user with bdist_wininst In-Reply-To: <1231407894.66.0.157123159421.issue4878@psf.upfronthosting.co.za> Message-ID: <1278624440.64.0.732989099887.issue4878@psf.upfronthosting.co.za> Mark Lawrence added the comment: I just hope I've got this right. :) ---------- assignee: -> tarek nosy: +BreamoreBoy, tarek versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 23:28:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Jul 2010 21:28:47 +0000 Subject: [issue9203] Use computed gotos by default In-Reply-To: <4C364132.8070806@egenix.com> Message-ID: <1278624522.3235.38.camel@localhost.localdomain> Antoine Pitrou added the comment: > gcc 4.4.2 on AMD processors ... > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42621 So? Compilers have all kinds of optimization bugs, it's not our job to have a compiler matrix with optimal flags per compiler. (well, you can of course maintain such a matrix if you want) For the record, I had an Athlon 64 machine until very recently, used it with gcc 4.4.x and computed gotos were better than without. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 23:31:30 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 08 Jul 2010 21:31:30 +0000 Subject: [issue9136] RuntimeError when profiling Decimal In-Reply-To: <1277936303.13.0.879921120175.issue9136@psf.upfronthosting.co.za> Message-ID: <1278624690.85.0.375953620086.issue9136@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in revisions r82654 through r82657. Thanks everyone for the input. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 23:31:57 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 21:31:57 +0000 Subject: [issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked In-Reply-To: <1231803037.62.0.52390349364.issue4926@psf.upfronthosting.co.za> Message-ID: <1278624717.82.0.438150287228.issue4926@psf.upfronthosting.co.za> Mark Lawrence added the comment: As patches were originally provided would someone kindly review them. ---------- nosy: +BreamoreBoy, loewis stage: -> patch review versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 23:33:18 2010 From: report at bugs.python.org (Greg Brockman) Date: Thu, 08 Jul 2010 21:33:18 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278624798.06.0.502644578989.issue9207@psf.upfronthosting.co.za> Greg Brockman added the comment: No, I'm not using the Google code backport. To be clear, I've tried testing this with two versions of multiprocessing: - multiprocessing-from-trunk (r82645): I get these exceptions with ~40% frequency - multiprocessing from Ubuntu 10.04 (version 0.70a1): No such exceptions observed Out of curiosity, I did just try this with the processing library (version 0.52) on a 64-bit Debian Lenny box, and did not observe these exceptions. Hope that's useful! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 8 23:43:20 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 08 Jul 2010 21:43:20 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1278625400.71.0.489716844613.issue1578269@psf.upfronthosting.co.za> Brian Curtin added the comment: Committed in r82659. I'm leaving this open until a few other issues are fleshed out. 1. Document privilege escalation and/or expose some method to do so. 2. Test execution, e.g., buildbots Once I get a few more things off my plate I should be able to finish setting up #2, the buildbot slave I've got almost up and running. I'd like to safely set it up so that this can be tested there, as none of the other buildbots are likely to run any of these tests. ---------- resolution: -> fixed stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:04:47 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 08 Jul 2010 22:04:47 +0000 Subject: [issue9198] Should repr() print unicode characters outside the BMP? In-Reply-To: <1278579187.34.0.662391507791.issue9198@psf.upfronthosting.co.za> Message-ID: <1278626687.5.0.550059895432.issue9198@psf.upfronthosting.co.za> STINNER Victor added the comment: amaury> Should repr() print unicode characters outside the BMP? Yes. I don't understand why characters outside the BMP will be considered differently than other characters. Is it a workaround for bogus operating systems? My Linux terminal (Konsole on KDE) is able to display Ugaritic characters (range starting at U+10383). amaury> it may be better to define "printable" based on the amaury> sys.stdout/sys.stderr encoding You can not do that: stdout and stderr encoding might be different, stdout and stderr errors are different, and repr() output is not always written to stdout or stderr. If you write repr() output to a file, you have to know the encoding of the file. How can I get the encoding? If sys.stdout is replaced by a io.StringIO() object (eg. doctests), you don't have any "encoding" (StringIO only manipulate unicode objects, no bytes objects). ezio> I want to change only the behavior of the interactive interpreter This idea was rejected by the PEP. I agree with "may add confusion of the kind "it works in interactive mode but not when redirecting to a file". I already noticed such problem: the interactive interpreter adds '' to sys.path, and so import behaves differently in the interpreter than a script. It's annoying because it took me hours to understand why it was different. ezio> and only when the string sent to stdout is not encodable Which means setting sys.stdout.errors to something else than strict. I prefer to detect unicode problems earlier. Eg. if you set errors to 'replace', write will never fail. If the output is used as input for another program (UNIX pipe), you will send "?" to the reader process. I'm not sure that it is the expected behaviour. And if stdout is not a TTY, stdout uses ASCII encoding (which will raise an unicode errors at the first non ASCII character!). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:10:05 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 08 Jul 2010 22:10:05 +0000 Subject: [issue9203] Use computed gotos by default In-Reply-To: <1278624522.3235.38.camel@localhost.localdomain> Message-ID: <4C364CAE.9000408@egenix.com> Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> gcc 4.4.2 on AMD processors ... >> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42621 > > So? Compilers have all kinds of optimization bugs, it's not our job to > have a compiler matrix with optimal flags per compiler. No, but we do need to make sure that the casual user does not run into such issues by using the default compiler on a typical Unix system with Python default settings. An expert user can always use the right compiler... but then an expert can also use the configure option :-) gcc 4.4.2 is not exactly an old version of gcc. The perspective of (apparently) not having the patch in in Ubuntu 10.4 LTS's default compiler suggests that we do need be more careful about enabling the switch per default. > (well, you can of course maintain such a matrix if you want) > > For the record, I had an Athlon 64 machine until very recently, used it > with gcc 4.4.x and computed gotos were better than without. Perhaps someone can report whether this affects Ubuntu 10.4 LTS ?! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:13:03 2010 From: report at bugs.python.org (Richard Jones) Date: Thu, 08 Jul 2010 22:13:03 +0000 Subject: [issue4184] Remove use of private attributes in smtpd In-Reply-To: <1224724634.09.0.0444621109477.issue4184@psf.upfronthosting.co.za> Message-ID: <1278627183.97.0.296412892534.issue4184@psf.upfronthosting.co.za> Richard Jones added the comment: Giampaolo, I think I can see where you're coming from: assuming that someone else must have also had to resort to the name-mangling hack to extend the class? In that case yes, my patch would break their code. I'll look at re-working it to use properties while retaining the underlying attributes. Would that be acceptable? What additional tests would you deem necessary? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:16:02 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 08 Jul 2010 22:16:02 +0000 Subject: [issue9198] Should repr() print unicode characters outside the BMP? In-Reply-To: <1278579187.34.0.662391507791.issue9198@psf.upfronthosting.co.za> Message-ID: <1278627362.86.0.0248833902364.issue9198@psf.upfronthosting.co.za> Ezio Melotti added the comment: I suggest to: 1) keep the current behavior for non-BMP chars (i.e. print them normally); 2) change isprintable to consider the Zx categories printable (this will affect repr() too); 3) change displayhook (*NOT* sys.stdout.encoding) to use backslashreplace when the string contains chars that are not encodable with sys.stdout.encoding *. * note that this will affect only the objects that are converted with repr() in the interpreter e.g. ">>> x = 'foo'; x" and *NOT* ">>> x = 'foo'; print(x)". Since the first behavior exists *only* in the interactive interpreter it won't be inconsistent with normal programs ("x = 'foo'; x" in a program doesn't display anything). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:16:11 2010 From: report at bugs.python.org (norbidur) Date: Thu, 08 Jul 2010 22:16:11 +0000 Subject: [issue9208] SMTPHandler does not handle unicode strings In-Reply-To: <1278627371.74.0.0567748809415.issue9208@psf.upfronthosting.co.za> Message-ID: <1278627371.74.0.0567748809415.issue9208@psf.upfronthosting.co.za> New submission from norbidur : SMTPHandler fails when receiving unicode strings. example : import logging,logging.handlers smtpHandler = logging.handlers.SMTPHandler( mailhost=("smtp.free.fr",25), fromaddr="from at free.fr", toaddrs="to at free.fr", subject=u"error message") LOG = logging.getLogger() LOG.addHandler(smtpHandler) LOG.error(u"accentu\u00E9") -> UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 108 : ordinal not in range(128) There has been a discuss on this in http://groups.google.com/group/comp.lang.python/browse_thread/thread/759df42f9374d1b6/05ad55c388c746e3?lnk=raot&pli=1 FileHandler does not behave the same way : for this handler's family an encoding can be specified, and if this encoding fails, there is a fallback to UTF-8. ---------- components: Unicode messages: 109621 nosy: norbidur priority: normal severity: normal status: open title: SMTPHandler does not handle unicode strings type: behavior versions: Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:24:19 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 22:24:19 +0000 Subject: [issue3401] wsgiref can't handle unicode environments In-Reply-To: <1216338814.66.0.0698084133409.issue3401@psf.upfronthosting.co.za> Message-ID: <1278627859.26.0.641662660222.issue3401@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'd guess that this has already been fixed as it relates to the Windows buildbot but has slipped under the radar. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:24:28 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Jul 2010 22:24:28 +0000 Subject: [issue9203] Use computed gotos by default In-Reply-To: <4C364CAE.9000408@egenix.com> Message-ID: <1278627862.3235.41.camel@localhost.localdomain> Antoine Pitrou added the comment: > No, but we do need to make sure that the casual user does not > run into such issues by using the default compiler on a typical > Unix system with Python default settings. The point is that we cannot make it sure. There is nothing specific about computed gotos here: any kind of compiler bug could threaten Python performance without us being able to do anything about it. Even if we restrict ourselves to standard C features. (also, I'll point out that it's not demonstrated that the problem above affects Python, rather than simply the particular piece of code shown in the bugzilla report) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:25:39 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 08 Jul 2010 22:25:39 +0000 Subject: [issue7766] sys.getwindowsversion as PyStructSequence In-Reply-To: <1278603383.31.0.0760734388633.issue7766@psf.upfronthosting.co.za> Message-ID: <4C36505B.8060406@egenix.com> Marc-Andre Lemburg added the comment: Brian Curtin wrote: > > Brian Curtin added the comment: > > The previously mentioned comments about backwards incompatibility with the number of items in the sequence are now a problem, since structseq now inherits from tuple. It seems that n_in_sequence gets ignored and we have a 9 item tuple. But that's not a problem with this ticket, is it. The previous use case has to be restored (after all, this was the main reason for adding structseq years ago). Someone goofed when making the said change to structseq. Is there a ticket open for this ? Here's the change: http://svn.python.org/view?view=rev&revision=82636 After some digging: Looks like it's being dealt with on http://bugs.python.org/issue8413 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:26:43 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 08 Jul 2010 22:26:43 +0000 Subject: [issue4184] Remove use of private attributes in smtpd In-Reply-To: <1224724634.09.0.0444621109477.issue4184@psf.upfronthosting.co.za> Message-ID: <1278628003.25.0.76519190504.issue4184@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > Would that be acceptable? I guess it would. Deciding to use that naming convention was a bad design choice in the first place, hence your proposal is perfectly reasonable, in my opinion. > What additional tests would you deem necessary? I think that a simple test which iterates over all renamed attributes and makes sure that DeprecationWarning is raised would be fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:27:33 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 08 Jul 2010 22:27:33 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1278628053.34.0.513766847321.issue5127@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: A new patch, generated on top of r82662 ---------- Added file: http://bugs.python.org/file17909/unicodectype_ucs4_4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:28:38 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 22:28:38 +0000 Subject: [issue6587] interrupts during long writes cause connection corruption with SSL module In-Reply-To: <1248741132.11.0.651534522713.issue6587@psf.upfronthosting.co.za> Message-ID: <1278628118.25.0.472734355382.issue6587@psf.upfronthosting.co.za> Mark Lawrence added the comment: For a simple fix this has been sitting around a long time. :) ---------- nosy: +BreamoreBoy versions: -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:30:14 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 08 Jul 2010 22:30:14 +0000 Subject: [issue4184] Remove use of private attributes in smtpd In-Reply-To: <1224724634.09.0.0444621109477.issue4184@psf.upfronthosting.co.za> Message-ID: <1278628214.72.0.0409578555443.issue4184@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:31:42 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 08 Jul 2010 22:31:42 +0000 Subject: [issue4184] Remove use of private attributes in smtpd In-Reply-To: <1224724634.09.0.0444621109477.issue4184@psf.upfronthosting.co.za> Message-ID: <1278628302.3.0.0795060754488.issue4184@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > Would that be acceptable? I guess it would. Deciding to use that naming convention was a bad design choice in the first place, hence your proposal is perfectly reasonable, in my opinion. > What additional tests would you deem necessary? I think that a test which iterates over all renamed attributes and makes sure that DeprecationWarning is raised would be fine. Also, "__attrname" and "attrname" should be checked for equality. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:31:43 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 08 Jul 2010 22:31:43 +0000 Subject: [issue7766] sys.getwindowsversion as PyStructSequence In-Reply-To: <1264276632.05.0.210165677499.issue7766@psf.upfronthosting.co.za> Message-ID: <1278628303.96.0.0796431196668.issue7766@psf.upfronthosting.co.za> Brian Curtin added the comment: Yep, setting this back to closed. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:33:21 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 08 Jul 2010 22:33:21 +0000 Subject: [issue9206] repr(os.stat(..)) is broken by the structseq change In-Reply-To: <1278619308.76.0.418560838526.issue9206@psf.upfronthosting.co.za> Message-ID: <1278628401.29.0.580276289706.issue9206@psf.upfronthosting.co.za> Benjamin Peterson added the comment: r82663 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:36:17 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 08 Jul 2010 22:36:17 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1278628053.34.0.513766847321.issue5127@psf.upfronthosting.co.za> Message-ID: <4C3652DA.8060702@egenix.com> Marc-Andre Lemburg added the comment: Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > A new patch, generated on top of r82662 Could you explain what this bit is about ? @@ -349,7 +313,7 @@ configure Python using --with-wctype-functions. This reduces the interpreter's code size. */ -#if defined(HAVE_USABLE_WCHAR_T) && defined(WANT_WCTYPE_FUNCTIONS) +#if defined(Py_UNICODE_WIDE) && defined(WANT_WCTYPE_FUNCTIONS) #include ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:41:58 2010 From: report at bugs.python.org (Jesse Noller) Date: Thu, 08 Jul 2010 22:41:58 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278628918.26.0.147542878627.issue9207@psf.upfronthosting.co.za> Jesse Noller added the comment: Wait - so, you are pulling svn trunk, compiling and running your test with the built python executable? I'm not following the "multiprocessing-from-trunk" distinction unless you're picking the module out of the tree / compiling it and then moving it into some other install. I might be being overly dense. You're running your test with cd src/tree/ && ./python - right? Also, what, if any, compile flags are you passing to the python build? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:43:08 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 08 Jul 2010 22:43:08 +0000 Subject: [issue9203] Use computed gotos by default In-Reply-To: <4C364CAE.9000408@egenix.com> Message-ID: <4C36546F.3030005@v.loewis.de> Martin v. L?wis added the comment: > No, but we do need to make sure that the casual user does not > run into such issues by using the default compiler on a typical > Unix system with Python default settings. I think there is no risk here. The casual Python user on an AMD64 system where gcc is the default compiler will use the Python installation that comes with the operating system. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:44:25 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Jul 2010 22:44:25 +0000 Subject: [issue4184] Remove use of private attributes in smtpd In-Reply-To: <1224724634.09.0.0444621109477.issue4184@psf.upfronthosting.co.za> Message-ID: <1278629065.88.0.632866167449.issue4184@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > The patch as-is can't be accepted if not for Python 4.x maybe, > obviously because it's just too breaking. With all due respect, this sounds a bit silly. If the attributes were of the "__private" kind, they weren't meant to be used by other classes, and so there's no problem in making them public. (the reverse would be more annoying) However, making them public means they should be maintained with the same semantics in future versions, which might be too much of a burden. In this case, perhaps you want to make them of the "_private" kind instead. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:44:42 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 22:44:42 +0000 Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za> Message-ID: <1278629082.35.0.512088431038.issue5004@psf.upfronthosting.co.za> Mark Lawrence added the comment: Would someone with appropriate knowledge please take a look to see if this is still an issue. ---------- components: +Library (Lib) -Extension Modules nosy: +BreamoreBoy stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:47:49 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Jul 2010 22:47:49 +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: <1278629269.77.0.594363680756.issue8240@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: commit review -> needs patch versions: +Python 3.2 -Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:47:57 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 08 Jul 2010 22:47:57 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1278629277.05.0.932654283162.issue2986@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Anyone can post on Python-dev, but non-developers should do so judiciously and with respect for the purpose of the list. It is also polite to introduce oneself with the first post. In any case, Tim Peters has approved making some change. The remaining question is exactly what. There is no problem with extending the API in 3.2. The debate there is over 2.7. My fourth proposal, detailed on pydev, is to introduce a fourth paramater, 'common', to set the frequency threshold to None or int 1-99. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:48:03 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Jul 2010 22:48:03 +0000 Subject: [issue6587] interrupts during long writes cause connection corruption with SSL module In-Reply-To: <1248741132.11.0.651534522713.issue6587@psf.upfronthosting.co.za> Message-ID: <1278629283.82.0.405664008699.issue6587@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> duplicate status: open -> closed superseder: -> ssl.SSLSocket.write may fail on non-blocking sockets _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:48:56 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Jul 2010 22:48:56 +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: <1278629336.81.0.344396996722.issue8240@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Patch should probably be rewritten to add a `mode` property on the new SSLContext object instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:52:03 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 22:52:03 +0000 Subject: [issue5024] sndhdr.whathdr returns -1 for WAV file frame count In-Reply-To: <1232558382.92.0.547995552561.issue5024@psf.upfronthosting.co.za> Message-ID: <1278629523.45.0.693065589089.issue5024@psf.upfronthosting.co.za> Mark Lawrence added the comment: Robert, could you provide a patch for this? ---------- nosy: +BreamoreBoy stage: -> needs patch versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:52:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Jul 2010 22:52:47 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1278629277.05.0.932654283162.issue2986@psf.upfronthosting.co.za> Message-ID: <1278629562.3235.42.camel@localhost.localdomain> Antoine Pitrou added the comment: > There is no problem with extending the API in 3.2. The debate there is > over 2.7. We could extend the API as long as it stays backwards-compatible (that is, the default value for the new argument produces the same behaviour as before). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:56:14 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 08 Jul 2010 22:56:14 +0000 Subject: [issue5060] gcc profile guided optimization In-Reply-To: <1232914718.3.0.0101941779254.issue5060@psf.upfronthosting.co.za> Message-ID: <1278629774.03.0.883170182785.issue5060@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could someone from the build area please take a look at the patch, only three lines have changed. ---------- nosy: +BreamoreBoy stage: -> patch review versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 00:58:57 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Jul 2010 22:58:57 +0000 Subject: [issue5060] gcc profile guided optimization In-Reply-To: <1232914718.3.0.0101941779254.issue5060@psf.upfronthosting.co.za> Message-ID: <1278629937.88.0.0892129830829.issue5060@psf.upfronthosting.co.za> Antoine Pitrou added the comment: On which platform? it works here (Python 3.2, Linux). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 01:02:39 2010 From: report at bugs.python.org (Joel Brobecker) Date: Thu, 08 Jul 2010 23:02:39 +0000 Subject: [issue7352] python2.6-config --ldflags out of /usr and missing -L In-Reply-To: <1258578467.08.0.137292547946.issue7352@psf.upfronthosting.co.za> Message-ID: <1278630159.21.0.885298064727.issue7352@psf.upfronthosting.co.za> Joel Brobecker added the comment: GDB can suffer from the same sort of problem. In my case, I picked up a Python binary tarball built on a different machine (without --enable-shared), and the path in -L returned by python-config --ldflags refered to the prefix used at configure time. But, by comparison, --cflags returns the correct include path. To give more context: GDB can be linked against libpython to add python scripting support in GDB. To determine how to compile&link Python in GDB, we have a copy of python-config in GDB, and do "python /path/to/python-config --cflags/ldflags. Because it is often convenient to pick up a binary install, and because this install is not always at the same location as the prefix used at configure time, python-config --ldflags returns a -L with a path that is irrelevant in our case. The attached patch fixes this issue. The patch also fixes the issue originally reported: I think that python-config --ldflags should also print -L/lib in the case where python was configured with --enable-shared. This is necessary when prefix is not a standard location. This was tested with Python 2.5, 2.6, and 2.7, static and shared, by calling the script with --ldflags, and by verifying the output. ---------- keywords: +patch nosy: +brobecke Added file: http://bugs.python.org/file17910/python-config.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 01:12:32 2010 From: report at bugs.python.org (Greg Brockman) Date: Thu, 08 Jul 2010 23:12:32 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278630752.65.0.431014553959.issue9207@psf.upfronthosting.co.za> Greg Brockman added the comment: > Wait - so, you are pulling svn trunk, compiling and running your test > with the built python executable? Yes. I initially observed this issue while using 10.04's Python (2.6.5), but wanted to make sure it wasn't fixed by using a newer interpreter. > I'm not following the "multiprocessing-from-trunk" distinction unless > you're picking the module out of the tree / compiling it and then > moving it into some other install. I might be being overly dense. Initially I was doing exactly that. (Some context: I was working on a patch to fix a different multiprocessing issue, and figured I may as well write my patch against the most recent version of the library.) Note that I was using Lucid's _multiprocessing, so there was no compilation involved. > You're running your test with cd src/tree/ && ./python - > right? What... is src/tree? If it's what you're asking, I am running the freshly-compiled python interpreter, and it does seem to be using the relevant modules out of trunk: >>> import threading; threading.__file__ '/usr/local/lib/python2.7/threading.pyc' >>> import multiprocessing; multiprocessing.__file__ '/usr/local/lib/python2.7/multiprocessing/__init__.pyc' >>> import _multiprocessing; _multiprocessing.__file__ '/usr/local/lib/python2.7/lib-dynload/_multiprocessing.so' When running with 2.6, all modules are whatever's available for 10.04 except for the multiprocessing that I took from trunk: >>> import threading; threading.__file__ '/usr/lib/python2.6/threading.pyc' >>> import multiprocessing; multiprocessing.__file__ 'multiprocessing/__init__.pyc' >>> import _multiprocessing; _multiprocessing.__file__ '/usr/lib/python2.6/lib-dynload/_multiprocessing.so' > Also, what, if any, compile flags are you passing to the python build? I just ran ./configure && make && make install Sorry about the confusion--let me know if you'd like additional information. I can test on other platforms/with other configurations if it would be useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 01:18:37 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 08 Jul 2010 23:18:37 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1278631117.08.0.157284007449.issue5127@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: A new patch that doesn't remove an important check, avoids a crash when the C macro is called with a huge number. thanks Ezio. ---------- Added file: http://bugs.python.org/file17911/unicodectype_ucs4_5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 01:27:52 2010 From: report at bugs.python.org (Jesse Noller) Date: Thu, 08 Jul 2010 23:27:52 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278631672.31.0.416217702412.issue9207@psf.upfronthosting.co.za> Jesse Noller added the comment: Alright, I'm fighting ubuntu 64 bit in my vmware install right now, I'll see if I can get it up and running. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 01:34:24 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 08 Jul 2010 23:34:24 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1278632064.34.0.51357937698.issue5127@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > Could you explain what this bit is about ? > -#if defined(HAVE_USABLE_WCHAR_T) && defined(WANT_WCTYPE_FUNCTIONS) > +#if defined(Py_UNICODE_WIDE) && defined(WANT_WCTYPE_FUNCTIONS) On Windows at least, HAVE_USABLE_WCHAR_T is True, this means that Py_Unicode can be converted to wchar_t. But now that Py_UNICODE_ISSPACE() takes Py_UCS4, it cannot be converted to wchar_t anymore. Now that the unicode database functions claim to use Py_UCS4, the functions of wctypes.h are usable only if they also support Py_UCS4. OTOH the symbol WANT_WCTYPE_FUNCTIONS is defined only if ./configure is called with --with-wctype-functions, I don't expect it to be common. BTW, the comment says that "This reduces the interpreter's code size". I don't really agree, these functions are two-liners. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 01:40:28 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Jul 2010 23:40:28 +0000 Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za> Message-ID: <1278632428.87.0.181524069355.issue5004@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 02:04:41 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 09 Jul 2010 00:04:41 +0000 Subject: [issue5004] socket.getfqdn() doesn't cope properly with purely DNS-based setups In-Reply-To: <1232404142.93.0.545475464378.issue5004@psf.upfronthosting.co.za> Message-ID: <1278633881.63.0.538804201316.issue5004@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think anybody willing to invest the time could acquire the appropriate knowledge, at least to determine whether it's still an issue (i.e. trying to reproduce it). To fix it, one would then need to read the source code of hostname, and find out what they do differently; strace might be sufficient already. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 02:22:16 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Jul 2010 00:22:16 +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: <1278634936.73.0.930787895929.issue2570@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It would be a change in behaviour, which is quite unacceptable for a bugfix release. I think this should be closed. ---------- nosy: +pitrou resolution: -> rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 02:28:15 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 00:28:15 +0000 Subject: [issue1723038] Curses Menu Message-ID: <1278635295.13.0.0540538672423.issue1723038@psf.upfronthosting.co.za> Mark Lawrence added the comment: Would someone please comment on the patch, I can't because I don't know anything about the Python C API. ---------- components: +Library (Lib) -Extension Modules nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 02:29:12 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Jul 2010 00:29:12 +0000 Subject: [issue3461] smtplib does not fully support IPv6 in EHLO In-Reply-To: <1217282925.26.0.916204427354.issue3461@psf.upfronthosting.co.za> Message-ID: <1278635352.2.0.263017889578.issue3461@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 02:30:16 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Jul 2010 00:30:16 +0000 Subject: [issue9170] zipfile cannot read AES encrypted files In-Reply-To: <1278351743.73.0.460439084815.issue9170@psf.upfronthosting.co.za> Message-ID: <1278635416.67.0.223090827492.issue9170@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 02:31:41 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Jul 2010 00:31:41 +0000 Subject: [issue9170] zipfile cannot read AES encrypted files In-Reply-To: <1278351743.73.0.460439084815.issue9170@psf.upfronthosting.co.za> Message-ID: <1278635501.98.0.0776965956969.issue9170@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Do note that providing a patch first requires that encryption/decryption facilities be made available in the stdlib. (right now we only offer hashing, and "high-level" socket wrapping) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 02:32:20 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Jul 2010 00:32:20 +0000 Subject: [issue9170] zipfile cannot read AES encrypted files In-Reply-To: <1278351743.73.0.460439084815.issue9170@psf.upfronthosting.co.za> Message-ID: <1278635540.77.0.511561727914.issue9170@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- dependencies: +add crypto routines to stdlib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 02:33:44 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Jul 2010 00:33:44 +0000 Subject: [issue9162] License for multiprocessing files In-Reply-To: <1278311687.0.0.315948028382.issue9162@psf.upfronthosting.co.za> Message-ID: <1278635624.81.0.78507193293.issue9162@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> jnoller nosy: +jnoller priority: normal -> high versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 02:44:25 2010 From: report at bugs.python.org (Jesse Noller) Date: Fri, 09 Jul 2010 00:44:25 +0000 Subject: [issue9162] License for multiprocessing files In-Reply-To: <1278311687.0.0.315948028382.issue9162@psf.upfronthosting.co.za> Message-ID: <1278636265.5.0.494399446827.issue9162@psf.upfronthosting.co.za> Jesse Noller added the comment: Yes; the copyright has to stay; but the license data can leave afaik. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 02:51:23 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 00:51:23 +0000 Subject: [issue2979] use_datetime in SimpleXMLRPCServer In-Reply-To: <1211846989.94.0.031553096454.issue2979@psf.upfronthosting.co.za> Message-ID: <1278636683.41.0.911708788506.issue2979@psf.upfronthosting.co.za> Mark Lawrence added the comment: Presumably the patch needs reworking as SimpleXMLRPCServer has been incorporated into the new xmlrpc package for Python 3. ---------- nosy: +BreamoreBoy stage: -> needs patch versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 03:06:32 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 01:06:32 +0000 Subject: [issue3591] elementtree tests do not include bytes handling In-Reply-To: <1219078669.04.0.473516144349.issue3591@psf.upfronthosting.co.za> Message-ID: <1278637592.23.0.809017915626.issue3591@psf.upfronthosting.co.za> Mark Lawrence added the comment: Have the tests been incorporated into py3k so this can be closed, or is it still valid? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 03:12:05 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 01:12:05 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1278637925.38.0.784132194129.issue2986@psf.upfronthosting.co.za> Terry J. Reedy added the comment: My proposal F, to expose the common frequency threshold as a fourth positional parameter with default 1, would do that: repeat current behavior. We should, and Eli and I would, add some of the anomalous cases to the test suite and verily that the default is to reproduce the current anomalies, and that passing None changes the result. Any opinions, anyone, on 'common', 'thresh', 'threshold', or anything else as the new parameter name? We will have to explain in the doc patch that the parameter is new in 2.7.1 to fix a partial bug and that giving any explicit value will make code not run with 2.7 (.0). Exposing the set of common values as an instance attribute, as I proposed on pydev, would be a new feature not needed to fix the bug. So it should be limited to 3.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 03:12:21 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 01:12:21 +0000 Subject: [issue3674] test_dbm_ndbm skip is unexpected on win32? In-Reply-To: <1219635810.63.0.758747925367.issue3674@psf.upfronthosting.co.za> Message-ID: <1278637941.03.0.0917100937863.issue3674@psf.upfronthosting.co.za> Mark Lawrence added the comment: Given this. c:\Python31\Lib\test>..\..\python.exe regrtest.py test_dbm_ndbm.py test_dbm_ndbm test_dbm_ndbm skipped -- No module named _dbm 1 test skipped: test_dbm_ndbm Those skips are all expected on win32. I assume that this can be closed. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 03:18:10 2010 From: report at bugs.python.org (Ilya Sandler) Date: Fri, 09 Jul 2010 01:18:10 +0000 Subject: [issue9209] pstats module crashes on trailing backslash In-Reply-To: <1278638290.01.0.457027619386.issue9209@psf.upfronthosting.co.za> Message-ID: <1278638290.01.0.457027619386.issue9209@psf.upfronthosting.co.za> New submission from Ilya Sandler : a session attached: cheetah:~/wrk/svn/psi-poly5/poly/aut/prof> ~/comp/python/trunk/python -m pstats prof.out Welcome to the profile statistics browser. % stats 20 \ Thu Jul 8 17:50:27 2010 prof.out 197258358 function calls (197187736 primitive calls) in 321.090 CPU seconds Traceback (most recent call last): File "/home/ilya/comp/python/trunk/Lib/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/home/ilya/comp/python/trunk/Lib/runpy.py", line 72, in _run_code exec code in run_globals File "/home/ilya/comp/python/trunk/Lib/pstats.py", line 681, in browser.cmdloop() File "/home/ilya/comp/python/trunk/Lib/cmd.py", line 142, in cmdloop stop = self.onecmd(line) File "/home/ilya/comp/python/trunk/Lib/cmd.py", line 219, in onecmd return func(arg) File "/home/ilya/comp/python/trunk/Lib/pstats.py", line 657, in do_stats return self.generic('print_stats', line) File "/home/ilya/comp/python/trunk/Lib/pstats.py", line 578, in generic getattr(self.stats, fn)(*processed) File "/home/ilya/comp/python/trunk/Lib/pstats.py", line 359, in print_stats width, list = self.get_print_list(amount) File "/home/ilya/comp/python/trunk/Lib/pstats.py", line 332, in get_print_list list, msg = self.eval_print_amount(selection, list, msg) File "/home/ilya/comp/python/trunk/Lib/pstats.py", line 306, in eval_print_amount if re.search(sel, func_std_string(func)): File "/home/ilya/comp/python/trunk/Lib/re.py", line 142, in search return _compile(pattern, flags).search(string) File "/home/ilya/comp/python/trunk/Lib/re.py", line 245, in _compile raise error, v # invalid expression sre_constants.error: bogus escape (end of line) ---------- components: Library (Lib) messages: 109656 nosy: isandler priority: normal severity: normal status: open title: pstats module crashes on trailing backslash type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 03:20:26 2010 From: report at bugs.python.org (Matthew Barnett) Date: Fri, 09 Jul 2010 01:20:26 +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: <1278638426.52.0.307733621576.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-20100709.zip is a new version of the regex module. I've moved most of the regex module's Python code into a private module. ---------- Added file: http://bugs.python.org/file17912/issue2636-20100709.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 03:22:04 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 01:22:04 +0000 Subject: [issue5302] Allow package_data globs match directories In-Reply-To: <1234909934.56.0.127417684931.issue5302@psf.upfronthosting.co.za> Message-ID: <1278638524.5.0.128354360228.issue5302@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Since there will be be separate patches for each Python version, it does not much matter. But I will try to notice when an issue for for D2 and leave such alone. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 03:25:01 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 01:25:01 +0000 Subject: [issue4492] httplib code thinks it closes connection, but does not In-Reply-To: <1228241719.92.0.946688230988.issue4492@psf.upfronthosting.co.za> Message-ID: <1278638701.19.0.38414473882.issue4492@psf.upfronthosting.co.za> Mark Lawrence added the comment: John could you provide a patch for this? ---------- nosy: +BreamoreBoy stage: -> needs patch versions: +Python 3.1, Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 03:25:56 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 01:25:56 +0000 Subject: [issue4609] Allow use of > 256 FD's on solaris in 32 bit mode In-Reply-To: <1228827066.41.0.986801678261.issue4609@psf.upfronthosting.co.za> Message-ID: <1278638756.3.0.832211554077.issue4609@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have no idea if this is possible or applicable to 3.x, but 3.2 is the earliest version for new features. ---------- nosy: +tjreedy versions: +Python 3.2 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 03:28:24 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 01:28:24 +0000 Subject: [issue4629] getopt should not accept no_argument that ends with '=' In-Reply-To: <1228978458.01.0.0804138423997.issue4629@psf.upfronthosting.co.za> Message-ID: <1278638904.58.0.890142953359.issue4629@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> commit review versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 03:36:55 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 01:36:55 +0000 Subject: [issue5784] raw deflate format and zlib module In-Reply-To: <1240006221.86.0.263428051867.issue5784@psf.upfronthosting.co.za> Message-ID: <1278639415.25.0.286231062859.issue5784@psf.upfronthosting.co.za> Terry J. Reedy added the comment: A doc addition would seem like a good idea, so I am changing this to a doc issue for the current versions. Can you suggest specific text and a specific location to place it? A behavior change could only go into 3.2. I do not know who, if anyone, maintains zlib. A reference to the desired algorithm might be necessary. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, tjreedy versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 03:38:46 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 09 Jul 2010 01:38:46 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278639526.98.0.366967351985.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: issue7989a.diff is a partial success implementing Nick Coghlan's testing idea. Unfortunately, datetime implementation with it's circular dependency on _strftime is not very robust with respect to import trickery. I am calling this a partial success because although running Lib/test/test_datetime.py does not report any errors, it only works with pure python version of pickle. (I had to add sys.modules['_pickle'] = None at the top of the module to make it work.) Also, the resulting test_datetime is quite an abomination! ---------- Added file: http://bugs.python.org/file17913/issue9206a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 03:39:40 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 09 Jul 2010 01:39:40 +0000 Subject: [issue1723038] Curses Menu Message-ID: <1278639580.68.0.476021761959.issue1723038@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- components: +Extension Modules -Library (Lib) versions: -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 03:40:51 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 09 Jul 2010 01:40:51 +0000 Subject: [issue1723038] Curses Menu Message-ID: <1278639651.98.0.911961683722.issue1723038@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- stage: -> unit test needed type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 03:58:37 2010 From: report at bugs.python.org (Jesse Noller) Date: Fri, 09 Jul 2010 01:58:37 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278640717.86.0.40182313585.issue9207@psf.upfronthosting.co.za> Jesse Noller added the comment: I can confirm with a clean ubuntu 64 install, with a clean checkout of release27 that it explodes with that exception, while the stock 2.6.5 does not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 03:58:48 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 09 Jul 2010 01:58:48 +0000 Subject: [issue4184] Remove use of private attributes in smtpd In-Reply-To: <1224724634.09.0.0444621109477.issue4184@psf.upfronthosting.co.za> Message-ID: <1278640728.29.0.864812619252.issue4184@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > If the attributes were of the "__private" kind, they weren't meant to > be used by other classes, and so there's no problem in making them > public. Generally I would agree with you but this case is different, imho. The problem here is that those items didn't have to be declared "__private" in the first place. As a consequence of this I think it's reasonable to expect that during the years some code out there might got to rely on them by using name-mangling hack. After all smtpd module is very old and SMTPHandler class likely to be subclassed because of its basic implementation, and that is why I see some similarities with issue 8483. I was of the opinion that just removing the __getattr___ ugliness without passing through the usual DeprecationWarning period supposed to be applied in such circumstances would cause no harm, until I realized I was relying on that very functionality in pyftpdlib and I didn't even know it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 04:03:56 2010 From: report at bugs.python.org (Jesse Noller) Date: Fri, 09 Jul 2010 02:03:56 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278641036.99.0.814544016303.issue9207@psf.upfronthosting.co.za> Jesse Noller added the comment: It does not seem to appear on OS/X 10.6.4 - so the only question is does this show up on Ubuntu 32bit ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 04:12:11 2010 From: report at bugs.python.org (Jesse Noller) Date: Fri, 09 Jul 2010 02:12:11 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278641531.0.0.303727732358.issue9207@psf.upfronthosting.co.za> Jesse Noller added the comment: Correction; it can and does happen on OS/X. So, this is not a platform specific bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 04:26:14 2010 From: report at bugs.python.org (Greg Brockman) Date: Fri, 09 Jul 2010 02:26:14 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278642374.67.0.194128609983.issue9207@psf.upfronthosting.co.za> Greg Brockman added the comment: Yeah, I've just taken a checkout from trunk, ran './configure && make && make install', and reproduced on: - Ubuntu 10.04 32-bit - Ubuntu 9.04 32-bit ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 04:31:49 2010 From: report at bugs.python.org (Jesse Noller) Date: Fri, 09 Jul 2010 02:31:49 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278642709.04.0.429716040112.issue9207@psf.upfronthosting.co.za> Jesse Noller added the comment: Greg, can you comment out line 272 in Lib/multiprocessing/pool.py and tell me if you can reproduce? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 04:53:02 2010 From: report at bugs.python.org (Greg Brockman) Date: Fri, 09 Jul 2010 02:53:02 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278643982.41.0.664616969681.issue9207@psf.upfronthosting.co.za> Greg Brockman added the comment: With the line commented out, I no longer see any exceptions. Although, if I understand what's going on, there still a (much rarer) possibility of an exception, right? I guess in the common case, the worker_handler is in the sleep when shutdown begins. But if it happens to be in the in the _maintain_pool step, would you still get these exceptions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 04:54:49 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 02:54:49 +0000 Subject: [issue5131] pprint doesn't know how to print a defaultdict In-Reply-To: <1233592442.21.0.0563262599933.issue5131@psf.upfronthosting.co.za> Message-ID: <1278644089.23.0.513807156389.issue5131@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I removed 'a set or' from the title since sets are no longer an issue. Since .fromkeys is a class method, it should be called on a class rather than an instance. I was initially fooled by the irrelevant addition of '(int)'. 100 is unnecessarily large for example and review. Patch changes code and test. However, I cannot tell what effect is has merely from reading the patch. Please add an example of the altered output, with 100 lowered to 5 or 10. A doc change is not needed since it merely says "The pprint module provides a capability to ?pretty-print? arbitrary Python data structures " I suspect the patch needs some update to apply to for 3.2a. Has Tarek's name been fixed already? ---------- nosy: +tjreedy stage: -> patch review title: pprint doesn't know how to print a set or a defaultdict -> pprint doesn't know how to print a defaultdict versions: +Python 3.2 -Python 2.5, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 04:58:03 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 02:58:03 +0000 Subject: [issue5445] codecs.StreamWriter.writelines problem when passed generator In-Reply-To: <1236540676.96.0.036576866383.issue5445@psf.upfronthosting.co.za> Message-ID: <1278644283.92.0.369300001025.issue5445@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.5, Python 2.6, Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 05:18:08 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 03:18:08 +0000 Subject: [issue2980] Pickle stream for unicode object may contain non-ASCII characters. In-Reply-To: <1211902695.6.0.958731947697.issue2980@psf.upfronthosting.co.za> Message-ID: <1278645488.29.0.364652658625.issue2980@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This can no longer be a 2.5 issue but I am not sure how to update it. OP apparently opened it as a feature request, so I did update it to 3.2. But OP then says "I'm not sure if this is a functionality or documentation bug." and indeed subsequent messages debate this issue. This would mean it could apply to earlier versions, if re-typed. On the other hand, there seems to be some opinion that there is no bug, or if there is/was, it cannot be fixed, which would mean this should be closed. Also, the docs seem to have already been changed, so if that were the issue, this is fixed and should be closed: "By default, the pickle data format uses a printable ASCII representation." is now "Protocol version 0 is the original human-readable protocol and is backwards compatible with earlier versions of Python. " ---------- nosy: +tjreedy versions: +Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 05:24:07 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 03:24:07 +0000 Subject: [issue5962] Ambiguity about the semantics of sys.exit() and os._exit() in multithreaded program In-Reply-To: <1241722395.44.0.880118568656.issue5962@psf.upfronthosting.co.za> Message-ID: <1278645847.06.0.309982423668.issue5962@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I know nothing about this. You might check http://docs.python.org/dev/py3k/ to see if there has been any change or open a discussion on python-list to get suggestions for specific doc updates. ---------- assignee: georg.brandl -> docs at python nosy: +docs at python, tjreedy versions: +Python 3.2 -Python 2.5, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 05:33:53 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 03:33:53 +0000 Subject: [issue6068] support read/write c_ulonglong type bitfield structures In-Reply-To: <1242812831.01.0.315764913222.issue6068@psf.upfronthosting.co.za> Message-ID: <1278646433.27.0.789462302908.issue6068@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have never used ctypes, so I could have missed something, but when perusing this, I see data and statements, but I did not see a clear statement as to precisely what change you want. I am sure it is implied, but I am suggesting a simple statement that Thomas H. could quickly read. ---------- nosy: +tjreedy stage: -> needs patch versions: +Python 3.2 -Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 05:42:07 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 03:42:07 +0000 Subject: [issue6162] What should happen to signals when the main thread dies? In-Reply-To: <1243872093.9.0.639774045025.issue6162@psf.upfronthosting.co.za> Message-ID: <1278646927.54.0.555920648058.issue6162@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think there has been some discussion of signals, in the last year, on the py-dev list (== gmane.comp.python.devel), which is archived both on the python site and gmane.org. Signals seem to be a somewhat nasty subject. Since you only raise a question rather than proposing a specific, possible change, I am closing this for now. I suggest you open a discussion on python-list (mirrored as newsgroup gmane.comp.python.general). Perhaps a specific proposal would come from that, perhaps you would find that your idea is impossible. ---------- nosy: +tjreedy resolution: -> later status: open -> closed versions: -Python 2.4, Python 2.5, Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 05:43:21 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 03:43:21 +0000 Subject: [issue1596] Broken pipes should be handled better in 2.x In-Reply-To: <1197410546.31.0.23440598734.issue1596@psf.upfronthosting.co.za> Message-ID: <1278647001.43.0.620802036623.issue1596@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 05:53:37 2010 From: report at bugs.python.org (Adam Olsen) Date: Fri, 09 Jul 2010 03:53:37 +0000 Subject: [issue9198] Should repr() print unicode characters outside the BMP? In-Reply-To: <1278579187.34.0.662391507791.issue9198@psf.upfronthosting.co.za> Message-ID: <1278647617.93.0.155947881544.issue9198@psf.upfronthosting.co.za> Changes by Adam Olsen : ---------- nosy: +Rhamphoryncus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 05:59:43 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 03:59:43 +0000 Subject: [issue6678] inspect.currentframe documentation omits optional depth parameter In-Reply-To: <1249928701.73.0.0206445902812.issue6678@psf.upfronthosting.co.za> Message-ID: <1278647983.96.0.662058228954.issue6678@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The doc string seems correct, so I agree. A condensed and improved version of the docstring (with *depth* italicized as usual) might be inspect.currentframe(depth=0) Return the frame object depth calls below the top of the stack. If there is none, raise ValueError. I do not think the internal comment is correct when it is exposed like this. Everything in inspect is specialized. The doc string could be similarly condensed. ---------- assignee: georg.brandl -> docs at python keywords: +patch nosy: +docs at python, tjreedy versions: -Python 2.4, Python 2.5, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 06:17:51 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 04:17:51 +0000 Subject: [issue6554] Do we have something like os.pid_exists()? In-Reply-To: <1248373715.48.0.616687111663.issue6554@psf.upfronthosting.co.za> Message-ID: <1278649071.29.0.707558722344.issue6554@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Avoiding an exception for a very rare use case is an inadequate reason to add a new function. Requests to add someone's favorite short, specialized, and easy-to-write function are a common feature of python-list. ---------- nosy: +tjreedy resolution: -> rejected status: open -> closed versions: +Python 3.2 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 06:24:16 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 04:24:16 +0000 Subject: [issue6592] otparse: processing variable number of short option arguments In-Reply-To: <1278649456.49.0.861613828654.issue6592@psf.upfronthosting.co.za> Message-ID: <1278649456.49.0.861613828654.issue6592@psf.upfronthosting.co.za> New submission from Terry J. Reedy : You should post feature requests as messages like this. No one is going to download and separately open a file from a stranger. In any case, I believe optparse is more or less feature frozen. In 3.2, the only version now open to new features, it will be somewhat superceded by argparse. ---------- nosy: +tjreedy resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 06:30:29 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 04:30:29 +0000 Subject: [issue5950] Make zimport work with zipfile containing comments In-Reply-To: <1241628586.95.0.0801479384158.issue5950@psf.upfronthosting.co.za> Message-ID: <1278649829.21.0.133381535637.issue5950@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Does 'zimport' refer to the 3.1 zipfile or zipimport modules or an internal function called zimport? ---------- nosy: +tjreedy title: zimport doesn't work with zipfile containing comments -> Make zimport work with zipfile containing comments versions: +Python 3.2 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 06:33:25 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 04:33:25 +0000 Subject: [issue3058] Let SimpleXMLRPCServer pass client_address to called functions. In-Reply-To: <1212855971.92.0.424447915547.issue3058@psf.upfronthosting.co.za> Message-ID: <1278650005.0.0.572294705877.issue3058@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In 3.x, class SimpleXMLRPCServer lives in module xmlrpc.server ---------- nosy: +tjreedy versions: +Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 06:34:43 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 09 Jul 2010 04:34:43 +0000 Subject: [issue5131] pprint doesn't know how to print a defaultdict In-Reply-To: <1233592442.21.0.0563262599933.issue5131@psf.upfronthosting.co.za> Message-ID: <1278650083.94.0.11525102714.issue5131@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 06:41:11 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 04:41:11 +0000 Subject: [issue3214] Suggest change to glossary explanation: "Duck Typing" In-Reply-To: <1214543459.76.0.157400708153.issue3214@psf.upfronthosting.co.za> Message-ID: <1278650471.65.0.420532701961.issue3214@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I actually would challenge the first sentence "A pythonic programming style which determines an object?s type by inspection of its method or attribute signature ". To me, and at least some usage on python-list, duck-typing means determining the interface (not type) by calling methods and catching exceptions if not present. This is the EAFP rather than inspection/LBYL style of duck typing. In 3.1: Python 3000 Nickname for the Python 3.x release line (coined long ago when the release of version 3 was something in the distant future.) This is also abbreviated ?Py3k?. I suspect this was backported at the same time. ---------- nosy: +tjreedy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 06:42:01 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 04:42:01 +0000 Subject: [issue4254] _cursesmodule.c callable update_lines_cols() In-Reply-To: <1225724529.97.0.843166149521.issue4254@psf.upfronthosting.co.za> Message-ID: <1278650521.54.0.365991129139.issue4254@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> patch review versions: +Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 06:42:57 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 04:42:57 +0000 Subject: [issue8561] Install .exes generated with distutils to not do a CRC check In-Reply-To: <1272482067.44.0.313764636607.issue8561@psf.upfronthosting.co.za> Message-ID: <1278650577.52.0.428711000396.issue8561@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 06:51:25 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 04:51:25 +0000 Subject: [issue1109602] Need some setup.py sanity Message-ID: <1278651085.61.0.926344801238.issue1109602@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Skip, did the suggestion work? or is this otherwise out of date for 3.2? ---------- nosy: +tjreedy versions: +Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 07:06:35 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 05:06:35 +0000 Subject: [issue8402] glob returns empty list with "[" character in the folder name In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1278651995.15.0.511616566299.issue8402@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The 3.1.2 doc for fnmatch.translate no longer says "There is no way to quote meta-characters." If that is still true (no quoting method is given that I can see), then that removal is something of a regression. ---------- nosy: +tjreedy versions: +Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 07:09:48 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 05:09:48 +0000 Subject: [issue3423] DeprecationWarning message applies to wrong context with exec() In-Reply-To: <1216687242.26.0.837867299264.issue3423@psf.upfronthosting.co.za> Message-ID: <1278652188.3.0.158341646397.issue3423@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New features only in 3.2 ---------- versions: -Python 2.5, Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 07:19:02 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 05:19:02 +0000 Subject: [issue5778] sys.version format differs between MSC and GCC In-Reply-To: <1239958808.78.0.447380255755.issue5778@psf.upfronthosting.co.za> Message-ID: <1278652742.95.0.734030796127.issue5778@psf.upfronthosting.co.za> Terry J. Reedy added the comment: msc is the same in 3.1. How about gcc? If still different, what change are you proposing? add \n to one or delete it from other? I agree that this is a (minor) unfortunate difference, but ... Changing either would be a pitfall to developers who only use one or the other and have adapted to what they get. Those on both have probably learned to work with the difference. However, unless they do something like sys.version.strip(), they might have code invalidated too. Of course, future developers might benefit. ---------- nosy: +tjreedy versions: +Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 07:25:43 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 05:25:43 +0000 Subject: [issue1745722] please add wsgi to SimpleXMLRPCServer Message-ID: <1278653143.82.0.60149105943.issue1745722@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 07:26:38 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 05:26:38 +0000 Subject: [issue2009] Grammar change to prevent shift/reduce problem with varargslist In-Reply-To: <1202170790.58.0.28997794645.issue2009@psf.upfronthosting.co.za> Message-ID: <1278653198.27.0.718636781216.issue2009@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 07:27:14 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 05:27:14 +0000 Subject: [issue1945] Document back ported C functions In-Reply-To: <1201445858.91.0.21119487494.issue1945@psf.upfronthosting.co.za> Message-ID: <1278653234.4.0.461294466996.issue1945@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 07:28:18 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 05:28:18 +0000 Subject: [issue2044] test_sunaudiodev.py converted to unittest In-Reply-To: <1202418415.34.0.91216503558.issue2044@psf.upfronthosting.co.za> Message-ID: <1278653298.63.0.428618780429.issue2044@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 07:28:29 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 05:28:29 +0000 Subject: [issue2024] test_gl.py converted to unittest In-Reply-To: <1202328966.17.0.238328227675.issue2024@psf.upfronthosting.co.za> Message-ID: <1278653309.7.0.236166925234.issue2024@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 07:28:35 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 05:28:35 +0000 Subject: [issue2023] test_cd converted to unittest In-Reply-To: <1202326827.71.0.0542752440376.issue2023@psf.upfronthosting.co.za> Message-ID: <1278653315.16.0.440828582998.issue2023@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 07:28:43 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 09 Jul 2010 05:28:43 +0000 Subject: [issue2022] test_al converted to unittest In-Reply-To: <1202325918.42.0.816019175645.issue2022@psf.upfronthosting.co.za> Message-ID: <1278653323.39.0.0105677839877.issue2022@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 07:50:21 2010 From: report at bugs.python.org (Jyrki Wahlstedt) Date: Fri, 09 Jul 2010 05:50:21 +0000 Subject: [issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X In-Reply-To: <1278323219.73.0.148043211343.issue9164@psf.upfronthosting.co.za> Message-ID: <1278654621.6.0.040254727385.issue9164@psf.upfronthosting.co.za> Jyrki Wahlstedt added the comment: Well, the background here is that at MacPorts the builds are done using Portfiles (I maintain some), and it seems that the current way of getting things configured and built leads to redundant, extraneous arch arguments. I don't know the internals of port system that well as to be able to explain, how the arguments are collected. I am starting to investigate port command to see, if something can be done there. Then, duplicate arguments are not illegal, may be seen elsewhere also, so if this can be dealt with cleanly, I'm happy. I check the configure logs this evening. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 09:00:32 2010 From: report at bugs.python.org (Dmitry) Date: Fri, 09 Jul 2010 07:00:32 +0000 Subject: [issue5950] Make zimport work with zipfile containing comments In-Reply-To: <1241628586.95.0.0801479384158.issue5950@psf.upfronthosting.co.za> Message-ID: <1278658832.69.0.450315950443.issue5950@psf.upfronthosting.co.za> Dmitry added the comment: I'm talking about internal zimport function (see attached testcase): i.e. import sys; sys.path.insert(0,'test.zip'); import test test.testme() doesn't work if test.zip contains comment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 10:13:37 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 09 Jul 2010 08:13:37 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1278632064.34.0.51357937698.issue5127@psf.upfronthosting.co.za> Message-ID: <4C36DA2C.6030408@egenix.com> Marc-Andre Lemburg added the comment: Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > >> Could you explain what this bit is about ? >> -#if defined(HAVE_USABLE_WCHAR_T) && defined(WANT_WCTYPE_FUNCTIONS) >> +#if defined(Py_UNICODE_WIDE) && defined(WANT_WCTYPE_FUNCTIONS) > > On Windows at least, HAVE_USABLE_WCHAR_T is True, this means that Py_Unicode can be converted to wchar_t. But now that Py_UNICODE_ISSPACE() takes Py_UCS4, it cannot be converted to wchar_t anymore. Right, but you still have to check whether wchar_t is usable, don't you ? If wchar_t is 2 bytes on a non-Windows platform, using the wctypes functions won't work either. The line should probably read: #if defined(WANT_WCTYPE_FUNCTIONS) && defined(HAVE_USABLE_WCHAR_T) && defined(Py_UNICODE_WIDE) > Now that the unicode database functions claim to use Py_UCS4, the functions of wctypes.h are usable only if they also support Py_UCS4. > > OTOH the symbol WANT_WCTYPE_FUNCTIONS is defined only if ./configure is called with --with-wctype-functions, I don't expect it to be common. > BTW, the comment says that "This reduces the interpreter's code size". I don't really agree, these functions are two-liners. True. The support for the wctype functions should have been remove long ago, since they cause subtle incompatibilities between Python builds. I should have probably never added it in the first place... people were worried about the size of the type record tables at the time, which is why I thought it would be a good idea to try to optionally use the C lib functions. The comment was true before the Python type tables were changed into a type record database: the switch used to remove the Python tables required for those functions. With the type records database, this is no longer the case, since the records are also being used for properties that are not exposed via wctype functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 10:23:37 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 09 Jul 2010 08:23:37 +0000 Subject: [issue2980] Pickle stream for unicode object may contain non-ASCII characters. In-Reply-To: <1278645488.29.0.364652658625.issue2980@psf.upfronthosting.co.za> Message-ID: <4C36DC7F.1000307@egenix.com> Marc-Andre Lemburg added the comment: Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > This can no longer be a 2.5 issue but I am not sure how to update it. > > OP apparently opened it as a feature request, so I did update it to 3.2. > > But OP then says "I'm not sure if this is a functionality or documentation bug." and indeed subsequent messages debate this issue. This would mean it could apply to earlier versions, if re-typed. > > On the other hand, there seems to be some opinion that there is no bug, or if there is/was, it cannot be fixed, which would mean this should be closed. > > Also, the docs seem to have already been changed, so if that were the issue, this is fixed and should be closed: > "By default, the pickle data format uses a printable ASCII representation." > is now > "Protocol version 0 is the original human-readable protocol and is backwards compatible with earlier versions of Python. " I'd suggest to close the ticket. The main idea behind version 0 was to have a readable format. The occasional UTF-8 in the stream should be readable enough nowadays, even if it's not ASCII. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 10:38:11 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 09 Jul 2010 08:38:11 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1278631117.08.0.157284007449.issue5127@psf.upfronthosting.co.za> Message-ID: <4C36DFE7.6040708@egenix.com> Marc-Andre Lemburg added the comment: Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > A new patch that doesn't remove an important check, avoids a crash when the C macro is called with a huge number. thanks Ezio. Could you please be more specific on what you changed ? At least visually, there don't appear to be any differences between v4 and v5 of the patch. Thanks, -- Marc-Andre Lemburg eGenix.com ________________________________________________________________________ 2010-07-19: EuroPython 2010, Birmingham, UK 9 days to go ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 10:44:53 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 09 Jul 2010 08:44:53 +0000 Subject: [issue9203] Use computed gotos by default In-Reply-To: <4C36546F.3030005@v.loewis.de> Message-ID: <4C36E181.1050101@egenix.com> Marc-Andre Lemburg added the comment: Martin v. L?wis wrote: > > Martin v. L?wis added the comment: > >> No, but we do need to make sure that the casual user does not >> run into such issues by using the default compiler on a typical >> Unix system with Python default settings. > > I think there is no risk here. The casual Python user on an AMD64 system > where gcc is the default compiler will use the Python installation that > comes with the operating system. I'd be fine with enabling the switch on those platforms as well, if we could get feedback from someone testing the behavior of gcc on an AMD platform running Ubuntu 10.4. If the problem is really only with the code snippet listed in the bug report, there shouldn't be a problem and we can go ahead with enabling computed gotos on that platform/compiler combination as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 10:49:58 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 09 Jul 2010 08:49:58 +0000 Subject: [issue9162] License for multiprocessing files In-Reply-To: <1278636265.5.0.494399446827.issue9162@psf.upfronthosting.co.za> Message-ID: <20100709084857.GA8021@yoda.bytereef.org> Stefan Krah added the comment: [Cc: psf at python.org] Jesse Noller wrote: > > Yes; the copyright has to stay; but the license data can leave afaik. If R Oudkerk signed the agreement, replacing 'see COPYING.txt' with 'Licensed to PSF under a Contributor Agreement.' should be fine. Does the PSF have the agreement? Stefan Krah ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 10:51:10 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Jul 2010 08:51:10 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1278665470.27.0.0435552687754.issue5127@psf.upfronthosting.co.za> Ezio Melotti added the comment: The 'if' in 'gettyperecord'. (I would also rewrite that as "if (code > 0x10FFFF)", it looks more readable to me.) The patch seems OK to me. In the NEWS message 'python' should be capitalized and I would also mention .isprintable() and possibly other functions that are affected directly -- mentioning repr() is good too, but it's only affected indirectly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 10:52:14 2010 From: report at bugs.python.org (Florent Xicluna) Date: Fri, 09 Jul 2010 08:52:14 +0000 Subject: [issue6057] sqlite3 error classes should be documented In-Reply-To: <1242673346.43.0.948670169284.issue6057@psf.upfronthosting.co.za> Message-ID: <1278665534.77.0.684721523805.issue6057@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- assignee: ghaering -> keywords: +easy nosy: +flox type: -> behavior versions: -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 10:59:06 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 09 Jul 2010 08:59:06 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1278665470.27.0.0435552687754.issue5127@psf.upfronthosting.co.za> Message-ID: <4C36E4D7.2050904@egenix.com> Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > The 'if' in 'gettyperecord'. (I would also rewrite that as "if (code > 0x10FFFF)", it looks more readable to me.) Ah, good catch ! > The patch seems OK to me. In the NEWS message 'python' should be capitalized and I would also mention .isprintable() and possibly other functions that are affected directly -- mentioning repr() is good too, but it's only affected indirectly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 11:02:40 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 09 Jul 2010 09:02:40 +0000 Subject: [issue9162] License for multiprocessing files In-Reply-To: <1278311687.0.0.315948028382.issue9162@psf.upfronthosting.co.za> Message-ID: <1278666160.81.0.842956130753.issue9162@psf.upfronthosting.co.za> Stefan Krah added the comment: If I'm not mistaken, the original code was BSD, so in the absence of a contributor agreement one could include the full BSD license in each file. http://pyprocessing.berlios.de/doc/COPYING.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 11:13:24 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 09 Jul 2010 09:13:24 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1278666804.07.0.499072645845.issue5127@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: str.isprintable() &co are not changed by this patch, because they enumerate Py_UNICODE units and do not join surrogates. See issue9200 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 11:15:17 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 09 Jul 2010 09:15:17 +0000 Subject: [issue9210] remove --with-wctype-functions configure option In-Reply-To: <1278666917.19.0.275398438928.issue9210@psf.upfronthosting.co.za> Message-ID: <1278666917.19.0.275398438928.issue9210@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc : Quoting Marc-Andre Lemburg: """ The support for the wctype functions should have been remove long ago, since they cause subtle incompatibilities between Python builds. I should have probably never added it in the first place... people were worried about the size of the type record tables at the time, which is why I thought it would be a good idea to try to optionally use the C lib functions. The comment was true before the Python type tables were changed into a type record database: the switch used to remove the Python tables required for those functions. With the type records database, this is no longer the case, since the records are also being used for properties that are not exposed via wctype functions. """ ---------- components: Unicode messages: 109696 nosy: amaury.forgeotdarc, ezio.melotti, lemburg priority: normal severity: normal status: open title: remove --with-wctype-functions configure option versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 11:21:34 2010 From: report at bugs.python.org (Christian Hager) Date: Fri, 09 Jul 2010 09:21:34 +0000 Subject: [issue9211] Cannot close socket after ssl handshake failed In-Reply-To: <1278667294.44.0.586266178697.issue9211@psf.upfronthosting.co.za> Message-ID: <1278667294.44.0.586266178697.issue9211@psf.upfronthosting.co.za> New submission from Christian Hager : When running a SSL socket server in Python 2.5 or 2.6 (didn't try with newer versions), new connections are setup with "ssl.wrap_socket()". Everything works fine if I connect a client with SSL, but if I just telnet to the server it's not possible to close the socket anymore (receiving data works fine through the non-ssl socket though). I get a SSL exception like this: "SSLError: [Errno 1] _ssl.c:480: error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol". After that I am not able to close the socket, but still can send data on the non-ssl-wrapped socket. How would I close this now open non-ssl socket? Simplified code: read_sockets,write_sockets,error_sockets = select.select(CONNECTION_LIST,[],[]) for sock in read_sockets: if sock == server_socket: newsock, addr = server_socket.accept() # SSL Setup try: sslsock = ssl.wrap_socket(newsock, server_side=True, certfile="../cert.pem", keyfile="../cert.pem") CONNECTION_LIST.append(sslsock) except: print "ssl handshake failed" try: newsock.send("bye\r\n") # succeeds newsock.close() # doesn't work ---------- components: IO messages: 109697 nosy: metachris priority: normal severity: normal status: open title: Cannot close socket after ssl handshake failed versions: Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 11:25:58 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Jul 2010 09:25:58 +0000 Subject: [issue3214] Suggest change to glossary explanation: "Duck Typing" In-Reply-To: <1278650471.65.0.420532701961.issue3214@psf.upfronthosting.co.za> Message-ID: <1278667547.3178.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > I actually would challenge the first sentence "A pythonic programming > style which determines an object?s type by inspection of its method or > attribute signature ". To me, and at least some usage on python-list, > duck-typing means determining the interface (not type) by calling > methods and catching exceptions if not present. This is the EAFP > rather than inspection/LBYL style of duck typing. Indeed. I would also remove "pythonic", because it will only confuse the beginner. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 11:28:07 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 Jul 2010 09:28:07 +0000 Subject: [issue2009] Grammar change to prevent shift/reduce problem with varargslist In-Reply-To: <1202170790.58.0.28997794645.issue2009@psf.upfronthosting.co.za> Message-ID: <1278667687.35.0.586829328207.issue2009@psf.upfronthosting.co.za> Mark Dickinson added the comment: +!. I had to do a very similar refactoring recently when trying to fix the parser module to understand keyword-only arguments and annotations. Taking keyword-only arguments into account, I think the replacement needs to be: varargslist: (vfpdef ['=' test] (',' vfpdef ['=' test])* [',' ['*' [vfpdef] (',' vfpdef ['=' test])* [',' '**' vfpdef] | '**' vfpdef]] | '*' [vfpdef] (',' vfpdef ['=' test])* [',' '**' vfpdef] | '**' vfpdef) and the analogous replacement needs to be made in the production for 'typedargslist', too. BTW, I'm a bit surprised that the grammar doesn't allow for trailing commas after keyword-only arguments: that is, def f(a, b,): ... is fine, but def f(*, a, b,): ... is a SyntaxError ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 11:34:11 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Jul 2010 09:34:11 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1278668051.4.0.0636115061699.issue1578269@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This has broken all non-Windows buildbots. Can you take a look? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 11:41:38 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Jul 2010 09:41:38 +0000 Subject: [issue9208] SMTPHandler does not handle unicode strings In-Reply-To: <1278627371.74.0.0567748809415.issue9208@psf.upfronthosting.co.za> Message-ID: <1278668498.97.0.656210179708.issue9208@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> vinay.sajip nosy: +vinay.sajip versions: +Python 3.2 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 11:45:48 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 Jul 2010 09:45:48 +0000 Subject: [issue2009] Grammar change to prevent shift/reduce problem with varargslist In-Reply-To: <1202170790.58.0.28997794645.issue2009@psf.upfronthosting.co.za> Message-ID: <1278668748.86.0.907379556585.issue2009@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch. I'm assuming that this doesn't violate the moratorium, since it's not so much a change to the grammar itself as a modification to the way that it's expressed. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file17914/refactor_varargslist.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 11:49:09 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Jul 2010 09:49:09 +0000 Subject: [issue9198] Should repr() print unicode characters outside the BMP? In-Reply-To: <1278579187.34.0.662391507791.issue9198@psf.upfronthosting.co.za> Message-ID: <1278668949.82.0.0997720973536.issue9198@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here is a patch to "fix" sys_displayhook (note: the patch is just a proof of concept -- it seems to work fine but I still have to clean it up, add comments, rename and reorganize some vars and add tests). This is an example output while using iso-8859-1 as IO encoding: wolf at linuxvm:~/dev/py3k$ PYTHONIOENCODING=iso-8859-1 ./python Python 3.2a0 (py3k:82643:82644M, Jul 9 2010, 11:39:25) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys; sys.stdout.encoding, sys.stdin.encoding ('iso-8859-1', 'iso-8859-1') >>> 'ascii string' 'ascii string' # works fine >>> 'some accented chars: ???' 'some accented chars: ???' # works fine - these chars are encodable >>> 'a snowman: \u2603' 'a snowman: \u2603' # non-encodable - the char is escaped instead of raising an error >>> 'snowman: \u2603, and accented ???' 'snowman: \u2603, and accented ???' # only non-encodable chars are escaped >>> # the behavior of print is still the same: >>> print('some accented chars: ???') some accented chars: ??? >>> print('a snowman: \u2603') Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'latin-1' codec can't encode character '\u2603' in position 11: ordinal not in range(256) ------------------------------------- While testing the patch with PYTHONIOENCODING=iso-8859-1 I also found this weird issue that however is *not* related to the patch, since I managed to reproduce on a clean py3k using PYTHONIOENCODING=iso-8859-1: >>> '????? ????? ?????' '??\xa0??? ?????\xad ?????' >>> '????? ????? ?????'.encode('iso-8859-1') b'\xc3\xb2\xc3\xa0\xc3\xb9\xc3\xa8\xc3\xac \xc3\xb3\xc3\xa1\xc3\xba\xc3\xa9\xc3\xad \xc3\xb6\xc3\xa4\xc3\xbc\xc3\xab\xc3\xaf' >>> '?????'.encode('utf-8') b'\xc3\x83\xc2\xb2\xc3\x83\xc2\xa0\xc3\x83\xc2\xb9\xc3\x83\xc2\xa8\xc3\x83\xc2\xac' I think there might be some conflict between the IO encoding that I specified and the one that my terminal actually uses, but I couldn't figure out what's going on exactly (it also weird that only '?' and '?' are not displayed correctly). Unless this behavior is expected I'll open another issue about it. ---------- keywords: +patch Added file: http://bugs.python.org/file17915/issue9198.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 11:49:29 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 09 Jul 2010 09:49:29 +0000 Subject: [issue9208] SMTPHandler in the logging module does not handle unicode strings In-Reply-To: <1278627371.74.0.0567748809415.issue9208@psf.upfronthosting.co.za> Message-ID: <1278668969.63.0.828864186516.issue9208@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- title: SMTPHandler does not handle unicode strings -> SMTPHandler in the logging module does not handle unicode strings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 11:51:49 2010 From: report at bugs.python.org (Christian Hager) Date: Fri, 09 Jul 2010 09:51:49 +0000 Subject: [issue9211] Cannot close socket after ssl handshake failed In-Reply-To: <1278667294.44.0.586266178697.issue9211@psf.upfronthosting.co.za> Message-ID: <1278669109.79.0.953444891983.issue9211@psf.upfronthosting.co.za> Christian Hager added the comment: Sorry for posting that issue -- I was able to solve it with newsock.shutdown(socket.SHUT_WR) ("newsock.shutdown(socket.SHUT_RD)" doesn't work for that). # SSL Setup try: sslsock = ssl.wrap_socket(newsock, server_side=True, certfile="../cert.pem", keyfile="../cert.pem") CONNECTION_LIST.append(sslsock) except: print "ssl handshake failed" newsock.shutdown(socket.SHUT_WR) newsock.close() ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 11:54:26 2010 From: report at bugs.python.org (Andrew Clegg) Date: Fri, 09 Jul 2010 09:54:26 +0000 Subject: [issue7846] Fnmatch cache is never cleared during usage In-Reply-To: <1265209336.56.0.865162695939.issue7846@psf.upfronthosting.co.za> Message-ID: <1278669266.62.0.741928209372.issue7846@psf.upfronthosting.co.za> Changes by Andrew Clegg : Removed file: http://bugs.python.org/file17901/py3k-fnmatch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 11:54:29 2010 From: report at bugs.python.org (Andrew Clegg) Date: Fri, 09 Jul 2010 09:54:29 +0000 Subject: [issue7846] Fnmatch cache is never cleared during usage In-Reply-To: <1265209336.56.0.865162695939.issue7846@psf.upfronthosting.co.za> Message-ID: <1278669269.45.0.431964623852.issue7846@psf.upfronthosting.co.za> Changes by Andrew Clegg : Removed file: http://bugs.python.org/file17902/py27-fnmatch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 11:57:29 2010 From: report at bugs.python.org (Andrew Clegg) Date: Fri, 09 Jul 2010 09:57:29 +0000 Subject: [issue7846] Fnmatch cache is never cleared during usage In-Reply-To: <1265209336.56.0.865162695939.issue7846@psf.upfronthosting.co.za> Message-ID: <1278669449.79.0.796426969454.issue7846@psf.upfronthosting.co.za> Andrew Clegg added the comment: OK, regenerated both patches from the top level of the checkout (paths within the patch are 'Lib/fnmatch.py' and 'Lib/test/test_fnmatch.py'. Sorry about the corrupted patch before - I've tested this version by reverting my changes and reapplying it, and it seems to work cleanly. Cheers ---------- Added file: http://bugs.python.org/file17916/py27-fnmatch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 11:57:36 2010 From: report at bugs.python.org (Andrew Clegg) Date: Fri, 09 Jul 2010 09:57:36 +0000 Subject: [issue7846] Fnmatch cache is never cleared during usage In-Reply-To: <1265209336.56.0.865162695939.issue7846@psf.upfronthosting.co.za> Message-ID: <1278669456.55.0.847946108402.issue7846@psf.upfronthosting.co.za> Changes by Andrew Clegg : Added file: http://bugs.python.org/file17917/py3k-fnmatch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 12:09:35 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 09 Jul 2010 10:09:35 +0000 Subject: [issue2009] Grammar change to prevent shift/reduce problem with varargslist In-Reply-To: <1278667687.35.0.586829328207.issue2009@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: > BTW, I'm a bit surprised that the grammar doesn't allow for trailing commas after keyword-only arguments: ?that is, > > def f(a, b,): ... ? ? is fine, but > def f(*, a, b,): ... ?is a SyntaxError That seems more like an oversight than a deliberate restriction. Does your patch eliminate the discrepancy? (And agreed the moratorium doesn't apply). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 12:20:18 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 Jul 2010 10:20:18 +0000 Subject: [issue2009] Grammar change to prevent shift/reduce problem with varargslist In-Reply-To: <1202170790.58.0.28997794645.issue2009@psf.upfronthosting.co.za> Message-ID: <1278670818.77.0.295577182012.issue2009@psf.upfronthosting.co.za> Mark Dickinson added the comment: No, "def f(*, a,): ..." is still a SyntaxError with the patch. I'd think that allowing that extra comma *would* be a violation of the moratorium, though maybe it's debatable. Perhaps worth bringing up on python-dev? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 12:28:02 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 09 Jul 2010 10:28:02 +0000 Subject: [issue2009] Grammar change to prevent shift/reduce problem with varargslist In-Reply-To: <1278670818.77.0.295577182012.issue2009@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: > No, ?"def f(*, a,): ..." is still a SyntaxError with the patch. ?I'd think that allowing that extra comma *would* be a violation of the moratorium, though maybe it's debatable. ?Perhaps worth bringing up on python-dev? Good point - I just wouldn't worry about it in that case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 12:41:31 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Jul 2010 10:41:31 +0000 Subject: [issue7846] Fnmatch cache is never cleared during usage In-Reply-To: <1265209336.56.0.865162695939.issue7846@psf.upfronthosting.co.za> Message-ID: <1278672091.7.0.949227751097.issue7846@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Instead of writing `bytes('foo', encoding='ascii')`, you can just write `b'foo'`. Otherwise, patch looks ok. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 12:43:13 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Jul 2010 10:43:13 +0000 Subject: [issue1945] Document back ported C functions In-Reply-To: <1201445858.91.0.21119487494.issue1945@psf.upfronthosting.co.za> Message-ID: <1278672193.11.0.166011994861.issue1945@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: georg.brandl -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 12:45:30 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Jul 2010 10:45:30 +0000 Subject: [issue5962] Ambiguity about the semantics of sys.exit() and os._exit() in multithreaded program In-Reply-To: <1241722395.44.0.880118568656.issue5962@psf.upfronthosting.co.za> Message-ID: <1278672330.73.0.965041332637.issue5962@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +exarkun, gps _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 12:52:27 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Jul 2010 10:52:27 +0000 Subject: [issue4609] Allow use of > 256 FD's on solaris in 32 bit mode In-Reply-To: <1228827066.41.0.986801678261.issue4609@psf.upfronthosting.co.za> Message-ID: <1278672747.23.0.502610987585.issue4609@psf.upfronthosting.co.za> Antoine Pitrou added the comment: 3.x doesn't use FILE pointers for the main I/O library (it uses unbuffered I/O instead). It only uses them for importing, and a couple of extension modules such as bz2 and zipimport. It might still mean, though, that a Python program opening many files might fail importing a module afterwards. ---------- nosy: +loewis, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 12:55:13 2010 From: report at bugs.python.org (Andrew Clegg) Date: Fri, 09 Jul 2010 10:55:13 +0000 Subject: [issue7846] Fnmatch cache is never cleared during usage In-Reply-To: <1265209336.56.0.865162695939.issue7846@psf.upfronthosting.co.za> Message-ID: <1278672913.91.0.873446706504.issue7846@psf.upfronthosting.co.za> Andrew Clegg added the comment: Updated py3k patch to use the more concise bytes syntax, cheers. ---------- Added file: http://bugs.python.org/file17918/py3k-fnmatch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 13:13:46 2010 From: report at bugs.python.org (Jesse Noller) Date: Fri, 09 Jul 2010 11:13:46 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278674026.64.0.604727315925.issue9207@psf.upfronthosting.co.za> Jesse Noller added the comment: I'm not sure if there would still be the possibility; the thing which worries me is the debug() function vanishing on us - something not good is happening on interpreter shutdown. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 13:15:21 2010 From: report at bugs.python.org (Jesse Noller) Date: Fri, 09 Jul 2010 11:15:21 +0000 Subject: [issue9162] License for multiprocessing files In-Reply-To: <1278311687.0.0.315948028382.issue9162@psf.upfronthosting.co.za> Message-ID: <1278674121.49.0.135181455643.issue9162@psf.upfronthosting.co.za> Jesse Noller added the comment: Hi Stefan - I'm familiar with the license/etc of the original module. This bug isn't urgent; I shot a quick email to the PSF's secretary Pat to confirm we have a contributor agreement however. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 13:35:31 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 09 Jul 2010 11:35:31 +0000 Subject: [issue9162] License for multiprocessing files In-Reply-To: <1278311687.0.0.315948028382.issue9162@psf.upfronthosting.co.za> Message-ID: <1278675331.64.0.903775794626.issue9162@psf.upfronthosting.co.za> Stefan Krah added the comment: Jesse, there's no doubt that you know the original license. :) I should have been more verbose: My BSD comment was intended for public consumption. People often think GPL if they see a reference to COPYING.txt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 13:37:06 2010 From: report at bugs.python.org (Jesse Noller) Date: Fri, 09 Jul 2010 11:37:06 +0000 Subject: [issue9162] License for multiprocessing files In-Reply-To: <1278311687.0.0.315948028382.issue9162@psf.upfronthosting.co.za> Message-ID: <1278675426.59.0.351647599039.issue9162@psf.upfronthosting.co.za> Jesse Noller added the comment: Egad No! I gotcha. I'll find out what the deal with the contrib. agreement is. Pretty sure we had to wait on it when we brought it in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 13:43:44 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 09 Jul 2010 11:43:44 +0000 Subject: [issue9210] remove --with-wctype-functions configure option In-Reply-To: <1278666917.19.0.275398438928.issue9210@psf.upfronthosting.co.za> Message-ID: <1278675824.15.0.19619870447.issue9210@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Patch attached. ---------- keywords: +patch Added file: http://bugs.python.org/file17919/kill-wctype.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 13:44:32 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 09 Jul 2010 11:44:32 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows In-Reply-To: <1278668051.4.0.0636115061699.issue1578269@psf.upfronthosting.co.za> Message-ID: <12C7AB425F0DD546B6049311F827C74E08A2C97E17@VA3DIAXVS141.RED001.local> Jason R. Coombs added the comment: I'm building now and will report back shortly... ---------- Added file: http://bugs.python.org/file17920/smime.p7s _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 6460 bytes Desc: not available URL: From report at bugs.python.org Fri Jul 9 13:49:36 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 09 Jul 2010 11:49:36 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1278676176.47.0.380743491283.issue1578269@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Also, GetFinalPathNameByHandle() is called 5 times with VOLUME_NAME_DOS, and once with VOLUME_NAME_NT. This one looks suspect to me. [I noticed this because these symbols are not defined with the SDK shipped with VS8.0. I'll propose another patch for this] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 13:54:36 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 09 Jul 2010 11:54:36 +0000 Subject: [issue9210] remove --with-wctype-functions configure option In-Reply-To: <1278675824.15.0.19619870447.issue9210@psf.upfronthosting.co.za> Message-ID: <4C370DF8.1080904@egenix.com> Marc-Andre Lemburg added the comment: Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > Patch attached. Thanks. The patch looks good and I'd be +1 on applying it. The only problem I see is that we may have to follow the deprecation process. OTOH, I've announce the plan in 2004 and confirmed it again in 2005: http://mail.python.org/pipermail/python-dev/2004-December/050193.html http://mail.python.org/pipermail/python-dev/2005-April/052989.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 14:10:53 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Jul 2010 12:10:53 +0000 Subject: [issue9038] test_distutils failure In-Reply-To: <1277066901.58.0.116708897563.issue9038@psf.upfronthosting.co.za> Message-ID: <1278677453.31.0.43122840052.issue9038@psf.upfronthosting.co.za> R. David Murray added the comment: I see this error too, but only when running under -j. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 14:23:48 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Jul 2010 12:23:48 +0000 Subject: [issue7846] Fnmatch cache is never cleared during usage In-Reply-To: <1265209336.56.0.865162695939.issue7846@psf.upfronthosting.co.za> Message-ID: <1278678228.44.0.354317156942.issue7846@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: -> r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 14:39:32 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 09 Jul 2010 12:39:32 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1278679172.16.0.216947733146.issue1578269@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Here's a patch to address the posix failures: - test_posixpath seems to have lost the creation of one test file. - WindowsError doesn't exist on other platforms, so it can't be caught directly (in tarfile.py). I've written a work-around, but I don't particularly like it (catches all exceptions and tests the name). There were three other tests that reported BAD for me. test_os and test_subprocess were reporting bad due to skipped tests. I presume this will not break the buildbots? test_readline is failing on readline.clear_history because it appears that attribute doesn't exist. I suspect this error is not related to the symlink patch. ---------- Added file: http://bugs.python.org/file17921/posix-failures.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 14:39:45 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 09 Jul 2010 12:39:45 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1278679185.35.0.11625989037.issue1578269@psf.upfronthosting.co.za> Changes by Jason R. Coombs : Removed file: http://bugs.python.org/file17920/smime.p7s _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 14:52:46 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 09 Jul 2010 12:52:46 +0000 Subject: [issue2044] test_sunaudiodev.py converted to unittest In-Reply-To: <1202418415.34.0.91216503558.issue2044@psf.upfronthosting.co.za> Message-ID: <1278679966.32.0.324173894738.issue2044@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Not in Py3. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 14:53:07 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 09 Jul 2010 12:53:07 +0000 Subject: [issue2024] test_gl.py converted to unittest In-Reply-To: <1202328966.17.0.238328227675.issue2024@psf.upfronthosting.co.za> Message-ID: <1278679987.19.0.119117853858.issue2024@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Not in Py3. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 14:53:23 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 09 Jul 2010 12:53:23 +0000 Subject: [issue2022] test_al converted to unittest In-Reply-To: <1202325918.42.0.816019175645.issue2022@psf.upfronthosting.co.za> Message-ID: <1278680003.27.0.914826081644.issue2022@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Not in Py3. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 14:53:55 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 09 Jul 2010 12:53:55 +0000 Subject: [issue2023] test_cd converted to unittest In-Reply-To: <1202326827.71.0.0542752440376.issue2023@psf.upfronthosting.co.za> Message-ID: <1278680035.56.0.963355221188.issue2023@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Not in Py3. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 14:55:15 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 09 Jul 2010 12:55:15 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1278680115.34.0.794435185402.issue1578269@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Hm, the patch could be more "pythonic". Something like: symlink_exception = (AttributeError,) try: symlink_exception += (NotImplementedError, WindowsError) except NameError: pass try: ... except symlink_exception: ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 15:07:38 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 13:07:38 +0000 Subject: [issue5121] PyRun_InteractiveLoop disagrees with documentation? In-Reply-To: <1233457621.0.0.661616898289.issue5121@psf.upfronthosting.co.za> Message-ID: <1278680858.48.0.613561403292.issue5121@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm assuming that this will be a doc change, in which case it applies to all versions. The comment is actually against PyRun_InteractiveLoopFlags. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +BreamoreBoy, docs at python stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 15:10:49 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Jul 2010 13:10:49 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows In-Reply-To: <1278680115.34.0.794435185402.issue1578269@psf.upfronthosting.co.za> Message-ID: <1278681034.3178.4.camel@localhost.localdomain> Antoine Pitrou added the comment: > Hm, the patch could be more "pythonic". Something like: > > symlink_exception = (AttributeError,) > try: > symlink_exception += (NotImplementedError, WindowsError) > except NameError: > pass Probably better as: symlink_exception = (AttributeError, NotImplementedError) try: symlink_exception += (WindowsError,) except NameError: pass ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 15:11:02 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 13:11:02 +0000 Subject: [issue5089] Error in atexit._run_exitfuncs [...] Exception expected for value, tuple found In-Reply-To: <1233147170.33.0.0367863608551.issue5089@psf.upfronthosting.co.za> Message-ID: <1278681062.43.0.813773738186.issue5089@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can this be reproduced with 3.1, 3.2 or even 2.7, or can it be closed? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 15:16:27 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 13:16:27 +0000 Subject: [issue749722] isinstance and weakref proxies. Message-ID: <1278681387.62.0.772920125618.issue749722@psf.upfronthosting.co.za> Mark Lawrence added the comment: Being seven years old is this request still valid, or has it been overtaken by events? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 15:20:49 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 Jul 2010 13:20:49 +0000 Subject: [issue5089] Error in atexit._run_exitfuncs [...] Exception expected for value, tuple found In-Reply-To: <1233147170.33.0.0367863608551.issue5089@psf.upfronthosting.co.za> Message-ID: <1278681649.73.0.684099301673.issue5089@psf.upfronthosting.co.za> Mark Dickinson added the comment: I haven't seen this for a while; it can probably be closed. Thanks! ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 15:21:01 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 13:21:01 +0000 Subject: [issue2600] BindingHTTPConnectionWithTimeout and BindingHTTPHandlerWithTimeout In-Reply-To: <1207688700.18.0.242817334294.issue2600@psf.upfronthosting.co.za> Message-ID: <1278681661.8.0.837826620001.issue2600@psf.upfronthosting.co.za> Mark Lawrence added the comment: Pau, this isn't likely to be progressed unless you can provide a unit test and possibly doc patches as well. ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 15:29:02 2010 From: report at bugs.python.org (Zvezdan Petkovic) Date: Fri, 09 Jul 2010 13:29:02 +0000 Subject: [issue9033] cmd module tab misbehavior In-Reply-To: <1276960216.2.0.17858038653.issue9033@psf.upfronthosting.co.za> Message-ID: <1278682142.49.0.854529584923.issue9033@psf.upfronthosting.co.za> Zvezdan Petkovic added the comment: Does a translation really need to be in Python? I use .editrc file in my home directory with this content: python:bind ^I rl_complete and everything works fine. ---------- nosy: +zvezdan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 15:30:34 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 13:30:34 +0000 Subject: [issue4140] urllib2: request with digest auth through proxy fail In-Reply-To: <1224258333.01.0.331002758914.issue4140@psf.upfronthosting.co.za> Message-ID: <1278682234.24.0.602367639401.issue4140@psf.upfronthosting.co.za> Mark Lawrence added the comment: As it's not actually known whether urllib2 or IIS is at fault, I suggest this is closed, it can always be reopened. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 15:37:57 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Jul 2010 13:37:57 +0000 Subject: [issue7846] Fnmatch cache is never cleared during usage In-Reply-To: <1265209336.56.0.865162695939.issue7846@psf.upfronthosting.co.za> Message-ID: <1278682677.43.0.781331782457.issue7846@psf.upfronthosting.co.za> R. David Murray added the comment: Committed to py3k in r82730, 3.1 in r82733, 2.7 in r82732, and, since 2.6.6 is still to come, 2.6 in r82740. Andrew: FYI I changed the assertTrue to assertLessEqual to take advantage of the better failure messages provided by the newer unittest methods. Thanks for the patch. ---------- resolution: accepted -> fixed stage: unit test needed -> committed/rejected status: open -> closed versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 15:40:31 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 13:40:31 +0000 Subject: [issue902065] fails building C++ extensions when configured --without-cxx Message-ID: <1278682831.38.0.0179014979784.issue902065@psf.upfronthosting.co.za> Mark Lawrence added the comment: This can be closed as a duplicate as Lib/distutils/sysconfig.py already refers to LDSHARED and CCSHARED. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 15:41:49 2010 From: report at bugs.python.org (Greg Brockman) Date: Fri, 09 Jul 2010 13:41:49 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278682909.73.0.690743796319.issue9207@psf.upfronthosting.co.za> Greg Brockman added the comment: Think http://www.mail-archive.com/python-list at python.org/msg282114.html is relevant? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 15:47:21 2010 From: report at bugs.python.org (Jesse Noller) Date: Fri, 09 Jul 2010 13:47:21 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278683241.79.0.495534715552.issue9207@psf.upfronthosting.co.za> Jesse Noller added the comment: Greg - yeah. it's the same problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 15:54:35 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 13:54:35 +0000 Subject: [issue921868] socket_htons does not work under AIX 64-bit Message-ID: <1278683675.67.0.672171531233.issue921868@psf.upfronthosting.co.za> Mark Lawrence added the comment: Do the socket tests still fail under 64 bit AIX? If yes could this patch or something similar be applied? If no please close this issue. ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 15:56:29 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 09 Jul 2010 13:56:29 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1278683789.33.0.535987041027.issue1578269@psf.upfronthosting.co.za> Brian Curtin added the comment: Committed Jason's patch with Antoine's twist as r82743 after running on Arch Linux. Thanks for catching and looking into this stuff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 16:00:22 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 14:00:22 +0000 Subject: [issue877904] freeze: problems excluding site Message-ID: <1278684022.43.0.876420955561.issue877904@psf.upfronthosting.co.za> Mark Lawrence added the comment: This strikes me as a reasonable request, would someone please like to comment. ---------- nosy: +BreamoreBoy versions: +Python 3.1 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 16:07:58 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 14:07:58 +0000 Subject: [issue1053687] PyOS_InputHook not called in IDLE subprocess Message-ID: <1278684478.44.0.0605316829326.issue1053687@psf.upfronthosting.co.za> Mark Lawrence added the comment: Wuld anyone with the relevant expertise care to comment on this please? ---------- nosy: +BreamoreBoy title: PyOS_InputHook not called in subprocess -> PyOS_InputHook not called in IDLE subprocess versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 16:08:56 2010 From: report at bugs.python.org (Ask Solem) Date: Fri, 09 Jul 2010 14:08:56 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278684536.81.0.0867451291017.issue9207@psf.upfronthosting.co.za> Changes by Ask Solem : ---------- nosy: +asksol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 16:15:06 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 14:15:06 +0000 Subject: [issue1040439] Missing documentation on How To Link With libpython Message-ID: <1278684906.75.0.507673016812.issue1040439@psf.upfronthosting.co.za> Mark Lawrence added the comment: The number of google hits tells me this is still an issue. ---------- assignee: -> docs at python nosy: +BreamoreBoy, docs at python versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 16:15:35 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 09 Jul 2010 14:15:35 +0000 Subject: [issue8402] glob returns empty list with "[" character in the folder name In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1278684935.0.0.0219749798837.issue8402@psf.upfronthosting.co.za> Eric Smith added the comment: The note about no quoting meta-chars is in the docstring for fnmatch.translate, not the documentation. I still see it in 3.1. I have a to-do item to add this to the actual documentation. I'll add an issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 16:25:50 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 14:25:50 +0000 Subject: [issue1178136] cgitb.py support for frozen images Message-ID: <1278685550.46.0.742914525673.issue1178136@psf.upfronthosting.co.za> Mark Lawrence added the comment: This is a small patch which could be useful, could someone please test it against a frozen program? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 16:33:28 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 14:33:28 +0000 Subject: [issue1158231] string.Template does not allow step-by-step replacements Message-ID: <1278686008.32.0.604203657954.issue1158231@psf.upfronthosting.co.za> Mark Lawrence added the comment: Stefan, could you provide a patch to move this forward, can this issue be closed, or what? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 16:40:20 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 14:40:20 +0000 Subject: [issue1158231] string.Template does not allow step-by-step replacements Message-ID: <1278686420.3.0.877561535476.issue1158231@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.1 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 16:45:41 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 09 Jul 2010 14:45:41 +0000 Subject: [issue9033] cmd module tab misbehavior In-Reply-To: <1276960216.2.0.17858038653.issue9033@psf.upfronthosting.co.za> Message-ID: <1278686741.96.0.0622417233108.issue9033@psf.upfronthosting.co.za> Ronald Oussoren added the comment: We either have to add some translation, or tweak parts of python: * the cmd module needs to learn how to configure libedit when the readline extension was linked to libedit * the rlcompleter documentation needs to be updated to do the same And that's just the stdlib. IIRC ipython contains code that uses libedit style configuration instead of readline when using /usr/bin/python on OSX, and there are probably other. IMHO the current behavior is confusing: the module is named readline, but sometimes uses libedit behavior. At least I ensured that the usage of libedit can be detected by introspecting readline.__doc__. A basic translator shouldn't be that hard... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 17:10:16 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 15:10:16 +0000 Subject: [issue1147646] Windows deadlock with PyEval_ReleaseLock Message-ID: <1278688216.16.0.845025006836.issue1147646@psf.upfronthosting.co.za> Mark Lawrence added the comment: Anyone with Windows threading experience who could comment on this please, i.e. is it still an issue? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 17:10:54 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 15:10:54 +0000 Subject: [issue1147646] Windows deadlock with PyEval_ReleaseLock Message-ID: <1278688254.36.0.0753156854683.issue1147646@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 17:11:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Jul 2010 15:11:16 +0000 Subject: [issue6507] Enhance dis.dis to autocompile codestrings In-Reply-To: <1247857575.21.0.389925271165.issue6507@psf.upfronthosting.co.za> Message-ID: <1278688276.59.0.214841392517.issue6507@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: accepted -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 17:15:44 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 15:15:44 +0000 Subject: [issue1248658] dir should accept dirproxies for __dict__ Message-ID: <1278688544.49.0.296573007335.issue1248658@psf.upfronthosting.co.za> Mark Lawrence added the comment: Ronald has this already been implemented, if not could you provide a patch for it, or what? ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 17:18:11 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 09 Jul 2010 15:18:11 +0000 Subject: [issue921868] socket_htons does not work under AIX 64-bit Message-ID: <1278688691.33.0.607773435779.issue921868@psf.upfronthosting.co.za> Stefan Krah added the comment: The proposed change was for socket_htons() to use ints instead of unsigned longs. This is the case now, so I'm closing the issue. ---------- nosy: +skrah resolution: -> out of date stage: unit test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 17:18:33 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 09 Jul 2010 15:18:33 +0000 Subject: [issue1248658] dir should accept dirproxies for __dict__ Message-ID: <1278688713.78.0.2820111171.issue1248658@psf.upfronthosting.co.za> Ronald Oussoren added the comment: AFAIK this is not yet implemented. Patched would be appreciated. I will get around to doing it myself some day, but this issue doesn't have high priority for me. ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 17:25:38 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 15:25:38 +0000 Subject: [issue1250] Building external modules using Sun Studio 12 In-Reply-To: <1191964251.86.0.558465608726.issue1250@psf.upfronthosting.co.za> Message-ID: <1278689138.76.0.0504753897274.issue1250@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm assuming this is still an issue, comments please. ---------- components: -Distutils nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 17:27:43 2010 From: report at bugs.python.org (Robert Pyle) Date: Fri, 09 Jul 2010 15:27:43 +0000 Subject: [issue5024] sndhdr.whathdr returns -1 for WAV file frame count In-Reply-To: <1278629523.45.0.693065589089.issue5024@psf.upfronthosting.co.za> Message-ID: <37E33902-D5CA-42EA-B92C-C540F3260089@post.harvard.edu> Robert Pyle added the comment: On Jul 8, 2010, at 6:52 PM, Mark Lawrence wrote: > > Mark Lawrence added the comment: > > Robert, could you provide a patch for this? > > ---------- > nosy: +BreamoreBoy > stage: -> needs patch > versions: +Python 3.2 > > _______________________________________ > Python tracker > > _______________________________________ Okay, I'm not sure exactly how I'm supposed to go about this. Here's the output from diff for sndhdr.py 131d130 < import wave 135,141c134,138 < f.seek(0) < try: < w = wave.openfp(f, 'r') < except (EOFError, wave.Error): < return None < return ('wav', w.getframerate(), w.getnchannels(), \ < w.getnframes(), 8*w.getsampwidth()) --- > style = get_short_le(h[20:22]) > nchannels = get_short_le(h[22:24]) > rate = get_long_le(h[24:28]) > sample_bits = get_short_le(h[34:36]) > return 'wav', rate, nchannels, -1, sample_bits $ All I did was use test_aifc() as inspiration, so the patched sndhdr.py calls wave.py to get the file parameters. Here's the new test_wav() in its entirety: -------------------------------- def test_wav(h, f): import wave # 'RIFF' 'WAVE' 'fmt ' if h[:4] != 'RIFF' or h[8:12] != 'WAVE' or h[12:16] != 'fmt ': return None f.seek(0) try: w = wave.openfp(f, 'r') except (EOFError, wave.Error): return None return ('wav', w.getframerate(), w.getnchannels(), \ w.getnframes(), 8*w.getsampwidth()) -------------------------------- If you want anything else, please ask. Bob Pyle ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 17:36:01 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 15:36:01 +0000 Subject: [issue5301] add mimetype for image/vnd.microsoft.icon (patch) In-Reply-To: <1234907792.31.0.00254559526039.issue5301@psf.upfronthosting.co.za> Message-ID: <1278689761.75.0.0154826807733.issue5301@psf.upfronthosting.co.za> Mark Lawrence added the comment: Just a one line addition to mimetypes.py ---------- nosy: +BreamoreBoy stage: -> patch review versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 17:41:35 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 15:41:35 +0000 Subject: [issue5321] I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status) In-Reply-To: <1235065804.66.0.913102056215.issue5321@psf.upfronthosting.co.za> Message-ID: <1278690095.52.0.724741714813.issue5321@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can anyone with a Linux box please check to see if this is still an issue. ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 17:44:33 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Jul 2010 15:44:33 +0000 Subject: [issue4044] test_output_textcalendar fails on non-englisch locale In-Reply-To: <1223209182.04.0.559787210329.issue4044@psf.upfronthosting.co.za> Message-ID: <1278690273.81.0.726247800825.issue4044@psf.upfronthosting.co.za> R. David Murray added the comment: This passes for me on linux (2.7), which is what I would expect, since the locale should not actually affect a python program unless locale.setlocale is called, which regrtest doesn't do. I also tried OSX 2.7+, and the 10.4 system python (2.6.1). test_calendar passed using the specified command line in all cases. Can anyone reproduce this issue? ---------- nosy: +r.david.murray resolution: -> works for me stage: -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 17:46:21 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 15:46:21 +0000 Subject: [issue5346] mailbox._singlefileMailbox.flush doesn't preserve file rights In-Reply-To: <1235317721.52.0.542523133974.issue5346@psf.upfronthosting.co.za> Message-ID: <1278690381.72.0.492315822068.issue5346@psf.upfronthosting.co.za> Mark Lawrence added the comment: What platform is this on? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 17:46:50 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 15:46:50 +0000 Subject: [issue5346] mailbox._singlefileMailbox.flush doesn't preserve file rights In-Reply-To: <1235317721.52.0.542523133974.issue5346@psf.upfronthosting.co.za> Message-ID: <1278690410.75.0.804221686069.issue5346@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> unit test needed versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 17:50:07 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 15:50:07 +0000 Subject: [issue5347] SocketIO redefines RawIOBase.__del__ In-Reply-To: <1235335737.36.0.938814537211.issue5347@psf.upfronthosting.co.za> Message-ID: <1278690607.29.0.625890361953.issue5347@psf.upfronthosting.co.za> Mark Lawrence added the comment: Does anyone need to do anything with this, or can it be closed? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 18:01:03 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 16:01:03 +0000 Subject: [issue5384] mmap and exception type In-Reply-To: <1235755397.37.0.107266248804.issue5384@psf.upfronthosting.co.za> Message-ID: <1278691263.32.0.75230873197.issue5384@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could someone please advise on the appropriate exception types for mmap. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 18:03:10 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 09 Jul 2010 16:03:10 +0000 Subject: [issue5321] I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status) In-Reply-To: <1235065804.66.0.913102056215.issue5321@psf.upfronthosting.co.za> Message-ID: <1278691390.49.0.157501657091.issue5321@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Yes, py3k r82745 still shows the problem ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 18:07:57 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 16:07:57 +0000 Subject: [issue2941] Propagate define to resurce mingw32 compile In-Reply-To: <1211451506.25.0.765395098834.issue2941@psf.upfronthosting.co.za> Message-ID: <1278691677.19.0.258393453069.issue2941@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm not entirely sure what msg67184 means but the patch is simple enough. ---------- nosy: +BreamoreBoy stage: -> unit test needed versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 18:21:06 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 16:21:06 +0000 Subject: [issue5412] extend configparser to support [] syntax In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1278692466.75.0.314457304958.issue5412@psf.upfronthosting.co.za> Mark Lawrence added the comment: Patch is simple, are people for or against syntactic sugar in configparser? ---------- nosy: +BreamoreBoy stage: -> unit test needed versions: +Python 3.2 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 18:30:18 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 16:30:18 +0000 Subject: [issue5424] Packed IPaddr conversion tests should be extended In-Reply-To: <1236260237.37.0.149966249724.issue5424@psf.upfronthosting.co.za> Message-ID: <1278693018.39.0.767223344961.issue5424@psf.upfronthosting.co.za> Mark Lawrence added the comment: Adding tests into test_socket.py for invalid input can't be wrong can it? Patch seems clean but would someone cast a more experienced Mk1 eyeball over it please. ---------- nosy: +BreamoreBoy stage: -> patch review versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 18:32:55 2010 From: report at bugs.python.org (Jeffrey Yasskin) Date: Fri, 09 Jul 2010 16:32:55 +0000 Subject: [issue9189] Improve CFLAGS handling In-Reply-To: <1278517873.84.0.191654592449.issue9189@psf.upfronthosting.co.za> Message-ID: <1278693175.39.0.163476588846.issue9189@psf.upfronthosting.co.za> Jeffrey Yasskin added the comment: Hearing no further comments, I've committed this as r82746. Let me know if it breaks anything. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 18:35:31 2010 From: report at bugs.python.org (Jan Killian) Date: Fri, 09 Jul 2010 16:35:31 +0000 Subject: [issue444582] Finding programs in PATH, adding shutil.which Message-ID: <1278693331.88.0.98367845645.issue444582@psf.upfronthosting.co.za> Jan Killian added the comment: @tarek: Sorry for not reacting, it completely vaporized out of my head. I'll do the patch this weekend. Agree, only which/which_files belong to public API. Regarding PATHEXT: 1. When a new process is created, the value is taken from registry variable PATHEXT in the 'HKCU\Environment' key, or the 'HKLM\System\CurrentControlSet\Control\Session Manager\Environment' key (in this order). The first key is for custom user values, and PATHEXT is not set by default there. The second key is a system-wide setting and defaults to: A. ".COM;.EXE;.BAT;.CMD" in Windows NT, and possibly also W2K (although it is already 5.0 version) B. ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH" in Wine [01], XP and WS 2003 [02] C. ".COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC" in Vista and W7 and possibly also WS 2008. 2. When the PATHEXT is missing, or is set to be empty in registry, or is set to be empty in the shell via "set PATHEXT=", then: A. CMD.EXE, START.EXE and standard exec do use the default value, which is probably hardcoded somewhere (not taken from registry) ... tested on XP only B. Wine [11] uses a hardcoded ".BAT;.COM;.CMD;.EXE" (I can't say I do see the reasons for this particular order) C. GnuWin32 which utility [12] uses a hardcoded ".COM;.EXE;.BAT;.CMD" So, in the corner case when the PATHEXT is set empty for whatever reason, we have basically the following options: 1. Find some magical way how to get the default value from windows. Any brave soul to fight this? 2. Stick with basic NT setting ".COM;.EXE;.BAT;.CMD", and document that it doesn't always match the execution behaviour in this case, eg. that .JS file would get executed on XP, but won't be found by which() 3. Resemble CMD.EXE/START.EXE and standard windows exec behavior, and hardcode the values for different windows versions from NT to W7, and for Wine. This is quite simple to do, as windows versions are well documented in platform.release()(we don't actually have to call this function, just check into which of the 3 intervals the current windows version fits). To do so, I only need someone to verify the correct default PATHEXT for W2K and WS 2008, as I do not have access to these. My .02$ for 3, as this is what user expects. What do you think? [01] http://source.winehq.org/source/tools/wine.inf.in#L556 http://archives.free.net.ph/message/20091231.134245.fce4d24a.en.html [02] http://technet.microsoft.com/en-us/library/bb490998.aspx http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ntcmds.mspx?mfr=true http://technet.microsoft.com/en-us/library/cc772691(WS.10).aspx (the manual is same for XP and WS 2003 so maybe they just used copy/paste without checking. [11] http://source.winehq.org/source/programs/cmd/wcmdmain.c#L1019 [12] http://gnuwin32.sourceforge.net/packages/which.htm see which-2.20-src.zip / ... / which-2.20-src.diff line 388 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 18:38:03 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 09 Jul 2010 16:38:03 +0000 Subject: [issue1147646] Windows deadlock with PyEval_ReleaseLock Message-ID: <1278693483.37.0.975443660062.issue1147646@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This issue looks invalid to me: PyEval_ReleaseLock manipulates the interpreter lock, but not the thread state. Both have to be released/reset before another thread can install its own thread state and run. In other words, PyEval_SaveThread() should be used instead (and PyEval_RestoreThread() at the end, but the example code does not care to finalize the interpreter) ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 18:38:15 2010 From: report at bugs.python.org (Adam Olsen) Date: Fri, 09 Jul 2010 16:38:15 +0000 Subject: [issue9200] str.isprintable() is always False for large code points In-Reply-To: <1278597003.49.0.847714220976.issue9200@psf.upfronthosting.co.za> Message-ID: <1278693495.91.0.503058318633.issue9200@psf.upfronthosting.co.za> Adam Olsen added the comment: There should be a way to walk the unicode string in Python too. Afaik there isn't. ---------- nosy: +Rhamphoryncus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 18:39:18 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 09 Jul 2010 16:39:18 +0000 Subject: [issue5321] I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status) In-Reply-To: <1235065804.66.0.913102056215.issue5321@psf.upfronthosting.co.za> Message-ID: <1278693558.64.0.0600401954354.issue5321@psf.upfronthosting.co.za> Stefan Krah added the comment: Yes, it's an issue in py3k. Also, I prefer the behavior of 2.5, but I'm not sure if that can be changed easily in 2.7. $ python2.5 -c 'print((1, 2, 3))' > /dev/full close failed: [Errno 28] No space left on device $ python2.7 -c 'print((1, 2, 3))' > /dev/full close failed in file object destructor: Error in sys.excepthook: Original exception was: $ python3.2 -c 'print((1, 2, 3))' > /dev/full $ ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 18:40:07 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 16:40:07 +0000 Subject: [issue5438] test_bigmem.test_from_2G_generator uses more memory than expected In-Reply-To: <1236475515.92.0.849329057425.issue5438@psf.upfronthosting.co.za> Message-ID: <1278693607.52.0.783521284156.issue5438@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is this problem repeatable? I haven't got a big enough box on which to try this out. ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 18:42:21 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Jul 2010 16:42:21 +0000 Subject: [issue7268] 2to3 execfile conversion changes behavior In-Reply-To: <1257466136.74.0.490341354872.issue7268@psf.upfronthosting.co.za> Message-ID: <1278693741.21.0.641509335317.issue7268@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file15273/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 18:44:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Jul 2010 16:44:07 +0000 Subject: [issue7268] 2to3 execfile conversion changes behavior In-Reply-To: <1257466136.74.0.490341354872.issue7268@psf.upfronthosting.co.za> Message-ID: <1278693847.43.0.374651403326.issue7268@psf.upfronthosting.co.za> ?ric Araujo added the comment: Not sure if this merits a new bug report: The conversion currently promotes the open().read() anti-pattern, which is not guaranteed to release file handles as soon as possible in all VMs. Using a with block would fix that. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 18:49:17 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 16:49:17 +0000 Subject: [issue1434090] DOM tree inconsistency in expat XML parser Message-ID: <1278694157.75.0.757819388726.issue1434090@psf.upfronthosting.co.za> Mark Lawrence added the comment: A one line change against expatbuilder.py, could anyone with XML skills provide a unit test for this please? ---------- nosy: +BreamoreBoy, loewis versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 18:52:31 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 16:52:31 +0000 Subject: [issue1441984] Multiple simultaneous sendtos on AF_UNIX socket broken. Message-ID: <1278694351.76.0.717626379654.issue1441984@psf.upfronthosting.co.za> Mark Lawrence added the comment: Brian to get this going forward could you provide a unit test for this? ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 18:53:12 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 09 Jul 2010 16:53:12 +0000 Subject: [issue5321] I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status) In-Reply-To: <1235065804.66.0.913102056215.issue5321@psf.upfronthosting.co.za> Message-ID: <1278694392.34.0.792055201792.issue5321@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The issue is that when close() calls flush(), errors are silently discarded. I'm sure a similar issue was already filed, but could not find it. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 18:58:26 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 16:58:26 +0000 Subject: [issue1465554] Cygwin installer should create a link to libpythonX.Y.dll.a Message-ID: <1278694706.41.0.136030071897.issue1465554@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've no idea if this has already been covered by the intensive work that I understand has been going on with distutils. ---------- nosy: +BreamoreBoy title: Cygwin installer should create a link to libpython2.5.dll.a -> Cygwin installer should create a link to libpythonX.Y.dll.a type: feature request -> behavior versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 19:10:25 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 17:10:25 +0000 Subject: [issue1471985] mimetools module getencoding error Message-ID: <1278695425.35.0.152130041203.issue1471985@psf.upfronthosting.co.za> Mark Lawrence added the comment: As mimetools has been deprecated since 2.3 and removed from py3k can this be closed as won't fix? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 19:13:10 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 09 Jul 2010 17:13:10 +0000 Subject: [issue9200] str.isprintable() is always False for large code points In-Reply-To: <1278597003.49.0.847714220976.issue9200@psf.upfronthosting.co.za> Message-ID: <1278695590.49.0.814983665294.issue9200@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: A "proof of concept" patch, which shows the macros used to walk a unicode string and uses them in unicode_repr() (should not change behaviour) and in unicode_isprintable() (should fix the issue). Other functions should be changed the same way, of course. ---------- keywords: +patch Added file: http://bugs.python.org/file17922/join-surrogates.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 19:14:05 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Jul 2010 17:14:05 +0000 Subject: [issue2382] [Py3k] SyntaxError cursor shifted if multibyte character is in line. In-Reply-To: <1205817752.04.0.892564898323.issue2382@psf.upfronthosting.co.za> Message-ID: <1278695645.96.0.321160805449.issue2382@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 19:14:13 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 17:14:13 +0000 Subject: [issue5550] urllib2 use of opener.addheaders In-Reply-To: <1237870141.83.0.616869799184.issue5550@psf.upfronthosting.co.za> Message-ID: <1278695653.9.0.811175729241.issue5550@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +orsenthil stage: -> unit test needed versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 19:29:09 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 17:29:09 +0000 Subject: [issue4690] asyncore calls handle_write() on closed sockets when use_poll=True In-Reply-To: <1229560322.27.0.660252722227.issue4690@psf.upfronthosting.co.za> Message-ID: <1278696549.56.0.741940462407.issue4690@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 19:33:54 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 09 Jul 2010 17:33:54 +0000 Subject: [issue5556] interactive interpreter, source encoding In-Reply-To: <1237923122.0.0.0658736950329.issue5556@psf.upfronthosting.co.za> Message-ID: <1278696834.33.0.0941502661556.issue5556@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +amaury.forgeotdarc stage: -> unit test needed versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 19:47:58 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 09 Jul 2010 17:47:58 +0000 Subject: [issue7268] 2to3 execfile conversion changes behavior In-Reply-To: <1257466136.74.0.490341354872.issue7268@psf.upfronthosting.co.za> Message-ID: <1278697678.86.0.6152429367.issue7268@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Closing since compile() will work properly now. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 20:28:11 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 09 Jul 2010 18:28:11 +0000 Subject: [issue1441984] Multiple simultaneous sendtos on AF_UNIX socket broken. Message-ID: <1278700091.32.0.873484141306.issue1441984@psf.upfronthosting.co.za> Stefan Krah added the comment: I'm almost certain that this has been fixed in issue 1544279. Setting to pending. Brian, if you disagree, you can still respond to this issue. ---------- nosy: +skrah resolution: -> duplicate stage: unit test needed -> committed/rejected superseder: -> Socket module is not thread-safe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 20:28:17 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 09 Jul 2010 18:28:17 +0000 Subject: [issue1441984] Multiple simultaneous sendtos on AF_UNIX socket broken. Message-ID: <1278700097.39.0.353563744149.issue1441984@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 20:28:48 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 09 Jul 2010 18:28:48 +0000 Subject: [issue5347] SocketIO redefines RawIOBase.__del__ In-Reply-To: <1235335737.36.0.938814537211.issue5347@psf.upfronthosting.co.za> Message-ID: <1278700128.51.0.590094963567.issue5347@psf.upfronthosting.co.za> Benjamin Peterson added the comment: r82748 ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 20:38:13 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 09 Jul 2010 18:38:13 +0000 Subject: [issue877904] freeze: problems excluding site Message-ID: <1278700693.79.0.951110444246.issue877904@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon versions: +Python 3.2 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 20:39:48 2010 From: report at bugs.python.org (Andrey Rahmatullin) Date: Fri, 09 Jul 2010 18:39:48 +0000 Subject: [issue5346] mailbox._singlefileMailbox.flush doesn't preserve file rights In-Reply-To: <1235317721.52.0.542523133974.issue5346@psf.upfronthosting.co.za> Message-ID: <1278700788.1.0.0186500264194.issue5346@psf.upfronthosting.co.za> Andrey Rahmatullin added the comment: Linux ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 20:41:18 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 09 Jul 2010 18:41:18 +0000 Subject: [issue877904] freeze: problems excluding site Message-ID: <1278700878.36.0.995590705183.issue877904@psf.upfronthosting.co.za> Brett Cannon added the comment: It sounds reasonable. Just requires someone to write a patch. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 20:43:29 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 09 Jul 2010 18:43:29 +0000 Subject: [issue877904] freeze: problems excluding site Message-ID: <1278701009.72.0.484721332466.issue877904@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 20:51:19 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Jul 2010 18:51:19 +0000 Subject: [issue5321] I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status) In-Reply-To: <1235065804.66.0.913102056215.issue5321@psf.upfronthosting.co.za> Message-ID: <1278701479.02.0.984374369131.issue5321@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > The issue is that when close() calls flush(), errors are silently > discarded This has been fixed in 3.1 and 3.2: $ ./python -c "with open('/dev/full', 'w') as f: print('a', file=f)" Traceback (most recent call last): File "", line 1, in IOError: [Errno 28] No space left on device However, it seems sys.stdout has a different treatment: $ ./python -c "print('a')" > /dev/full $ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 20:56:36 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 Jul 2010 18:56:36 +0000 Subject: [issue9189] Improve CFLAGS handling In-Reply-To: <1278517873.84.0.191654592449.issue9189@psf.upfronthosting.co.za> Message-ID: <1278701796.7.0.205703826505.issue9189@psf.upfronthosting.co.za> Mark Dickinson added the comment: Jeffrey, the Linux buildbots are showing some distutils failures that look like they might be related to this change. For example: http://www.python.org/dev/buildbot/all/builders/amd64%20gentoo%203.x/builds/1351 test output contains: ====================================================================== ERROR: test_parse_makefile_base (distutils.tests.test_sysconfig.SysconfigTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/distutils/tests/support.py", line 16, in _capture_warnings return func(*args, **kw) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/distutils/tests/test_sysconfig.py", line 58, in test_parse_makefile_base d = sysconfig.parse_makefile(self.makefile) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/distutils/sysconfig.py", line 140, in parse_makefile return _sysconfig._parse_makefile(fn, g) File "/home/buildbot/slave/py-build/3.x.norwitz-amd64/build/Lib/sysconfig.py", line 265, in _parse_makefile done[var] = done['PY_' + var] KeyError: 'PY_CFLAGS' ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 21:03:37 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Fri, 09 Jul 2010 19:03:37 +0000 Subject: [issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method In-Reply-To: <1278702217.69.0.69895367614.issue9212@psf.upfronthosting.co.za> Message-ID: <1278702217.69.0.69895367614.issue9212@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : >>> isinstance({}.keys(), collections.Set) True >>> [method for method in set(dir(collections.Set)) - set(dir({}.keys())) ... if not method.startswith('_')] ['isdisjoint'] (in Python 2.7, use "viewkeys()" instead of "keys") dict_items has the same problem. ---------- assignee: stutzbach components: Interpreter Core messages: 109783 nosy: stutzbach priority: normal severity: normal stage: unit test needed status: open title: dict_keys purports to implement the Set ABC, but is missing the isdisjoint method versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 21:03:48 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Fri, 09 Jul 2010 19:03:48 +0000 Subject: [issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method In-Reply-To: <1278702217.69.0.69895367614.issue9212@psf.upfronthosting.co.za> Message-ID: <1278702228.36.0.313162435229.issue9212@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 21:06:15 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Fri, 09 Jul 2010 19:06:15 +0000 Subject: [issue9213] range purports to implement the Sequence ABC, but is missing index and count methods In-Reply-To: <1278702375.23.0.863463663463.issue9213@psf.upfronthosting.co.za> Message-ID: <1278702375.23.0.863463663463.issue9213@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : >>> isinstance(range, collections.Sequence) True >>> [method for method in set(dir(collections.Sequence)) - set(dir(range(1))) if not method.startswith('_')] ['index', 'count'] ---------- assignee: stutzbach components: Interpreter Core messages: 109784 nosy: stutzbach priority: normal severity: normal stage: unit test needed status: open title: range purports to implement the Sequence ABC, but is missing index and count methods type: behavior versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 21:08:22 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Fri, 09 Jul 2010 19:08:22 +0000 Subject: [issue9213] range purports to implement the Sequence ABC, but is missing index and count methods In-Reply-To: <1278702375.23.0.863463663463.issue9213@psf.upfronthosting.co.za> Message-ID: <1278702502.19.0.597425392893.issue9213@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: In Python 2.6 and 2.7, the same problem applies to xrange objects. ---------- versions: +Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 21:13:00 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Jul 2010 19:13:00 +0000 Subject: [issue4045] test_mboxmmdf_to_maildir fails on non-englisch locale In-Reply-To: <1223210018.98.0.954404111319.issue4045@psf.upfronthosting.co.za> Message-ID: <1278702780.6.0.271419154352.issue4045@psf.upfronthosting.co.za> R. David Murray added the comment: After testing 4044, I suspect this has more to do with the specific user environment than it does with Python. My guess would be that someone is setting the locale in site.py, or some module is getting imported on startup that is setting the locale. Closing as works for me, the OP can reopen if they still have the problem and still think it is a python bug. ---------- nosy: +r.david.murray resolution: -> works for me stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 21:13:57 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Jul 2010 19:13:57 +0000 Subject: [issue4044] test_output_textcalendar fails on non-englisch locale In-Reply-To: <1223209182.04.0.559787210329.issue4044@psf.upfronthosting.co.za> Message-ID: <1278702837.82.0.163674330455.issue4044@psf.upfronthosting.co.za> R. David Murray added the comment: As mentioned in #4045, I believe this is a problem with the user's local Python setup and not a Python bug. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 21:31:45 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Fri, 09 Jul 2010 19:31:45 +0000 Subject: [issue9214] Most Set methods of KeysView and ItemsView do not work right In-Reply-To: <1278703905.18.0.125671722438.issue9214@psf.upfronthosting.co.za> Message-ID: <1278703905.18.0.125671722438.issue9214@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : Attached is a simple Python 3 example script that defines a minimalist MutableMapping that simply wraps a dict, followed by: x = MySimpleMapping(red=5) y = x.keys() z = x.keys() | {'orange'} x['blue'] = 7 print(list(z)) print(list(z)) Output: ['blue', 'red', 'orange'] [] Expected Output: ['orange', 'red'] ['orange', 'red'] The problem is that __or__ ends up returning a new KeysView wrapping a generator instead of returning a set. To solve the problem, KeysView and ItemsView need to override _from_iterable to return a set instead of a new view. ---------- assignee: stutzbach components: Library (Lib) files: keysview_test.py keywords: easy messages: 109788 nosy: stutzbach priority: normal severity: normal stage: unit test needed status: open title: Most Set methods of KeysView and ItemsView do not work right type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file17923/keysview_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 21:32:34 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Fri, 09 Jul 2010 19:32:34 +0000 Subject: [issue9214] Most Set methods of KeysView and ItemsView do not work right In-Reply-To: <1278703905.18.0.125671722438.issue9214@psf.upfronthosting.co.za> Message-ID: <1278703954.05.0.985778729473.issue9214@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: Oops. Somehow deleted a linefeed in there. The example should read: x = MySimpleMapping(red=5) y = x.keys() z = x.keys() | {'orange'} x['blue'] = 7 print(list(z)) print(list(z)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 21:33:45 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Fri, 09 Jul 2010 19:33:45 +0000 Subject: [issue9214] Most Set methods of KeysView and ItemsView do not work right In-Reply-To: <1278703905.18.0.125671722438.issue9214@psf.upfronthosting.co.za> Message-ID: <1278704025.96.0.965231423885.issue9214@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: I guess roundup is deleting my linefeed? I'm sure I didn't do it that time. I'm not sure what's going on there, but the "x['blue'] = 7" should be on a line by itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 21:55:34 2010 From: report at bugs.python.org (Jeffrey Yasskin) Date: Fri, 09 Jul 2010 19:55:34 +0000 Subject: [issue9189] Improve CFLAGS handling In-Reply-To: <1278517873.84.0.191654592449.issue9189@psf.upfronthosting.co.za> Message-ID: <1278705334.26.0.402725340659.issue9189@psf.upfronthosting.co.za> Jeffrey Yasskin added the comment: Oops. Thanks for telling me. Fixed in r82753. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 22:12:04 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 09 Jul 2010 20:12:04 +0000 Subject: [issue5556] interactive interpreter, source encoding In-Reply-To: <1237923122.0.0.0658736950329.issue5556@psf.upfronthosting.co.za> Message-ID: <1278706324.11.0.652521530248.issue5556@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I fail to see the issue. runsource() takes a (unicode) string because a Python script is a text; you cannot pass a bytes object, it must be decoded before. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 22:15:28 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Jul 2010 20:15:28 +0000 Subject: [issue5556] interactive interpreter, source encoding In-Reply-To: <1237923122.0.0.0658736950329.issue5556@psf.upfronthosting.co.za> Message-ID: <1278706528.12.0.756198515065.issue5556@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 22:31:18 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 09 Jul 2010 20:31:18 +0000 Subject: [issue5321] I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status) In-Reply-To: <1235065804.66.0.913102056215.issue5321@psf.upfronthosting.co.za> Message-ID: <1278707478.38.0.605568481608.issue5321@psf.upfronthosting.co.za> Stefan Krah added the comment: It looks like the error is cleared in Python/pythonrun.c, line 321: if (fout != NULL && fout != Py_None) { tmp = PyObject_CallMethod(fout, "flush", ""); if (tmp == NULL) PyErr_Clear(); else Py_DECREF(tmp); } Not sure why it isn't handled before that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 22:31:54 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 09 Jul 2010 20:31:54 +0000 Subject: [issue9214] Most Set methods of KeysView and ItemsView do not work right In-Reply-To: <1278703905.18.0.125671722438.issue9214@psf.upfronthosting.co.za> Message-ID: <1278707514.11.0.015789717898.issue9214@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 22:33:01 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 09 Jul 2010 20:33:01 +0000 Subject: [issue4690] asyncore calls handle_write() on closed sockets when use_poll=True In-Reply-To: <1229560322.27.0.660252722227.issue4690@psf.upfronthosting.co.za> Message-ID: <1278707581.62.0.214094012257.issue4690@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- assignee: -> giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 22:54:53 2010 From: report at bugs.python.org (Anil Jangity) Date: Fri, 09 Jul 2010 20:54:53 +0000 Subject: [issue1250] Building external modules using Sun Studio 12 In-Reply-To: <1191964251.86.0.558465608726.issue1250@psf.upfronthosting.co.za> Message-ID: <1278708893.35.0.304273710124.issue1250@psf.upfronthosting.co.za> Anil Jangity added the comment: Not sure. This had happened such a long time ago, not sure now. I do not have an environment now to re-test this. Sorry. ---------- nosy: +Anil.Jangity _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 23:01:03 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 09 Jul 2010 21:01:03 +0000 Subject: [issue5127] Use Py_UCS4 instead of Py_UNICODE in unicodectype.c In-Reply-To: <1233538306.69.0.00753244691607.issue5127@psf.upfronthosting.co.za> Message-ID: <1278709263.48.0.815890560347.issue5127@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: In this 6th patch, the wctype part was changed as suggested. there is one more condition, Py_UNICODE_WIDE: -#if defined(HAVE_USABLE_WCHAR_T) && defined(WANT_WCTYPE_FUNCTIONS) +#if defined(WANT_WCTYPE_FUNCTIONS) && defined(HAVE_USABLE_WCHAR_T) && defined(Py_UNICODE_WIDE) ---------- Added file: http://bugs.python.org/file17924/unicodectype_ucs4_6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 23:01:53 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 Jul 2010 21:01:53 +0000 Subject: [issue9215] test_float crashes with assertion failure on Ubuntu buildbot. In-Reply-To: <1278709313.21.0.942874068814.issue9215@psf.upfronthosting.co.za> Message-ID: <1278709313.21.0.942874068814.issue9215@psf.upfronthosting.co.za> New submission from Mark Dickinson : The Ubuntu i386 buildbot was crashing in test_float in the 3.1 branch; it looks as though _Py_dg_dtoa is producing invalid results. I've made a couple of checkins to try to diagnose the failure (r82752 and r82754); here's some of the resulting output from http://www.python.org/dev//buildbot/builders/i386%20Ubuntu%203.1/builds/870 test_float Unexpected failure in format_float_short. Arguments: d = 9999, format_code = 101, mode = 2, precision = 3 digits == : Unexpected failure in format_float_short. Arguments: d = 0.096000000000000002, format_code = 102, mode = 3, precision = 2 digits == : ':' is the ASCII character after '9', so this is a classic case of the digit '9' being rounded up to the next ASCII digit. I don't know why this is happening on this particular buildbot and no others that I've noticed. This machine is one where double rounding *is* typically a problem (according to its configure output), so it should be using the _Py_{set,get}_387controlword functions to control the FPU precision; perhaps something's going wrong with this step. ---------- assignee: mark.dickinson messages: 109796 nosy: eric.smith, mark.dickinson priority: high severity: normal status: open title: test_float crashes with assertion failure on Ubuntu buildbot. type: crash versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 23:03:00 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 Jul 2010 21:03:00 +0000 Subject: [issue9215] test_float crashes with assertion failure on Ubuntu buildbot. In-Reply-To: <1278709313.21.0.942874068814.issue9215@psf.upfronthosting.co.za> Message-ID: <1278709380.36.0.0400774214485.issue9215@psf.upfronthosting.co.za> Mark Dickinson added the comment: The py3k branch on the same machine seems fine, as does the release27-maint branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 23:22:18 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 Jul 2010 21:22:18 +0000 Subject: [issue9215] test_float crashes with assertion failure on Ubuntu buildbot. In-Reply-To: <1278709313.21.0.942874068814.issue9215@psf.upfronthosting.co.za> Message-ID: <1278710538.13.0.871926525218.issue9215@psf.upfronthosting.co.za> Mark Dickinson added the comment: I've just noticed that the 3.1 buildbot is compiling with -O2, while the 2.7 and 3.2 bots are using -O0; this would explain the different results. The possibility that this might be a compiler optimization bug makes me a little happier. Matthias, you wouldn't happen to know what version of gcc is being used by this buildslave, would you? The machine in question is: http://www.python.org/dev//buildbot/buildslaves/klose-ubuntu-i386 ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 23:33:10 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Jul 2010 21:33:10 +0000 Subject: [issue4297] Add error_log attribute to optparse.OptionParser In-Reply-To: <1226413379.99.0.188665223227.issue4297@psf.upfronthosting.co.za> Message-ID: <1278711190.9.0.0508197275652.issue4297@psf.upfronthosting.co.za> R. David Murray added the comment: Having an easy way to control where output goes makes sense. This is a new feature, however, and thus only a candidate for 3.2, and in 3.2 it would be better to target it at argparse. I think argarse makes this easier to do via subclassing, but doing so the easy way seems to require overriding a 'private' method (_print_message). I've added Steven to the nosy list to see what he thinks. ---------- nosy: +bethard, r.david.murray versions: -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 9 23:47:38 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 Jul 2010 21:47:38 +0000 Subject: [issue2009] Grammar change to prevent shift/reduce problem with varargslist In-Reply-To: <1202170790.58.0.28997794645.issue2009@psf.upfronthosting.co.za> Message-ID: <1278712058.28.0.177675187885.issue2009@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Good point - I just wouldn't worry about it in that case. Ah, now I have to apologise: after some discussion on #python-dev IRC, I'm afraid I've (perhaps foolishly) rejected this advice. :) See python-dev discussion starting at http://mail.python.org/pipermail/python-dev/2010-July/101636.html I'll hold off on the modification in this issue until that discussion resolves. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 00:22:35 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 09 Jul 2010 22:22:35 +0000 Subject: [issue9215] test_float crashes with assertion failure on Ubuntu buildbot. In-Reply-To: <1278709313.21.0.942874068814.issue9215@psf.upfronthosting.co.za> Message-ID: <1278714155.89.0.875129737806.issue9215@psf.upfronthosting.co.za> Mark Dickinson added the comment: Reverted the temporary debugging commits in r82755, so test_float is now crashing again on that buildbot. I've made yet another temporary commit (r82756) to get the configure script to tell me what gcc version is being used on that machine. Once I've got that info, I can have a go at reproducing this locally. If that fails, I'll create a branch and try to debug the buildbot remotely via repeated test runs on that branch. ... and the results from the configure script are in: it's an experimental prerelease version of gcc! This makes me even more suspicious that it's a compiler bug. checking gcc version... Using built-in specs. COLLECT_GCC=/usr/lib/gcc-snapshot/bin/gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc-snapshot/libexec/gcc/i686-linux-gnu/4.6.0/lto-wrapper Target: i686-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 20100702-0ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs --enable-languages=c,ada,c++,java,fortran,objc,obj-c++ --prefix=/usr/lib/gcc-snapshot --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --disable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-gold --with-plugin-ld=ld.gold --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.6-snap/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.6-snap --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.6-snap --with-arch-directory=i386 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=yes --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu Thread model: posix gcc version 4.6.0 20100702 (experimental) [trunk revision 161740] (Ubuntu 20100702-0ubuntu1) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 00:41:11 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 09 Jul 2010 22:41:11 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> Message-ID: <1278715271.85.0.208683910868.issue9141@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Hi Antoine. I am not adding another traversal pass. I am modifying the function that gets called for every object about to be collected, to call the object's traversal function. This is hardly an extra "pass" and is done only for objects that are about to be collected (i.e. only in the rare case). The particular case is this: I have objects (tasklets) that depending on their runtime state, need to run a finalizer or not. If not, they can be collected. If they do, then they end up on gc.garbage. This is exactly the same case as with generators. But instead of adding yet another special case into stackless python, I realized that it may be up to objects' runtime state whether they need to run a finalizer or not. So, I wrote a more generic way and decided to contribute it to C Python, so that a future developer, having a C extension that only sometimes needs to run a finalizer, could have a way to cleanly deal with garbage collection. This is twice now that this problem has been seen in python. The first time, a special case was coded into gcmodule. This second time, I'm offering a more generic solution. Now, I have a number of useful improvements and additions to C python sitting in our repository, the result of over 7 years work with Python at CCP games. I have another one sitting and waiting that adds useful functionality to gcmodule. Useful in my opinion anyway, and worth at least being kept for posterity as a patch in the tracker. But since these patches of mine seem to be met with rather limited enthusiasm, I wonder if I should be bothering. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 00:48:33 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 09 Jul 2010 22:48:33 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> Message-ID: <1278715713.41.0.647823933206.issue9141@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Hi Daniel. Your message was classified as spam, I have no idea why, but this is why I only noticed it now. Your suggestion is interesting, I hadn't thought of that. Yes, it is possible to use the track/untrack functions (I think), but that would mean that you would have to monitor your object for every state change and reliably detect the transition from one state to another. Being able to query the current state and let gc know: "No, I cannot be collected as I am now" is a much more robust solution from the programmers perspective. A further difference is this: If an object isn't tracked, it won't be collected if it is part of a cycle, but it will not be put in gc.garbage either. In effect, it will just remain in memory, unreachable, with no chance of it ever being released. In contrast, a generator (or in my case, a tasklet) that needs to have a finalizer run when it goes away, will end up in gc.garbage, which a dilligent application will visit once in a while in order to clean it out. I'm not sure how you would clear out a generator like that, but in Stackless python, you could do something like this once in a while: for g in gc.garbage: if isinstance(g, stackless.tasklet): g.kill() del gc.garbage[:] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 00:58:53 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Jul 2010 22:58:53 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> Message-ID: <1278716333.3.0.342859957379.issue9141@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > The particular case is this: I have objects (tasklets) that depending > on their runtime state, need to run a finalizer or not. If not, they > can be collected. If they do, then they end up on gc.garbage. But why don't you try using tp_dealloc as I suggested instead? It will allow you to run a finalizer in all cases, without anything ending up in gc.garbage. It's what we do in the new io lib. Also, I'm still worried that the mechanism you're proposing is a bit quirky. I hope other developers can give opinions or even suggestions. > But since these patches of mine seem to be met with rather limited > enthusiasm, I wonder if I should be bothering. Well, the GC is a rather delicate affair and moreover it doesn't have a dedicated maintainer. That doesn't mean your patches are not interesting, but I think everyone tries to be very careful with that area of the code. ---------- nosy: +amaury.forgeotdarc, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 01:02:27 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 09 Jul 2010 23:02:27 +0000 Subject: [issue9214] Most Set methods of KeysView and ItemsView do not work right In-Reply-To: <1278703905.18.0.125671722438.issue9214@psf.upfronthosting.co.za> Message-ID: <1278716547.21.0.815226311202.issue9214@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > To solve the problem, KeysView and ItemsView need > to override _from_iterable to return a set instead > of a new view. Thanks for the good analysis and suggested fix. I believe both are correct and they match the behavior of real dictionaries. def _from_iterable(self, it): return set(it) Proposed tests to match real dicts: x = MySimpleMapping() # from stuzback's example x['red'] = 5 y = x.keys() assert isinstance(y, collections.Set) assert not isinstance(y, collections.MutableSet) z = x.keys() | {'orange'} assert type(z) is set ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 01:11:52 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Fri, 09 Jul 2010 23:11:52 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> Message-ID: <1278717112.73.0.352744913761.issue9141@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: I posted some of this earlier in the week, but for some reason the bug tracker marked my message as spam. Hopefully this message will survive. ;-) Can you compare and contrast your approach with calling PyObject_GC_UnTrack and PyObject_GC_Track to mark the object as uncollectable/collectable? I can't speak for anyone else, but speaking as someone who has ungracefully poked into the innards of garbage collector in extension modules, I'm interested in seeing your patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 01:12:38 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Fri, 09 Jul 2010 23:12:38 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> Message-ID: <1278717158.99.0.17906732559.issue9141@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 01:16:14 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 09 Jul 2010 23:16:14 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> Message-ID: <1278717374.98.0.232594644724.issue9141@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I'm merely providing a way for objects to signal > that they _have_ (or don't have) non-trivial finalizers. +1 This is useful and non-hackish way to communicate with GC and solves a problem that doesn't otherwise have a clean solution. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 02:22:15 2010 From: report at bugs.python.org (Dave Malcolm) Date: Sat, 10 Jul 2010 00:22:15 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> New submission from Dave Malcolm : (taking the liberty of adding gregory.p.smith to the "nosy" list; hope that's OK) This is a higher-level take on issue 9146. Some versions of OpenSSL have a FIPS mode that can refuse the use of non-certified hashes. The idea is that FIPS mode should prevent the use of non-certified hashes for security uses. For example, MD5 shouldn't be used for signatures these days (see e.g. http://www.kb.cert.org/vuls/id/836068). However, there are legitimate non-security uses of these hashes. For example, one might use MD5 hashes of objects to places them in bins for later retrieval, purely as a speed optimization (e.g. files in directories on a filesystem). I'm working on a patch to hashlib which would better support this, but it involves an API expansion, and I wanted to sound things out first. The API idea is to introduce a new keyword argument, say "usedforsecurity" to hashlib.new() and to the named hashlib constructors, such as hashlib.md5(). This would default to True. If code is using these hashes in FIPS mode, the developer needs to override this: usedforsecurity=False to mark the callsite as a non-security-sensitive location. Internally, this would lead to the EVP_MD_CTX being initialized with EVP_MD_CTX_FLAG_NON_FIPS_ALLOW. This way, if you run unaudited code in an environment that cares about FIPS, the code will raise exceptions if it uses a non-valid hash, but during code audit the callsites can be marked clearly as "usedforsecurity=False", and be used as before. In non-FIPS environments, the flag would be ignored. Am I right in thinking that the _hashlib module should be treated as an implementation detail here? The entry points within _hashlib are likely to double, with a pair of pre-initialized contexts, one with the flag, one without. Does this sound reasonable? Thanks. ---------- components: Library (Lib) messages: 109808 nosy: dmalcolm, gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: FIPS support for hashlib versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 02:23:35 2010 From: report at bugs.python.org (Dave Malcolm) Date: Sat, 10 Jul 2010 00:23:35 +0000 Subject: [issue9146] Segfault in hashlib in OpenSSL FIPS mode using non-FIPS-compliant hashes, if "ssl" imported before "hashlib" In-Reply-To: <1278097810.42.0.823869291087.issue9146@psf.upfronthosting.co.za> Message-ID: <1278721415.06.0.646543458633.issue9146@psf.upfronthosting.co.za> Dave Malcolm added the comment: I've filed issue 9216 to discuss this at a higher level, with an API proposal ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 02:33:35 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Sat, 10 Jul 2010 00:33:35 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278715713.41.0.647823933206.issue9141@psf.upfronthosting.co.za> Message-ID: Daniel Stutzbach added the comment: 2010/7/9 Kristj??n Valur J??nsson > Your message was classified as spam, I have no idea why, but this is why I > only noticed it now. > Yes, I just noticed that tonight as well. I filed a bug on the meta-tracker in the hopes that someone can dig into the underlying cause. > Your suggestion is interesting, I hadn't thought of that. Yes, it is > possible to use the track/untrack functions (I think), but that would mean > that you would have to monitor your object for every state change and > reliably detect the transition from one state to another. Being able to > query the current state and let gc know: "No, I cannot be collected as I am > now" is a much more robust solution from the programmers perspective. > > A further difference is this: If an object isn't tracked, it won't be > collected if it is part of a cycle, but it will not be put in gc.garbage > either. In effect, it will just remain in memory, unreachable, with no > chance of it ever being released. > Yes, I see. I have used the track/untrack approach, but it was in a very different situation. I have a long-running C function which keeps alive a large number of objects. At the start of the function, I untrack them all as a performance optimization, so the garbage collector does not have to spend time traversing them. Before the function returns, I track them again. I see now why that wouldn't work for your use-case. Thank you. I like the idea of your patch to give opportunities to tell the GC that they are uncollectable on the fly. I'm concerned about the performance impact of making tp_traverse do double-duty, though. Calling tp_traverse for every object in a cycle will have the effect of making an extra pass on every reference from every object participating in the cycle. For example, consider a large list that's part of a cycle. If we call the list's tp_traverse to establish if it's collectible, list's tp_traverse will call visit() on every item in the list. Even though you've made visit() a do-nothing function, that's still a function call per reference. It seems a shame to do all of that work unnecessarily. ---------- Added file: http://bugs.python.org/file17925/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
2010/7/9 Kristj??n Valur J??nsson <report at bugs.python.org>
Your message was classified as spam, I have no idea why, but this is why I only noticed it now.

Yes, I just noticed that tonight as well. ??I filed a bug on the meta-tracker in the hopes that someone can dig into the underlying cause.
??
Your suggestion is interesting, I hadn't thought of that. ??Yes, it is possible to use the track/untrack functions (I think), but that would mean that you would have to monitor your object for every state change and reliably detect the transition from one state to another. ??Being able to query the current state and let gc know: ??"No, I cannot be collected as I am now" is a much more robust solution from the programmers perspective.

A further difference is this: ??If an object isn't tracked, it won't be collected if it is part of a cycle, but it will not be put in gc.garbage either. ??In effect, it will just remain in memory, unreachable, with no chance of it ever being released.

Yes, I see. ??I have used the track/untrack approach, but it was in a very different situation. ??I have a long-running C function which keeps alive a large number of objects. ??At the start of the function, I untrack them all as a performance optimization, so the garbage collector does not have to spend time traversing them. ??Before the function returns, I track them again.

I see now why that wouldn't work for your use-case. ??Thank you. ??I like the idea of your patch to give opportunities to tell the GC that they are uncollectable on the fly. ??

I'm concerned about the performance impact of??making tp_traverse do double-duty, though. ??Calling tp_traverse for every object in a cycle will have the effect of making an extra pass on every reference from every object participating in the cycle. ??For example, consider a large list that's part of a cycle. ??If we call the list's tp_traverse to establish if it's??collectible, list's tp_traverse will call visit() on every item in the list. ??Even though you've made visit() a do-nothing function, that's still a function call per reference. ??It seems a shame to do all of that work unnecessarily.
From report at bugs.python.org Sat Jul 10 04:23:50 2010 From: report at bugs.python.org (Jack Diederich) Date: Sat, 10 Jul 2010 02:23:50 +0000 Subject: [issue9110] contextlib.ContextDecorator In-Reply-To: <1277765898.65.0.314299135702.issue9110@psf.upfronthosting.co.za> Message-ID: <1278728630.11.0.677496280298.issue9110@psf.upfronthosting.co.za> Jack Diederich added the comment: I like it, but I think it would help to give it the same interface as contextlib.contextmanager (the single function, single yield). Like your mock library 'patch' both function decorators and context managers have an interface that reads like "do this before the real work," "do the real work," and then "do this after the real work" pattern. The fact that the examples and test cases all require an almost empty class feels heavy to me. ---------- nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 04:27:08 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 10 Jul 2010 02:27:08 +0000 Subject: [issue9110] contextlib.ContextDecorator In-Reply-To: <1277765898.65.0.314299135702.issue9110@psf.upfronthosting.co.za> Message-ID: <1278728828.48.0.405164084347.issue9110@psf.upfronthosting.co.za> Michael Foord added the comment: Hey Jack. The point of ContextDecorator is that when you are implementing a context manager, which you will usually do as a class anyway, you can just inherit from it and get the decorator functionality for free. If you like the contextmanager style of creating your apis then you can just use contextmanager - which now uses ContextDecorator *anyway*. (i.e. all uses of contextlib.contextmanager can now be used as decorators as well as context managers.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 04:40:22 2010 From: report at bugs.python.org (Jack Diederich) Date: Sat, 10 Jul 2010 02:40:22 +0000 Subject: [issue9110] contextlib.ContextDecorator In-Reply-To: <1277765898.65.0.314299135702.issue9110@psf.upfronthosting.co.za> Message-ID: <1278729622.38.0.718207557958.issue9110@psf.upfronthosting.co.za> Jack Diederich added the comment: Hey Frood, I'll take another look at it tomorrow when I am less addled. But as to context managers that are actual classes - I've not written a single one; they are always generator functions with a simple try/yield/except/finally in the body. After all state-is-state, and writing an __init__, __enter__, and __exit__ is just extra boilerplate for my common uses. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 05:02:32 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 10 Jul 2010 03:02:32 +0000 Subject: [issue9110] contextlib.ContextDecorator In-Reply-To: <1277765898.65.0.314299135702.issue9110@psf.upfronthosting.co.za> Message-ID: <1278730952.32.0.751766744004.issue9110@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I can shake the feeling that this is going to end-up being rarely used cruft that causes more confusion than its worth. The use case and motivation isn't clear (why do context managers need to be both context managers and decorators)? Has this decorator/contextmanager mix been used "in the wild" and shown any degree of popularity? AFAICT, it doesn't seem to have come in newsgroup discussions, feature requests, utility modules, or a published recipe. Do we have any strong examples of code that is improved by the use of a decorating context manager? One issue for me is that my understanding of decorators (as function/classs wrappers) and of context managers (deeply associated with the with-statement) have no overlap. ISTM, that code using both in the same object would be too clever by far, making it difficult to explain and difficult to debug. Also, Jack's critiques seem valid to me -- too much machinery for too little benefit. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 05:39:26 2010 From: report at bugs.python.org (Jack Diederich) Date: Sat, 10 Jul 2010 03:39:26 +0000 Subject: [issue9110] contextlib.ContextDecorator In-Reply-To: <1277765898.65.0.314299135702.issue9110@psf.upfronthosting.co.za> Message-ID: <1278733166.04.0.0547493219723.issue9110@psf.upfronthosting.co.za> Jack Diederich added the comment: Raymond, Short version: This isn't theoretical because I use context managers and function decorators interchangeably and constantly. Long Version: Function decorators and context managers have very similar use cases. They both go something like: 1) add optional extra state 2) execute the original function (decorator) or block (context manager) 3) add optional extra exception handling or do something special based on the extra state. Frood's mock library does this in a very sane way. ex/ @mock.patch(sys, 'stdio', someStringIOInstance) def test_blah(self): pass # this test uses context instead of decorators def test_blaise(self): # test setup here with @mock.patch(sys, 'stdin', someStringIOInstance): dummy = 'something particular to this setup' # more tests here So the use isn't theoretical [at a minimum he's doing it and I'm doing it], now we're just talking about what is the most obvious interface. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:01:45 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 10 Jul 2010 05:01:45 +0000 Subject: [issue4304] build mode which fails for build failures in extensions In-Reply-To: <1226482481.6.0.943122034161.issue4304@psf.upfronthosting.co.za> Message-ID: <1278738105.57.0.515808707104.issue4304@psf.upfronthosting.co.za> R. David Murray added the comment: One reasonably easy possibility would be to add an option to regrtest to exit with a non-zero return code if there are unexpected skips. This might not cover 100% of Mathias's cases (but it might), and the configurability would be limited to changing the expected skip lists in regrtest. But it would be pretty easy to do, if all of the buildbots can be required to build all of the expected extensions. I'm not sure that this last requirement is currently met by all the buidbots. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:03:09 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 10 Jul 2010 05:03:09 +0000 Subject: [issue9132] Documentation for comparing dictionaries is out of date In-Reply-To: <1277927951.56.0.908504944608.issue9132@psf.upfronthosting.co.za> Message-ID: <1278738189.01.0.489727289887.issue9132@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:03:22 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 10 Jul 2010 05:03:22 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1278738202.53.0.698707733803.issue9205@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:17:41 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 05:17:41 +0000 Subject: [issue9150] IDLE should not save trailing whitespace after strip trailing whitespace has been used In-Reply-To: <1278179945.62.0.903425904075.issue9150@psf.upfronthosting.co.za> Message-ID: <1278739061.91.0.732887064793.issue9150@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Please explain " after strip trailing whitespace has been used". I use IDLE but do not understand. Give a simple, reproducible example of something you do, the result, what you expected different, and why you expected different. Also, use a shorter title and explain in the message. This one cannot be read without selecting and fiddling with the mouse. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:32:25 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 05:32:25 +0000 Subject: [issue6058] Add cp65001 to encodings/aliases.py In-Reply-To: <1242692494.35.0.391765957832.issue6058@psf.upfronthosting.co.za> Message-ID: <1278739945.82.0.23576490621.issue6058@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:33:37 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 05:33:37 +0000 Subject: [issue1962] ctypes feature request: Automatic type conversion of input arguments to C functions In-Reply-To: <1201597182.13.0.442457985171.issue1962@psf.upfronthosting.co.za> Message-ID: <1278740017.49.0.57116504553.issue1962@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:34:17 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 05:34:17 +0000 Subject: [issue1953] Compact int and float freelists In-Reply-To: <1201491269.72.0.799398122167.issue1953@psf.upfronthosting.co.za> Message-ID: <1278740057.01.0.721062636074.issue1953@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:35:04 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 05:35:04 +0000 Subject: [issue2405] Drop w9xpopen and all dependencies In-Reply-To: <1205870969.55.0.774025556957.issue2405@psf.upfronthosting.co.za> Message-ID: <1278740104.53.0.492960279608.issue2405@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:35:23 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 05:35:23 +0000 Subject: [issue2008] cookielib lacks FileCookieJar class for Safari In-Reply-To: <1202153846.32.0.869416159529.issue2008@psf.upfronthosting.co.za> Message-ID: <1278740123.48.0.748982833675.issue2008@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:41:45 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 05:41:45 +0000 Subject: [issue1524825] ConfigParser: accept leading whitespace on options+comments Message-ID: <1278740505.87.0.866664007551.issue1524825@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I closed #1714 as a duplicate of this. It also has a patch attached. ---------- nosy: +akuchling, christian.heimes, msuchy, schmir, tjreedy versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:41:57 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 05:41:57 +0000 Subject: [issue1714] ConfigParser.py do not allow leading (and trailing) space in values. In-Reply-To: <1199115002.03.0.289718233868.issue1714@psf.upfronthosting.co.za> Message-ID: <1278740517.57.0.977320215769.issue1714@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> duplicate status: open -> closed superseder: -> ConfigParser: accept leading whitespace on options+comments versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:44:06 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 05:44:06 +0000 Subject: [issue2843] New methods for existing Tkinter widgets In-Reply-To: <1210648562.38.0.607141778412.issue2843@psf.upfronthosting.co.za> Message-ID: <1278740646.75.0.603086528717.issue2843@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:45:38 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 05:45:38 +0000 Subject: [issue2850] Augmenting the Windows build to support code signing. In-Reply-To: <1210762970.34.0.566906557535.issue2850@psf.upfronthosting.co.za> Message-ID: <1278740738.41.0.32195696003.issue2850@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> rejected status: open -> closed versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:47:03 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 05:47:03 +0000 Subject: [issue1424152] urllib/urllib2: HTTPS over (Squid) Proxy fails Message-ID: <1278740823.28.0.262912968204.issue1424152@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:47:11 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 05:47:11 +0000 Subject: [issue648658] xmlrpc can't do proxied HTTP Message-ID: <1278740831.35.0.16548599868.issue648658@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:49:57 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 05:49:57 +0000 Subject: [issue3865] explain that profilers should be used for profiling, not benchmarking In-Reply-To: <1221392860.21.0.302367581665.issue3865@psf.upfronthosting.co.za> Message-ID: <1278740997.7.0.927695397978.issue3865@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:55:34 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 05:55:34 +0000 Subject: [issue2190] MozillaCookieJar ignore HttpOnly cookies In-Reply-To: <1203957546.34.0.123660895963.issue2190@psf.upfronthosting.co.za> Message-ID: <1278741334.73.0.470177702502.issue2190@psf.upfronthosting.co.za> Terry J. Reedy added the comment: MozillaCookieJar is now a class in http.cookiejar, so patch would need update. Is this still used enough to bother? ---------- nosy: +tjreedy versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 07:57:55 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 05:57:55 +0000 Subject: [issue2007] cookielib lacks FileCookieJar class for Internet Explorer In-Reply-To: <1202153753.42.0.88577975251.issue2007@psf.upfronthosting.co.za> Message-ID: <1278741475.19.0.111457284198.issue2007@psf.upfronthosting.co.za> Changes by Terry J. Reedy : Removed file: http://bugs.python.org/file9362/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:07:27 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:07:27 +0000 Subject: [issue2007] cookielib lacks FileCookieJar class for Internet Explorer In-Reply-To: <1202153753.42.0.88577975251.issue2007@psf.upfronthosting.co.za> Message-ID: <1278742047.11.0.613776126661.issue2007@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Removed file was a dup of msg62113 Jansen 2008-02-06 13:34 FileCookieJars are now in http.cookiejar. Doc says "The following CookieJar subclasses are provided for reading and writing . Further CookieJar subclasses, including one that reads Microsoft Internet Explorer cookies, are available at http://wwwsearch.sf.net/ClientCookie/." Link does not work and appears to be superseded by http://wwwsearch.sourceforge.net/mechanize/ If this issue is closed, at least that doc change should be made. ---------- nosy: +tjreedy versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:07:54 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:07:54 +0000 Subject: [issue3647] urlparse - relative url parsing and joins to be RFC3986 compliance In-Reply-To: <1219409676.71.0.379802173537.issue3647@psf.upfronthosting.co.za> Message-ID: <1278742074.18.0.100732037644.issue3647@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:09:47 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:09:47 +0000 Subject: [issue4246] execution model - clear and complete example in documentation In-Reply-To: <1225551571.75.0.81232740458.issue4246@psf.upfronthosting.co.za> Message-ID: <1278742187.89.0.120174546523.issue4246@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:11:33 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:11:33 +0000 Subject: [issue4558] with_stdc89 In-Reply-To: <1228530326.9.0.419197104424.issue4558@psf.upfronthosting.co.za> Message-ID: <1278742293.95.0.208995886522.issue4558@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:12:55 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:12:55 +0000 Subject: [issue4805] Make python code compilable with a C++ compiler In-Reply-To: <1230872206.73.0.47638283248.issue4805@psf.upfronthosting.co.za> Message-ID: <1278742375.26.0.276341116909.issue4805@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:13:16 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:13:16 +0000 Subject: [issue4805] Make python code compilable with a C++ compiler In-Reply-To: <1230872206.73.0.47638283248.issue4805@psf.upfronthosting.co.za> Message-ID: <1278742396.32.0.702832183549.issue4805@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:21:10 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:21:10 +0000 Subject: [issue813453] restrictions in _tkinter built with threaded tk undocumented Message-ID: <1278742870.03.0.0685689274327.issue813453@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Is this still valid (or has something already been added)? If so, do you still think it is needed (we seem to have gotten along without it for 7 years)? If so, will you rewrite the snippet (it starts with with a dangling 'this') and specify where you would put it? Response with reset this to open. ---------- nosy: +tjreedy resolution: -> out of date status: open -> pending versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:23:42 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:23:42 +0000 Subject: [issue1887] distutils doesn't support out-of-source builds In-Reply-To: <1200961919.23.0.699852435444.issue1887@psf.upfronthosting.co.za> Message-ID: <1278743022.34.0.208405183175.issue1887@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Roumen's comments suggest that this should be closed. Monty, do you disagree? ---------- nosy: +tjreedy versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:24:22 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:24:22 +0000 Subject: [issue1977] Python reinitialization test In-Reply-To: <1201720244.02.0.0976736262476.issue1977@psf.upfronthosting.co.za> Message-ID: <1278743062.92.0.96789719421.issue1977@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:25:32 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:25:32 +0000 Subject: [issue1554133] PyOS_InputHook() and related API funcs. not documented Message-ID: <1278743132.63.0.839162209635.issue1554133@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:26:15 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:26:15 +0000 Subject: [issue1626300] 'Installing Python Modules' does not work for Windows Message-ID: <1278743175.56.0.191071558135.issue1626300@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:28:17 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:28:17 +0000 Subject: [issue1643712] Emphasize buffering issues when sys.stdin is used Message-ID: <1278743297.92.0.613294680995.issue1643712@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: -> docs at python keywords: +patch nosy: +docs at python stage: unit test needed -> versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:28:52 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:28:52 +0000 Subject: [issue1539925] warnings in interactive sessions Message-ID: <1278743332.57.0.28574782288.issue1539925@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:31:38 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:31:38 +0000 Subject: [issue1720250] PyGILState_Ensure does not acquires GIL Message-ID: <1278743498.29.0.153008319187.issue1720250@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Please check whether this is still an issue in 3.1, so that there is still an issue for 3.2. ---------- nosy: +tjreedy versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:35:35 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:35:35 +0000 Subject: [issue1349732] urllib.urlencode provides two features in one param Message-ID: <1278743735.45.0.685761311613.issue1349732@psf.upfronthosting.co.za> Terry J. Reedy added the comment: "put something somewhere" will not get action. Please suggest specific wording and a specific place to put it and mark it TEXT or PATCH or something so a doc person can find it. I am assuming that this does not apply to 3.x. ---------- assignee: georg.brandl -> docs at python nosy: +docs at python, tjreedy versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:36:32 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:36:32 +0000 Subject: [issue5888] mmap ehancement - resize with sequence notation In-Reply-To: <1241116451.53.0.52928290171.issue5888@psf.upfronthosting.co.za> Message-ID: <1278743792.23.0.131668612938.issue5888@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- components: +Library (Lib) stage: -> unit test needed versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:38:08 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:38:08 +0000 Subject: [issue1376292] Write user's version of the reference guide Message-ID: <1278743888.96.0.0824066973307.issue1376292@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:38:47 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:38:47 +0000 Subject: [issue2053] IDLE - standardize dialogs In-Reply-To: <1202515821.86.0.159216664847.issue2053@psf.upfronthosting.co.za> Message-ID: <1278743927.76.0.013087336648.issue2053@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:39:53 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:39:53 +0000 Subject: [issue7136] Idle File Menu Option Improvement In-Reply-To: <1255567244.32.0.288243785856.issue7136@psf.upfronthosting.co.za> Message-ID: <1278743993.12.0.741074408183.issue7136@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> needs patch versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:46:20 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:46:20 +0000 Subject: [issue1865] Bytes alias for 2.6 In-Reply-To: <1200673415.11.0.353515189605.issue1865@psf.upfronthosting.co.za> Message-ID: <1278744380.66.0.180456163831.issue1865@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Still not in 2.7: 2.4.1. String literals include not in the grammar section. ---------- nosy: +tjreedy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:56:00 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:56:00 +0000 Subject: [issue8040] It would be nice if documentation pages linked to other versions of the same document In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1278744960.74.0.184454182925.issue8040@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The link does not currently work. I think this effectively impossible for volunteers. Microsoft has 1000s of paid employees. Chapter and Sections numbers do not match from version to version. How many other versions would you link to? Multiple links could get a bit ugly. What might be done is to put one permanent link to "All doc versions" on the sidebar. ---------- nosy: +tjreedy versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:57:14 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:57:14 +0000 Subject: [issue6728] To avoid hang up in using CGIXMLRPCRequestHandler under IIS 7.x In-Reply-To: <1250611088.83.0.579376687228.issue6728@psf.upfronthosting.co.za> Message-ID: <1278745034.61.0.80134545853.issue6728@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 08:57:46 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 06:57:46 +0000 Subject: [issue6741] Garbage collector release method In-Reply-To: <1250771912.15.0.32080385055.issue6741@psf.upfronthosting.co.za> Message-ID: <1278745066.87.0.0744959925687.issue6741@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> unit test needed versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 09:12:27 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 10 Jul 2010 07:12:27 +0000 Subject: [issue8040] It would be nice if documentation pages linked to other versions of the same document In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1278745947.48.0.924130708902.issue8040@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think I've already discussed this with Georg a while ago and we ended up adding the links on the left sidebar in http://docs.python.org/. IIRC there's no easy way to find the same document in another version of the doc, not even now with Sphinx. I think this can be closed, unless Georg disagrees. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 09:20:18 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 10 Jul 2010 07:20:18 +0000 Subject: [issue9110] contextlib.ContextDecorator In-Reply-To: <1277765898.65.0.314299135702.issue9110@psf.upfronthosting.co.za> Message-ID: <1278746418.92.0.517425347435.issue9110@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Jack, thanks for the explanation. Glad it seems sensible to more than just one person. To my eyes, it looks like a little too much magic and I would be more comfortable if this idea and its variants had been explored more thoroughly by the community before it got injected into the standard library. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 09:26:24 2010 From: report at bugs.python.org (Matthias Klose) Date: Sat, 10 Jul 2010 07:26:24 +0000 Subject: [issue9215] test_float crashes with assertion failure on Ubuntu buildbot. In-Reply-To: <1278709313.21.0.942874068814.issue9215@psf.upfronthosting.co.za> Message-ID: <1278746784.71.0.0819574985097.issue9215@psf.upfronthosting.co.za> Matthias Klose added the comment: > what version of gcc is being used by this buildslave you already found out, but it's mentioned at the top of the test stdio. I'll update the compiler and recheck. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 09:32:06 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 10 Jul 2010 07:32:06 +0000 Subject: [issue1147646] Windows deadlock with PyEval_ReleaseLock Message-ID: <1278747126.81.0.346411344927.issue1147646@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This is actually the same issue as issue1720250 ---------- resolution: -> duplicate status: open -> closed superseder: -> PyGILState_Ensure does not acquires GIL _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 09:34:49 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 10 Jul 2010 07:34:49 +0000 Subject: [issue9215] test_float crashes with assertion failure on Ubuntu buildbot. In-Reply-To: <1278746784.71.0.0819574985097.issue9215@psf.upfronthosting.co.za> Message-ID: Mark Dickinson added the comment: On Sat, Jul 10, 2010 at 8:26 AM, Matthias Klose wrote: > you already found out, but it's mentioned at the top of the test stdio. Ah yes, so it is. Thank you. I thought I remembered seeing it somewhere in the buildbot output in the past; I obviously didn't look hard enough. > I'll update the compiler and recheck. Thank you again! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 09:36:37 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 10 Jul 2010 07:36:37 +0000 Subject: [issue1720250] PyGILState_Ensure does not acquires GIL Message-ID: <1278747397.02.0.173500361676.issue1720250@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This is still the case: the documentation should mention that PyEval_ReleaseLock() is not the correct function to release "the GIL", both the interpreter lock *and* the current thread state have to be released. ---------- assignee: -> docs at python components: -Interpreter Core nosy: +amaury.forgeotdarc, docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 10:00:00 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 10 Jul 2010 08:00:00 +0000 Subject: [issue9110] contextlib.ContextDecorator In-Reply-To: <1277765898.65.0.314299135702.issue9110@psf.upfronthosting.co.za> Message-ID: <1278748800.3.0.443699388896.issue9110@psf.upfronthosting.co.za> Nick Coghlan added the comment: The idea of building this into contextlib actually came out on off-list discussion between Michael and I. To quote the original suggestion he sent to me: """What do you think about adding ContextDecorator to contextlib for Python 3.2? http://pypi.python.org/pypi/contextdecorator It's a simple recipe but useful nonetheless (and Barry Warsaw at least is very enthusiastic about it ;-). ContextDecorator allows you to create APIs that behave as both context managers and as decorators. It also provides the optional exception handling capability of __exit__ for decorators. This isn't an uncommon pattern, used in libraries like mock, py.test and django, and it is at least slightly fiddly to get right.""" I agree it is good to have that additional motivation (and the reference to previous work) here in the tracker issue rather than squirreled away in a couple of private email archives. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 10:16:46 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 10 Jul 2010 08:16:46 +0000 Subject: [issue9110] contextlib.ContextDecorator In-Reply-To: <1277765898.65.0.314299135702.issue9110@psf.upfronthosting.co.za> Message-ID: <1278749806.31.0.935627134747.issue9110@psf.upfronthosting.co.za> Nick Coghlan added the comment: One thing that Jack's confusion above does suggest to me is that we should mention in the *ContextDecorator* documentation that it is automatically applied to the context managers created when you use @contextmanager. A lot of people familiar with contextmanager are just going to read the docs for the new toy, so may miss the fact that we have added __call__ support to GeneratorContextManager. As far as use cases go, this change is just syntactic sugar for any construct of the following form: def f(): with cm(): # Do stuff ContextDecorator lets you instead write: @cm def f(): # Do stuff It makes it clear that the CM applies to the whole function, rather than just a piece of it (and saving an indentation level is nice, too). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 11:00:54 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 10 Jul 2010 09:00:54 +0000 Subject: [issue9110] contextlib.ContextDecorator In-Reply-To: <1277765898.65.0.314299135702.issue9110@psf.upfronthosting.co.za> Message-ID: <1278752454.05.0.624640250926.issue9110@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > this change is just syntactic sugar for > any construct of the following form: > > def f(): > with cm(): > # Do stuff > > ContextDecorator lets you instead write: > > @cm > def f(): > # Do stuff Nicely expressed. This ought to go directly into the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 11:00:56 2010 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 10 Jul 2010 09:00:56 +0000 Subject: [issue876421] logging handlers raise exception on level Message-ID: <1278752456.15.0.932458738922.issue876421@psf.upfronthosting.co.za> Vinay Sajip added the comment: If I did this for some but not handler classes, then people would probably log issues saying e.g. "Why doesn't NTEventLogHandler" support a level argument? Other handlers do." etc. What's the big problem with using setLevel() to set the level? If you're after convenience, you could use the dictionary configuration API which allows you to set the levels declaratively. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 11:37:33 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 09:37:33 +0000 Subject: [issue4277] asynchat's handle_error inconsistency In-Reply-To: <1226060153.34.0.769481825348.issue4277@psf.upfronthosting.co.za> Message-ID: <1278754653.27.0.278734484504.issue4277@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> unit test needed versions: +Python 3.1, Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 11:41:43 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 09:41:43 +0000 Subject: [issue5162] multiprocessing cannot spawn child from a Windows service In-Reply-To: <1233885632.9.0.0484597105973.issue5162@psf.upfronthosting.co.za> Message-ID: <1278754903.22.0.697380041694.issue5162@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 11:42:54 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 09:42:54 +0000 Subject: [issue1521950] shlex.split() does not tokenize like the shell Message-ID: <1278754974.7.0.772598211904.issue1521950@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 11:45:32 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 09:45:32 +0000 Subject: [issue1522400] irda socket support Message-ID: <1278755132.64.0.653041923084.issue1522400@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- components: +Library (Lib) -Extension Modules stage: unit test needed -> patch review versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 11:47:09 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 09:47:09 +0000 Subject: [issue1576120] Support spawnvp[e] + use native execvp[e] on win32 Message-ID: <1278755229.69.0.598303283085.issue1576120@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 11:49:50 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 09:49:50 +0000 Subject: [issue1051216] make distutils.core.run_setup re-entrant Message-ID: <1278755390.63.0.278384459731.issue1051216@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> unit test needed versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 11:50:54 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 09:50:54 +0000 Subject: [issue1571878] Improvements to socket module exceptions Message-ID: <1278755454.1.0.126899886761.issue1571878@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 11:51:44 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 09:51:44 +0000 Subject: [issue1728741] move intern to sys, make intern() optionally warn Message-ID: <1278755504.43.0.96819128016.issue1728741@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 11:53:24 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 09:53:24 +0000 Subject: [issue1691387] Call sys.except_hook if exception occurs in __del__ Message-ID: <1278755604.38.0.869527487303.issue1691387@psf.upfronthosting.co.za> Mark Lawrence added the comment: Please provide a patch. ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 11:56:54 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 09:56:54 +0000 Subject: [issue1613479] pydoc info for a package doesn't list all package contents Message-ID: <1278755814.9.0.880057286902.issue1613479@psf.upfronthosting.co.za> Mark Lawrence added the comment: Surely this is a bug? ---------- nosy: +BreamoreBoy type: feature request -> behavior versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 12:01:24 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 10:01:24 +0000 Subject: [issue1685962] socket.getaddrinfo() should take an address tuple. Message-ID: <1278756084.51.0.423193996858.issue1685962@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 12:08:43 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 10:08:43 +0000 Subject: [issue1744456] Patch for feat. 1713877 Expose callbackAPI in readline module Message-ID: <1278756523.19.0.896867309065.issue1744456@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +christian.heimes versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 12:11:18 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 10:11:18 +0000 Subject: [issue1713877] Expose callback API in readline module Message-ID: <1278756678.43.0.813839051625.issue1713877@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can this be closed as a duplicate as Issue1744456 has a patch? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 12:15:13 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 10:15:13 +0000 Subject: [issue1748064] inspect.getargspec fails on built-in or slot wrapper methods Message-ID: <1278756913.39.0.0122313594202.issue1748064@psf.upfronthosting.co.za> Mark Lawrence added the comment: I think this should be treated as a bug. ---------- nosy: +BreamoreBoy type: feature request -> behavior versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 12:22:05 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 10:22:05 +0000 Subject: [issue5729] Allows tabs for indenting JSON output In-Reply-To: <1239297330.19.0.24635332127.issue5729@psf.upfronthosting.co.za> Message-ID: <1278757325.18.0.756813808535.issue5729@psf.upfronthosting.co.za> Mark Lawrence added the comment: Patch is small and simple, can we move this forward? ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 12:26:26 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Jul 2010 10:26:26 +0000 Subject: [issue1713877] Expose callback API in readline module Message-ID: <1278757586.32.0.469037552739.issue1713877@psf.upfronthosting.co.za> Georg Brandl added the comment: Yes, that makes sense (the two issues come from the SourceForge era, where bugs and patches had different trackers). ---------- dependencies: -Patch for feat. 1713877 Expose callbackAPI in readline module nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> Patch for feat. 1713877 Expose callbackAPI in readline module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 12:32:44 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Jul 2010 10:32:44 +0000 Subject: [issue3071] The ValueError raised by failing to unpack sequence should have more information. In-Reply-To: <1213063566.77.0.933941671492.issue3071@psf.upfronthosting.co.za> Message-ID: <1278757964.4.0.930654809935.issue3071@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied patch in r82759. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 12:32:52 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Jul 2010 10:32:52 +0000 Subject: [issue3071] The ValueError raised by failing to unpack sequence should have more information. In-Reply-To: <1213063566.77.0.933941671492.issue3071@psf.upfronthosting.co.za> Message-ID: <1278757972.24.0.291864594881.issue3071@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: wont fix -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 12:34:05 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Jul 2010 10:34:05 +0000 Subject: [issue3080] Full unicode import system In-Reply-To: <1213208697.49.0.984990811807.issue3080@psf.upfronthosting.co.za> Message-ID: <1278758045.5.0.846909163055.issue3080@psf.upfronthosting.co.za> Georg Brandl added the comment: Victor is working on this. ---------- assignee: -> haypo nosy: +georg.brandl, haypo versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 12:36:33 2010 From: report at bugs.python.org (Roumen Petrov) Date: Sat, 10 Jul 2010 10:36:33 +0000 Subject: [issue5060] gcc profile guided optimization In-Reply-To: <1232914718.3.0.0101941779254.issue5060@psf.upfronthosting.co.za> Message-ID: <1278758193.6.0.695628284345.issue5060@psf.upfronthosting.co.za> Roumen Petrov added the comment: a) search for fficonfig.h is fixed long time ago (i could not remember issue) b) build python executable cannot run without to setup some environment variables - $(RUNSHARED). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 12:40:09 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Jul 2010 10:40:09 +0000 Subject: [issue3214] Suggest change to glossary explanation: "Duck Typing" In-Reply-To: <1214543459.76.0.157400708153.issue3214@psf.upfronthosting.co.za> Message-ID: <1278758409.84.0.311908870972.issue3214@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed the first sentence in r82760. ---------- resolution: works for me -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 12:43:37 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 10:43:37 +0000 Subject: [issue1726208] SimpleHTTPServer extensions_map Message-ID: <1278758617.36.0.0316272262804.issue1726208@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> needs patch versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 12:47:40 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Jul 2010 10:47:40 +0000 Subject: [issue902065] fails building C++ extensions when configured --without-cxx Message-ID: <1278758860.36.0.647117454242.issue902065@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, closing. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 12:53:30 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 10 Jul 2010 10:53:30 +0000 Subject: [issue1685962] socket.getaddrinfo() should take an address tuple. Message-ID: <1278759210.3.0.467921394588.issue1685962@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I think the original reason why getaddrinfo() has been designed to accept separate host and port args instead of a tuple is because the original C call does the same: http://www2.research.att.com/~gsf/man/man3/getaddrinfo.html Despite this apparently looks somewhat inconsistent with other calls like bind(), connect() and connect_ex() which take an address tuple, they reflect the original C behavior in the same manner, also because they're fundamentally different than getaddrinfo(), so I see no valid reason to change this situation. ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 12:53:31 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Jul 2010 10:53:31 +0000 Subject: [issue1471985] mimetools module getencoding error Message-ID: <1278759211.46.0.131166207882.issue1471985@psf.upfronthosting.co.za> Georg Brandl added the comment: Agreed. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 13:06:15 2010 From: report at bugs.python.org (John J Lee) Date: Sat, 10 Jul 2010 11:06:15 +0000 Subject: [issue2007] cookielib lacks FileCookieJar class for Internet Explorer In-Reply-To: <1202153753.42.0.88577975251.issue2007@psf.upfronthosting.co.za> Message-ID: <1278759975.03.0.119939578807.issue2007@psf.upfronthosting.co.za> John J Lee added the comment: Suggest removing the comment that Terry refers to. That referenced MSIE code doesn't have an automated test, I've no idea whether it still works on modern Windows OSes, mechanize no longer supports use with urllib2, and I don't think that link is really appropriate in the docs anyway -- Google will likely give people more accurate information. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 13:09:35 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 10 Jul 2010 11:09:35 +0000 Subject: [issue1522400] irda socket support Message-ID: <1278760175.31.0.368301625016.issue1522400@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 13:12:50 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 10 Jul 2010 11:12:50 +0000 Subject: [issue1685962] socket.getaddrinfo() should take an address tuple. Message-ID: <1278760370.59.0.215162156578.issue1685962@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I'm closing this out as rejected. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 13:17:56 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 11:17:56 +0000 Subject: [issue1515142] sgmllib should recover from unmatched quotes Message-ID: <1278760676.87.0.100050246641.issue1515142@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've tried the patch against 2.7 on Windows Vista and got three test failures. Would someone else please try this in case I had finger problems. ---------- nosy: +BreamoreBoy type: feature request -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 13:21:24 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 11:21:24 +0000 Subject: [issue1459279] sgmllib.SGMLparser and hexadecimal numeric character refs Message-ID: <1278760884.23.0.41279724022.issue1459279@psf.upfronthosting.co.za> Mark Lawrence added the comment: sgmllib has been removed from py3k. ---------- nosy: +BreamoreBoy versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 13:22:37 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 10 Jul 2010 11:22:37 +0000 Subject: [issue4277] asynchat's handle_error inconsistency In-Reply-To: <1226060153.34.0.769481825348.issue4277@psf.upfronthosting.co.za> Message-ID: <1278760957.0.0.561355192864.issue4277@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- assignee: -> giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 13:40:21 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Jul 2010 11:40:21 +0000 Subject: [issue1434090] DOM tree inconsistency in expat XML parser Message-ID: <1278762021.42.0.82505628099.issue1434090@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r82761, thanks! ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 13:41:23 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 11:41:23 +0000 Subject: [issue900112] cgi.fieldStorage doesn't grok standards env. variables Message-ID: <1278762083.04.0.466807437289.issue900112@psf.upfronthosting.co.za> Mark Lawrence added the comment: Original link is duff try this. http://cgi-spec.golux.com/draft-coar-cgi-v11-03.txt ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 13:45:36 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 11:45:36 +0000 Subject: [issue5817] Right-click behavior from Windows Explorer In-Reply-To: <1240447084.05.0.414854633538.issue5817@psf.upfronthosting.co.za> Message-ID: <1278762336.86.0.0541272157651.issue5817@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> kbk nosy: +kbk stage: -> needs patch versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 13:47:01 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 11:47:01 +0000 Subject: [issue5863] bz2.BZ2File should accept other file-like objects. In-Reply-To: <1240898269.47.0.592056792771.issue5863@psf.upfronthosting.co.za> Message-ID: <1278762421.44.0.425368168711.issue5863@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> unit test needed versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 13:49:27 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 11:49:27 +0000 Subject: [issue5877] Add a function for updating URL query parameters In-Reply-To: <1241011935.05.0.388851858626.issue5877@psf.upfronthosting.co.za> Message-ID: <1278762567.6.0.799785860315.issue5877@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> orsenthil nosy: +orsenthil stage: -> unit test needed versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 13:50:33 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 11:50:33 +0000 Subject: [issue5926] bdist_msi - add support for minimum Python version for pure Python packages In-Reply-To: <1241465384.5.0.639061880588.issue5926@psf.upfronthosting.co.za> Message-ID: <1278762633.88.0.859510659491.issue5926@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 13:51:13 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Jul 2010 11:51:13 +0000 Subject: [issue8338] Outdated information In-Reply-To: <1270674362.74.0.217445647634.issue8338@psf.upfronthosting.co.za> Message-ID: <1278762673.29.0.722329519898.issue8338@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r82762. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 13:53:26 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 11:53:26 +0000 Subject: [issue1736792] dict reentrant/threading request Message-ID: <1278762806.56.0.898528203237.issue1736792@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- title: dict reentrant/threading bug -> dict reentrant/threading request versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 14:02:08 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Jul 2010 12:02:08 +0000 Subject: [issue8456] sqlite3.connect documentation is incorrect In-Reply-To: <1271676692.22.0.105359668933.issue8456@psf.upfronthosting.co.za> Message-ID: <1278763328.41.0.840009015341.issue8456@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r82763. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 14:12:15 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 12:12:15 +0000 Subject: [issue2528] Change os.access to check ACLs under Windows In-Reply-To: <1207059558.9.0.891835325783.issue2528@psf.upfronthosting.co.za> Message-ID: <1278763935.3.0.5543987102.issue2528@psf.upfronthosting.co.za> Mark Lawrence added the comment: A quick look tells me that the patch seems clean. However it involves changes to posixmodule.c and I don't (yet) want to get involved with doing builds, so could someone else please give this a try. ---------- nosy: +BreamoreBoy versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 14:14:08 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 12:14:08 +0000 Subject: [issue6124] Tkinter should support the OS X zoom button In-Reply-To: <1243436472.73.0.689907343638.issue6124@psf.upfronthosting.co.za> Message-ID: <1278764048.58.0.0249014584231.issue6124@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> gpolo nosy: +gpolo stage: -> unit test needed versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 14:16:38 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 12:16:38 +0000 Subject: [issue4966] Improving Lib Doc Sequence Types Section In-Reply-To: <1232149418.64.0.0450574767427.issue4966@psf.upfronthosting.co.za> Message-ID: <1278764198.46.0.910066842268.issue4966@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: georg.brandl -> docs at python nosy: +docs at python versions: +Python 3.2 -Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 14:16:48 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Jul 2010 12:16:48 +0000 Subject: [issue8560] regrtest: add a minimal "progress bar" In-Reply-To: <1272474105.27.0.516301529425.issue8560@psf.upfronthosting.co.za> Message-ID: <1278764208.07.0.255211355148.issue8560@psf.upfronthosting.co.za> Georg Brandl added the comment: Hmm, I see only one objection... and I think readability will be much less affected if the format is [ 1/340] test_grammar [ 2/340] test_opcodes [ 3/340] test_dict or somesuch. ---------- nosy: +georg.brandl resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 14:16:55 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Sat, 10 Jul 2010 12:16:55 +0000 Subject: [issue8040] It would be nice if documentation pages linked to other versions of the same document In-Reply-To: <1278744960.74.0.184454182925.issue8040@psf.upfronthosting.co.za> Message-ID: Daniel Stutzbach added the comment: On Sat, Jul 10, 2010 at 1:56 AM, Terry J. Reedy wrote: > I think this effectively impossible for volunteers. Microsoft has 1000s of > paid employees. Chapter and Sections numbers do not match from version to > version. > We don't need to match numbers, we just need to match links, which in 99% of all cases follow a regular pattern: For example: http://docs.python.org/py3k/library/fractions.html http://docs.python.org/library/fractions.html http://docs.python.org/release/2.6.5/library/fractions.html It's pretty easy to generate the links to the corresponding pages. The trickier part is testing that the link is valid when building the pages. In an ideal universe, there would be a way to manually specify when a page has been renamed (e.g., _winreg -> winreg), but even if those links were missing it would still be quite useful (IMO, of course). How many other versions would you link to? Multiple links could get a bit > ugly. > The same number as currently listed in the sidebar on the index page. ---------- status: pending -> open Added file: http://bugs.python.org/file17926/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
On Sat, Jul 10, 2010 at 1:56 AM, Terry J. Reedy <report at bugs.python.org> wrote:
I think this effectively impossible for volunteers. Microsoft has 1000s of paid employees. Chapter and Sections numbers do not match from version to version.

We don't need to match numbers, we just need to match links, which in 99% of all cases follow a regular pattern:

For example:


It's pretty easy to generate the links to the corresponding pages. ??The trickier part is testing that the link is valid when building the pages.

In an ideal universe, there would be a way to manually specify when a page has been renamed (e.g., _winreg -> winreg), but even if those links were missing it would still be quite useful (IMO, of course).

How many other versions would you link to? Multiple links could get a bit ugly.

The same number as currently listed in the sidebar on the index page.
From report at bugs.python.org Sat Jul 10 14:19:03 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 12:19:03 +0000 Subject: [issue6321] Reload Python modules when running programs In-Reply-To: <1245648620.51.0.901061764952.issue6321@psf.upfronthosting.co.za> Message-ID: <1278764343.63.0.711317504363.issue6321@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> kbk nosy: +kbk versions: +Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 14:20:50 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Jul 2010 12:20:50 +0000 Subject: [issue8564] Update documentation on doctest/unittest2 integration In-Reply-To: <1272491514.09.0.168519244685.issue8564@psf.upfronthosting.co.za> Message-ID: <1278764450.38.0.265106176394.issue8564@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied in r82764. Thanks! ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 14:26:45 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 12:26:45 +0000 Subject: [issue6751] Default return value in ConfigParser In-Reply-To: <1250845077.86.0.224640008074.issue6751@psf.upfronthosting.co.za> Message-ID: <1278764805.43.0.578950874442.issue6751@psf.upfronthosting.co.za> Mark Lawrence added the comment: A short inline patch is proposed, would something like this be acceptable? ---------- nosy: +BreamoreBoy stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 14:29:38 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Sat, 10 Jul 2010 12:29:38 +0000 Subject: [issue8040] It would be nice if documentation pages linked to other versions of the same document In-Reply-To: <1278745947.48.0.924130708902.issue8040@psf.upfronthosting.co.za> Message-ID: Daniel Stutzbach added the comment: On Sat, Jul 10, 2010 at 2:12 AM, Ezio Melotti wrote: > I think I've already discussed this with Georg a while ago and we ended up > adding the links on the left sidebar in http://docs.python.org/. > IIRC there's no easy way to find the same document in another version of > the doc, not even now with Sphinx. > I think this can be closed, unless Georg disagrees. When I opened this issue originally, I hadn't learned Sphinx yet and couldn't propose a solution. Since then I've started using Sphinx and have a much better idea of what it can and cannot do. It would require a new Sphinx extension, but it need not be a complex one. Inside sidebartoc:

Docs for other versions

    (call extension module)
The extension module would use a global directory (outside of a particular version's Sphinx build) to keep track of which versions had generated the same page. The builds would have to be run twice, once to produce all of the information and once to include it. Alternately, they could be run once if it's acceptable to use Apache Server-Side-Includes (SSI). If you want to assign the issue to me and leave it open, that would be fine with me. I can't promise to get to it soon, but I'm willing to work on it eventually. ---------- Added file: http://bugs.python.org/file17927/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
On Sat, Jul 10, 2010 at 2:12 AM, Ezio Melotti <report at bugs.python.org> wrote:
I think I've already discussed this with Georg a while ago and we ended up adding the links on the left sidebar in http://docs.python.org/.
IIRC there's no easy way to find the same document in another version of the doc, not even now with Sphinx.
I think this can be closed, unless Georg disagrees.

When I opened this issue originally, I hadn't learned Sphinx yet and couldn't propose a solution. ??Since then I've started using Sphinx and have a much better idea of what it can and cannot do.

It would require a new Sphinx extension, but it need not be a complex one.

Inside sidebartoc:

<h3>Docs for other versions</h3>
<ul>
(call extension module)
</ul>

The extension module would use a global directory (outside of a particular version's Sphinx build) to??keep track of which versions had generated the same page. ??The builds would have to be run twice, once to produce all of the information and once to include it. ??Alternately, they could be run once if it's acceptable to use Apache Server-Side-Includes (SSI).

If you want to assign the issue to me and leave it open, that would be fine with me. ??I can't promise to get to it soon, but I'm willing to work on it eventually.
From report at bugs.python.org Sat Jul 10 14:29:37 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Jul 2010 12:29:37 +0000 Subject: [issue8560] regrtest: add a minimal "progress bar" In-Reply-To: <1272474105.27.0.516301529425.issue8560@psf.upfronthosting.co.za> Message-ID: <1278764977.52.0.0275763835343.issue8560@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Georg's suggestion is rather nice. ---------- nosy: +pitrou versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 14:35:00 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Sat, 10 Jul 2010 12:35:00 +0000 Subject: [issue8040] It would be nice if documentation pages linked to other versions of the same document In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1278765300.64.0.805756272743.issue8040@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : Removed file: http://bugs.python.org/file17926/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 14:35:15 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Sat, 10 Jul 2010 12:35:15 +0000 Subject: [issue8040] It would be nice if documentation pages linked to other versions of the same document In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1278765315.62.0.679374559503.issue8040@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : Removed file: http://bugs.python.org/file17927/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 14:36:06 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Jul 2010 12:36:06 +0000 Subject: [issue1720250] PyGILState_Ensure does not acquires GIL Message-ID: <1278765366.35.0.112568388224.issue1720250@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not even sure what PyEval_AcquireLock() and PyEval_ReleaseLock() are good for. Perhaps they should be deprecated. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 14:46:55 2010 From: report at bugs.python.org (Jesse Noller) Date: Sat, 10 Jul 2010 12:46:55 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278766015.79.0.392971430902.issue9207@psf.upfronthosting.co.za> Jesse Noller added the comment: Talking with Brett; the fix should be as simple as keeping a reference to the debug function which we have in the imports. During interpreter shutdown, the sys.modules is iterated and each module replaced with None. Since the _handle_workers thread persists slightly past the point of the parent (and can, it's a daemon thread) debug is vanishing on us. We can go with switching this to a classmethod, and keeping a reference on the class, passing debug directly into the _handle_workers thread (testing this last night fixed it 100% of the time) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 14:52:05 2010 From: report at bugs.python.org (Jesse Noller) Date: Sat, 10 Jul 2010 12:52:05 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1278766325.66.0.291303964598.issue9205@psf.upfronthosting.co.za> Jesse Noller added the comment: thanks greg; I'm going to take a look and think about this. I'd like to resolve bug 9207 first though ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 14:52:48 2010 From: report at bugs.python.org (Jesse Noller) Date: Sat, 10 Jul 2010 12:52:48 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1278766368.51.0.397134708951.issue9205@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: -> jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 15:45:03 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 13:45:03 +0000 Subject: [issue7284] optparse - display version in usage by default In-Reply-To: <1257641781.98.0.415542584092.issue7284@psf.upfronthosting.co.za> Message-ID: <1278769503.76.0.107494496678.issue7284@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +aronacher stage: -> needs patch versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 15:47:21 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 13:47:21 +0000 Subject: [issue7303] pkgutil lacks documentation for useful functions In-Reply-To: <1257891153.41.0.767469344024.issue7303@psf.upfronthosting.co.za> Message-ID: <1278769641.74.0.206637252999.issue7303@psf.upfronthosting.co.za> Mark Lawrence added the comment: Ulrik could you please submit a patch? ---------- assignee: georg.brandl -> docs at python nosy: +BreamoreBoy, docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 15:50:20 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Jul 2010 13:50:20 +0000 Subject: [issue1522400] irda socket support Message-ID: <1278769820.78.0.279853555854.issue1522400@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 15:56:33 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 10 Jul 2010 13:56:33 +0000 Subject: [issue9174] unittest assertEqual error output sub-optimal for single strings In-Reply-To: <1278388937.66.0.26708370086.issue9174@psf.upfronthosting.co.za> Message-ID: <1278770193.5.0.978846191051.issue9174@psf.upfronthosting.co.za> Michael Foord added the comment: Committed revision 82767. (py3k) Committed revision 82765. (release27-maint) Fix could be ported to Python 3.1 as a bugfix as well. ---------- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 16:04:14 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Jul 2010 14:04:14 +0000 Subject: [issue1522400] irda socket support Message-ID: <1278770654.3.0.0764773770009.issue1522400@psf.upfronthosting.co.za> Antoine Pitrou added the comment: A new patch should be generated against 3.2 (the current one doesn't apply cleanly). Also, checking for linux/irda.h requires that sys/socket.h is included, hence needing the following snippet in configure.in: # On Linux, irda.h requires sys/socket.h AC_CHECK_HEADERS(linux/irda.h,,,[ #ifdef HAVE_SYS_SOCKET_H #include #endif ]) ---------- nosy: +pitrou stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 16:23:56 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 10 Jul 2010 14:23:56 +0000 Subject: [issue2528] Change os.access to check ACLs under Windows In-Reply-To: <1207059558.9.0.891835325783.issue2528@psf.upfronthosting.co.za> Message-ID: <1278771836.22.0.526176388788.issue2528@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: But what are the benefits of this change? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 16:24:55 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 10 Jul 2010 14:24:55 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1276529706.85.0.44919621235.issue7475@psf.upfronthosting.co.za> Message-ID: <4C3882B1.5030900@v.loewis.de> Martin v. L?wis added the comment: > I would like to know what happened with hex_codec and what is the new py3 for this. If you had read this bug report, you'd know that the codec was removed in Python 3. Use binascii.hexlify/binascii.unhexlify instead (as you should in 2.x, also). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 16:41:40 2010 From: report at bugs.python.org (Tal Einat) Date: Sat, 10 Jul 2010 14:41:40 +0000 Subject: [issue2053] IDLE - standardize dialogs In-Reply-To: <1202515821.86.0.159216664847.issue2053@psf.upfronthosting.co.za> Message-ID: <1278772900.16.0.45682947992.issue2053@psf.upfronthosting.co.za> Tal Einat added the comment: Because of the method of implementation, a dialog can be created without specifying a parent. There was at least one instance of this in IDLE before my patch. This is a bug, since the behavior of the dialog in this instance is obviously incorrect (the user can switch focus back to the parent while the dialog is still open). I found that making the EditorWindow the default parent was the best way to both fix the bug, make the code more readable, and avoid replicating this bug in the future. Feel free to write up a different patch or change mine if you feel so strongly about the default parent. The process of discussing this patch has taken far, far too long. I can't stand such discussions spanning months (and years!). Please just accept this patch or close it. I'm fed up with this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 16:43:16 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 10 Jul 2010 14:43:16 +0000 Subject: [issue8560] regrtest: add a minimal "progress bar" In-Reply-To: <1272474105.27.0.516301529425.issue8560@psf.upfronthosting.co.za> Message-ID: <1278772996.93.0.927104014824.issue8560@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:04:30 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 15:04:30 +0000 Subject: [issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth) In-Reply-To: <1204223194.19.0.670418970441.issue2202@psf.upfronthosting.co.za> Message-ID: <1278774270.68.0.181071422447.issue2202@psf.upfronthosting.co.za> Mark Lawrence added the comment: I tried to test the patch but got:- c:\Python26>python.exe lib\test\test_urllib2_localnet.py Traceback (most recent call last): File "lib\test\test_urllib2_localnet.py", line 325, in class DigestMD5sessClientAuthTests(BaseTestCase): NameError: name 'BaseTestCase' is not defined ---------- nosy: +BreamoreBoy stage: unit test needed -> patch review versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:07:47 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 15:07:47 +0000 Subject: [issue7752] Add support for Digest authentication session (reuse nonces) In-Reply-To: <1264117674.74.0.518658840947.issue7752@psf.upfronthosting.co.za> Message-ID: <1278774467.26.0.514433518689.issue7752@psf.upfronthosting.co.za> Mark Lawrence added the comment: The patch will need reworking to apply to 3.2 only. ---------- nosy: +BreamoreBoy versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:10:29 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 15:10:29 +0000 Subject: [issue7797] base64 module docs should indicate that encode methods return bytes, not strings In-Reply-To: <1264657234.88.0.361902382991.issue7797@psf.upfronthosting.co.za> Message-ID: <1278774629.23.0.832693925123.issue7797@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: georg.brandl -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:11:59 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 15:11:59 +0000 Subject: [issue7836] Add /usr/sfw/lib to OpenSSL search path for Solaris. In-Reply-To: <1265104504.64.0.0631825253097.issue7836@psf.upfronthosting.co.za> Message-ID: <1278774719.62.0.817717856884.issue7836@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:13:58 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 15:13:58 +0000 Subject: [issue7935] Cross-reference ast.literal_eval() from eval() docs In-Reply-To: <1266241099.84.0.200250637967.issue7935@psf.upfronthosting.co.za> Message-ID: <1278774838.08.0.440831430641.issue7935@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: georg.brandl -> docs at python nosy: +docs at python versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:24:34 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 10 Jul 2010 15:24:34 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <4C3882B1.5030900@v.loewis.de> Message-ID: <4C3890AF.7030500@egenix.com> Marc-Andre Lemburg added the comment: Martin v. L?wis wrote: > > Martin v. L?wis added the comment: > >> I would like to know what happened with hex_codec and what is the new py3 for this. > > If you had read this bug report, you'd know that the codec was removed > in Python 3. Use binascii.hexlify/binascii.unhexlify instead (as you > should in 2.x, also). ... or wait for Python 3.2 which will readd them :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:34:21 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 15:34:21 +0000 Subject: [issue1653457] Python misbehaves when installed in / (patch attached) Message-ID: <1278776061.79.0.455370724275.issue1653457@psf.upfronthosting.co.za> Mark Lawrence added the comment: I think the patch should be looked at very carefully as I guess that the reduce function is called all over the place. ---------- nosy: +BreamoreBoy stage: unit test needed -> patch review versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:36:09 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Jul 2010 15:36:09 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1278776169.12.0.235855599877.issue7475@psf.upfronthosting.co.za> Georg Brandl added the comment: ... but don't wait too long! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:36:19 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Jul 2010 15:36:19 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1278776179.74.0.373632918776.issue7475@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:36:31 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Jul 2010 15:36:31 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1278776191.37.0.502406444668.issue7475@psf.upfronthosting.co.za> Georg Brandl added the comment: ... but don't wait to long to add them! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:36:43 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 15:36:43 +0000 Subject: [issue1367631] maximum length not enforced in cgi.parse() Message-ID: <1278776203.43.0.100226657575.issue1367631@psf.upfronthosting.co.za> Mark Lawrence added the comment: Andrew could you please provide a patch. ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:38:35 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 15:38:35 +0000 Subject: [issue5638] test_httpservers fails CGI tests if --enable-shared In-Reply-To: <1238555479.53.0.0126068485544.issue5638@psf.upfronthosting.co.za> Message-ID: <1278776315.2.0.63197951717.issue5638@psf.upfronthosting.co.za> Mark Lawrence added the comment: Would anyone like to comment on this. ---------- nosy: +BreamoreBoy stage: -> unit test needed versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:44:38 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 15:44:38 +0000 Subject: [issue1612012] builtin compile() doc needs PyCF_DONT_IMPLY_DEDENT Message-ID: <1278776678.21.0.50151582169.issue1612012@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> docs at python nosy: +docs at python versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:46:40 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Jul 2010 15:46:40 +0000 Subject: [issue1522400] irda socket support Message-ID: <1278776800.76.0.0986391325451.issue1522400@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a straight port of the patch to py3k, compiling under Linux and Windows. Several problems though: 1. the patch seems incomplete, in that manual decoding of return values is necessary (see posted example obex_test.py) 2. there seems to be no way to test it if you don't have an IRDA device (I don't have any) 3. the patch itself seems fragile: for example, it won't always put a terminating '\0' in sir_name; also, straight memcpy() of an int into a char[] buffer is wrong (endianness issues) ---------- Added file: http://bugs.python.org/file17928/irda-32.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:47:47 2010 From: report at bugs.python.org (Reid Kleckner) Date: Sat, 10 Jul 2010 15:47:47 +0000 Subject: [issue8844] Condition.wait() doesn't raise KeyboardInterrupt In-Reply-To: <1275065292.27.0.238026363438.issue8844@psf.upfronthosting.co.za> Message-ID: <1278776867.58.0.64335416345.issue8844@psf.upfronthosting.co.za> Reid Kleckner added the comment: Here's a patch that makes Python-level lock acquisitions interruptible for py3k. There are many users of the C-level lock API, most of whom are not set up to deal with lock acquisition failure. I decided to make a new API function and leave the others alone. If possible, I think this should go out with 3.2. In that case, I was wondering if I should merge PyThread_acquire_lock_timed with my new PyThread_acquire_lock_timed_intr, since PyThread_acquire_lock_timed wasn't available in 3.1. Although it did go out in 2.7, we don't promise C API compatibility with the 2.x series, so I don't think it matters. I've tested this patch on Mac OS X and Linux. The whole test suite passes on both, along with the test that I added to test_threadsignals.py. I added a noop compatibility wrapper to thread_nt.h, but I haven't tested it or built it. When I get around to testing/fixing the subprocess patch on Windows, I'll make sure this works and the test is skipped. ---------- keywords: +patch Added file: http://bugs.python.org/file17929/lock-interrupt.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:48:32 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 15:48:32 +0000 Subject: [issue1749512] imaplib cannot handle mailboxes with ACL: lrs Message-ID: <1278776912.74.0.377840348977.issue1749512@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- components: +Library (Lib) -Extension Modules versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:50:09 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 15:50:09 +0000 Subject: [issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character In-Reply-To: <1188943421.22.0.776458935296.issue1104@psf.upfronthosting.co.za> Message-ID: <1278777009.98.0.858683944154.issue1104@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:57:48 2010 From: report at bugs.python.org (Brian Curtin) Date: Sat, 10 Jul 2010 15:57:48 +0000 Subject: [issue1522400] irda socket support Message-ID: <1278777468.08.0.924549559092.issue1522400@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- components: +Extension Modules -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 17:59:36 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 10 Jul 2010 15:59:36 +0000 Subject: [issue1728741] move intern to sys, make intern() optionally warn Message-ID: <1278777576.98.0.604344781024.issue1728741@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 18:12:04 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 16:12:04 +0000 Subject: [issue5715] listen socket close in SocketServer.ForkingMixIn.process_request() In-Reply-To: <1239064250.04.0.401358738839.issue5715@psf.upfronthosting.co.za> Message-ID: <1278778324.1.0.513050136758.issue5715@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> unit test needed versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.4, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 18:14:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Jul 2010 16:14:01 +0000 Subject: [issue8844] Condition.wait() doesn't raise KeyboardInterrupt In-Reply-To: <1275065292.27.0.238026363438.issue8844@psf.upfronthosting.co.za> Message-ID: <1278778441.87.0.455388183261.issue8844@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Oh, nice! > I was wondering if I should merge PyThread_acquire_lock_timed with my > new PyThread_acquire_lock_timed_intr, since PyThread_acquire_lock_timed > wasn't available in 3.1. Yes, I think you should. I haven't tried the patch, but it seems you got the logic right. There's a problem sometimes that you're using 2 spaces for indent rather than 4. Also, you forgot to update the RLock implementation in _threadmodule.c (and perhaps add another test for it). (there are other modules which use the PyThread_acquire_lock API, but most of the time the locks are held for a short time (and shouldn't deadlock), which makes converting them less of a priority) ---------- versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 18:14:43 2010 From: report at bugs.python.org (Greg Brockman) Date: Sat, 10 Jul 2010 16:14:43 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1278778483.78.0.438373563328.issue9205@psf.upfronthosting.co.za> Greg Brockman added the comment: Cool, thanks. I'll note that with this patch applied, using the test program from 9207 I consistently get the following exception: """ Exception in thread Thread-1 (most likely raised during interpreter shutdown): Traceback (most recent call last): File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner File "/usr/lib/python2.6/threading.py", line 484, in run File "/home/gdb/repositories/multiprocessing/pool.py", line 312, in _handle_workers File "/home/gdb/repositories/multiprocessing/pool.py", line 190, in _maintain_pool File "/home/gdb/repositories/multiprocessing/pool.py", line 158, in _join_exited_workers : 'NoneType' object is not callable """ This is line 148 in the unpatched source, namely the 'reversed(range(len(self._pool)))' line of _join_exited_workers. Looks like the same issue, where instead reversed/range/len have been set to None. So I think by changing how much time the worker_handler spends in various functions, I've made it possible (or just more likely?) that if we lose the race with interpreter shutdown the worker_handler will be in the middle of _join_exited_workers. This may mean that someone should keep around a local reference to reversed/range/len... not sure if there's a better solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 18:20:54 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 16:20:54 +0000 Subject: [issue5758] fileinput.hook_compressed returning bytes from gz file In-Reply-To: <1239752882.45.0.853698903963.issue5758@psf.upfronthosting.co.za> Message-ID: <1278778854.99.0.918973949039.issue5758@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 18:28:56 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 16:28:56 +0000 Subject: [issue5286] urrlib2 digest authentication problems In-Reply-To: <1234828359.04.0.561116090692.issue5286@psf.upfronthosting.co.za> Message-ID: <1278779336.44.0.240370087848.issue5286@psf.upfronthosting.co.za> Mark Lawrence added the comment: To quote msg82284. "The fix in the patch is crude, but it should work better than now." Would this be acceptable? ---------- nosy: +BreamoreBoy, orsenthil versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 18:31:08 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 16:31:08 +0000 Subject: [issue985064] plistlib crashes too easily on bad files Message-ID: <1278779468.1.0.279164097444.issue985064@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 18:35:13 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 16:35:13 +0000 Subject: [issue5256] rlcompleter adds builtins when custom dict is used In-Reply-To: <1234569860.16.0.0783224890959.issue5256@psf.upfronthosting.co.za> Message-ID: <1278779713.47.0.512227971437.issue5256@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- components: +Library (Lib) -None versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 18:42:34 2010 From: report at bugs.python.org (Jean-Paul Calderone) Date: Sat, 10 Jul 2010 16:42:34 +0000 Subject: [issue5286] urrlib2 digest authentication problems In-Reply-To: <1234828359.04.0.561116090692.issue5286@psf.upfronthosting.co.za> Message-ID: <1278780154.47.0.735399589231.issue5286@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: Some unit tests which demonstrate the present non-working behavior and the correctness of the fix would help a lot. ---------- nosy: +exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 18:44:27 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 16:44:27 +0000 Subject: [issue1172011] BaseCookie should call value_decode from __getitem__ Message-ID: <1278780267.67.0.980441088917.issue1172011@psf.upfronthosting.co.za> Mark Lawrence added the comment: Well should it or shouldn't it? ---------- nosy: +BreamoreBoy title: BaseCookie does not call value_decode -> BaseCookie should call value_decode from __getitem__ versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 18:44:39 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 10 Jul 2010 16:44:39 +0000 Subject: [issue5286] urrlib2 digest authentication problems In-Reply-To: <1234828359.04.0.561116090692.issue5286@psf.upfronthosting.co.za> Message-ID: <1278780279.18.0.616867449739.issue5286@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: -> orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 18:49:06 2010 From: report at bugs.python.org (Matthew Barnett) Date: Sat, 10 Jul 2010 16:49:06 +0000 Subject: [issue1158231] string.Template does not allow step-by-step replacements Message-ID: <1278780546.85.0.461424376233.issue1158231@psf.upfronthosting.co.za> Matthew Barnett added the comment: Here's a patch for Python 3.1, if anyone's still interested after 5 years. :-) ---------- keywords: +patch nosy: +mrabarnett Added file: http://bugs.python.org/file17930/from_template.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 18:49:58 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 16:49:58 +0000 Subject: [issue845560] imaplib: traceback from _checkquote with empty string Message-ID: <1278780598.37.0.267802451625.issue845560@psf.upfronthosting.co.za> Mark Lawrence added the comment: The patch adds two lines to imaplib.py, would applying it after all these years be more trouble than it's worth? ---------- nosy: +BreamoreBoy stage: unit test needed -> patch review versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 18:55:02 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 16:55:02 +0000 Subject: [issue4493] urllib2 doesn't always supply / where URI path component is empty In-Reply-To: <1228250772.41.0.047917224679.issue4493@psf.upfronthosting.co.za> Message-ID: <1278780902.56.0.654518517015.issue4493@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 19:00:07 2010 From: report at bugs.python.org (Gregory P. Smith) Date: Sat, 10 Jul 2010 17:00:07 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1278781207.13.0.543835080131.issue9216@psf.upfronthosting.co.za> Gregory P. Smith added the comment: That sounds fine to me and I do like the usedforsecurity annotation on the API. I'll gladly review any patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 19:00:56 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 17:00:56 +0000 Subject: [issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0) In-Reply-To: <1241895448.39.0.497331485225.issue5978@psf.upfronthosting.co.za> Message-ID: <1278781256.75.0.101082302298.issue5978@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm note sure if this is a library bug, doc bug, external library issue or what, anyone got any true idea? ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 19:05:08 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 17:05:08 +0000 Subject: [issue6014] No shell prompt when a graphics window that was started from IDLE is closed In-Reply-To: <1242252085.07.0.824128250707.issue6014@psf.upfronthosting.co.za> Message-ID: <1278781508.75.0.781278836817.issue6014@psf.upfronthosting.co.za> Mark Lawrence added the comment: Surely a graphics program should be run from a command prompt, not from IDLE or anything similar? Hence can this be closed? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 19:06:58 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 10 Jul 2010 17:06:58 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1278776191.37.0.502406444668.issue7475@psf.upfronthosting.co.za> Message-ID: <4C38A8AF.2020204@egenix.com> Marc-Andre Lemburg added the comment: Georg Brandl wrote: > > Georg Brandl added the comment: > > ... but don't wait to long to add them! I plan to work on that after EuroPython. Florent already provided the patch for the codecs, so what's left is adding the .transform()/ .untransform() methods, and perhaps tweak the codec input/output types in a couple of cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 19:07:40 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 10 Jul 2010 17:07:40 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1278781660.37.0.457542197472.issue7475@psf.upfronthosting.co.za> Changes by Marc-Andre Lemburg : ---------- versions: -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 19:08:48 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 17:08:48 +0000 Subject: [issue3070] Wrong size calculation in posix_execve In-Reply-To: <1213054131.08.0.268305843949.issue3070@psf.upfronthosting.co.za> Message-ID: <1278781728.27.0.015881255335.issue3070@psf.upfronthosting.co.za> Mark Lawrence added the comment: Any core C developers have any input on this one? ---------- nosy: +BreamoreBoy versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 19:19:11 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 10 Jul 2010 17:19:11 +0000 Subject: [issue9174] unittest assertEqual error output sub-optimal for single strings In-Reply-To: <1278388937.66.0.26708370086.issue9174@psf.upfronthosting.co.za> Message-ID: <1278782351.9.0.792302098391.issue9174@psf.upfronthosting.co.za> Michael Foord added the comment: I agree that mentioning contextmanager in the ContextDecorator docs is a good idea - plus adding something like Nick's example. I'll do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 19:19:42 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 10 Jul 2010 17:19:42 +0000 Subject: [issue9174] unittest assertEqual error output sub-optimal for single strings In-Reply-To: <1278388937.66.0.26708370086.issue9174@psf.upfronthosting.co.za> Message-ID: <1278782382.29.0.708415796337.issue9174@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 19:20:19 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 10 Jul 2010 17:20:19 +0000 Subject: [issue9110] contextlib.ContextDecorator In-Reply-To: <1277765898.65.0.314299135702.issue9110@psf.upfronthosting.co.za> Message-ID: <1278782419.21.0.699655529569.issue9110@psf.upfronthosting.co.za> Michael Foord added the comment: I agree that mentioning contextmanager in the ContextDecorator docs is a good idea - plus adding something like Nick's example. I'll do that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 19:24:21 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 17:24:21 +0000 Subject: [issue1441] Cycles through ob_type aren't freed In-Reply-To: <1195009292.31.0.0975446267952.issue1441@psf.upfronthosting.co.za> Message-ID: <1278782661.09.0.779731249508.issue1441@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 19:26:27 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 17:26:27 +0000 Subject: [issue2609] Tests fail if ./@test is not writeable In-Reply-To: <1207846870.93.0.178479630911.issue2609@psf.upfronthosting.co.za> Message-ID: <1278782787.91.0.397854948045.issue2609@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 2.7, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 19:28:19 2010 From: report at bugs.python.org (Reid Kleckner) Date: Sat, 10 Jul 2010 17:28:19 +0000 Subject: [issue8844] Condition.wait() doesn't raise KeyboardInterrupt In-Reply-To: <1275065292.27.0.238026363438.issue8844@psf.upfronthosting.co.za> Message-ID: <1278782899.83.0.425974392712.issue8844@psf.upfronthosting.co.za> Reid Kleckner added the comment: Here is a new version of a patch that updates recursive locks to have the same behavior. The pure Python RLock implementaiton should be interruptible by virtue of the base lock acquire primitive being interruptible. I've also updated the relevant documentation I could find. I've surely missed some, though. I also got rid of the _intr version of lock acquisition and simply added a new parameter to the _timed variant. The only two callers of it are the ones I updated in the _thread module. ---------- Added file: http://bugs.python.org/file17931/lock-interrupt.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 19:38:18 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 17:38:18 +0000 Subject: [issue6246] Python debugger ignores exception if instructed to return from generator In-Reply-To: <1244502401.73.0.647401575179.issue6246@psf.upfronthosting.co.za> Message-ID: <1278783498.89.0.461564104516.issue6246@psf.upfronthosting.co.za> Mark Lawrence added the comment: I can reproduce this on Windows Vista. ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 19:42:05 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 17:42:05 +0000 Subject: [issue6302] email.header.decode_header data types are inconsistent and incorrectly documented In-Reply-To: <1245288976.09.0.298419063758.issue6302@psf.upfronthosting.co.za> Message-ID: <1278783725.85.0.258789908841.issue6302@psf.upfronthosting.co.za> Mark Lawrence added the comment: Anyone got any comments to make on this? Should 2.7 also be included? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 19:43:09 2010 From: report at bugs.python.org (Bob Ippolito) Date: Sat, 10 Jul 2010 17:43:09 +0000 Subject: [issue5729] Allows tabs for indenting JSON output In-Reply-To: <1239297330.19.0.24635332127.issue5729@psf.upfronthosting.co.za> Message-ID: <1278783789.96.0.731351047168.issue5729@psf.upfronthosting.co.za> Bob Ippolito added the comment: Well this feature is already in simplejson 2.1.0, it would probably make more sense to simply merge the latest simplejson back with Python 3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 19:43:57 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 10 Jul 2010 17:43:57 +0000 Subject: [issue3070] Wrong size calculation in posix_execve In-Reply-To: <1213054131.08.0.268305843949.issue3070@psf.upfronthosting.co.za> Message-ID: <1278783837.2.0.851384721791.issue3070@psf.upfronthosting.co.za> STINNER Victor added the comment: Yes, I fixed it in 3.1 (r80494) and 3.2 (r80421): see issue #8391. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 19:47:10 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 17:47:10 +0000 Subject: [issue6322] Pdb breakpoints don't work on lines without bytecode In-Reply-To: <1245679754.68.0.982838087844.issue6322@psf.upfronthosting.co.za> Message-ID: <1278784030.8.0.607987377829.issue6322@psf.upfronthosting.co.za> Mark Lawrence added the comment: The OP has offered source code which fixes this issue, see msg89597. ---------- nosy: +BreamoreBoy stage: -> needs patch versions: +Python 3.2 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 20:07:56 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 18:07:56 +0000 Subject: [issue7303] pkgutil lacks documentation for useful functions In-Reply-To: <1257891153.41.0.767469344024.issue7303@psf.upfronthosting.co.za> Message-ID: <1278785276.54.0.767034554619.issue7303@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +easy nosy: +merwok resolution: -> accepted stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 20:14:35 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 18:14:35 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1278785675.6.0.36490305964.issue7475@psf.upfronthosting.co.za> ?ric Araujo added the comment: I am confused by MvL?s reply. From the first paragraph documentation for binascii: ?Normally, you will not use these functions directly but use wrapper modules like uu, base64, or binhex instead. The binascii module contains low-level functions written in C for greater speed that are used by the higher-level modules.? Is the doc not accurate? Also, can someone not unsure about the status of this report edit the type, stage, component and resolution? It would be helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 20:35:08 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 10 Jul 2010 18:35:08 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib hex_codec ... In-Reply-To: <1278785675.6.0.36490305964.issue7475@psf.upfronthosting.co.za> Message-ID: <4C38BD50.3050903@v.loewis.de> Martin v. L?wis added the comment: > I am confused by MvL?s reply. From the first paragraph documentation > for binascii: ?Normally, you will not use these functions directly > but use wrapper modules like uu, base64, or binhex instead. The > binascii module contains low-level functions written in C for greater > speed that are used by the higher-level modules.? > > Is the doc not accurate? It is correct. So use base64.b16encode/b16decode then. It's just that I personally prefer hexlify/unhexlify, because I can memorize the function name better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 20:37:42 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 10 Jul 2010 18:37:42 +0000 Subject: [issue9215] test_float crashes with assertion failure on Ubuntu buildbot. In-Reply-To: <1278709313.21.0.942874068814.issue9215@psf.upfronthosting.co.za> Message-ID: <1278787062.7.0.69525087856.issue9215@psf.upfronthosting.co.za> Mark Dickinson added the comment: I managed to reproduce this with Ubuntu 10.10 and the gcc-snapshot package. I've shrunk it to the following (no floating-point in sight!): /* file dtoa.c */ static char s0[12]; char *_Py_dg_dtoa() { char *s = s0; *s++ = '9'; *s++ = '9'; while(*--s == '9') if (s == s0) { *s = '0'; break; } ++*s; return s0; } int main(void) { char *s; s = _Py_dg_dtoa(); return s[0] != '1'; } /* end file dtoa.c */ dickinsm at ubuntu:~/bug$ /usr/lib/gcc-snapshot/bin/gcc -O0 dtoa.c && ./a.out && echo "Success" || echo "Failure" Success dickinsm at ubuntu:~/bug$ /usr/lib/gcc-snapshot/bin/gcc -O1 dtoa.c && ./a.out && echo "Success" || echo "Failure" Failure ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 20:41:05 2010 From: report at bugs.python.org (Hans Lellelid) Date: Sat, 10 Jul 2010 18:41: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: <1278787265.63.0.0302749738626.issue7946@psf.upfronthosting.co.za> Changes by Hans Lellelid : ---------- nosy: +hozn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 20:48:51 2010 From: report at bugs.python.org (Tim Golden) Date: Sat, 10 Jul 2010 18:48:51 +0000 Subject: [issue2528] Change os.access to check ACLs under Windows In-Reply-To: <1278771836.22.0.526176388788.issue2528@psf.upfronthosting.co.za> Message-ID: <4C38C08F.6000008@timgolden.me.uk> Tim Golden added the comment: Although I'm the implementer of the patch (the concept was discussed way back on c.l.py after a naive poster's original request) I'm probably +0 myself. It's an attempt to replace os.access' next-to-useless behaviour on Windows with something which at least uses current security mechanisms to determine its answer. However, it's just one function among the many Posixesque functions which don't quite map to Windows. And one which you might well be advised to avoid in any case since there's an race condition inherent in checking for a file's accessibility and then making use of that fact. Better to try and fall back. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 20:51:10 2010 From: report at bugs.python.org (Matthias Klose) Date: Sat, 10 Jul 2010 18:51:10 +0000 Subject: [issue9215] test_float crashes with assertion failure on Ubuntu buildbot. In-Reply-To: <1278709313.21.0.942874068814.issue9215@psf.upfronthosting.co.za> Message-ID: <1278787870.34.0.68284063527.issue9215@psf.upfronthosting.co.za> Matthias Klose added the comment: I updated the compiler on the buildbot to trunk 20100709, and your reduced testcase is fixed. will update the gcc-snapshot package in maverick later. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:18:36 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 19:18:36 +0000 Subject: [issue8040] It would be nice if documentation pages linked to other versions of the same document In-Reply-To: <1267543845.91.0.112810116218.issue8040@psf.upfronthosting.co.za> Message-ID: <1278789516.84.0.402847005732.issue8040@psf.upfronthosting.co.za> Terry J. Reedy added the comment: All yours. Good luck. As usual, no guarantees on acceptance of any particular patch. I am marking this for 3.2 because that is where new *code* will go and that is also the doc set you should experiment with. That is not to say that new code, once approved, cannot be applied to past doc sets. ---------- assignee: georg.brandl -> stutzbach stage: -> needs patch versions: -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:26:34 2010 From: report at bugs.python.org (Jesse Noller) Date: Sat, 10 Jul 2010 19:26:34 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1278789994.37.0.50389416727.issue9205@psf.upfronthosting.co.za> Jesse Noller added the comment: Ugh. I'm going to have to think about the cleanest way of handling this case of functions vanishing from us since this is going to be more widespread inside the code. Suggestions welcome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:27:50 2010 From: report at bugs.python.org (Tiago Antao) Date: Sat, 10 Jul 2010 19:27:50 +0000 Subject: [issue9217] 2to3 crashes with some doctests In-Reply-To: <1278790070.07.0.615684286831.issue9217@psf.upfronthosting.co.za> Message-ID: <1278790070.07.0.615684286831.issue9217@psf.upfronthosting.co.za> New submission from Tiago Antao : 2to3 -d sometimes crashes. The problem seems to be in refactor_doctest. The problematic line is: if self.log.isEnabledFor(logging.DEBUG): self.log does not exist. The error, as expected: File "/usr/lib/python3.1/lib2to3/refactor.py", line 516, in refactor_doctest if self.log.isEnabledFor(logging.DEBUG): AttributeError: 'StdoutRefactoringTool' object has no attribute 'log' ---------- components: 2to3 (2.x to 3.0 conversion tool) messages: 109911 nosy: tiagoantao priority: normal severity: normal status: open title: 2to3 crashes with some doctests versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:28:49 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 19:28:49 +0000 Subject: [issue4966] Improving Lib Doc Sequence Types Section In-Reply-To: <1232149418.64.0.0450574767427.issue4966@psf.upfronthosting.co.za> Message-ID: <1278790129.89.0.637232445922.issue4966@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:29:50 2010 From: report at bugs.python.org (Tiago Antao) Date: Sat, 10 Jul 2010 19:29:50 +0000 Subject: [issue9217] 2to3 crashes with some doctests In-Reply-To: <1278790070.07.0.615684286831.issue9217@psf.upfronthosting.co.za> Message-ID: <1278790190.61.0.102156511594.issue9217@psf.upfronthosting.co.za> Changes by Tiago Antao : ---------- type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:30:09 2010 From: report at bugs.python.org (Diego Jacobi) Date: Sat, 10 Jul 2010 19:30:09 +0000 Subject: [issue9218] pop multiple elements of a list at once In-Reply-To: <1278790209.67.0.359453381678.issue9218@psf.upfronthosting.co.za> Message-ID: <1278790209.67.0.359453381678.issue9218@psf.upfronthosting.co.za> New submission from Diego Jacobi : I am currently working with buffer in an USB device and pyusb. So when i read from a buffer endpoint i get an array.Array() list. I handle this chunk of data with a thread to send a receive the information that i need. In this thread i load a list with all the information that is read from the USB device, and another layer with pop this information from the threads buffer. The thing i found is that, to pop a variable chunk of data from this buffer without copying it and deleting the elements, i have to pop one element at the time. def get_chunk(self, size): for x in range(size): yield self.recv_buffer.pop() I guess that it would be improved if i can just pop a defined number of elements, like this: pop self.recv_buffer[:size] or self.recv_buffer.pop(,-size) That would be... "pop from the last element minus size to the last element" in that way there is only one memory transaction. The new list points to the old memory address and the recv_buffer is advanced to a new address. Data is not moved. note that i like the idea of using "pop" as the "del" operator for lists thanks. Diego ---------- messages: 109912 nosy: jacobidiego priority: normal severity: normal status: open title: pop multiple elements of a list at once type: performance versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:32:47 2010 From: report at bugs.python.org (Guilherme Polo) Date: Sat, 10 Jul 2010 19:32:47 +0000 Subject: [issue2053] IDLE - standardize dialogs In-Reply-To: <1278772900.16.0.45682947992.issue2053@psf.upfronthosting.co.za> Message-ID: Guilherme Polo added the comment: > Tal Einat added the comment: > > ... > > The process of discussing this patch has taken far, far too long. I can't stand such discussions spanning months (and years!). Please just accept this patch or close it. I'm fed up with this. > If the patch were good enough for everyone then it could have been committed about 2 years ago, but it is not the case apparently (kbk also raised some points earlier). Also, the effective discussion has taken maybe some hours and this large extra time shows this issue is not important enough to be noticed and taken proper care (and I'm mostly sure you know this situation isn't exclusive to this issue/Python/other (closed or open) projects). Said that, I don't see the reason to just accept the patch and close the issue if no one else fully backs up your patch. I understand you may want to no longer follow the issue, and I can't blame you because I've been mostly away from Python development these months. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:35:51 2010 From: report at bugs.python.org (Reid Kleckner) Date: Sat, 10 Jul 2010 19:35:51 +0000 Subject: [issue6643] joining a child that forks can deadlock in the forked child process In-Reply-To: <1249412209.9.0.200329347238.issue6643@psf.upfronthosting.co.za> Message-ID: <1278790551.79.0.100239561367.issue6643@psf.upfronthosting.co.za> Reid Kleckner added the comment: Here's an updated patch for py3k (3.2). The test still fails without the fix, and passes with the fix. Thinking more about this, I'll try summarizing the bug more coherently: When the main thread joins the child threads, it acquires some locks. If a fork in a child thread occurs while those locks are held, they remain locked in the child process. My solution is to do here what we do elsewhere in CPython: abandon radioactive locks and allocate fresh ones. ---------- Added file: http://bugs.python.org/file17932/thread-fork-join.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:38:36 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 19:38:36 +0000 Subject: [issue5150] IDLE to support reindent.py In-Reply-To: <1233736664.4.0.115705275626.issue5150@psf.upfronthosting.co.za> Message-ID: <1278790716.99.0.475168259318.issue5150@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok resolution: accepted -> fixed stage: needs patch -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:41:19 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 19:41:19 +0000 Subject: [issue1447633] "reindent.py" exposes bug in tokenize Message-ID: <1278790879.66.0.553659978541.issue1447633@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:44:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Jul 2010 19:44:01 +0000 Subject: [issue8844] Condition.wait() doesn't raise KeyboardInterrupt In-Reply-To: <1275065292.27.0.238026363438.issue8844@psf.upfronthosting.co.za> Message-ID: <1278791041.12.0.355601401769.issue8844@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The RLock version gets different semantics in your patch: it doesn't retry acquiring when a signal is caught. Is there a reason for that? By the way, your patch works fine under Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:45:41 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 10 Jul 2010 19:45:41 +0000 Subject: [issue9217] 2to3 crashes with some doctests In-Reply-To: <1278790070.07.0.615684286831.issue9217@psf.upfronthosting.co.za> Message-ID: <1278791141.95.0.377710207776.issue9217@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r82779. I'm curious as to what it's failing on. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:51:02 2010 From: report at bugs.python.org (Tiago Antao) Date: Sat, 10 Jul 2010 19:51:02 +0000 Subject: [issue9217] 2to3 crashes with some doctests In-Reply-To: <1278790070.07.0.615684286831.issue9217@psf.upfronthosting.co.za> Message-ID: <1278791462.73.0.817645975217.issue9217@psf.upfronthosting.co.za> Tiago Antao added the comment: Benjamin, Thanks for the fast answer. I attach the problematic file. This file is from Biopython. We are trying to have a Python 3 version of it. We applied 2to3 (no -d) first (via distutils on setup.py build) and I was applying 2to3 -d manually after it. ---------- Added file: http://bugs.python.org/file17933/DocSQL.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:51:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 19:51:07 +0000 Subject: [issue9219] Make reindent-rst.py preserve ^L In-Reply-To: <1278791467.43.0.414939089844.issue9219@psf.upfronthosting.co.za> Message-ID: <1278791467.43.0.414939089844.issue9219@psf.upfronthosting.co.za> New submission from ?ric Araujo : Tools/scripts/reindent-rst.py strips trailing whitespace from reST files, including ^L. ISTM that this character is always used explicitly, not by oversight, e.g. by people wanting their editor to paginate files like plain text PEPs. I suggest that the regex at the core of the script be changed to let ^L alone. This is arguably a bug fix, depending on your definition of ?trailing whitespace?, but I?m not sure at all whether it should be in 2.7.1. ---------- keywords: easy messages: 109918 nosy: merwok priority: low severity: normal status: open title: Make reindent-rst.py preserve ^L type: feature request versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:51:23 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 10 Jul 2010 19:51:23 +0000 Subject: [issue9218] pop multiple elements of a list at once In-Reply-To: <1278790209.67.0.359453381678.issue9218@psf.upfronthosting.co.za> Message-ID: <1278791483.84.0.924913856563.issue9218@psf.upfronthosting.co.za> Mark Dickinson added the comment: The python-ideas mailing list might be a better place to discuss this. Note that it's too late for new features in the 2.x series, so I'm changing the version to 3.2 > pop self.recv_buffer[:size] I don't think this'll fly, even if you spell it pop(self.recv_buffer[:size]). It's not worth a new built-in function, let alone a grammar change. > self.recv_buffer.pop(,-size) Something like this seems more reasonable, especially if it can be done without introducing new syntax and in a fully backwards-compatible way. One idea that seems fairly natural to me would be to allow list.pop and friends to support slices, so you could do: last2 = slice(None, -2) self.recv_buffer.pop(last2) or even penultimate, ultimate = self.recv_buffer.pop(last2) It would require some work to implement and debug this, though. ---------- components: +Interpreter Core nosy: +mark.dickinson type: performance -> feature request versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:52:30 2010 From: report at bugs.python.org (Jim Fulton) Date: Sat, 10 Jul 2010 19:52:30 +0000 Subject: [issue9220] Modules no longer usable as context managers In-Reply-To: <1278791550.43.0.759341928181.issue9220@psf.upfronthosting.co.za> Message-ID: <1278791550.43.0.759341928181.issue9220@psf.upfronthosting.co.za> New submission from Jim Fulton : In python 2.7 a module can't be used as a context manager. For example, given the module, t.py: def __enter__(*args): print 'enter', args def __exit__(*args): print 'exit', args In Python 2.6: >>> import t >>> with t: pass ... enter () exit (None, None, None) In Python 2.7: >>> import t >>> with t: pass ... Traceback (most recent call last): File "", line 1, in AttributeError: __exit__ ---------- components: Interpreter Core messages: 109920 nosy: j1m priority: normal severity: normal status: open title: Modules no longer usable as context managers type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:54:41 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Jul 2010 19:54:41 +0000 Subject: [issue9219] Make reindent-rst.py preserve ^L In-Reply-To: <1278791467.43.0.414939089844.issue9219@psf.upfronthosting.co.za> Message-ID: <1278791681.73.0.170554918209.issue9219@psf.upfronthosting.co.za> Georg Brandl added the comment: This script is mainly meant to fix files according to our standards, and I don't want ^L in them. Thus, I'm rejecting this. ---------- nosy: +georg.brandl resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 21:56:40 2010 From: report at bugs.python.org (Greg Brockman) Date: Sat, 10 Jul 2010 19:56:40 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1278791800.01.0.0397788344702.issue9205@psf.upfronthosting.co.za> Greg Brockman added the comment: What about just catching the exception? See e.g. the attached patch. (Disclaimer: not heavily tested). ---------- Added file: http://bugs.python.org/file17934/shutdown.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 22:01:02 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 20:01:02 +0000 Subject: [issue9219] Make reindent-rst.py preserve ^L In-Reply-To: <1278791467.43.0.414939089844.issue9219@psf.upfronthosting.co.za> Message-ID: <1278792062.52.0.778324176086.issue9219@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the answer. Perhaps it would be useful to mention trailing whitespace and ^L in http://docs.python.org/documenting/style.html? As for PEPs, I guess it?s less important that they conform to these standards, since they?re more an internal documentation. ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 22:03:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 20:03:15 +0000 Subject: [issue9220] Modules no longer usable as context managers In-Reply-To: <1278791550.43.0.759341928181.issue9220@psf.upfronthosting.co.za> Message-ID: <1278792195.28.0.015149769119.issue9220@psf.upfronthosting.co.za> ?ric Araujo added the comment: IIUC, magic methods are looked up on the object?s class, not in the object?s __dict__. This behavior in 2.6 seems like a bug to me. I-tried-to-add-__call__-to-a-module-once-ly yours ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 22:03:22 2010 From: report at bugs.python.org (Tiago Antao) Date: Sat, 10 Jul 2010 20:03:22 +0000 Subject: [issue9217] 2to3 crashes with some doctests In-Reply-To: <1278790070.07.0.615684286831.issue9217@psf.upfronthosting.co.za> Message-ID: <1278792202.34.0.906332555365.issue9217@psf.upfronthosting.co.za> Tiago Antao added the comment: BTW, this happens in 2.6 also ---------- versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 22:04:34 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 10 Jul 2010 20:04:34 +0000 Subject: [issue6302] email.header.decode_header data types are inconsistent and incorrectly documented In-Reply-To: <1245288976.09.0.298419063758.issue6302@psf.upfronthosting.co.za> Message-ID: <1278792274.08.0.800196594728.issue6302@psf.upfronthosting.co.za> R. David Murray added the comment: No, this is a 3.x only problem. And my main comment is that decode_headers ought to go away as an API :) But I'll try to fix the inconsistent data types problem before 3.2. ---------- assignee: -> r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 22:04:41 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Jul 2010 20:04:41 +0000 Subject: [issue9219] Make reindent-rst.py preserve ^L In-Reply-To: <1278791467.43.0.414939089844.issue9219@psf.upfronthosting.co.za> Message-ID: <1278792281.08.0.0375253872333.issue9219@psf.upfronthosting.co.za> Georg Brandl added the comment: > Thanks for the answer. Perhaps it would be useful to mention trailing > whitespace and ^L in http://docs.python.org/documenting/style.html? So far, I guess nobody has tried to check in a ^L, and nobody has complained about the commit hook that rejects trailing whitespace, so I don't see a reason. > As for PEPs, I guess it?s less important that they conform to these > standards, since they?re more an internal documentation. I don't set the standards for PEPs, and they're not covered by the commit hook anyway... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 22:08:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 20:08:31 +0000 Subject: [issue9220] Modules no longer usable as context managers In-Reply-To: <1278791550.43.0.759341928181.issue9220@psf.upfronthosting.co.za> Message-ID: <1278792511.1.0.337499326597.issue9220@psf.upfronthosting.co.za> ?ric Araujo added the comment: Confirmed: http://docs.python.org/reference/datamodel#specialnames Closing. Sorry! (BTW, using import hackery and a custom module type, you could achieve your goal.) ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 22:12:28 2010 From: report at bugs.python.org (Tiago Antao) Date: Sat, 10 Jul 2010 20:12:28 +0000 Subject: [issue9221] 2to3 fails to parse a for construct In-Reply-To: <1278792748.61.0.873837385139.issue9221@psf.upfronthosting.co.za> Message-ID: <1278792748.61.0.873837385139.issue9221@psf.upfronthosting.co.za> New submission from Tiago Antao : 2to3 crashes with a apparently simple for. An example is presented (the first line is actually enough) >>> for clade in tree.find_clades(branch_length=True, order='level'): >>> if (clade.branch_length < .5 and >>> not clade.is_terminal() and >>> clade is not self.root): >>> tree.collapse(clade) The stack is shown below. It almost seems a problem with newline conversion at the end? RefactoringTool: Can't parse docstring in xx2 line 1: ParseError: bad input: type=0, value='', context=('', (2, 0)) RefactoringTool: Can't parse docstring in xx2 line 2: ParseError: bad input: type=5, value=' ', context=('\n', (2, 0)) RefactoringTool: Can't parse docstring in xx2 line 3: ParseError: bad input: type=5, value=' ', context=('\n\n', (3, 0)) RefactoringTool: Can't parse docstring in xx2 line 4: ParseError: bad input: type=5, value=' ', context=('\n\n\n', (4, 0)) RefactoringTool: Can't parse docstring in xx2 line 5: ParseError: bad input: type=5, value=' ', context=('\n\n\n\n', (5, 0)) RefactoringTool: No files need to be modified. ---------- components: 2to3 (2.x to 3.0 conversion tool) messages: 109929 nosy: tiagoantao priority: normal severity: normal status: open title: 2to3 fails to parse a for construct type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 22:15:03 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 20:15:03 +0000 Subject: [issue9219] Make reindent-rst.py preserve ^L In-Reply-To: <1278791467.43.0.414939089844.issue9219@psf.upfronthosting.co.za> Message-ID: <1278792903.83.0.893443712687.issue9219@psf.upfronthosting.co.za> ?ric Araujo added the comment: > [...] so I don't see a reason. Thanks for the additional info, agreed then. > [PEPs are] not covered by the commit hook anyway... Probably because it?s not as useful to enforce standards on them, since less people read and edit their source, so no problem. Thank you for your time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 22:19:08 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 20:19:08 +0000 Subject: [issue9221] 2to3 fails to parse a for construct In-Reply-To: <1278792748.61.0.873837385139.issue9221@psf.upfronthosting.co.za> Message-ID: <1278793148.65.0.651682575186.issue9221@psf.upfronthosting.co.za> ?ric Araujo added the comment: You are supposed to use ?...? on continuation lines, not ?>>>?: http://docs.python.org/glossary#term-1 http://docs.python.org/dev/library/doctest#how-are-docstring-examples-recognized Please reopen it the problem persists after this change. Thank you! ---------- nosy: +merwok resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 22:32:08 2010 From: report at bugs.python.org (Reid Kleckner) Date: Sat, 10 Jul 2010 20:32:08 +0000 Subject: [issue8844] Condition.wait() doesn't raise KeyboardInterrupt In-Reply-To: <1275065292.27.0.238026363438.issue8844@psf.upfronthosting.co.za> Message-ID: <1278793928.71.0.640326602682.issue8844@psf.upfronthosting.co.za> Reid Kleckner added the comment: Oops, copy/paste oversight. =/ I wrote a test to verify that it handles signals, and then retries the lock acquire. ---------- Added file: http://bugs.python.org/file17935/lock-interrupt.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 22:39:03 2010 From: report at bugs.python.org (Reid Kleckner) Date: Sat, 10 Jul 2010 20:39:03 +0000 Subject: [issue6643] joining a child that forks can deadlock in the forked child process In-Reply-To: <1249412209.9.0.200329347238.issue6643@psf.upfronthosting.co.za> Message-ID: <1278794343.73.0.41425938439.issue6643@psf.upfronthosting.co.za> Reid Kleckner added the comment: I realized that in a later fix for unladen-swallow, we also cleared the condition variable waiters list, since it has radioactive synchronization primitives in it as well. Here's an updated patch that simplifies the fix by just using __init__() to completely reinitialize the condition variables and adds a test. This corresponds to unladen-swallow revisions r799 and r834. ---------- Added file: http://bugs.python.org/file17936/thread-fork-join.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 22:46:39 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 10 Jul 2010 20:46:39 +0000 Subject: [issue9220] Modules no longer usable as context managers In-Reply-To: <1278791550.43.0.759341928181.issue9220@psf.upfronthosting.co.za> Message-ID: <1278794799.66.0.95880295744.issue9220@psf.upfronthosting.co.za> Mark Dickinson added the comment: Just for the record, this changed with the introduction of the SETUP_WITH opcode in r72912. Perhaps Benjamin can confirm that the behaviour change was deliberate? ---------- nosy: +benjamin.peterson, mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 22:58:00 2010 From: report at bugs.python.org (Reid Kleckner) Date: Sat, 10 Jul 2010 20:58:00 +0000 Subject: [issue8844] Condition.wait() doesn't raise KeyboardInterrupt In-Reply-To: <1275065292.27.0.238026363438.issue8844@psf.upfronthosting.co.za> Message-ID: <1278795480.04.0.423445647871.issue8844@psf.upfronthosting.co.za> Reid Kleckner added the comment: Also, thanks for the quick reviews! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 23:16:41 2010 From: report at bugs.python.org (Jesse Noller) Date: Sat, 10 Jul 2010 21:16:41 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1278796601.03.0.57368466277.issue9205@psf.upfronthosting.co.za> Jesse Noller added the comment: A+ for creativity; I wouldn't have thought of that ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 23:16:47 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 21:16:47 +0000 Subject: [issue9193] Versioned .so files In-Reply-To: <1278527607.97.0.766712002778.issue9193@psf.upfronthosting.co.za> Message-ID: <1278796607.9.0.846041218037.issue9193@psf.upfronthosting.co.za> ?ric Araujo added the comment: In build_ext, your modifications to get_ext_filename do not update the docstring, although it contains a comment documenting the handling of ext.so_abi_tag. They also use str.rpartition, not available in 2.3, with which distutils has to remain compatible as per PEP 291. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 23:19:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 21:19:52 +0000 Subject: [issue9214] Most Set methods of KeysView and ItemsView do not work right In-Reply-To: <1278703905.18.0.125671722438.issue9214@psf.upfronthosting.co.za> Message-ID: <1278796792.98.0.27045152823.issue9214@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 23:20:00 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 21:20:00 +0000 Subject: [issue9214] Most Set methods of KeysView and ItemsView do not work right In-Reply-To: <1278703905.18.0.125671722438.issue9214@psf.upfronthosting.co.za> Message-ID: <1278796800.02.0.651574401775.issue9214@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 23:20:42 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 21:20:42 +0000 Subject: [issue9213] range purports to implement the Sequence ABC, but is missing index and count methods In-Reply-To: <1278702375.23.0.863463663463.issue9213@psf.upfronthosting.co.za> Message-ID: <1278796842.16.0.83184613218.issue9213@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 23:21:03 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 21:21:03 +0000 Subject: [issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method In-Reply-To: <1278702217.69.0.69895367614.issue9212@psf.upfronthosting.co.za> Message-ID: <1278796863.21.0.676563360687.issue9212@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 23:21:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 21:21:59 +0000 Subject: [issue3214] Suggest change to glossary explanation: "Duck Typing" In-Reply-To: <1214543459.76.0.157400708153.issue3214@psf.upfronthosting.co.za> Message-ID: <1278796919.83.0.754995136496.issue3214@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 23:24:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 21:24:52 +0000 Subject: [issue3214] Suggest change to glossary explanation: "Duck Typing" In-Reply-To: <1214543459.76.0.157400708153.issue3214@psf.upfronthosting.co.za> Message-ID: <1278797092.32.0.723235770625.issue3214@psf.upfronthosting.co.za> ?ric Araujo added the comment: Benjamin: Georg, you may also want to amend this entry for ABCs. Georg: ABCs are not duck-typing since they involve isinstance() anyway. Since ABCs provide virtual subclassing, using hasattr without requiring subclassing or registering, isn?t Benjamin right after all? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 23:26:58 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 21:26:58 +0000 Subject: [issue3214] Suggest change to glossary explanation: "Duck Typing" In-Reply-To: <1214543459.76.0.157400708153.issue3214@psf.upfronthosting.co.za> Message-ID: <1278797218.02.0.236149396703.issue3214@psf.upfronthosting.co.za> ?ric Araujo added the comment: Re-reading the glossary for both entries, they already link to each other, and the subtleties of ABCs can be learned later in their documentation. The glossary is good, sorry for the noise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 23:34:51 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 21:34:51 +0000 Subject: [issue9000] Provide parseable repr to datetime.timezone In-Reply-To: <1276617170.01.0.394704824446.issue9000@psf.upfronthosting.co.za> Message-ID: <1278797691.9.0.666651496357.issue9000@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: accepted -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 23:35:17 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 21:35:17 +0000 Subject: [issue5094] datetime lacks concrete tzinfo implementation for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1278797717.17.0.149644375022.issue5094@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: accepted -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 10 23:37:35 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 21:37:35 +0000 Subject: [issue8564] Update documentation on doctest/unittest2 integration In-Reply-To: <1272491514.09.0.168519244685.issue8564@psf.upfronthosting.co.za> Message-ID: <1278797855.07.0.793395434646.issue8564@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 00:01:30 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 22:01:30 +0000 Subject: [issue3071] The ValueError raised by failing to unpack sequence should have more information. In-Reply-To: <1213063566.77.0.933941671492.issue3071@psf.upfronthosting.co.za> Message-ID: <1278799290.49.0.652803965791.issue3071@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: accepted -> fixed stage: unit test needed -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 00:07:56 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Jul 2010 22:07:56 +0000 Subject: [issue3214] Suggest change to glossary explanation: "Duck Typing" In-Reply-To: <1214543459.76.0.157400708153.issue3214@psf.upfronthosting.co.za> Message-ID: <1278799676.96.0.604244788467.issue3214@psf.upfronthosting.co.za> ?ric Araujo added the comment: To make one useful comment today: I noticed one missing :term: construct to link ABCs from duck typing. Attaching patch. ---------- keywords: +patch Added file: http://bugs.python.org/file17937/add-ref.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 00:08:13 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 10 Jul 2010 22:08:13 +0000 Subject: [issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method In-Reply-To: <1278702217.69.0.69895367614.issue9212@psf.upfronthosting.co.za> Message-ID: <1278799693.46.0.117414707331.issue9212@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Concrete classes are allowed to have more features than the corresponding ABC. The ABCs are not intended to be full-featured; instead, they specify the part of the API that will be guaranteed. For example, the union() method for built-in sets allows two or more set arguments, but the corresponding method for the ABC is limited to two arguments. This was an intentional difference, designed to make it easier for people to implement a Set class. That being said, the omission of isdisjoint() was an oversight and I see no reason that this shouldn't be fixed. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 00:56:48 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 22:56:48 +0000 Subject: [issue1326113] Letting "build_ext --libraries" take more than one lib Message-ID: <1278802608.52.0.42680431014.issue1326113@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 00:59:34 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 22:59:34 +0000 Subject: [issue4711] Wide literals in the table of contents overflow in documentation In-Reply-To: <1229878552.94.0.178929851509.issue4711@psf.upfronthosting.co.za> Message-ID: <1278802774.96.0.652624350944.issue4711@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 00:59:45 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 22:59:45 +0000 Subject: [issue4965] Can doc index of html version be separately scrollable? In-Reply-To: <1232148633.29.0.602528403512.issue4965@psf.upfronthosting.co.za> Message-ID: <1278802785.24.0.27010318983.issue4965@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 01:00:29 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 23:00:29 +0000 Subject: [issue5116] expose _CrtSetReportMode via the msvcrt module In-Reply-To: <1233384774.63.0.198719185318.issue5116@psf.upfronthosting.co.za> Message-ID: <1278802829.12.0.0405116052222.issue5116@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 01:06:53 2010 From: report at bugs.python.org (Tal Einat) Date: Sat, 10 Jul 2010 23:06:53 +0000 Subject: [issue2053] IDLE - standardize dialogs In-Reply-To: <1202515821.86.0.159216664847.issue2053@psf.upfronthosting.co.za> Message-ID: <1278803213.67.0.625029280905.issue2053@psf.upfronthosting.co.za> Tal Einat added the comment: At this point I would prefer that this patch just be rejected rather than continue discussing it. I can understand IDLE being a low priority, but someone could have just stated that to begin with and I wouldn't have bothered working for hours to work up a patch and discuss its merits. Guilherme, I appreciate your taking an interest in this and obviously you have only helped move this forward. My frustration is with the devs allowing me to waste hours of my time, while requesting that I spend even more time testing and consolidating patches before submission, and then proceeding to ignore my work completely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 01:23:43 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 23:23:43 +0000 Subject: [issue7867] Proposed FAQ entry on pass-by-? semantics and the meaning of 'variable' in python In-Reply-To: <1265490255.73.0.743157337936.issue7867@psf.upfronthosting.co.za> Message-ID: <1278804223.9.0.83462681968.issue7867@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I and others completely disagree with "Technically the correct answer is 'pass by value',". This confuses the C implementation with the abstract semantics of Python. The correct answer is neither. Nothing is 'passed'. A better form of the question would be "Does Python use call-by-value or call-by-reference?" The answer would still be 'neither'. Python is different from Fortran, C, and the other languages to which those terms apply. And because both are wrong, both lead to wrong expectations. Python binds argument objects to parameter names in the function's local namespace. This is 'call by object', the term used by Barbara Liskov, chief developer of the object-based CLU language that did the same long before Python. I would call *that* the 'technically correct answer. Yes, this has been very controversial on python-list. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 01:24:01 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 23:24:01 +0000 Subject: [issue7867] Proposed FAQ entry on pass-by-? semantics and the meaning of 'variable' in python In-Reply-To: <1265490255.73.0.743157337936.issue7867@psf.upfronthosting.co.za> Message-ID: <1278804241.94.0.363789327946.issue7867@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- assignee: georg.brandl -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 01:29:28 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 23:29:28 +0000 Subject: [issue7918] distutils always ignores compile errors In-Reply-To: <1265995747.45.0.532654407664.issue7918@psf.upfronthosting.co.za> Message-ID: <1278804568.01.0.846621701398.issue7918@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 01:30:35 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 23:30:35 +0000 Subject: [issue6325] robotparser doesn't handle URL's with query strings In-Reply-To: <1245731150.83.0.504271486523.issue6325@psf.upfronthosting.co.za> Message-ID: <1278804635.27.0.998674602528.issue6325@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> orsenthil nosy: +orsenthil versions: +Python 3.1, Python 3.2 -Python 2.4, Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 01:30:37 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 23:30:37 +0000 Subject: [issue902061] pydoc insists upon producing file: URLs Message-ID: <1278804637.41.0.0883102892807.issue902061@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 01:33:20 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 23:33:20 +0000 Subject: [issue6359] pyexpat.c calls trace function incorrectly for exceptions In-Reply-To: <1246229003.36.0.107970043042.issue6359@psf.upfronthosting.co.za> Message-ID: <1278804800.01.0.639167216604.issue6359@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +loewis stage: -> unit test needed versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 01:38:34 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 23:38:34 +0000 Subject: [issue6386] importing yields unexpected results when initial script is a symbolic link In-Reply-To: <1246356344.6.0.218965497612.issue6386@psf.upfronthosting.co.za> Message-ID: <1278805114.35.0.104416749038.issue6386@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> unit test needed versions: +Python 3.2 -Python 2.4, Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 01:42:25 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Sat, 10 Jul 2010 23:42:25 +0000 Subject: [issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method In-Reply-To: <1278702217.69.0.69895367614.issue9212@psf.upfronthosting.co.za> Message-ID: <1278805345.36.0.729772848157.issue9212@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: In this case, the concrete class is the one missing a method. Concrete classes are allowed to provide more features than the corresponding ABC, but the converse is not true to the best of my knowledge. dict_keys .register()s as supporting the Set ABC, so it does not automatically pick up the method through inheritance. Put another way: >>> # dict_keys provides the Set ABC API >>> isinstance({}.keys(), collections.Set) True >>> # The Set ABC provides isdisjoint >>> hasattr(collections.Set, 'isdisjoint') True >>> # Ergo, dict_keys should provide isdisjoint ... but it doesn't >>> hasattr({}.keys(), 'isdisjoint') False See also Issue9213 for another case where a concrete class is missing a method provided by an ABC it claims to support. I sort of wonder if .register() should verify that the concrete class provides all of the methods of the ABC. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 01:43:26 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 10 Jul 2010 23:43:26 +0000 Subject: [issue1657] epoll and kqueue wrappers for the select module In-Reply-To: <1198057263.13.0.0951432296357.issue1657@psf.upfronthosting.co.za> Message-ID: <1278805406.26.0.206903259357.issue1657@psf.upfronthosting.co.za> Terry J. Reedy added the comment: "Is the problem that the kqueue section says things like 'filter-specific data' with no explanation?" The phase is not in the (newer) 3.1.2 docs. Given the absence of a specific doc issue, closing. ---------- keywords: -patch nosy: +tjreedy resolution: accepted -> fixed stage: -> committed/rejected status: open -> closed title: [patch] epoll and kqueue wrappers for the select module -> epoll and kqueue wrappers for the select module versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 01:45:40 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 23:45:40 +0000 Subject: [issue3077] h2py char literal doesn't work In-Reply-To: <1213172768.79.0.156029263713.issue3077@psf.upfronthosting.co.za> Message-ID: <1278805540.86.0.701917560301.issue3077@psf.upfronthosting.co.za> Mark Lawrence added the comment: Both patch files are two liners, could someone please take a look and decide if one of them can be accepted? ---------- nosy: +BreamoreBoy stage: -> patch review title: h2py char literal doesn work -> h2py char literal doesn't work versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 01:53:56 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 23:53:56 +0000 Subject: [issue6478] time.tzset does not reset _strptime's locale time cache In-Reply-To: <1247506425.36.0.284798334504.issue6478@psf.upfronthosting.co.za> Message-ID: <1278806036.31.0.870558890169.issue6478@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +belopolsky stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.4, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 01:59:20 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 10 Jul 2010 23:59:20 +0000 Subject: [issue6529] get{pw,gr}{nam,[ug]id}() calls are not re-entrant In-Reply-To: <1248130486.1.0.677109329447.issue6529@psf.upfronthosting.co.za> Message-ID: <1278806360.83.0.44061811974.issue6529@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is this an issue that should be addressed? ---------- nosy: +BreamoreBoy stage: -> unit test needed versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 02:00:18 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 00:00:18 +0000 Subject: [issue8145] Documentation about sqlite3 isolation_level In-Reply-To: <1268643705.49.0.319902511171.issue8145@psf.upfronthosting.co.za> Message-ID: <1278806418.7.0.55551521475.issue8145@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If the content of the patch is correct, it looks ready to apply, with only a touch of editing. Do we have a resident expert of sqlite3? Or Laszlo, do you have a reference for the statements made? ---------- assignee: georg.brandl -> docs at python nosy: +docs at python, tjreedy versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 02:01:53 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 00:01:53 +0000 Subject: [issue7944] Use the 'with' statement in conjunction with 'open' throughout test modules In-Reply-To: <1266342231.42.0.692171370087.issue7944@psf.upfronthosting.co.za> Message-ID: <1278806513.27.0.666967406563.issue7944@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 02:03:54 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 00:03:54 +0000 Subject: [issue6639] turtle: _tkinter.TclError: invalid command name ".10170160" In-Reply-To: <1249344565.24.0.634557720335.issue6639@psf.upfronthosting.co.za> Message-ID: <1278806634.82.0.193498372587.issue6639@psf.upfronthosting.co.za> Mark Lawrence added the comment: Anyone with turtle/Tkinter knowledge who can shed some light on this? ---------- nosy: +BreamoreBoy stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 02:21:35 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 11 Jul 2010 00:21:35 +0000 Subject: [issue9220] Modules no longer usable as context managers In-Reply-To: <1278791550.43.0.759341928181.issue9220@psf.upfronthosting.co.za> Message-ID: <1278807695.74.0.993989292368.issue9220@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Yes, definitely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 02:44:12 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 00:44:12 +0000 Subject: [issue9222] IDLE: Fix open/saveas 'Files of type' choices In-Reply-To: <1278809052.13.0.969100167059.issue9222@psf.upfronthosting.co.za> Message-ID: <1278809052.13.0.969100167059.issue9222@psf.upfronthosting.co.za> New submission from Terry J. Reedy : In the open and save-as dialog boxes, the choices for the 'Files of type' field are governed by the filetypes list in Lib\idlelib\IOBinding.py, about line 225 (found by a friend). filetypes = [ ("Python and text files", "*.py *.pyw *.txt", "TEXT"), ("All text files", "*", "TEXT"), ("All files", "*"), ] I see multiple problems with this: 1. The first line, which for me is the default, mixes Python and text files, while one nearly only wants to only search through Python files. I propose to remove 'and text' and '*.txt'. 2. The second line, which would currently be redundant with the first if it did what it said (but would not be with the first fix), has a bug in the file spec, '*' instead of '*.txt', that makes it redundant with the third line. I propose to fix that bug. The following is copied from my patched and tested version of the file: filetypes = [ ("Python files", "*.py *.pyw", "TEXT"), ("Text files", "*.txt", "TEXT"), ("All files", "*"), ] So this is a trivial 2 line patch. ---------- components: IDLE keywords: easy messages: 109951 nosy: tjreedy priority: normal severity: normal status: open title: IDLE: Fix open/saveas 'Files of type' choices type: behavior versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 02:46:33 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 11 Jul 2010 00:46:33 +0000 Subject: [issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method In-Reply-To: <1278702217.69.0.69895367614.issue9212@psf.upfronthosting.co.za> Message-ID: <1278809193.72.0.380272252735.issue9212@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I had misread you original post. Thought you we saying that the Set ABC was missing disjoint. Disregard my last post. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 03:00:12 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 01:00:12 +0000 Subject: [issue2980] Pickle stream for unicode object may contain non-ASCII characters. In-Reply-To: <1211902695.6.0.958731947697.issue2980@psf.upfronthosting.co.za> Message-ID: <1278810012.57.0.749831397658.issue2980@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 03:40:27 2010 From: report at bugs.python.org (Jim Fulton) Date: Sun, 11 Jul 2010 01:40:27 +0000 Subject: [issue9220] Modules no longer usable as context managers In-Reply-To: <1278792511.1.0.337499326597.issue9220@psf.upfronthosting.co.za> Message-ID: Jim Fulton added the comment: On Sat, Jul 10, 2010 at 4:08 PM, ?ric Araujo wrote: > > ?ric Araujo added the comment: > > Confirmed: http://docs.python.org/reference/datamodel#specialnames > Closing. Sorry! (BTW, using import hackery and a custom module type, you could achieve your goal.) Yes, I'll have to use a custom module type and import hackery to get code that worked before working again in Python 2.7. Jim ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 03:54:37 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 01:54:37 +0000 Subject: [issue6749] Support for encrypted zipfiles when interpreting zipfile as script In-Reply-To: <1250830303.29.0.377270089004.issue6749@psf.upfronthosting.co.za> Message-ID: <1278813277.6.0.915732576417.issue6749@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 03:59:15 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 01:59:15 +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: <1278813555.26.0.612307696772.issue8269@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 04:00:15 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 02:00:15 +0000 Subject: [issue8289] multiprocessing.Process.__init__ pickles all arguments In-Reply-To: <1270220809.31.0.384012166997.issue8289@psf.upfronthosting.co.za> Message-ID: <1278813615.34.0.286367143385.issue8289@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 04:00:59 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 02:00:59 +0000 Subject: [issue8387] use universal newline mode in csv module examples In-Reply-To: <1271193086.18.0.201846291594.issue8387@psf.upfronthosting.co.za> Message-ID: <1278813659.87.0.64500007082.issue8387@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 04:12:50 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 02:12:50 +0000 Subject: [issue8465] re: Backreferences vs. escapes: a silent failure solved In-Reply-To: <1271711477.02.0.868706319352.issue8465@psf.upfronthosting.co.za> Message-ID: <1278814370.07.0.535319990566.issue8465@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If you are suggesting that code like >>> '\2' '\x02' should routinely product a warning, and later an exception, this issue should be rejected. Normal code does not produce warnings. Rarity in the stdlib is irrelevant. Backslash processing of string literals is part of core syntax. Breaking existing code would not be acceptable. ---------- nosy: +tjreedy versions: +Python 3.2 -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 04:14:12 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 02:14:12 +0000 Subject: [issue6588] insert cookies into cookie jar - cookielib.py In-Reply-To: <1248746834.41.0.511434731236.issue6588@psf.upfronthosting.co.za> Message-ID: <1278814452.71.0.857018546019.issue6588@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> unit test needed versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 04:14:41 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 02:14:41 +0000 Subject: [issue724459] Add documentation about line endings in email messages. Message-ID: <1278814481.72.0.505058100672.issue724459@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 04:16:28 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 02:16:28 +0000 Subject: [issue1777134] minidom pretty xml output improvement Message-ID: <1278814588.49.0.00613274153267.issue1777134@psf.upfronthosting.co.za> Changes by Terry J. Reedy : Removed file: http://bugs.python.org/file13043/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 04:17:00 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 02:17:00 +0000 Subject: [issue1777134] minidom pretty xml output improvement Message-ID: <1278814620.39.0.932805277739.issue1777134@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Removed junk copy of message ---------- nosy: +tjreedy versions: +Python 3.2 -Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 04:18:07 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 02:18:07 +0000 Subject: [issue8722] Documentation for __getattr__ In-Reply-To: <1273896658.97.0.575873001655.issue8722@psf.upfronthosting.co.za> Message-ID: <1278814687.68.0.896728747184.issue8722@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 04:18:22 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 02:18:22 +0000 Subject: [issue808129] Change --changelog to accept files Message-ID: <1278814702.4.0.709908361072.issue808129@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 04:18:54 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 02:18:54 +0000 Subject: [issue1675455] Use getaddrinfo() in urllib2.py for IPv6 support Message-ID: <1278814734.64.0.496515672854.issue1675455@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 04:19:59 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 02:19:59 +0000 Subject: [issue4888] misplaced (or misleading) assert in ceval.c In-Reply-To: <1231476734.82.0.767072982695.issue4888@psf.upfronthosting.co.za> Message-ID: <1278814799.73.0.417268989826.issue4888@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 04:23:22 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 02:23:22 +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: <1278815002.21.0.033564135368.issue3143@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- components: -Documentation tools (Sphinx) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 04:26:32 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 02:26:32 +0000 Subject: [issue8841] GetoptError strings should be localized In-Reply-To: <1275007450.32.0.944656023036.issue8841@psf.upfronthosting.co.za> Message-ID: <1278815192.7.0.835385680854.issue8841@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 04:28:24 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 02:28:24 +0000 Subject: [issue6378] Patch to make 'idle.bat' run idle.pyw using appropriate Python interpreter (so 3.1's idle.bat does not accidently use python26.exe) In-Reply-To: <1246308322.32.0.750084238969.issue6378@psf.upfronthosting.co.za> Message-ID: <1278815304.77.0.308295834196.issue6378@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I will try to test this sometime, though I always start IDLE through the start menu. ---------- nosy: +tjreedy versions: +Python 3.2 -Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 05:29:11 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 11 Jul 2010 03:29:11 +0000 Subject: [issue8801] Inconsistency in behaviour of urllib and urllib2 with file:// URLs In-Reply-To: <1274696603.9.0.49787272885.issue8801@psf.upfronthosting.co.za> Message-ID: <1278818951.09.0.0610985170628.issue8801@psf.upfronthosting.co.za> Senthil Kumaran added the comment: There were differing behaviors in the way urllib and urllib2 was handling certain kind of file:// urls which led to this error. I just made them consistent with the fix in r82780 and merged into branches. Now, this Exception won't be thrown at the file-open state, but a addinfo url object will be returned. The opening of an Invalid path will be left to the way OS will handle it, either allow it or reject. ---------- resolution: accepted -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 05:42:45 2010 From: report at bugs.python.org (Dou Yuan) Date: Sun, 11 Jul 2010 03:42:45 +0000 Subject: [issue2190] MozillaCookieJar ignore HttpOnly cookies In-Reply-To: <1203957546.34.0.123660895963.issue2190@psf.upfronthosting.co.za> Message-ID: <1278819765.42.0.334517795798.issue2190@psf.upfronthosting.co.za> Dou Yuan added the comment: Firefox no longer use cookies.txt. I think this patch is useless. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 05:46:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Jul 2010 03:46:52 +0000 Subject: [issue808129] Change --changelog to accept files Message-ID: <1278820012.26.0.097971203135.issue808129@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report Tony. Sorry for the late reply, I tried to review a lot of distutils bugs some months ago but didn?t manage to read all of them. I?m assigning this to the distutils maintainer. Distutils is mainly frozen now, since we?ve seen that even changing undocumented internals may break third-party tools replying on them. New work happens in distutils2, where rpm-related code has been removed, because platform-specific tools are in a better position to comply with platform-specific oddities and policies. Tarek, can this feature make it into distutils or does the freeze apply? ---------- assignee: -> tarek nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 06:16:07 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Sun, 11 Jul 2010 04:16:07 +0000 Subject: [issue6378] Patch to make 'idle.bat' run idle.pyw using appropriate Python interpreter (so 3.1's idle.bat does not accidently use python26.exe) In-Reply-To: <1246308322.32.0.750084238969.issue6378@psf.upfronthosting.co.za> Message-ID: <1278821767.09.0.331065873552.issue6378@psf.upfronthosting.co.za> Changes by Sridhar Ratnakumar : Added file: http://bugs.python.org/file17938/idle-use-curr-py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 06:36:23 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 11 Jul 2010 04:36:23 +0000 Subject: [issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method In-Reply-To: <1278702217.69.0.69895367614.issue9212@psf.upfronthosting.co.za> Message-ID: <1278822983.12.0.998661799921.issue9212@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 06:36:57 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 11 Jul 2010 04:36:57 +0000 Subject: [issue9213] range purports to implement the Sequence ABC, but is missing index and count methods In-Reply-To: <1278702375.23.0.863463663463.issue9213@psf.upfronthosting.co.za> Message-ID: <1278823017.87.0.312318089531.issue9213@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 07:03:19 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 11 Jul 2010 05:03:19 +0000 Subject: [issue2007] cookielib lacks FileCookieJar class for Internet Explorer In-Reply-To: <1202153753.42.0.88577975251.issue2007@psf.upfronthosting.co.za> Message-ID: <1278824599.76.0.100159159873.issue2007@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I removed the documentation comment in r82785. But the report still holds till we have a class for handling MSIE Cookies. ---------- nosy: +orsenthil stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 07:06:01 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 11 Jul 2010 05:06:01 +0000 Subject: [issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth) In-Reply-To: <1204223194.19.0.670418970441.issue2202@psf.upfronthosting.co.za> Message-ID: <1278824761.82.0.299427574889.issue2202@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: georg.brandl -> orsenthil resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 07:09:52 2010 From: report at bugs.python.org (Atsuo Ishimoto) Date: Sun, 11 Jul 2010 05:09:52 +0000 Subject: [issue3665] Support \u and \U escapes in regexes In-Reply-To: <1219610032.28.0.862215531927.issue3665@psf.upfronthosting.co.za> Message-ID: <1278824992.16.0.0748569749169.issue3665@psf.upfronthosting.co.za> Atsuo Ishimoto added the comment: Here's an updated patch for py3k branch. As per Georg's comment, I added to check codepoint in the character ranges, conversion to the surrogate pairs. I also added check to raise exception if codepoint > 0x10ffff. I with to English speakers to fix error messages in the patch. ---------- nosy: +ishimoto Added file: http://bugs.python.org/file17939/3665.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 07:16:12 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 11 Jul 2010 05:16:12 +0000 Subject: [issue3647] urlparse - relative url parsing and joins to be RFC3986 compliance In-Reply-To: <1219409676.71.0.379802173537.issue3647@psf.upfronthosting.co.za> Message-ID: <1278825372.51.0.64697047307.issue3647@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Several changes were already made to urlparse to make it more rfc3986 compliant. Let me recollect what else these patches offer. ---------- assignee: gregory.p.smith -> orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 07:18:41 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 11 Jul 2010 05:18:41 +0000 Subject: [issue1500504] Alternate RFC 3986 compliant URI parsing module Message-ID: <1278825521.83.0.488746491752.issue1500504@psf.upfronthosting.co.za> Senthil Kumaran added the comment: A new way for parsing URI. I have not reviewed it even after saying I would like to, but having the dependency issue resolved, I think it is good to look at it again, especially if it leads some helpful approaches to parsing IRI. ---------- assignee: -> orsenthil dependencies: -URI parsing library resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 07:20:40 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 11 Jul 2010 05:20:40 +0000 Subject: [issue4140] urllib2: request with digest auth through proxy fail In-Reply-To: <1224258333.01.0.331002758914.issue4140@psf.upfronthosting.co.za> Message-ID: <1278825640.58.0.242221888211.issue4140@psf.upfronthosting.co.za> Senthil Kumaran added the comment: This might be related to issue2202 as well. ---------- assignee: gregory.p.smith -> orsenthil dependencies: +urllib2 fails against IIS 6.0 (No support for MD5-sess auth) nosy: +orsenthil resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 07:29:54 2010 From: report at bugs.python.org (Laszlo Nagy) Date: Sun, 11 Jul 2010 05:29:54 +0000 Subject: [issue8145] Documentation about sqlite3 isolation_level In-Reply-To: <1278806418.7.0.55551521475.issue8145@psf.upfronthosting.co.za> Message-ID: Laszlo Nagy added the comment: 2010/7/11 Terry J. Reedy > > Terry J. Reedy added the comment: > > If the content of the patch is correct, it looks ready to apply, with only > a touch of editing. Do we have a resident expert of sqlite3? Or Laszlo, do > you have a reference for the statements made? > Sorry, the only reference I have is that mailing list thread ( http://mail.python.org/pipermail/python-list/2010-March/1239374.html ). There you can find an example with SQL statements, showing the problem. Ryan Kelly wrote the following: I have a theory, based on a quick perusal of the sqlite3 bindings source. The bindings think that "SAVEPOINT sp1" is a "non-DML, non-query" statement. So when isolation_level is something other than None, this statement implicitly commits the current transaction and throws away your savepoints! So the problem is with the sqlite binding code, not sqlite itself. I'm not an expert in C, so I'm not sure I can help more. Thanks, Laszlo ---------- Added file: http://bugs.python.org/file17940/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------

2010/7/11 Terry J. Reedy <report at bugs.python.org>

Terry J. Reedy <tjreedy at udel.edu> added the comment:

If the content of the patch is correct, it looks ready to apply, with only a touch of editing. Do we have a resident expert of sqlite3? Or Laszlo, do you have a reference for the statements made?

Sorry, the only reference I have is that mailing list thread ( http://mail.python.org/pipermail/python-list/2010-March/1239374.html ).

There you can find an example with SQL statements, showing the problem.

Ryan Kelly wrote the following:

<quote>
I have a theory, based on a quick perusal of the sqlite3 bindings
source.

The bindings think that "SAVEPOINT sp1" is a "non-DML, non-query"
statement. So when isolation_level is something other than None, this
statement implicitly commits the current transaction and throws away
your savepoints!
</quote>

So the problem is with the sqlite binding code, not sqlite itself. I'm not an expert in C, so I'm not sure I can help more.

Thanks,

???? Laszlo

From report at bugs.python.org Sun Jul 11 07:37:05 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 11 Jul 2010 05:37:05 +0000 Subject: [issue4493] urllib2 doesn't always supply / where URI path component is empty In-Reply-To: <1228250772.41.0.047917224679.issue4493@psf.upfronthosting.co.za> Message-ID: <1278826625.11.0.565642203967.issue4493@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: -> orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 07:41:41 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 11 Jul 2010 05:41:41 +0000 Subject: [issue7752] Add support for Digest authentication session (reuse nonces) In-Reply-To: <1264117674.74.0.518658840947.issue7752@psf.upfronthosting.co.za> Message-ID: <1278826901.18.0.96254807752.issue7752@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: -> orsenthil nosy: +orsenthil resolution: -> accepted stage: unit test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 07:53:10 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 11 Jul 2010 05:53:10 +0000 Subject: [issue900112] cgi.fieldStorage doesn't grok standards env. variables Message-ID: <1278827590.54.0.700108296195.issue900112@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 08:22:36 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 11 Jul 2010 06:22:36 +0000 Subject: [issue1500504] Alternate RFC 3986 compliant URI parsing module Message-ID: <1278829356.99.0.0918713852584.issue1500504@psf.upfronthosting.co.za> Nick Coghlan added the comment: "accepted" is a little too strong for the current status of this :) I've removed the easy tag as well (making the case for this or something like it in the standard library it going to involve a fair bit of effort - the coding was actually the comparatively easy part). ---------- keywords: -easy resolution: accepted -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 10:35:52 2010 From: report at bugs.python.org (gonegown) Date: Sun, 11 Jul 2010 08:35:52 +0000 Subject: [issue8988] import + coding = failure (3.1.2/win32) In-Reply-To: <1276426235.15.0.873898512927.issue8988@psf.upfronthosting.co.za> Message-ID: <1278837352.96.0.704983837759.issue8988@psf.upfronthosting.co.za> gonegown added the comment: @Amaury: Just fine! It's either another bug in python or 3.1.1 specifics. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 10:37:22 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 Jul 2010 08:37:22 +0000 Subject: [issue4968] Clarify inspect.is method docs In-Reply-To: <1232162769.03.0.624026715862.issue4968@psf.upfronthosting.co.za> Message-ID: <1278837442.15.0.106444977468.issue4968@psf.upfronthosting.co.za> Georg Brandl added the comment: No, I've just had no time to review the suggested changes. ---------- assignee: georg.brandl -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:00:24 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:00:24 +0000 Subject: [issue6640] urlparse should parse mailto: URL headers as query parameters In-Reply-To: <1249346554.96.0.279967945769.issue6640@psf.upfronthosting.co.za> Message-ID: <1278838824.21.0.389203978921.issue6640@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> orsenthil nosy: +orsenthil stage: -> unit test needed versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:05:07 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:05:07 +0000 Subject: [issue6671] webbrowser.py doesn't respect xfce default browser In-Reply-To: <1249814125.92.0.530552321419.issue6671@psf.upfronthosting.co.za> Message-ID: <1278839107.58.0.467343737869.issue6671@psf.upfronthosting.co.za> Mark Lawrence added the comment: This is a three line patch. ---------- assignee: -> georg.brandl nosy: +BreamoreBoy, georg.brandl stage: -> unit test needed versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:08:43 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:08:43 +0000 Subject: [issue6682] Default traceback does not handle PEP302 loaded modules In-Reply-To: <1250000791.92.0.10910978351.issue6682@psf.upfronthosting.co.za> Message-ID: <1278839323.71.0.388535518812.issue6682@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:14:36 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:14:36 +0000 Subject: [issue6709] It's possible to create TryExcept with no handlers In-Reply-To: <1250303994.53.0.2741455605.issue6709@psf.upfronthosting.co.za> Message-ID: <1278839676.17.0.711472431546.issue6709@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:18:04 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:18:04 +0000 Subject: [issue6774] socket.shudown documentation: on some platforms, closing one half closes the other half In-Reply-To: <1251103521.34.0.917057608479.issue6774@psf.upfronthosting.co.za> Message-ID: <1278839884.6.0.649159273468.issue6774@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: georg.brandl -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:20:55 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 Jul 2010 09:20:55 +0000 Subject: [issue6671] webbrowser.py doesn't respect xfce default browser In-Reply-To: <1249814125.92.0.530552321419.issue6671@psf.upfronthosting.co.za> Message-ID: <1278840055.49.0.480131425711.issue6671@psf.upfronthosting.co.za> Georg Brandl added the comment: I'm not so keen on the os.popen() -- is there no other way to find out if XFCE is running? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:21:22 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:21:22 +0000 Subject: [issue6785] IncompleteRead / BadStatus when parsing http://peakoil.mobi In-Reply-To: <1251294693.63.0.748199046509.issue6785@psf.upfronthosting.co.za> Message-ID: <1278840082.83.0.249969615567.issue6785@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- components: +Library (Lib) versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:23:24 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 Jul 2010 09:23:24 +0000 Subject: [issue6774] socket.shudown documentation: on some platforms, closing one half closes the other half In-Reply-To: <1251103521.34.0.917057608479.issue6774@psf.upfronthosting.co.za> Message-ID: <1278840204.6.0.796077608468.issue6774@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, applied in r82798. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:25:45 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:25:45 +0000 Subject: [issue6807] No such file or directory: 'msisupport.dll' in msi.py In-Reply-To: <1251629956.22.0.252677555531.issue6807@psf.upfronthosting.co.za> Message-ID: <1278840345.83.0.15819760071.issue6807@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> larry nosy: +larry, loewis stage: -> patch review versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:29:31 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:29:31 +0000 Subject: [issue6835] doctest problem with decorated function when decorator is defined in separate file In-Reply-To: <1251989637.01.0.106852845631.issue6835@psf.upfronthosting.co.za> Message-ID: <1278840571.65.0.329501766559.issue6835@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:29:38 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 11 Jul 2010 09:29:38 +0000 Subject: [issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X In-Reply-To: <1278323219.73.0.148043211343.issue9164@psf.upfronthosting.co.za> Message-ID: <1278840578.5.0.488332308139.issue9164@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Committed a fix in r82791 (2.7), r82797 (2.6), r82796 (3.2), r82800 (3.1) Tested by running configure and then patching the Makefile to include duplicate arch flags before running make. ---------- resolution: -> accepted stage: -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:31:51 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:31:51 +0000 Subject: [issue6853] system proxy not used for https (on windows) In-Reply-To: <1252298794.29.0.673935576663.issue6853@psf.upfronthosting.co.za> Message-ID: <1278840711.23.0.36229006497.issue6853@psf.upfronthosting.co.za> Mark Lawrence added the comment: This is a one line patch. ---------- assignee: -> orsenthil nosy: +BreamoreBoy, orsenthil stage: -> patch review versions: +Python 2.7, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:32:38 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 11 Jul 2010 09:32:38 +0000 Subject: [issue9197] subprocess module causing crash In-Reply-To: <1278579237.82.0.673928899274.issue9197@psf.upfronthosting.co.za> Message-ID: <1278840758.95.0.0126906394441.issue9197@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Unassigning, this is not mac-specific and I don't plan to work on this in the near future. ---------- assignee: ronaldoussoren -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:33:31 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:33:31 +0000 Subject: [issue6114] distutils build_ext path comparison only based on strings In-Reply-To: <1243335359.03.0.865660639037.issue6114@psf.upfronthosting.co.za> Message-ID: <1278840811.01.0.0149087681425.issue6114@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:33:51 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 Jul 2010 09:33:51 +0000 Subject: [issue9184] open() doc: default value for buffering is -1, not None In-Reply-To: <1278453489.46.0.972678242141.issue9184@psf.upfronthosting.co.za> Message-ID: <1278840831.01.0.684827497825.issue9184@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied as r82801. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:34:59 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:34:59 +0000 Subject: [issue6867] return value of epoll.register In-Reply-To: <1252461480.6.0.183531606536.issue6867@psf.upfronthosting.co.za> Message-ID: <1278840899.63.0.255281612385.issue6867@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: georg.brandl -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:36:58 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:36:58 +0000 Subject: [issue6868] Check errno of epoll_ctrl In-Reply-To: <1252462391.45.0.469283463386.issue6868@psf.upfronthosting.co.za> Message-ID: <1278841018.44.0.0271962066057.issue6868@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> unit test needed versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:38:32 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:38:32 +0000 Subject: [issue6915] os.listdir inconsistenly releases the GIL on win32 In-Reply-To: <1252989796.76.0.19947250091.issue6915@psf.upfronthosting.co.za> Message-ID: <1278841112.39.0.969430562788.issue6915@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- components: +Library (Lib) -None stage: -> patch review versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:42:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Jul 2010 09:42:15 +0000 Subject: [issue9184] open() doc: default value for buffering is -1, not None In-Reply-To: <1278453489.46.0.972678242141.issue9184@psf.upfronthosting.co.za> Message-ID: <1278841335.65.0.0935579301793.issue9184@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:42:20 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 Jul 2010 09:42:20 +0000 Subject: [issue7935] Cross-reference ast.literal_eval() from eval() docs In-Reply-To: <1266241099.84.0.200250637967.issue7935@psf.upfronthosting.co.za> Message-ID: <1278841340.54.0.0654866722901.issue7935@psf.upfronthosting.co.za> Georg Brandl added the comment: Added reference in r82805. Thanks! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:42:51 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:42:51 +0000 Subject: [issue6960] test_telnetlib gives spurious output In-Reply-To: <1253568852.27.0.259606507401.issue6960@psf.upfronthosting.co.za> Message-ID: <1278841371.12.0.541663923127.issue6960@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is this reproducible or can this be closed? ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:45:20 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:45:20 +0000 Subject: [issue6981] locale.getdefaultlocale() envvars default code and documentation mismatch In-Reply-To: <1253734503.58.0.404575668112.issue6981@psf.upfronthosting.co.za> Message-ID: <1278841520.8.0.235809128555.issue6981@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +lemburg, loewis versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:48:11 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:48:11 +0000 Subject: [issue4887] environment inspection and manipulation API is buggy, inconsistent with "Python philosophy" for wrapping native APIs In-Reply-To: <1231452487.08.0.408278867366.issue4887@psf.upfronthosting.co.za> Message-ID: <1278841691.02.0.03058308187.issue4887@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:51:37 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:51:37 +0000 Subject: [issue7096] test_curses fails on 3.1 when run under regrtest In-Reply-To: <1255143233.91.0.954013064992.issue7096@psf.upfronthosting.co.za> Message-ID: <1278841897.44.0.150835343633.issue7096@psf.upfronthosting.co.za> Mark Lawrence added the comment: Have any comments been made that could be referenced here? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:54:13 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:54:13 +0000 Subject: [issue7101] tarfile: OSError with TarFile.add(..., recursive=True) about non-existing file In-Reply-To: <1255218562.66.0.694569702907.issue7101@psf.upfronthosting.co.za> Message-ID: <1278842053.56.0.0170434782273.issue7101@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:55:19 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 11 Jul 2010 09:55:19 +0000 Subject: [issue9223] distutils Command docs linking In-Reply-To: <1278842118.98.0.447580746047.issue9223@psf.upfronthosting.co.za> Message-ID: <1278842118.98.0.447580746047.issue9223@psf.upfronthosting.co.za> New submission from anatoly techtonik : There are a couple of chapters about implementing a command in distutils docs that should be linked together. http://docs.python.org/distutils/extending.html#extending-distutils should link to http://docs.python.org/distutils/apiref.html#distutils.cmd.Command and the latter to http://docs.python.org/distutils/apiref.html#creating-a-new-distutils-command (or merged). ---------- assignee: tarek components: Distutils messages: 109979 nosy: tarek, techtonik priority: normal severity: normal status: open title: distutils Command docs linking _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:55:30 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 11 Jul 2010 09:55:30 +0000 Subject: [issue9223] distutils Command docs linking In-Reply-To: <1278842118.98.0.447580746047.issue9223@psf.upfronthosting.co.za> Message-ID: <1278842130.05.0.443431806892.issue9223@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- components: +Documentation versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:55:41 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 11 Jul 2010 09:55:41 +0000 Subject: [issue9223] distutils Command docs linking In-Reply-To: <1278842118.98.0.447580746047.issue9223@psf.upfronthosting.co.za> Message-ID: <1278842141.36.0.78105669615.issue9223@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:56:13 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:56:13 +0000 Subject: [issue7124] idle.py -n : help() doesn't work in a reopened shell window In-Reply-To: <1255523645.12.0.980684749685.issue7124@psf.upfronthosting.co.za> Message-ID: <1278842173.19.0.00773370719158.issue7124@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> kbk nosy: +kbk stage: -> needs patch versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 11:59:44 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 09:59:44 +0000 Subject: [issue7200] multiprocessing deadlock on Mac OS X when queue collected before process terminates In-Reply-To: <1256425837.07.0.628633816678.issue7200@psf.upfronthosting.co.za> Message-ID: <1278842384.16.0.95506746893.issue7200@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> jnoller nosy: +jnoller stage: -> needs patch versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:03:30 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 10:03:30 +0000 Subject: [issue7219] Unhelpful error message when a distutils package install fails due to a permissions error In-Reply-To: <1256647071.1.0.815334810123.issue7219@psf.upfronthosting.co.za> Message-ID: <1278842610.02.0.991062267591.issue7219@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- keywords: +easy -26backport versions: +Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:04:47 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 10:04:47 +0000 Subject: [issue7221] DispatcherWithSendTests_UsePoll with test_asyncore does nothing In-Reply-To: <1256668022.66.0.873968126347.issue7221@psf.upfronthosting.co.za> Message-ID: <1278842687.13.0.497757838014.issue7221@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:10:47 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 10:10:47 +0000 Subject: [issue7238] frame.f_lineno doesn't get updated after local trace function assigned to it In-Reply-To: <1256836618.71.0.0275056583438.issue7238@psf.upfronthosting.co.za> Message-ID: <1278843047.35.0.924969099456.issue7238@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> needs patch versions: -Python 2.4, Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:15:16 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 10:15:16 +0000 Subject: [issue7275] CoverageResult fails to merge input file with non-empty callers in trace.py (patch) In-Reply-To: <1257531121.53.0.200338110704.issue7275@psf.upfronthosting.co.za> Message-ID: <1278843316.24.0.810589109247.issue7275@psf.upfronthosting.co.za> Mark Lawrence added the comment: The attached patch is effectively a one liner. ---------- nosy: +BreamoreBoy stage: -> patch review versions: -Python 2.4, Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:16:07 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 Jul 2010 10:16:07 +0000 Subject: [issue9184] open() doc: default value for buffering is -1, not None In-Reply-To: <1278453489.46.0.972678242141.issue9184@psf.upfronthosting.co.za> Message-ID: <1278843367.61.0.845020183571.issue9184@psf.upfronthosting.co.za> Georg Brandl added the comment: ?ric, I appreciate your wanting to help, but I don't think setting the stage after the fact makes much sense, especially since it is going away anyway... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:16:40 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sun, 11 Jul 2010 10:16:40 +0000 Subject: [issue7895] Mac 10.6 mac_ver() crashes with USING_FORK_WITHOUT_EXEC_IS _NOT_SUPPORTED_BY_FILE_MANAGER In-Reply-To: <1265741797.91.0.267775294764.issue7895@psf.upfronthosting.co.za> Message-ID: <1278843400.18.0.276974608724.issue7895@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've attached a patch for python 3.2 that uses plistlib to read the XML file. This should also work with python 2.7. I want to commit this in the near future, but don't have time right now to apply the patch to all 4 active branches and do testing. (The patch also includes a unittests that checks that mac_ver doesn't crash) ---------- resolution: -> accepted stage: unit test needed -> patch review Added file: http://bugs.python.org/file17941/issue-7895-platform.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:17:09 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 10:17:09 +0000 Subject: [issue7292] Multiprocessing Joinable race condition? In-Reply-To: <1257748286.94.0.346139031927.issue7292@psf.upfronthosting.co.za> Message-ID: <1278843429.39.0.705686888536.issue7292@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> jnoller components: +Library (Lib) -None nosy: +jnoller stage: -> unit test needed versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:18:40 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Jul 2010 10:18:40 +0000 Subject: [issue9223] distutils Command docs linking In-Reply-To: <1278842118.98.0.447580746047.issue9223@psf.upfronthosting.co.za> Message-ID: <1278843520.68.0.503134588969.issue9223@psf.upfronthosting.co.za> ?ric Araujo added the comment: Note for someone wanting to propose a patch: distutils is in the process of being improved and cleaned up as distutils2. Improving the documentation is part of the process. Adding cross-links in the existing docs is okay, but I?d recommend against using too much time for distutils. For example, merging sections or doing other significant work would be IMO (which is only one opinion) time better spent on something else. ---------- assignee: tarek -> docs at python components: -Distutils nosy: +alexis, merwok stage: -> needs patch versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:20:55 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 10:20:55 +0000 Subject: [issue7304] email.message.Message.set_payload and as_string given charset 'us-ascii' plus 8bit data produces invalid message In-Reply-To: <1257892368.6.0.221695441401.issue7304@psf.upfronthosting.co.za> Message-ID: <1278843655.05.0.626774871432.issue7304@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +barry versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:21:43 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 11 Jul 2010 10:21:43 +0000 Subject: [issue8954] wininst regression: errors when building on linux In-Reply-To: <1276093244.44.0.895217979727.issue8954@psf.upfronthosting.co.za> Message-ID: <1278843703.87.0.189074415326.issue8954@psf.upfronthosting.co.za> anatoly techtonik added the comment: The regression is two-fold: 1. platform name regression is caused by r62197 by Mark Hammond - Issue #2513: enable 64bit cross compilation on windows 2. when wininst stub selection started to depend on MSVC compiler version is yet to be investigated, but I am sure that wininst stub selection should only be affected by compatibility with operating system only More complete research notes are at https://wave.google.com/wave/waveref/googlewave.com/w+GnQ9tjc8A ---------- nosy: +mhammond _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:22:41 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 11 Jul 2010 10:22:41 +0000 Subject: [issue9184] open() doc: default value for buffering is -1, not None In-Reply-To: <1278453489.46.0.972678242141.issue9184@psf.upfronthosting.co.za> Message-ID: <1278843761.05.0.757959278883.issue9184@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think it's still better to set it correctly. Even assuming that it will go away, if the stage is set correctly it will be easier to convert it to something else if necessary (e.g. if the stage is left on "patch review" it might be turned to "needs review" even if it gets closed). ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:23:39 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 10:23:39 +0000 Subject: [issue7159] Urllib2 authentication memory. In-Reply-To: <1255793559.46.0.185389780208.issue7159@psf.upfronthosting.co.za> Message-ID: <1278843819.15.0.387780041991.issue7159@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:24:41 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Jul 2010 10:24:41 +0000 Subject: [issue9218] pop multiple elements of a list at once In-Reply-To: <1278790209.67.0.359453381678.issue9218@psf.upfronthosting.co.za> Message-ID: <1278843881.14.0.710321837803.issue9218@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:25:15 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 10:25:15 +0000 Subject: [issue7322] Socket timeout can cause file-like readline() method to lose data In-Reply-To: <1258218993.08.0.764402701678.issue7322@psf.upfronthosting.co.za> Message-ID: <1278843915.53.0.776745942944.issue7322@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:26:25 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 Jul 2010 10:26:25 +0000 Subject: [issue9223] distutils Command docs linking In-Reply-To: <1278842118.98.0.447580746047.issue9223@psf.upfronthosting.co.za> Message-ID: <1278843985.79.0.927786755139.issue9223@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, should be fixed in r82806. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:29:09 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 Jul 2010 10:29:09 +0000 Subject: [issue9184] open() doc: default value for buffering is -1, not None In-Reply-To: <1278453489.46.0.972678242141.issue9184@psf.upfronthosting.co.za> Message-ID: <1278844149.08.0.00965128473597.issue9184@psf.upfronthosting.co.za> Georg Brandl added the comment: Well, of course I don't want to make you unhappy, but don't ever expect me to make such a useless change myself :) Especially when an issue is closed, nobody is going to look at it again except by accident. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:32:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Jul 2010 10:32:31 +0000 Subject: [issue9217] 2to3 crashes with some doctests In-Reply-To: <1278790070.07.0.615684286831.issue9217@psf.upfronthosting.co.za> Message-ID: <1278844351.96.0.0323463264803.issue9217@psf.upfronthosting.co.za> ?ric Araujo added the comment: Could it be because of the escaped triple quotes? ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:49:24 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 10:49:24 +0000 Subject: [issue7336] traceback module not properly printing exceptions on interpreter shutdown In-Reply-To: <1258413839.38.0.430585773151.issue7336@psf.upfronthosting.co.za> Message-ID: <1278845364.99.0.906303475277.issue7336@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> georg.brandl nosy: +georg.brandl versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:50:29 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 10:50:29 +0000 Subject: [issue7340] Doc for sys.exc_info has warning that is no longer valid In-Reply-To: <1258481567.01.0.124523901293.issue7340@psf.upfronthosting.co.za> Message-ID: <1278845429.17.0.331683285085.issue7340@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: georg.brandl -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:53:44 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 10:53:44 +0000 Subject: [issue7365] grp and pwd should treat uid and gid as unsigned In-Reply-To: <1258680245.88.0.627899346962.issue7365@psf.upfronthosting.co.za> Message-ID: <1278845624.85.0.0697133926318.issue7365@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- components: +Library (Lib) -Extension Modules stage: -> patch review versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:56:43 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 10:56:43 +0000 Subject: [issue7285] multiprocessing module, example code error In-Reply-To: <1257647520.68.0.169575152715.issue7285@psf.upfronthosting.co.za> Message-ID: <1278845803.55.0.200972147673.issue7285@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> patch review versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 12:59:24 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 10:59:24 +0000 Subject: [issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip In-Reply-To: <1260428371.84.0.68619284631.issue7467@psf.upfronthosting.co.za> Message-ID: <1278845964.79.0.810115315465.issue7467@psf.upfronthosting.co.za> Mark Lawrence added the comment: Douglas could you please provide a patch. ---------- nosy: +BreamoreBoy stage: -> needs patch versions: +Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:02:02 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 11:02:02 +0000 Subject: [issue7474] multiprocessing.managers.SyncManager managed object creation fails when started outside of invoked file In-Reply-To: <1260477184.12.0.729093197155.issue7474@psf.upfronthosting.co.za> Message-ID: <1278846122.24.0.461897355509.issue7474@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- components: +Library (Lib) -Extension Modules versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:03:08 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 11:03:08 +0000 Subject: [issue7547] test_timeout should skip, not fail, when the remote host is not available In-Reply-To: <1261241104.77.0.599570179128.issue7547@psf.upfronthosting.co.za> Message-ID: <1278846188.03.0.261489202178.issue7547@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:05:12 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 11:05:12 +0000 Subject: [issue7616] test_memoryview test_setitem_writable failures with Intel ICC In-Reply-To: <1262324287.94.0.590004351292.issue7616@psf.upfronthosting.co.za> Message-ID: <1278846312.7.0.125078965417.issue7616@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- components: +Tests -Library (Lib) nosy: +michael.foord versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:07:05 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 11:07:05 +0000 Subject: [issue3902] distutils does not correctly create packages for compiled extensions In-Reply-To: <1221761506.23.0.180859211428.issue3902@psf.upfronthosting.co.za> Message-ID: <1278846425.25.0.448454547001.issue3902@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:08:40 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 11:08:40 +0000 Subject: [issue7645] test_distutils fails on Windows XP In-Reply-To: <1262807781.76.0.367553383725.issue7645@psf.upfronthosting.co.za> Message-ID: <1278846520.82.0.983819715218.issue7645@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:14:54 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 11:14:54 +0000 Subject: [issue7656] test_hashlib fails on some installations (specifically Neal's regression test runner) In-Reply-To: <1262914113.09.0.614913015599.issue7656@psf.upfronthosting.co.za> Message-ID: <1278846894.9.0.859445225056.issue7656@psf.upfronthosting.co.za> Mark Lawrence added the comment: As 2.7 has been released can this be closed? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:18:46 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 11 Jul 2010 11:18:46 +0000 Subject: [issue7656] test_hashlib fails on some installations (specifically Neal's regression test runner) In-Reply-To: <1262914113.09.0.614913015599.issue7656@psf.upfronthosting.co.za> Message-ID: <1278847126.77.0.978243517554.issue7656@psf.upfronthosting.co.za> Ezio Melotti added the comment: This doesn't look like a new feature, so if it's still a problem it shouldn't be closed. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:20:34 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 11:20:34 +0000 Subject: [issue7674] select.select() corner cases: duplicate fds, out-of-range fds In-Reply-To: <1263192751.1.0.719382931138.issue7674@psf.upfronthosting.co.za> Message-ID: <1278847234.14.0.112171463707.issue7674@psf.upfronthosting.co.za> Mark Lawrence added the comment: Chris, to me it's as clear as mud but please produce a doc patch anyway. :) ---------- assignee: georg.brandl -> docs at python nosy: +BreamoreBoy, docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:22:26 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 11 Jul 2010 11:22:26 +0000 Subject: [issue7616] test_memoryview test_setitem_writable failures with Intel ICC In-Reply-To: <1262324287.94.0.590004351292.issue7616@psf.upfronthosting.co.za> Message-ID: <1278847346.03.0.618549281353.issue7616@psf.upfronthosting.co.za> Stefan Krah added the comment: Confirmed with release27-maint, icc 11.0. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:28:17 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Jul 2010 11:28:17 +0000 Subject: [issue7616] test_memoryview test_setitem_writable failures with Intel ICC In-Reply-To: <1262324287.94.0.590004351292.issue7616@psf.upfronthosting.co.za> Message-ID: <1278847697.86.0.272099985836.issue7616@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Can you try with the following patch? ---------- keywords: +patch nosy: +pitrou Added file: http://bugs.python.org/file17942/memmove.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:30:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Jul 2010 11:30:11 +0000 Subject: [issue7340] Doc for sys.exc_info has warning that is no longer valid In-Reply-To: <1258481567.01.0.124523901293.issue7340@psf.upfronthosting.co.za> Message-ID: <1278847811.62.0.916595345076.issue7340@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> accepted stage: -> needs patch versions: -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:33:48 2010 From: report at bugs.python.org (Michael Foord) Date: Sun, 11 Jul 2010 11:33:48 +0000 Subject: [issue7616] test_memoryview test_setitem_writable failures with Intel ICC In-Reply-To: <1262324287.94.0.590004351292.issue7616@psf.upfronthosting.co.za> Message-ID: <1278848028.86.0.814657756102.issue7616@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- nosy: -michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:36:47 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 11 Jul 2010 11:36:47 +0000 Subject: [issue9223] distutils Command docs linking In-Reply-To: <1278842118.98.0.447580746047.issue9223@psf.upfronthosting.co.za> Message-ID: <1278848207.21.0.993205746026.issue9223@psf.upfronthosting.co.za> anatoly techtonik added the comment: Eric, think about people who will be porting old code from distutils. They need to understand the behavior of distutils even if you'd like to force them to rewrite the logic for distutils2 from scratch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:38:55 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Jul 2010 11:38:55 +0000 Subject: [issue3214] Suggest change to glossary explanation: "Duck Typing" In-Reply-To: <1214543459.76.0.157400708153.issue3214@psf.upfronthosting.co.za> Message-ID: <1278848335.46.0.0987486694591.issue3214@psf.upfronthosting.co.za> ?ric Araujo added the comment: Applied in r82790 by Georg, thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:44:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Jul 2010 11:44:01 +0000 Subject: [issue7674] select.select() corner cases: duplicate fds, out-of-range fds In-Reply-To: <1263192751.1.0.719382931138.issue7674@psf.upfronthosting.co.za> Message-ID: <1278848641.98.0.368275139186.issue7674@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: docs at python -> components: -Documentation nosy: +exarkun versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:47:50 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 11:47:50 +0000 Subject: [issue7676] IDLE shell shouldn't use TABs In-Reply-To: <1263213381.47.0.181451927584.issue7676@psf.upfronthosting.co.za> Message-ID: <1278848870.8.0.476820791623.issue7676@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> kbk nosy: +kbk stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:48:48 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 11:48:48 +0000 Subject: [issue7687] Bluetooth support untested In-Reply-To: <1263367703.76.0.187821272753.issue7687@psf.upfronthosting.co.za> Message-ID: <1278848928.64.0.263214882286.issue7687@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:52:48 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 11:52:48 +0000 Subject: [issue7688] TypeError: __name__ must be set to a string object In-Reply-To: <1263368820.05.0.872831790778.issue7688@psf.upfronthosting.co.za> Message-ID: <1278849168.39.0.323980042177.issue7688@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 13:56:42 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 11 Jul 2010 11:56:42 +0000 Subject: [issue7616] test_memoryview test_setitem_writable failures with Intel ICC In-Reply-To: <1262324287.94.0.590004351292.issue7616@psf.upfronthosting.co.za> Message-ID: <1278849402.21.0.353406582538.issue7616@psf.upfronthosting.co.za> Stefan Krah added the comment: Antoine, the patch works well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 14:00:40 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 12:00:40 +0000 Subject: [issue5587] vars() no longer has a useful __repr__ In-Reply-To: <1238260121.89.0.108446240417.issue5587@psf.upfronthosting.co.za> Message-ID: <1278849640.54.0.785255993999.issue5587@psf.upfronthosting.co.za> Mark Lawrence added the comment: Note that 2.7 output is the same as for 2.6. ---------- nosy: +BreamoreBoy stage: unit test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 14:10:35 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 12:10:35 +0000 Subject: [issue7719] distutils: ignore .nfsXXXX files In-Reply-To: <1263669405.52.0.706975841329.issue7719@psf.upfronthosting.co.za> Message-ID: <1278850235.69.0.794191424949.issue7719@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.1, Python 3.2 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 14:12:38 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 12:12:38 +0000 Subject: [issue7738] IDLE hang when tooltip comes up in Linux In-Reply-To: <1263889833.11.0.812168606755.issue7738@psf.upfronthosting.co.za> Message-ID: <1278850358.94.0.442181978197.issue7738@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> kbk nosy: +kbk versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 14:16:05 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Jul 2010 12:16:05 +0000 Subject: [issue7616] test_memoryview test_setitem_writable failures with Intel ICC In-Reply-To: <1262324287.94.0.590004351292.issue7616@psf.upfronthosting.co.za> Message-ID: <1278850565.43.0.475426599802.issue7616@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you. This was fixed in r82814 (py3k), r82815 (2.7), r82816 (3.1). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 14:19:34 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 12:19:34 +0000 Subject: [issue7761] telnetlib Telnet.interact fails on Windows but not Linux In-Reply-To: <1264212900.62.0.226780855818.issue7761@psf.upfronthosting.co.za> Message-ID: <1278850774.68.0.205808998015.issue7761@psf.upfronthosting.co.za> Mark Lawrence added the comment: This works fine with Python 2.7 on Windows. ---------- nosy: +BreamoreBoy versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 14:39:06 2010 From: report at bugs.python.org (Reid Kleckner) Date: Sun, 11 Jul 2010 12:39:06 +0000 Subject: [issue7576] Avoid warnings in PyModuleDef_HEAD_INIT In-Reply-To: <1261744819.66.0.987087888755.issue7576@psf.upfronthosting.co.za> Message-ID: <1278851946.66.0.978998221515.issue7576@psf.upfronthosting.co.za> Reid Kleckner added the comment: This patch looks good to me, after digging through the relevant module code. I was confused though for a bit as to why PyModuleDef is a PyObject with a NULL type. It turns out that import.c wants to keep them in a dictionary, so it needs to be able to cast to PyObject* and to access the refcount. It never needs the type, though, so it's safe to leave it NULL. I think it might be worth adding comments explaining that in this patch or another. ---------- nosy: +rnk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:05:14 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 11 Jul 2010 13:05:14 +0000 Subject: [issue7096] test_curses fails on 3.1 when run under regrtest In-Reply-To: <1255143233.91.0.954013064992.issue7096@psf.upfronthosting.co.za> Message-ID: <1278853514.08.0.640090743588.issue7096@psf.upfronthosting.co.za> Stefan Krah added the comment: David, was this fixed in r75702 by any chance? Currently the test is just skipped in 3.1. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:09:02 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 13:09:02 +0000 Subject: [issue7840] Lib/ctypes/test/test_pep3118.py should not shadow the memoryview() builtin In-Reply-To: <1265150088.78.0.228755954807.issue7840@psf.upfronthosting.co.za> Message-ID: <1278853742.18.0.551587211773.issue7840@psf.upfronthosting.co.za> Mark Lawrence added the comment: This has been done in revision 79288. ---------- nosy: +BreamoreBoy resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:22:20 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 13:22:20 +0000 Subject: [issue7871] Duplicate test method in test_heapq In-Reply-To: <1265547204.98.0.659112380909.issue7871@psf.upfronthosting.co.za> Message-ID: <1278854540.85.0.995138658259.issue7871@psf.upfronthosting.co.za> Mark Lawrence added the comment: Hardly a showstopper, but shouldn't this file have been patched before the release of Python 2.7? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:22:50 2010 From: report at bugs.python.org (Reid Kleckner) Date: Sun, 11 Jul 2010 13:22:50 +0000 Subject: [issue6643] Throw away more radioactive locks that could be held across a fork in threading.py In-Reply-To: <1249412209.9.0.200329347238.issue6643@psf.upfronthosting.co.za> Message-ID: <1278854570.12.0.601308845489.issue6643@psf.upfronthosting.co.za> Changes by Reid Kleckner : ---------- title: joining a child that forks can deadlock in the forked child process -> Throw away more radioactive locks that could be held across a fork in threading.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:25:12 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 11 Jul 2010 13:25:12 +0000 Subject: [issue7871] Duplicate test method in test_heapq In-Reply-To: <1265547204.98.0.659112380909.issue7871@psf.upfronthosting.co.za> Message-ID: <1278854712.09.0.968036471254.issue7871@psf.upfronthosting.co.za> Ezio Melotti added the comment: If no one did, it will have to be done for 2.7.1. ---------- nosy: +ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:25:53 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 13:25:53 +0000 Subject: [issue6270] Menu deletecommand fails if command is already deleted In-Reply-To: <1244754580.13.0.801057820447.issue6270@psf.upfronthosting.co.za> Message-ID: <1278854753.93.0.844507850221.issue6270@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> gpolo nosy: +gpolo versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:30:34 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 13:30:34 +0000 Subject: [issue6668] locale.py: can't parse sr_RS@latin locale In-Reply-To: <1249655674.35.0.635015975428.issue6668@psf.upfronthosting.co.za> Message-ID: <1278855034.29.0.360424086813.issue6668@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- components: +Library (Lib) -Unicode nosy: +lemburg, loewis stage: -> unit test needed versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:31:57 2010 From: report at bugs.python.org (Ryan Kelly) Date: Sun, 11 Jul 2010 13:31:57 +0000 Subject: [issue5950] Make zimport work with zipfile containing comments In-Reply-To: <1241628586.95.0.0801479384158.issue5950@psf.upfronthosting.co.za> Message-ID: <1278855117.07.0.0449118712126.issue5950@psf.upfronthosting.co.za> Changes by Ryan Kelly : ---------- nosy: +rfk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:33:41 2010 From: report at bugs.python.org (Larry Hastings) Date: Sun, 11 Jul 2010 13:33:41 +0000 Subject: [issue6807] No such file or directory: 'msisupport.dll' in msi.py In-Reply-To: <1251629956.22.0.252677555531.issue6807@psf.upfronthosting.co.za> Message-ID: <1278855221.87.0.997092552037.issue6807@psf.upfronthosting.co.za> Larry Hastings added the comment: Why did you assign this to me? I don't know why my name is on this bug in the first place. Is it possible you were thinking of another Larry? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:34:54 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 13:34:54 +0000 Subject: [issue7965] Problem with urlparse in Windows XP after a drag and drop In-Reply-To: <1266589212.06.0.504228462246.issue7965@psf.upfronthosting.co.za> Message-ID: <1278855294.97.0.820929455043.issue7965@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> orsenthil nosy: +orsenthil versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:36:02 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Jul 2010 13:36:02 +0000 Subject: [issue8844] Condition.wait() doesn't raise KeyboardInterrupt In-Reply-To: <1275065292.27.0.238026363438.issue8844@psf.upfronthosting.co.za> Message-ID: <1278855362.64.0.837699559196.issue8844@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The latest patch looks good to me. ---------- assignee: -> pitrou resolution: -> accepted stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:36:59 2010 From: report at bugs.python.org (ipatrol) Date: Sun, 11 Jul 2010 13:36:59 +0000 Subject: [issue9224] Distutls fails with MSVC++ 2008on Windows Vista 64bit In-Reply-To: <1278855419.68.0.64475748771.issue9224@psf.upfronthosting.co.za> Message-ID: <1278855419.68.0.64475748771.issue9224@psf.upfronthosting.co.za> New submission from ipatrol : Trying to compile any extension module fails with the following error: running install running build running build_ext building 'bsdiff' extension Traceback (most recent call last): File "setup.py", line 56, in ext_modules = [extension]) File "C:\hp\bin\Python\lib\distutils\core.py", line 152, in setup dist.run_commands() [Skipping many levels for brevity] File "C:\hp\bin\Python\lib\distutils\msvc9compiler.py", line 469, in compile self.initialize() File "C:\hp\bin\Python\lib\distutils\msvc9compiler.py", line 379, in initialize vc_env = query_vcvarsall(VERSION, plat_spec) File "C:\hp\bin\Python\lib\distutils\msvc9compiler.py", line 295, in query_vcvarsall raise ValueError(str(list(result.keys()))) ValueError: [u'path'] here, \hp\bin is a vista symlink to Python's directory. This is the second version that had this error, with several modules as well. It appears to be an issue in msvc9compiler's handling of stdout, will try to patch. ---------- assignee: tarek components: Distutils, Extension Modules, Windows messages: 110008 nosy: ipatrol, tarek priority: normal severity: normal status: open title: Distutls fails with MSVC++ 2008on Windows Vista 64bit type: compile error versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:37:58 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 13:37:58 +0000 Subject: [issue7991] test_ntpath fails on Windows XP In-Reply-To: <1266862639.58.0.407151128158.issue7991@psf.upfronthosting.co.za> Message-ID: <1278855478.16.0.72151826075.issue7991@psf.upfronthosting.co.za> Mark Lawrence added the comment: Works fine for me on Vista, can this be closed? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:44:11 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 11 Jul 2010 13:44:11 +0000 Subject: [issue7991] test_ntpath fails on Windows XP In-Reply-To: <1266862639.58.0.407151128158.issue7991@psf.upfronthosting.co.za> Message-ID: <1278855851.1.0.972747967684.issue7991@psf.upfronthosting.co.za> Ezio Melotti added the comment: Austin, can you provide more information about the operative system and the exact version of Python you are using? You could also try with a more recent 3.1.x version or if possible even with 3.2. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:54:09 2010 From: report at bugs.python.org (Brian Curtin) Date: Sun, 11 Jul 2010 13:54:09 +0000 Subject: [issue6668] locale.py: can't parse sr_RS@latin locale In-Reply-To: <1249655674.35.0.635015975428.issue6668@psf.upfronthosting.co.za> Message-ID: <1278856449.68.0.129254638269.issue6668@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- components: +Unicode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:55:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Jul 2010 13:55:12 +0000 Subject: [issue3758] "make check" suggest a testing target under GNU coding standards In-Reply-To: <1220362449.51.0.882466438238.issue3758@psf.upfronthosting.co.za> Message-ID: <1278856512.53.0.263677043416.issue3758@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: accepted -> fixed stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:55:49 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 11 Jul 2010 13:55:49 +0000 Subject: [issue9224] Distutls fails with MSVC++ 2008on Windows Vista 64bit In-Reply-To: <1278855419.68.0.64475748771.issue9224@psf.upfronthosting.co.za> Message-ID: <1278856549.39.0.962320213074.issue9224@psf.upfronthosting.co.za> Stefan Krah added the comment: Duplicate of issue 7511. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 15:56:54 2010 From: report at bugs.python.org (Brian Curtin) Date: Sun, 11 Jul 2010 13:56:54 +0000 Subject: [issue7365] grp and pwd should treat uid and gid as unsigned In-Reply-To: <1258680245.88.0.627899346962.issue7365@psf.upfronthosting.co.za> Message-ID: <1278856614.92.0.450650457981.issue7365@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- components: +Extension Modules -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:02:46 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 14:02:46 +0000 Subject: [issue6807] No such file or directory: 'msisupport.dll' in msi.py In-Reply-To: <1251629956.22.0.252677555531.issue6807@psf.upfronthosting.co.za> Message-ID: <1278856966.17.0.429616471221.issue6807@psf.upfronthosting.co.za> Mark Lawrence added the comment: I didn't realise that I had, sorry!!! ---------- assignee: larry -> nosy: +BreamoreBoy -larry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:19:12 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 Jul 2010 14:19:12 +0000 Subject: [issue9224] Distutls fails with MSVC++ 2008on Windows Vista 64bit In-Reply-To: <1278855419.68.0.64475748771.issue9224@psf.upfronthosting.co.za> Message-ID: <1278857952.26.0.438354691636.issue9224@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> duplicate status: open -> closed superseder: -> msvc9compiler.py: ValueError: [u'path'] _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:20:01 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 Jul 2010 14:20:01 +0000 Subject: [issue7511] msvc9compiler.py: ValueError: [u'path'] In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1278858001.5.0.150420486854.issue7511@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closed issue 9224 as a duplicate of this one; merging nosy lists. ---------- nosy: +ipatrol, mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:22:11 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 14:22:11 +0000 Subject: [issue7982] extend captured_output to simulate different stdout.encoding In-Reply-To: <1266844157.92.0.671833558035.issue7982@psf.upfronthosting.co.za> Message-ID: <1278858131.18.0.438958269461.issue7982@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:24:11 2010 From: report at bugs.python.org (Ryan Kelly) Date: Sun, 11 Jul 2010 14:24:11 +0000 Subject: [issue5950] Make zimport work with zipfile containing comments In-Reply-To: <1241628586.95.0.0801479384158.issue5950@psf.upfronthosting.co.za> Message-ID: <1278858251.64.0.536858112608.issue5950@psf.upfronthosting.co.za> Ryan Kelly added the comment: Attached is my attempt at a patch for this functionality, along with some simple tests. This basically mirrors what's done in zipfile.py, searching backwards through the file until it finds the end-of-central-directory marker. It tries to be memory conscious by reading in small chunks. Patch is against trunk; I've also tested it against 2.7 and it seems to work. Any chance of it being backported into 2.7? Also wanted to mention a real-world usecase for this functionality. I want to digitally sign a frozen python program with appended zipfile, which involves appending the signature to the EXE. Simple to do if only zipimport would support appended comments. ---------- keywords: +patch Added file: http://bugs.python.org/file17943/zipimport_with_comments.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:24:45 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 14:24:45 +0000 Subject: [issue2864] etree: Add XPath documentation In-Reply-To: <1210863012.97.0.696135529968.issue2864@psf.upfronthosting.co.za> Message-ID: <1278858285.45.0.888755548523.issue2864@psf.upfronthosting.co.za> Mark Lawrence added the comment: Shouldn't this be assigned to docs at python? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:26:15 2010 From: report at bugs.python.org (Ryan Kelly) Date: Sun, 11 Jul 2010 14:26:15 +0000 Subject: [issue5950] Make zimport work with zipfile containing comments In-Reply-To: <1241628586.95.0.0801479384158.issue5950@psf.upfronthosting.co.za> Message-ID: <1278858375.9.0.33267007532.issue5950@psf.upfronthosting.co.za> Ryan Kelly added the comment: Whoops, forgot to remove the line from the docs about comments not being supported. Updated the patch accordingly. ---------- Added file: http://bugs.python.org/file17944/zipimport_with_comments.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:26:26 2010 From: report at bugs.python.org (Ryan Kelly) Date: Sun, 11 Jul 2010 14:26:26 +0000 Subject: [issue5950] Make zimport work with zipfile containing comments In-Reply-To: <1241628586.95.0.0801479384158.issue5950@psf.upfronthosting.co.za> Message-ID: <1278858386.05.0.72763656118.issue5950@psf.upfronthosting.co.za> Changes by Ryan Kelly : Removed file: http://bugs.python.org/file17943/zipimport_with_comments.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:28:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Jul 2010 14:28:25 +0000 Subject: [issue5842] Move test outside of urlparse module In-Reply-To: <1240686074.24.0.993637087915.issue5842@psf.upfronthosting.co.za> Message-ID: <1278858505.2.0.838989459247.issue5842@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:28:57 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Jul 2010 14:28:57 +0000 Subject: [issue5843] Possible normalization error in urlparse.urlunparse In-Reply-To: <1240686759.57.0.0410680082249.issue5843@psf.upfronthosting.co.za> Message-ID: <1278858537.32.0.958730367221.issue5843@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: -> orsenthil nosy: +orsenthil type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:28:57 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 11 Jul 2010 14:28:57 +0000 Subject: [issue2864] etree: Add XPath documentation In-Reply-To: <1210863012.97.0.696135529968.issue2864@psf.upfronthosting.co.za> Message-ID: <1278858537.75.0.828476737414.issue2864@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +docs at python stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:30:53 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 14:30:53 +0000 Subject: [issue8078] add more baud constants to termios In-Reply-To: <1267849602.5.0.0627386493701.issue8078@psf.upfronthosting.co.za> Message-ID: <1278858653.18.0.730470144115.issue8078@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:32:43 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Jul 2010 14:32:43 +0000 Subject: [issue8974] svnmerge errors in msgfmt.py In-Reply-To: <1276276615.62.0.0556230549588.issue8974@psf.upfronthosting.co.za> Message-ID: <1278858763.83.0.289801241846.issue8974@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:33:15 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 14:33:15 +0000 Subject: [issue8150] urllib needs ability to set METHOD for HTTP requests In-Reply-To: <1268680506.54.0.712056752351.issue8150@psf.upfronthosting.co.za> Message-ID: <1278858795.65.0.540165624854.issue8150@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> orsenthil nosy: +orsenthil stage: -> unit test needed versions: -Python 3.1, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:34:07 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 14:34:07 +0000 Subject: [issue5747] knowing the parent command In-Reply-To: <1239635801.31.0.779200404785.issue5747@psf.upfronthosting.co.za> Message-ID: <1278858847.92.0.318931958961.issue5747@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:38:42 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 14:38:42 +0000 Subject: [issue8492] Addition to readline module to get dictionary of keystrokes and commands In-Reply-To: <1271880127.18.0.454462638892.issue8492@psf.upfronthosting.co.za> Message-ID: <1278859122.41.0.0929693320594.issue8492@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:40:01 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 11 Jul 2010 14:40:01 +0000 Subject: [issue7761] telnetlib Telnet.interact fails on Windows but not Linux In-Reply-To: <1264212900.62.0.226780855818.issue7761@psf.upfronthosting.co.za> Message-ID: <1278859201.92.0.350033076069.issue7761@psf.upfronthosting.co.za> Stefan Krah added the comment: Confirmed with 3.1. Raising priority, since it seems to be one of those bytes/string issues that prevent people from using py3k. ---------- nosy: +skrah priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:40:42 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 11 Jul 2010 14:40:42 +0000 Subject: [issue7761] telnetlib Telnet.interact fails on Windows but not Linux In-Reply-To: <1264212900.62.0.226780855818.issue7761@psf.upfronthosting.co.za> Message-ID: <1278859242.62.0.173803724666.issue7761@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- stage: unit test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:41:39 2010 From: report at bugs.python.org (Martina Oefelein) Date: Sun, 11 Jul 2010 14:41:39 +0000 Subject: [issue4045] test_mboxmmdf_to_maildir fails on non-englisch locale In-Reply-To: <1223210018.98.0.954404111319.issue4045@psf.upfronthosting.co.za> Message-ID: <1278859299.11.0.605575281789.issue4045@psf.upfronthosting.co.za> Martina Oefelein added the comment: Did you test it Python *3.0*? Apparently, the issue does not happen in Python 2.x, and also not in Python 3.1.2. Apparently it was introduced somewhere in Python 3.0, and later fixed. I retested the issue in Python 3.0.1 on Mac OS X 10.6.4, using a freshly unpacked tarball, built with ./configure && make and it still happens. To avoid influences of the user environment, I repeated the test in a newly created test account. Same issue. The issue doesn't happen in Python 2.6, 2.6.5, 2.7, or 3.1.2, however. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:43:12 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 11 Jul 2010 14:43:12 +0000 Subject: [issue7761] telnetlib Telnet.interact fails on Windows but not Linux In-Reply-To: <1264212900.62.0.226780855818.issue7761@psf.upfronthosting.co.za> Message-ID: <1278859392.49.0.559332537134.issue7761@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: needs patch -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:44:36 2010 From: report at bugs.python.org (Martina Oefelein) Date: Sun, 11 Jul 2010 14:44:36 +0000 Subject: [issue4044] test_output_textcalendar fails on non-englisch locale In-Reply-To: <1223209182.04.0.559787210329.issue4044@psf.upfronthosting.co.za> Message-ID: <1278859476.24.0.183023481674.issue4044@psf.upfronthosting.co.za> Martina Oefelein added the comment: Did you test it Python *3.0*? Apparently, the issue does not happen in Python 2.x, and also not in Python 3.1.2. Apparently it was introduced somewhere in Python 3.0, and later fixed. I retested the issue in Python 3.0.1 on Mac OS X 10.6.4, using a freshly unpacked tarball, built with ./configure && make and it still happens. To avoid influences of the user environment, I repeated the test in a newly created test account. Same issue. The issue doesn't happen in Python 2.6, 2.6.5, 2.7, or 3.1.2, however. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:45:30 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 14:45:30 +0000 Subject: [issue1210680] Split email headers near a space Message-ID: <1278859530.17.0.60334454054.issue1210680@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'd have thought patching something that splits words into two should be treated as a bug, not a feature request, hence could this go into Python 2.7, 3.1 and 3.2? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:46:09 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 11 Jul 2010 14:46:09 +0000 Subject: [issue4045] test_mboxmmdf_to_maildir fails on non-englisch locale In-Reply-To: <1223210018.98.0.954404111319.issue4045@psf.upfronthosting.co.za> Message-ID: <1278859569.74.0.358649925932.issue4045@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:46:27 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 14:46:27 +0000 Subject: [issue1690608] email.utils.formataddr() should be rfc2047 aware Message-ID: <1278859587.61.0.640912279517.issue1690608@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:49:42 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Jul 2010 14:49:42 +0000 Subject: [issue6643] Throw away more radioactive locks that could be held across a fork in threading.py In-Reply-To: <1249412209.9.0.200329347238.issue6643@psf.upfronthosting.co.za> Message-ID: <1278859782.27.0.487213527065.issue6643@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +Rhamphoryncus, gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:51:18 2010 From: report at bugs.python.org (Martina Oefelein) Date: Sun, 11 Jul 2010 14:51:18 +0000 Subject: [issue4047] test_run_abort triggers CrashReporter on MacOS X In-Reply-To: <1223212546.3.0.400600313868.issue4047@psf.upfronthosting.co.za> Message-ID: <1278859878.21.0.73889302.issue4047@psf.upfronthosting.co.za> Martina Oefelein added the comment: Retested in Python 2.6.5, 2.7, 3.0.1, 3.1.2: same result ---------- versions: +Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:55:08 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 11 Jul 2010 14:55:08 +0000 Subject: [issue4045] test_mboxmmdf_to_maildir fails on non-englisch locale In-Reply-To: <1223210018.98.0.954404111319.issue4045@psf.upfronthosting.co.za> Message-ID: <1278860108.81.0.342493710991.issue4045@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, OK, thanks for the clarification. 3.0 is no longer receiving bug fixes. I'll change the resolution to 'out of date', though. ---------- resolution: works for me -> out of date _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 16:55:46 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 11 Jul 2010 14:55:46 +0000 Subject: [issue4044] test_output_textcalendar fails on non-englisch locale In-Reply-To: <1223209182.04.0.559787210329.issue4044@psf.upfronthosting.co.za> Message-ID: <1278860146.23.0.0863248536237.issue4044@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: works for me -> out of date _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 17:37:03 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 11 Jul 2010 15:37:03 +0000 Subject: [issue5950] Make zipimport work with zipfile containing comments In-Reply-To: <1241628586.95.0.0801479384158.issue5950@psf.upfronthosting.co.za> Message-ID: <1278862623.33.0.752920659848.issue5950@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- title: Make zimport work with zipfile containing comments -> Make zipimport work with zipfile containing comments _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 17:44:03 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 15:44:03 +0000 Subject: [issue8639] Allow callable objects in inspect.getargspec In-Reply-To: <1273183110.15.0.600505035287.issue8639@psf.upfronthosting.co.za> Message-ID: <1278863043.6.0.404336598694.issue8639@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 18:13:08 2010 From: report at bugs.python.org (Tiago Antao) Date: Sun, 11 Jul 2010 16:13:08 +0000 Subject: [issue9217] 2to3 crashes with some doctests In-Reply-To: <1278790070.07.0.615684286831.issue9217@psf.upfronthosting.co.za> Message-ID: <1278864788.53.0.683988897597.issue9217@psf.upfronthosting.co.za> Tiago Antao added the comment: A few more problematic examples (hope it helps) >>> my_mseq = MutableSeq("MKQHKAMIVALIVICITAVVAAL", \ IUPAC.protein) Note the line continuation >>> rec.letter_annotations["secondary_structure"] = \ (The same pattern) Another (different) """Returns a simple text representation of the codon table e.g. >>> import Bio.Data.CodonTable >>> print Bio.Data.CodonTable.standard_dna_table >>> print Bio.Data.CodonTable.generic_by_id[1]""" And (the original) >>> class CreatePeople(DocSQL.Create): ... \""" ... CREATE TEMPORARY TABLE people ... (id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT, ... last_name TINYTEXT, ... first_name TINYTEXT) ... \""" ... Hope it helps ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 18:24:16 2010 From: report at bugs.python.org (Chris Webb) Date: Sun, 11 Jul 2010 16:24:16 +0000 Subject: [issue1653457] Python misbehaves when installed in / (patch attached) Message-ID: <1278865456.24.0.0837912361787.issue1653457@psf.upfronthosting.co.za> Chris Webb added the comment: Fortunately reduce() is static within getpath.c, so it should only be necessary to check the handful of callers in there. I've done this, and am reasonably sure it doesn't break anything. In addition, I've given this patch quite a bit of empirical testing, at least under linux/glibc. This has been a persistent bug in Python since 2004 or earlier, and I've needed the attached fix on our Python builds on all our production servers since then, rebasing for every release from 2.4 to the new 2.7. (Our machines don't have legacy /usr dirs so Python is installed to /bin and /lib.) The exact patch I'm using right now against 2.7 is attached, but it's essentially identical to the one I submitted originally against Python 2.4, and later against Python 2.5. ---------- keywords: +patch Added file: http://bugs.python.org/file17945/paths.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 18:27:42 2010 From: report at bugs.python.org (Tiago Antao) Date: Sun, 11 Jul 2010 16:27:42 +0000 Subject: [issue9217] 2to3 crashes with some doctests In-Reply-To: <1278790070.07.0.615684286831.issue9217@psf.upfronthosting.co.za> Message-ID: <1278865662.19.0.579412946917.issue9217@psf.upfronthosting.co.za> Tiago Antao added the comment: Another example >>> records = (record for record in \ SeqIO.parse("Roche/E3MFGYR02_random_10_reads.sff","sff") \ if record.seq[record.annotations["cli [...] Note that ... does not apply here (it will fail on python2 doctests) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 18:30:45 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 11 Jul 2010 16:30:45 +0000 Subject: [issue7096] test_curses fails on 3.1 when run under regrtest In-Reply-To: <1255143233.91.0.954013064992.issue7096@psf.upfronthosting.co.za> Message-ID: <1278865845.48.0.840757212055.issue7096@psf.upfronthosting.co.za> R. David Murray added the comment: This still fails for me in the same way if I uncomment the skip. It works fine in py3k trunk, though, so unless someone wants to figure out what fix that wasn't backported fixed this, we could probably just close it as out of date. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 18:54:13 2010 From: report at bugs.python.org (Diego) Date: Sun, 11 Jul 2010 16:54:13 +0000 Subject: [issue9218] pop multiple elements of a list at once In-Reply-To: <1278843881.22.0.633731500837.issue9218@psf.upfronthosting.co.za> Message-ID: Diego added the comment: Help me. I cant find this list. I guessed that it would be a part of the issue tracker and someone would label it right. 2010/7/11 ?ric Araujo : > > Changes by ?ric Araujo : > > > ---------- > nosy: +merwok > > _______________________________________ > Python tracker > > _______________________________________ > ---------- nosy: +epsilon_da _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 19:14:35 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Jul 2010 17:14:35 +0000 Subject: [issue9218] pop multiple elements of a list at once In-Reply-To: <1278790209.67.0.359453381678.issue9218@psf.upfronthosting.co.za> Message-ID: <1278868475.62.0.564357302855.issue9218@psf.upfronthosting.co.za> ?ric Araujo added the comment: python.org ? community ? mailing lists http://mail.python.org/mailman/listinfo/python-ideas ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 19:19:12 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 11 Jul 2010 17:19:12 +0000 Subject: [issue1076790] test test_codecs failed Message-ID: <1278868752.96.0.915506650128.issue1076790@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 19:36:28 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 11 Jul 2010 17:36:28 +0000 Subject: [issue1076790] test test_codecs failed Message-ID: <1278869788.08.0.897908443769.issue1076790@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is there any point in leaving this open as the patch is against Python 2.4? How many times has test_codecs been successfully run against various Python versions since the patch was produced 6 1/2 years ago? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 19:39:36 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 Jul 2010 17:39:36 +0000 Subject: [issue9165] Add math.isfinite() In-Reply-To: <1278343008.96.0.366805630513.issue9165@psf.upfronthosting.co.za> Message-ID: <1278869976.83.0.00707596181593.issue9165@psf.upfronthosting.co.za> Mark Dickinson added the comment: Applied in r82818 (with issue number added to Misc/NEWS; thanks, Eric!). ---------- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 19:40:11 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 11 Jul 2010 17:40:11 +0000 Subject: [issue8974] svnmerge errors in msgfmt.py In-Reply-To: <1276276615.62.0.0556230549588.issue8974@psf.upfronthosting.co.za> Message-ID: <1278870011.29.0.989619477417.issue8974@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for the patch. Committed as r82819. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 19:42:44 2010 From: report at bugs.python.org (Marco Donato Torsello) Date: Sun, 11 Jul 2010 17:42:44 +0000 Subject: [issue9222] IDLE: Fix open/saveas 'Files of type' choices In-Reply-To: <1278809052.13.0.969100167059.issue9222@psf.upfronthosting.co.za> Message-ID: <1278870164.81.0.210054956479.issue9222@psf.upfronthosting.co.za> Marco Donato Torsello added the comment: My fix for IDLE of Python3.1 . This is the first time for me, so I didn't know what i have to do , sorry ---------- nosy: +md1512 Added file: http://bugs.python.org/file17946/IOBinding.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 19:54:49 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Sun, 11 Jul 2010 17:54:49 +0000 Subject: [issue9224] Distutls fails with MSVC++ 2008on Windows Vista 64bit In-Reply-To: <1278855419.68.0.64475748771.issue9224@psf.upfronthosting.co.za> Message-ID: <1278870889.45.0.476609534043.issue9224@psf.upfronthosting.co.za> Changes by Sridhar Ratnakumar : ---------- nosy: +srid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 20:31:50 2010 From: report at bugs.python.org (Jan Killian) Date: Sun, 11 Jul 2010 18:31:50 +0000 Subject: [issue444582] Finding programs in PATH, adding shutil.which Message-ID: <1278873110.76.0.424791135839.issue444582@psf.upfronthosting.co.za> Jan Killian added the comment: * hardcoded deafult PATHEXT values for different versions of Windows (confirmed the W2K, W2008 values via google) * code+tests+docs cleanup Just one question: is there some std proc how to run the test suite on the updated stdlib in a working repo? For now, I just copied the Lib/test/test_shutil.py to a parent Lib/ dir, renamed Lib/test temporarily to not collide with a test module, and run python test_shutil.py in Lib, but I guess you have some simpler way to do it. ---------- Added file: http://bugs.python.org/file17947/shutil_which_82778.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 20:32:48 2010 From: report at bugs.python.org (Jan Killian) Date: Sun, 11 Jul 2010 18:32:48 +0000 Subject: [issue444582] Finding programs in PATH, adding shutil.which Message-ID: <1278873168.66.0.940843469582.issue444582@psf.upfronthosting.co.za> Changes by Jan Killian : Added file: http://bugs.python.org/file17948/which.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 20:41:57 2010 From: report at bugs.python.org (Michael Foord) Date: Sun, 11 Jul 2010 18:41:57 +0000 Subject: [issue444582] Finding programs in PATH, adding shutil.which Message-ID: <1278873717.27.0.335399699509.issue444582@psf.upfronthosting.co.za> Michael Foord added the comment: which is useful for discovering *if* a program is available (I sorely miss it on Windows when I don't have cygwin installed). +1 for adding it to shutil. ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 20:49:41 2010 From: report at bugs.python.org (Demur Rumed) Date: Sun, 11 Jul 2010 18:49:41 +0000 Subject: [issue9225] Replace DUP_TOPX with DUP_TOP_TWO In-Reply-To: <1278874181.81.0.745105188712.issue9225@psf.upfronthosting.co.za> Message-ID: <1278874181.81.0.745105188712.issue9225@psf.upfronthosting.co.za> New submission from Demur Rumed : DUP_TOPX(3) is never used, nor is ROT_FOUR. This patch removes the opcodes, replacing DUP_TOPX with DUP_TOP_TWO Oddly, at least with pybench, use of PREDICT(BINARY_SUBSCR) in DUP_TOP_TWO seems to show an always right PREDICT as slower than FAST_DISPATCH ---------- components: Interpreter Core files: duptoptwo.patch keywords: patch messages: 110035 nosy: serprex priority: normal severity: normal status: open title: Replace DUP_TOPX with DUP_TOP_TWO type: performance Added file: http://bugs.python.org/file17949/duptoptwo.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 21:28:53 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 Jul 2010 19:28:53 +0000 Subject: [issue9137] x.update(red=5, blue=6, other=7) doesn't work, where x is a MutableMapping In-Reply-To: <1277997162.2.0.246195895629.issue9137@psf.upfronthosting.co.za> Message-ID: <1278876533.84.0.50468487838.issue9137@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in r82821 (py3k), r82823 (release27-maint) and r82824 (release31-maint). ---------- stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 21:50:58 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Sun, 11 Jul 2010 19:50:58 +0000 Subject: [issue7511] msvc9compiler.py: ValueError: [u'path'] In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1278877858.45.0.368466763684.issue7511@psf.upfronthosting.co.za> Changes by Sridhar Ratnakumar : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 21:56:36 2010 From: report at bugs.python.org (Chris Monsanto) Date: Sun, 11 Jul 2010 19:56:36 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> New submission from Chris Monsanto : I have a function whose closure contains a local variable that shadows a global variable (lets call it x). If I create a class as follows: class Test(object): x = x Test.x will contain the value of the global x, not the local x. This ONLY happens when the names are the same, and it only happens in the class body; i.e., "class Test(object): y = x" and class "Test(object): pass; Test.x = x" work fine. However, if there is an assignment x = x AND you make other assignments, such as y = x, in the body, the other variables will have the wrong value too. Test case attached. Problem noticed on Python 2.6.2 on Windows and 2.6.5 on Linux. ---------- files: test.py messages: 110037 nosy: monsanto priority: normal severity: normal status: open title: erroneous behavior when creating classes inside a closure versions: Python 2.6 Added file: http://bugs.python.org/file17950/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 22:08:32 2010 From: report at bugs.python.org (Chris Monsanto) Date: Sun, 11 Jul 2010 20:08:32 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1278878912.39.0.381693966044.issue9226@psf.upfronthosting.co.za> Chris Monsanto added the comment: A friend confirmed that this was the case on 3.1.2 as well. ---------- versions: +3rd party -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 22:11:09 2010 From: report at bugs.python.org (Chris Monsanto) Date: Sun, 11 Jul 2010 20:11:09 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1278879069.3.0.189567113797.issue9226@psf.upfronthosting.co.za> Changes by Chris Monsanto : ---------- versions: +Python 2.6, Python 3.1 -3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 22:22:48 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 Jul 2010 20:22:48 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1278879768.65.0.734529996312.issue9226@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- components: +Interpreter Core stage: -> needs patch type: -> behavior versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 22:24:45 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 11 Jul 2010 20:24:45 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1278879885.25.0.555833071992.issue9226@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm not sure what I correct behavior is in this case. Consider the function equivalent: x = 3 def f(x): def m(): x = x print x m() f(4) which gives: Traceback (most recent call last): File "x.py", line 7, in f(4) File "x.py", line 6, in f m() File "x.py", line 4, in m x = x UnboundLocalError: local variable 'x' referenced before assignment The class example works because name namespaces are unoptimized, so failing to find a binding in the local (class) namepsace, Python looks at the globals and finds the global definition. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 22:30:31 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 Jul 2010 20:30:31 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1278880231.41.0.516436648263.issue9226@psf.upfronthosting.co.za> Mark Dickinson added the comment: I don't see anything in http://docs.python.org/reference/executionmodel.html#naming-and-binding to suggest that the class should behave differently from a nested function here; that is, I'd expect UnboundLocalError. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 22:37:48 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 Jul 2010 20:37:48 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1278880668.66.0.0716161993283.issue9226@psf.upfronthosting.co.za> Mark Dickinson added the comment: Jython 2.5.1 gives the same results as Python: newton:~ dickinsm$ cat test.py x = "error" def test(x): class Test(object): x = x print("x: ", x) print("Test.x: ", Test.x) test("success") newton:~ dickinsm$ jython2.5.1/jython test.py ('x: ', 'success') ('Test.x: ', 'error') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 22:39:48 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 11 Jul 2010 20:39:48 +0000 Subject: [issue7511] msvc9compiler.py: ValueError: [u'path'] In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1278880788.47.0.55682347092.issue7511@psf.upfronthosting.co.za> Stefan Krah added the comment: I've been looking at this again because of new duplicate reports. I think we need to distinguish between amd64 and x86_amd64/x86_ia64. But using arch="x86" as the default parameter would do fine. Re unit test: The test will only work if 64-bit tools from the SDK are present, and I'm not sure how to test for that other than writing an independent find_vcvarsall2 function that checks on the first one. I have to say that I'm using Linux 99.9% of the time, so perhaps a Windows expert could suggest a registry based solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 22:49:42 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 11 Jul 2010 20:49:42 +0000 Subject: [issue7511] msvc9compiler.py: ValueError: [u'path'] In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1278881382.27.0.0509148924505.issue7511@psf.upfronthosting.co.za> Stefan Krah added the comment: New version for the patch with a default value for arch. ---------- Added file: http://bugs.python.org/file17951/vcvars3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 22:49:51 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 11 Jul 2010 20:49:51 +0000 Subject: [issue7511] msvc9compiler.py: ValueError: [u'path'] In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1278881391.48.0.772149979485.issue7511@psf.upfronthosting.co.za> Stefan Krah added the comment: New version of the patch with a default value for arch. ---------- Added file: http://bugs.python.org/file17952/vcvars3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 22:50:01 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 11 Jul 2010 20:50:01 +0000 Subject: [issue7511] msvc9compiler.py: ValueError: [u'path'] In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1278881401.66.0.219454239627.issue7511@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 22:50:27 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 11 Jul 2010 20:50:27 +0000 Subject: [issue7511] msvc9compiler.py: ValueError: [u'path'] In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1278881427.63.0.613802484756.issue7511@psf.upfronthosting.co.za> Changes by Stefan Krah : Removed file: http://bugs.python.org/file17952/vcvars3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 22:53:53 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 11 Jul 2010 20:53:53 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1278881633.27.0.296157118041.issue9226@psf.upfronthosting.co.za> R. David Murray added the comment: I agree with Mark, I'd expect an UnboundLocalError. I remembered this thread on Python-dev that may or may not be relevant, but is certainly analogous: http://www.mail-archive.com/python-dev at python.org/msg37576.html ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 23:05:54 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 11 Jul 2010 21:05:54 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1278882354.51.0.854772853565.issue9226@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Here's a patch. It raises a NameError in that case. ---------- keywords: +patch Added file: http://bugs.python.org/file17953/obscure_corner_cases.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 23:10:29 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sun, 11 Jul 2010 21:10:29 +0000 Subject: [issue8988] import + coding = failure (3.1.2/win32) In-Reply-To: <1276426235.15.0.873898512927.issue8988@psf.upfronthosting.co.za> Message-ID: <1278882629.52.0.20558153331.issue8988@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > Just fine! > It's either another bug in python or 3.1.1 specifics. What do you mean? what is 'it'? The error I in the session above shows the bug we described first (strange letters in the path makes the program unusable), and shows that the file's encoding doesn't change this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 23:15:25 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 Jul 2010 21:15:25 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1278882925.34.0.551430251543.issue9226@psf.upfronthosting.co.za> Mark Dickinson added the comment: I think it would be worth bringing this up on python-dev, especially since it affects alternative Python implementations. It would also be good to have a documentation fix to the reference manual that clearly explains whatever behaviour is decided on; it's not at all clear (to me, anyway), how to extract this information from the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 23:20:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Jul 2010 21:20:05 +0000 Subject: [issue444582] Finding programs in PATH, adding shutil.which Message-ID: <1278883205.99.0.475230054587.issue444582@psf.upfronthosting.co.za> ?ric Araujo added the comment: Jan, have you tried this: $ ./python -m test.test_shutil This uninstalled Python will import the shutil module from the checkout. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 23:20:57 2010 From: report at bugs.python.org (Demur Rumed) Date: Sun, 11 Jul 2010 21:20:57 +0000 Subject: [issue9225] Replace DUP_TOPX with DUP_TOP_TWO In-Reply-To: <1278874181.81.0.745105188712.issue9225@psf.upfronthosting.co.za> Message-ID: <1278883257.6.0.382656617001.issue9225@psf.upfronthosting.co.za> Changes by Demur Rumed : ---------- versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 23:21:39 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Jul 2010 21:21:39 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1278883299.17.0.966719943576.issue9226@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 23:26:19 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sun, 11 Jul 2010 21:26:19 +0000 Subject: [issue1076790] test test_codecs failed Message-ID: <1278883579.65.0.16731174573.issue1076790@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The OP compiled python with --with-wctype-functions, and the libc wctype functions work differently depending on the locale. I suggest closing this issue as "won't fix", and favor the removal of the "--with-wctype-functions" option proposed in issue9210. ---------- nosy: +amaury.forgeotdarc resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 23:31:47 2010 From: report at bugs.python.org (Michael Foord) Date: Sun, 11 Jul 2010 21:31:47 +0000 Subject: [issue9227] can't import Tkinter / use IDLE after installing Python 2.7 on Mac OS X In-Reply-To: <1278883906.89.0.545374403914.issue9227@psf.upfronthosting.co.za> Message-ID: <1278883906.89.0.545374403914.issue9227@psf.upfronthosting.co.za> New submission from Michael Foord : After installing Python 2.7 for Mac OS X from the Python.org binary I can't use Tkinter or IDLE. I installed the following, on Snow Leopard: * Python 2.7 PPC/i386/x86-64 Max OS X Installer Disk Image >>> import Tkinter Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 39, in import _tkinter # If this fails your Python may not be configured for Tk ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so, 2): no suitable image found. Did find: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so: no matching architecture in universal wrapper ---------- assignee: ronaldoussoren components: Macintosh messages: 110051 nosy: michael.foord, ronaldoussoren priority: normal severity: normal status: open title: can't import Tkinter / use IDLE after installing Python 2.7 on Mac OS X versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 23:35:49 2010 From: report at bugs.python.org (Michael Foord) Date: Sun, 11 Jul 2010 21:35:49 +0000 Subject: [issue9227] can't import Tkinter / use IDLE after installing Python 2.7 on Mac OS X In-Reply-To: <1278883906.89.0.545374403914.issue9227@psf.upfronthosting.co.za> Message-ID: <1278884149.44.0.847113251013.issue9227@psf.upfronthosting.co.za> Michael Foord added the comment: As a further oddity, if I run IDLE.app I get an IDLE shell (weird as from the command line Tkinter can't even be imported) - but I also get an error dialog that the subprocess can't be connected to and then IDLE shuts down. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 23:56:09 2010 From: report at bugs.python.org (Michael Foord) Date: Sun, 11 Jul 2010 21:56:09 +0000 Subject: [issue9227] can't import Tkinter / use IDLE after installing Python 2.7 on Mac OS X In-Reply-To: <1278883906.89.0.545374403914.issue9227@psf.upfronthosting.co.za> Message-ID: <1278885369.71.0.879703474328.issue9227@psf.upfronthosting.co.za> Michael Foord added the comment: Mark Dickinson confirms the problem and offers this diagnosis: The python.org binary links to Tcl 8.4 (which doesn't seem to have a 64-bit version). Perhaps this means having to have a separate installer for OS X 10.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 11 23:59:17 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 11 Jul 2010 21:59:17 +0000 Subject: [issue9227] can't import Tkinter / use IDLE after installing Python 2.7 on Mac OS X In-Reply-To: <1278883906.89.0.545374403914.issue9227@psf.upfronthosting.co.za> Message-ID: <1278885557.4.0.738056160618.issue9227@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 00:00:41 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 11 Jul 2010 22:00:41 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1278885641.75.0.607351550358.issue9226@psf.upfronthosting.co.za> Changes by Benjamin Peterson : Added file: http://bugs.python.org/file17954/obscure_corner_cases2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 00:42:30 2010 From: report at bugs.python.org (ipatrol) Date: Sun, 11 Jul 2010 22:42:30 +0000 Subject: [issue7511] msvc9compiler.py: ValueError: [u'path'] In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1278888150.88.0.372868053335.issue7511@psf.upfronthosting.co.za> ipatrol added the comment: May I request we resolve this by folding this patch into the main source tree for the next bugfix release? ---------- components: +Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 00:47:00 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 11 Jul 2010 22:47:00 +0000 Subject: [issue7511] msvc9compiler.py: ValueError: [u'path'] In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1278888420.46.0.602154397958.issue7511@psf.upfronthosting.co.za> Martin v. L?wis added the comment: ipatrol: have you actually tested the patch? If so, which specific version, and on what specific Python version? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 01:51:27 2010 From: report at bugs.python.org (ipatrol) Date: Sun, 11 Jul 2010 23:51:27 +0000 Subject: [issue9228] Make changes in the path and pathext on installation In-Reply-To: <1278892287.6.0.671523214632.issue9228@psf.upfronthosting.co.za> Message-ID: <1278892287.6.0.671523214632.issue9228@psf.upfronthosting.co.za> New submission from ipatrol : I was fiddling around with easier ways to run python scripts in the Windows shell. I'll represent these as hypothetical AUTOEXEC.BAT entries (I used the UI for this): ;Add python to the search path so "python script.py" works set path="%path%;C:\Python27" ;Add .py to the executable list so "script.py" works set pathext="%pathext%;.PY" ;And finally (I couldn't find any other way) "script" works set .py=python.exe I think it would be a good idea to do this on installation. Any improvements and actual implementations using the registry would be greatly appreciated (especially since autoexec.bat isn't used anymore). ---------- components: Installation, Windows messages: 110056 nosy: ipatrol priority: normal severity: normal status: open title: Make changes in the path and pathext on installation type: feature request versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 01:58:20 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 11 Jul 2010 23:58:20 +0000 Subject: [issue9222] IDLE: Fix open/saveas 'Files of type' choices In-Reply-To: <1278809052.13.0.969100167059.issue9222@psf.upfronthosting.co.za> Message-ID: <1278892700.19.0.536321191531.issue9222@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The upload still needed is a .diff patch file. This is most easily done with a VCS, in particular svn or possibly hg. I have asked someone with the proper setup to make one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 02:04:47 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Jul 2010 00:04:47 +0000 Subject: [issue2190] MozillaCookieJar ignore HttpOnly cookies In-Reply-To: <1203957546.34.0.123660895963.issue2190@psf.upfronthosting.co.za> Message-ID: <1278893087.92.0.321923081951.issue2190@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Would you suggest removing MozillaCookieJar from the module? (Through the normal warn-deprecate-remove process.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 02:09:00 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Jul 2010 00:09:00 +0000 Subject: [issue4968] Clarify inspect.is method docs In-Reply-To: <1232162769.03.0.624026715862.issue4968@psf.upfronthosting.co.za> Message-ID: <1278893340.97.0.834117081323.issue4968@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 02:17:03 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Jul 2010 00:17:03 +0000 Subject: [issue5950] Make zipimport work with zipfile containing comments In-Reply-To: <1241628586.95.0.0801479384158.issue5950@psf.upfronthosting.co.za> Message-ID: <1278893823.09.0.908442487182.issue5950@psf.upfronthosting.co.za> Terry J. Reedy added the comment: "the line from the docs about comments not being supported." answers your question. Current behavior is documented behavior and therefor changing it is not a bugfix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 02:36:15 2010 From: report at bugs.python.org (ipatrol) Date: Mon, 12 Jul 2010 00:36:15 +0000 Subject: [issue7511] msvc9compiler.py: ValueError: [u'path'] In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1278894975.74.0.0589462813967.issue7511@psf.upfronthosting.co.za> ipatrol added the comment: Actually, I forgot the 64 bit directions X-? It will take some time for everything to download. But I did apply the patch and it did give me the "64 bit SDK not installed" error. Also, I think the tow ValueErrors should be changed to DistutilsPlatformError and DistutilsExecError respectively. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 03:04:57 2010 From: report at bugs.python.org (Craig McQueen) Date: Mon, 12 Jul 2010 01:04:57 +0000 Subject: [issue7696] Improve Memoryview/Buffer documentation In-Reply-To: <1263418431.81.0.407262013758.issue7696@psf.upfronthosting.co.za> Message-ID: <1278896697.1.0.128306929239.issue7696@psf.upfronthosting.co.za> Craig McQueen added the comment: The documentation implies that memoryview always accesses bytes: * "len(view) returns the total number of bytes in the memoryview, view." * "Taking a single index will return a single byte." But, the following example shows this is misleading: >>> from array import array >>> ar = array('H', [1,2,3]) >>> arv = memoryview(ar) >>> len(arv) 3 >>> arv[1] b'\x02\x00' ---------- nosy: +cmcqueen1975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 03:08:09 2010 From: report at bugs.python.org (Craig McQueen) Date: Mon, 12 Jul 2010 01:08:09 +0000 Subject: [issue7696] Improve Memoryview/Buffer documentation In-Reply-To: <1263418431.81.0.407262013758.issue7696@psf.upfronthosting.co.za> Message-ID: <1278896889.44.0.450264456058.issue7696@psf.upfronthosting.co.za> Craig McQueen added the comment: My previous comment was referring to Python 3.x, by the way. Python 2.7 has not implemented the buffer protocol for `array`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 03:11:30 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Mon, 12 Jul 2010 01:11:30 +0000 Subject: [issue9124] Mailbox module demonstrates infeasibly slow performance In-Reply-To: <1277900903.38.0.556015912714.issue9124@psf.upfronthosting.co.za> Message-ID: <1278897090.07.0.239721654992.issue9124@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 03:53:29 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 12 Jul 2010 01:53:29 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1278899609.97.0.879410306698.issue9226@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 04:46:18 2010 From: report at bugs.python.org (Matt Gattis) Date: Mon, 12 Jul 2010 02:46:18 +0000 Subject: [issue9229] memoryview of mmap object not working in 2.7 In-Reply-To: <1278902778.58.0.779431592784.issue9229@psf.upfronthosting.co.za> Message-ID: <1278902778.58.0.779431592784.issue9229@psf.upfronthosting.co.za> New submission from Matt Gattis : This code works in 3.1.2 but not in 2.7: >>> import mmap >>> m = mmap.mmap(-1,20) >>> v = memoryview(m) Traceback (most recent call last): File "", line 1, in TypeError: cannot make memory view because object does not have the buffer interface ---------- components: Extension Modules, IO messages: 110063 nosy: Matt.Gattis priority: normal severity: normal status: open title: memoryview of mmap object not working in 2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 04:52:43 2010 From: report at bugs.python.org (Tony Meyer) Date: Mon, 12 Jul 2010 02:52:43 +0000 Subject: [issue845560] imaplib: traceback from _checkquote with empty string Message-ID: <1278903163.84.0.321103514197.issue845560@psf.upfronthosting.co.za> Tony Meyer added the comment: Why does the patch being very small make it more trouble? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 05:56:30 2010 From: report at bugs.python.org (Ivan Pozdeev) Date: Mon, 12 Jul 2010 03:56:30 +0000 Subject: [issue9230] pdb.Pdb.checkline() throws AttributeError if called before starting a debug session In-Reply-To: <1278906990.65.0.476539166106.issue9230@psf.upfronthosting.co.za> Message-ID: <1278906990.65.0.476539166106.issue9230@psf.upfronthosting.co.za> New submission from Ivan Pozdeev : pdb.Pdb.checkline() throws AttributeError at pdb.py:470 if invoked before starting a debugging session because self.curframe doesn't exist at that time. This breaks IPython's %run magic command (v0.10, Magic.py:1663). The command sets a breakpoint before running the script and scans the file before that to make sure the breakpoint is set on an executable line. This is a reasonable thing to do: setting a breakpoint and making sure it is set correctly shouldn't require a running debug session. So i conclude it is pdb, not IPython, that shall be fixed. The patch attached gives linecache.getline() None as module_globals if self.curframe doesn't exist. The rationale is: even if the script does use PEP302 import stuff, we can't know or use that before running it. So it's ok if we stay limited with usual paths. ---------- components: Library (Lib) files: pdb_checkline.patch keywords: patch messages: 110065 nosy: __Vano priority: normal severity: normal status: open title: pdb.Pdb.checkline() throws AttributeError if called before starting a debug session type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file17955/pdb_checkline.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 06:53:43 2010 From: report at bugs.python.org (Jan Killian) Date: Mon, 12 Jul 2010 04:53:43 +0000 Subject: [issue444582] Finding programs in PATH, adding shutil.which Message-ID: <1278910423.47.0.238597353904.issue444582@psf.upfronthosting.co.za> Changes by Jan Killian : Removed file: http://bugs.python.org/file17948/which.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 07:10:52 2010 From: report at bugs.python.org (samwyse) Date: Mon, 12 Jul 2010 05:10:52 +0000 Subject: [issue3058] Let SimpleXMLRPCServer pass client_address to called functions. In-Reply-To: <1278650005.0.0.572294705877.issue3058@psf.upfronthosting.co.za> Message-ID: samwyse added the comment: More importantly, the dispatch method is now part of the SimpleXMLRPCDispatcher, which (as a mix-in class) has no direct access to the RequestHandler instance that comprises the request. This breaks Victor's and my idea, unless one is willing to subclass SimpleXMLRPCRequestHandler to provide a_dispatch method. The ability to do this, however, is only provided for backward compatibility and I doubt it could be part of a general solution. On Thu, Jul 8, 2010 at 11:33 PM, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > In 3.x, class SimpleXMLRPCServer lives in module xmlrpc.server > > ---------- > nosy: +tjreedy > versions: +Python 3.2 -Python 2.5 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file17956/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- More importantly, the dispatch method is now part of the??SimpleXMLRPCDispatcher, which (as a mix-in class) has no direct access to the??RequestHandler instance that comprises??the request. ??This breaks Victor's and my idea, unless one is willing to subclass SimpleXMLRPCRequestHandler to provide a_dispatch method. ??The ability to do this, however, is only provided for backward compatibility and I doubt it could be part of a general solution.

On Thu, Jul 8, 2010 at 11:33 PM, Terry J. Reedy <report at bugs.python.org> wrote:

Terry J. Reedy <tjreedy at udel.edu> added the comment:

In 3.x, class ??SimpleXMLRPCServer lives in module xmlrpc.server

----------
nosy: +tjreedy
versions: +Python 3.2 -Python 2.5

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

From report at bugs.python.org Mon Jul 12 07:17:20 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Jul 2010 05:17:20 +0000 Subject: [issue3058] Let SimpleXMLRPCServer pass client_address to called functions. In-Reply-To: <1212855971.92.0.424447915547.issue3058@psf.upfronthosting.co.za> Message-ID: <1278911840.48.0.309901762121.issue3058@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am taking your comment as a suggestion to close this. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 07:24:39 2010 From: report at bugs.python.org (Jan Killian) Date: Mon, 12 Jul 2010 05:24:39 +0000 Subject: [issue444582] Finding programs in PATH, adding shutil.which Message-ID: <1278912279.51.0.0586564014871.issue444582@psf.upfronthosting.co.za> Jan Killian added the comment: * updated docs in the patch @ ?ric: Thanks, that works nicely :) @ Michael: You don't need cygwin to use which and many gnu tools on windows. See http://gnuwin32.sourceforge.net/packages.html. After installation you can take the ,exe and .dll files in GnuWin32/bin and use them on any pc/network - just put them to the path. @ Tarek: In the docs I used ".. versionadded:: 2.7.1", but this guess needs a verification :) ---------- Added file: http://bugs.python.org/file17957/shutil_which_82778.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 07:24:49 2010 From: report at bugs.python.org (Jan Killian) Date: Mon, 12 Jul 2010 05:24:49 +0000 Subject: [issue444582] Finding programs in PATH, adding shutil.which Message-ID: <1278912289.31.0.741537382366.issue444582@psf.upfronthosting.co.za> Changes by Jan Killian : Removed file: http://bugs.python.org/file17947/shutil_which_82778.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 07:25:46 2010 From: report at bugs.python.org (Jan Killian) Date: Mon, 12 Jul 2010 05:25:46 +0000 Subject: [issue444582] Finding programs in PATH, adding shutil.which Message-ID: <1278912346.68.0.248830724052.issue444582@psf.upfronthosting.co.za> Changes by Jan Killian : Added file: http://bugs.python.org/file17958/which.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 07:45:19 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 12 Jul 2010 05:45:19 +0000 Subject: [issue9227] can't import Tkinter / use IDLE after installing Python 2.7 on Mac OS X In-Reply-To: <1278883906.89.0.545374403914.issue9227@psf.upfronthosting.co.za> Message-ID: <1278913519.8.0.0847074846693.issue9227@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Mark nails the issue: there is no 64-bit version of Tk on OSX 10.5. I'm -1 on creating a 10.6 specific installer, two installers is confusing enough. IDLE.app somewhat works because the Makefile makes sure it gets started using a 32-bit version of the interpreter (which is a quick workaround: 'arch -i386 python2.7' starts python in 32-bit mode an Tkinter is available there) I can't find the specific issue right now, but did file a feature request a while back for a patch that allows us to ship copies of _tkinter linked to Tk 8.4 and Tk 8.5 while having a wrapper that loads the right one. I am however slowly moving towards liking to ship a newer version of Tk with Python. That would have to be a minimal copy of the Tcl/Tk frameworks, and would definitely require feedback from people that actually use Tkinter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 08:03:29 2010 From: report at bugs.python.org (Jyrki Wahlstedt) Date: Mon, 12 Jul 2010 06:03:29 +0000 Subject: [issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X In-Reply-To: <1278323219.73.0.148043211343.issue9164@psf.upfronthosting.co.za> Message-ID: <1278914609.87.0.772538868727.issue9164@psf.upfronthosting.co.za> Jyrki Wahlstedt added the comment: Ok, here's a bit of the missing information: - as per the first message, I'm not using command line to build, I use MacPorts (having been able to build 2.5, 2.6, and 3.1 with no problems) - I checked some of internal workings (by asking), and MacPorts gives the architecture arguments in several of the make process flags, compilation and link, so the multiple flags come from that - after port configure, there are duplicate architecture flags in Makefile, which seems to just the way the change has been checked So, thanks for putting this in (appear with the next release?) ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 08:34:27 2010 From: report at bugs.python.org (Adam Olsen) Date: Mon, 12 Jul 2010 06:34:27 +0000 Subject: [issue6643] Throw away more radioactive locks that could be held across a fork in threading.py In-Reply-To: <1249412209.9.0.200329347238.issue6643@psf.upfronthosting.co.za> Message-ID: <1278916467.92.0.152784161551.issue6643@psf.upfronthosting.co.za> Adam Olsen added the comment: I don't have any direct opinions on this, as it is just a bandaid. fork, as defined by POSIX, doesn't allow what we do with it, so we're reliant on great deal of OS and library implementation details. The only portable and robust solution would be to replace it with a unified fork-and-exec API that's implemented directly in C. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 08:53:17 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 12 Jul 2010 06:53:17 +0000 Subject: [issue9218] pop multiple elements of a list at once In-Reply-To: <1278790209.67.0.359453381678.issue9218@psf.upfronthosting.co.za> Message-ID: <1278917597.77.0.273794683184.issue9218@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -1 on multi-popping. The semantics aren't obvious -- is the order the same as s[-n:] or the same as a [s.pop() for i in range(n)] ? Also, this is an unnecessary extension of the list API, one that has not been previously requested, nor is the extension something that other languages find it necessary to implement. Besides, it already suffices to write: result = s[-n:]; del s[-n:] I recommend that this be rejected in favor of keeping the API relatively small and clean. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 09:25:41 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 12 Jul 2010 07:25:41 +0000 Subject: [issue444582] Finding programs in PATH, adding shutil.which Message-ID: <1278919541.09.0.263361719834.issue444582@psf.upfronthosting.co.za> ?ric Araujo added the comment: Jan, new features don?t go in stable releases. Your patch targets 3.2 (see the versions field at the top of the page). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 10:27:01 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 12 Jul 2010 08:27:01 +0000 Subject: [issue7511] msvc9compiler.py: ValueError: [u'path'] In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1278923221.75.0.235351252909.issue7511@psf.upfronthosting.co.za> Stefan Krah added the comment: ipatrol, thanks, I forgot to change ValueError. New patch attached. ---------- Added file: http://bugs.python.org/file17959/vcvars4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 10:45:57 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 12 Jul 2010 08:45:57 +0000 Subject: [issue8954] wininst regression: errors when building on linux In-Reply-To: <1276093244.44.0.895217979727.issue8954@psf.upfronthosting.co.za> Message-ID: <1278924357.39.0.670376697334.issue8954@psf.upfronthosting.co.za> anatoly techtonik added the comment: http://codereview.appspot.com/1774043 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 10:46:31 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 12 Jul 2010 08:46:31 +0000 Subject: [issue8954] wininst regression: errors when building on linux In-Reply-To: <1276093244.44.0.895217979727.issue8954@psf.upfronthosting.co.za> Message-ID: <1278924391.97.0.9489343343.issue8954@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- keywords: +patch Added file: http://bugs.python.org/file17960/suffix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 10:52:08 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 12 Jul 2010 08:52:08 +0000 Subject: [issue8954] wininst regression: errors when building on linux In-Reply-To: <1276093244.44.0.895217979727.issue8954@psf.upfronthosting.co.za> Message-ID: <1278924728.7.0.177444469374.issue8954@psf.upfronthosting.co.za> Georg Brandl added the comment: Did you test that patch? ISTM that it contains a syntax error: + if not self.distribution.has_ext_modules() + and not self.distribution.has_c_libraries(): ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 12:27:02 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Jul 2010 10:27:02 +0000 Subject: [issue9231] IDLE interactive interpreter crash In-Reply-To: <1278930422.83.0.430271709302.issue9231@psf.upfronthosting.co.za> Message-ID: <1278930422.83.0.430271709302.issue9231@psf.upfronthosting.co.za> New submission from Antoine Pitrou : After a few keystrokes in the interactive interpreter, I got the following traceback: Traceback (most recent call last): File "Lib/idlelib/idle.py", line 11, in idlelib.PyShell.main() File "/home/antoine/py3k/__svn__/Lib/idlelib/PyShell.py", line 1420, in main root.mainloop() File "/home/antoine/py3k/__svn__/Lib/tkinter/__init__.py", line 1009, in mainloop self.tk.mainloop(n) UnicodeDecodeError: 'utf8' codec can't decode byte 0xc0 in position 0: invalid start byte The keystrokes were ['d', 'i', Ctrl+Space], which briefly displayed the completion popup before crashing. ---------- components: IDLE messages: 110077 nosy: pitrou priority: high severity: normal stage: needs patch status: open title: IDLE interactive interpreter crash type: crash versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 12:27:51 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Jul 2010 10:27:51 +0000 Subject: [issue9231] IDLE interactive interpreter crash In-Reply-To: <1278930422.83.0.430271709302.issue9231@psf.upfronthosting.co.za> Message-ID: <1278930471.09.0.370936912453.issue9231@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +kbk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 12:39:59 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 12 Jul 2010 10:39:59 +0000 Subject: [issue9227] can't import Tkinter / use IDLE after installing Python 2.7 on Mac OS X In-Reply-To: <1278883906.89.0.545374403914.issue9227@psf.upfronthosting.co.za> Message-ID: <1278931199.86.0.835429690614.issue9227@psf.upfronthosting.co.za> Michael Foord added the comment: I don't particularly mind what the fix is - but at the moment users can download and install Python from a python.org installer and then have an (apparently) non functioning IDLE and Tkinter. At the very least we should advise users to install the 32bit only binary (which presumably works - I should try it) unless they *need* the 64 bit Python. (And also let them know that installing the 64 bit version means that Tkinter / IDLE doesn't work on Snow Leopard.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 13:00:47 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 12 Jul 2010 11:00:47 +0000 Subject: [issue9231] IDLE interactive interpreter crash In-Reply-To: <1278930422.83.0.430271709302.issue9231@psf.upfronthosting.co.za> Message-ID: <1278932447.9.0.947803574411.issue9231@psf.upfronthosting.co.za> Ezio Melotti added the comment: Closing as duplicate of #1028 (and #6144, #6512, #7884, #6920, #6424, #5156). ---------- nosy: +ezio.melotti resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 13:05:04 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 12 Jul 2010 11:05:04 +0000 Subject: [issue1028] Tkinter binding involving Control-spacebar raises unicode error In-Reply-To: <1188161311.7.0.864205774814.issue1028@psf.upfronthosting.co.za> Message-ID: <1278932704.53.0.368022086224.issue1028@psf.upfronthosting.co.za> Ezio Melotti added the comment: This has been reported in #9231 (and #6144, #6512, #7884, #6920, #6424, #5156) too. ---------- components: +IDLE keywords: +needs review stage: -> patch review versions: +Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 13:25:29 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Jul 2010 11:25:29 +0000 Subject: [issue7696] Improve Memoryview/Buffer documentation In-Reply-To: <1263418431.81.0.407262013758.issue7696@psf.upfronthosting.co.za> Message-ID: <1278933929.37.0.851230505507.issue7696@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: teoliphant -> pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 13:27:32 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Jul 2010 11:27:32 +0000 Subject: [issue9229] memoryview of mmap object not working in 2.7 In-Reply-To: <1278902778.58.0.779431592784.issue9229@psf.upfronthosting.co.za> Message-ID: <1278934052.68.0.609832605999.issue9229@psf.upfronthosting.co.za> Antoine Pitrou added the comment: True, not all modules in 2.7 have converted to support the new buffer interface (which memoryview() requires, as opposed to the "old" buffer interface used by buffer()). Unfortunately, it's probably too late to care about this now that the 2.7 branch is in bugfix mode. ---------- nosy: +pitrou resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 13:33:17 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Jul 2010 11:33:17 +0000 Subject: [issue9225] Replace DUP_TOPX with DUP_TOP_TWO In-Reply-To: <1278874181.81.0.745105188712.issue9225@psf.upfronthosting.co.za> Message-ID: <1278934397.98.0.415174037339.issue9225@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Oddly, at least with pybench, use of PREDICT(BINARY_SUBSCR) in > DUP_TOP_TWO seems to show an always right PREDICT as slower than > FAST_DISPATCH The main point of computed gotos is to allow the CPU's branch predictor to predict opcode pairs by itself. So, yes, adding a manual PREDICT() might actually slow down the code (probably depending on the CPU model). By the way, when you modify the bytecode, you have to change the magic number in Python/import.c. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 13:37:58 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 12 Jul 2010 11:37:58 +0000 Subject: [issue8954] wininst regression: errors when building on linux In-Reply-To: <1276093244.44.0.895217979727.issue8954@psf.upfronthosting.co.za> Message-ID: <1278934678.59.0.595377558286.issue8954@psf.upfronthosting.co.za> anatoly techtonik added the comment: reuploaded correct version to rietveld. ---------- Added file: http://bugs.python.org/file17961/suffix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 13:38:11 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 12 Jul 2010 11:38:11 +0000 Subject: [issue8954] wininst regression: errors when building on linux In-Reply-To: <1276093244.44.0.895217979727.issue8954@psf.upfronthosting.co.za> Message-ID: <1278934691.18.0.579035067492.issue8954@psf.upfronthosting.co.za> Changes by anatoly techtonik : Removed file: http://bugs.python.org/file17960/suffix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 13:47:14 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Jul 2010 11:47:14 +0000 Subject: [issue444582] Finding programs in PATH, adding shutil.which Message-ID: <1278935234.53.0.867571365335.issue444582@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Some comments on the patch: - shouldn't getdir_id use os.path.normcase() rather than manually switch on `windows`? - the patch adds lots of names at the top-level which aren't part of the public API ("windows", "getdir_id", "defpath", "defpath_ext"). They should probably start with an underscore. - if PATH is updated after shutil is first imported, the changes won't get picked up. Is it desired? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 15:00:32 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 12 Jul 2010 13:00:32 +0000 Subject: [issue9230] pdb.Pdb.checkline() throws AttributeError if called before starting a debug session In-Reply-To: <1278906990.65.0.476539166106.issue9230@psf.upfronthosting.co.za> Message-ID: <1278939632.78.0.28525850253.issue9230@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 15:38:27 2010 From: report at bugs.python.org (Jan Killian) Date: Mon, 12 Jul 2010 13:38:27 +0000 Subject: [issue444582] Finding programs in PATH, adding shutil.which Message-ID: <1278941907.32.0.552460755483.issue444582@psf.upfronthosting.co.za> Jan Killian added the comment: @ ?ric and Antoine: Thanks for the useful hints! * PATH and PATHEXT are now evaluated when needed, not only on module init. The rationale is, that the lib user may change them, eg. to include a directory with additional commands. * the only helper module-level variables left are _windows and _getwinpathext() * updated doctest * updated versionadded in docs to 3.2 ---------- Added file: http://bugs.python.org/file17962/shutil_which_82778.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 15:39:14 2010 From: report at bugs.python.org (Jan Killian) Date: Mon, 12 Jul 2010 13:39:14 +0000 Subject: [issue444582] Finding programs in PATH, adding shutil.which Message-ID: <1278941954.83.0.92423073119.issue444582@psf.upfronthosting.co.za> Changes by Jan Killian : Added file: http://bugs.python.org/file17963/which.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 15:55:19 2010 From: report at bugs.python.org (Mihai Ibanescu) Date: Mon, 12 Jul 2010 13:55:19 +0000 Subject: [issue6478] time.tzset does not reset _strptime's locale time cache In-Reply-To: <1247506425.36.0.284798334504.issue6478@psf.upfronthosting.co.za> Message-ID: <1278942919.57.0.488518209407.issue6478@psf.upfronthosting.co.za> Mihai Ibanescu added the comment: Proposed patch attached. ---------- keywords: +patch Added file: http://bugs.python.org/file17964/_strptime.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 15:57:16 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Jul 2010 13:57:16 +0000 Subject: [issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others. In-Reply-To: <1268131645.26.0.730387379265.issue8098@psf.upfronthosting.co.za> Message-ID: <1278943036.64.0.393968660848.issue8098@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +belopolsky, brett.cannon versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 15:58:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 12 Jul 2010 13:58:20 +0000 Subject: [issue6478] time.tzset does not reset _strptime's locale time cache In-Reply-To: <1247506425.36.0.284798334504.issue6478@psf.upfronthosting.co.za> Message-ID: <1278943100.55.0.419166551908.issue6478@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 16:01:40 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 12 Jul 2010 14:01:40 +0000 Subject: [issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others. In-Reply-To: <1268131645.26.0.730387379265.issue8098@psf.upfronthosting.co.za> Message-ID: <1278943300.55.0.464248383158.issue8098@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 16:10:52 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 12 Jul 2010 14:10:52 +0000 Subject: [issue8114] python 2.6.4 installation is not working for the single user mode in vista. In-Reply-To: <1268427406.37.0.715646943783.issue8114@psf.upfronthosting.co.za> Message-ID: <1278943852.84.0.431223308639.issue8114@psf.upfronthosting.co.za> Mark Lawrence added the comment: Python cannot be installed on Vista in single user mode, this is a limitation of Vista. ---------- nosy: +BreamoreBoy resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 16:15:54 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Jul 2010 14:15:54 +0000 Subject: [issue2009] Grammar change to prevent shift/reduce problem with varargslist In-Reply-To: <1202170790.58.0.28997794645.issue2009@psf.upfronthosting.co.za> Message-ID: <1278944154.49.0.649089134005.issue2009@psf.upfronthosting.co.za> Mark Dickinson added the comment: Applied in r82837. I'll open a separate issue for the trailing commas. ---------- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 16:19:06 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 12 Jul 2010 14:19:06 +0000 Subject: [issue8138] wsgiref.simple_server.SimpleServer claims to be multithreaded In-Reply-To: <1268590136.32.0.519225445448.issue8138@psf.upfronthosting.co.za> Message-ID: <1278944346.06.0.500246709593.issue8138@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +pje _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 16:30:17 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Jul 2010 14:30:17 +0000 Subject: [issue9232] Allow trailing comma in any function argument list. In-Reply-To: <1278945017.29.0.842296068848.issue9232@psf.upfronthosting.co.za> Message-ID: <1278945017.29.0.842296068848.issue9232@psf.upfronthosting.co.za> New submission from Mark Dickinson : Python's current grammar allows a trailing comma after the argument list in: def f(a, b,): pass but not in def f(*, a, b,): pass I propose allowing trailing commas in both situations. See python-dev discussion starting at http://mail.python.org/pipermail/python-dev/2010-July/101636.html ---------- components: Interpreter Core messages: 110089 nosy: mark.dickinson priority: normal severity: normal stage: needs patch status: open title: Allow trailing comma in any function argument list. type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 16:35:16 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 12 Jul 2010 14:35:16 +0000 Subject: [issue1610654] cgi.py multipart/form-data Message-ID: <1278945316.75.0.904853013201.issue1610654@psf.upfronthosting.co.za> Mark Lawrence added the comment: Chui Tey does this issue still apply? If yes, could you please provide a patch according to the guidelines here. python.org/dev/patches ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 16:48:12 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 12 Jul 2010 14:48:12 +0000 Subject: [issue1616125] Cached globals+builtins lookup optimization Message-ID: <1278946092.44.0.350452880777.issue1616125@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 17:05:48 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 12 Jul 2010 15:05:48 +0000 Subject: [issue6478] time.tzset does not reset _strptime's locale time cache In-Reply-To: <1247506425.36.0.284798334504.issue6478@psf.upfronthosting.co.za> Message-ID: <1278947148.6.0.111751248396.issue6478@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Thank you for the bug report and a patch. This does look like a bug and proposed patch seems to be the simplest way to fix it. It is unfortunate that the entire TimeRE cache needs to be recalculated when only 'Z' entry is invalidated by TZ change. Please consider separating lang and TZ change checks and not reinitialize TimeRE cache object if only TZ changes, just replace the 'Z' entry. The patch also needs unit tests. It should be straightforward to convert ttime.py into a test case. Please add a test case for both test_time and test_datetime. Note that in 3.2 datetime.strptime() will process '%Z' when '%z' is also present. For example, >>> datetime.strptime('Fri Jul 25 13:26:29 EDT -0500 2008', '%a %b %d %H:%M:%S %Z %z %Y') datetime.datetime(2008, 7, 25, 13, 26, 29, tzinfo=datetime.timezone(datetime.timedelta(-1, 68400), 'EDT')) Please make sure to restore environment variables in test cleanup. Also a nit on the implementation: cls is unused in _get_timezone(cls), so it would be more appropriate to make it staticmethod instead of classmethod. And tzset should probably be called inside _get_timezone. ---------- stage: needs patch -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 17:11:30 2010 From: report at bugs.python.org (Reid Kleckner) Date: Mon, 12 Jul 2010 15:11:30 +0000 Subject: [issue6643] Throw away more radioactive locks that could be held across a fork in threading.py In-Reply-To: <1249412209.9.0.200329347238.issue6643@psf.upfronthosting.co.za> Message-ID: <1278947490.73.0.734020910562.issue6643@psf.upfronthosting.co.za> Reid Kleckner added the comment: I completely agree, but the cat is out of the bag on this one. I don't see how we could get rid of fork until Py4K, and even then I'm sure there will be people who don't want to see it go, and I'd rather not spend my time arguing this point. The only application of fork that doesn't use exec that I've heard of is pre-forked Python servers. But those don't seem like they would be very useful, since with refcounting the copy-on-write behavior doesn't get you very many wins. The problem that this bandaid solves for me is that test_threading.py already tests thread+fork behaviors, and can fail non-deterministically. This problem was exacerbated while I was working on making the compilation thread. I don't think we can un-support fork and threads in the near future either, because subprocess.py uses fork, and libraries can use fork behind the user's back. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 17:19:28 2010 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 12 Jul 2010 15:19:28 +0000 Subject: [issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others. In-Reply-To: <1268131645.26.0.730387379265.issue8098@psf.upfronthosting.co.za> Message-ID: <1278947968.72.0.70811280143.issue8098@psf.upfronthosting.co.za> Nick Coghlan added the comment: Interesting. Your example code doesn't run afoul of any of the "don't do this" flags relating to import that I put into the threading docs, so it seems like a fair complaint to me. As Christian pointed out on c.l.p, the idea with this API is to turn deadlocks triggered due to violations of the first rule noted in http://docs.python.org/library/threading.html#importing-in-threaded-code into exceptions instead. This is *much* friendlier than the old behaviour. However, as your example shows, there are cases involving the main module where the new approach will throw an exception but a deadlock would not have occurred if it had just waited for the import lock to be released. Note the difference in behaviour if the invocation style is changed to hold the import lock when the module is executed: $ ./python -c "import noblock" acquire strptime exit Unhandled exception in thread started by Error in sys.excepthook: Original exception was: (The bizarre exception noise at the end is due to the violation of rule 2 at the page linked above - since the example code used thread rather than threading, we tried to release an import lock that didn't exist any more. If the code had used threading instead it would have worked fine and printed "released" as expected) My instinct says that allowing *_NoBlock() to block(!) when invoked from the main Python thread will "do the right thing", but I'm going to want to ponder that for a while. Inadvertently recreating the deadlocks that this whole mechanism is designed to eliminate would be dumb. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 17:20:06 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Jul 2010 15:20:06 +0000 Subject: [issue6290] cPickle can misread data type In-Reply-To: <1245107994.41.0.726587002709.issue6290@psf.upfronthosting.co.za> Message-ID: <1278948006.45.0.0288983928896.issue6290@psf.upfronthosting.co.za> Mark Dickinson added the comment: I think this can be closed. It should no longer be a problem in Python 2.7 or Python 3.x, and there's a workaround (use protocol 1 or 2) for Python 2.6. In theory, it *could* still be fixed for Python 2.6.6, but changing the pickle output in a bugfix release seems like it might be dangerous. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 17:26:46 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 12 Jul 2010 15:26:46 +0000 Subject: [issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others. In-Reply-To: <1268131645.26.0.730387379265.issue8098@psf.upfronthosting.co.za> Message-ID: <1278948406.25.0.736256209915.issue8098@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Composed before reading Nick's comment: """ This issue is broader in scope than just the time module example that is given, so I am not taking this over. With respect to datetime and time modules, there are several related issues I am working on which aim to reduce or eliminate the use of PyImport_ImportModuleNoBlock(): issue 9012 aims to eliminate the need to import time module from datetime; issue 7989 while not directly related, may lead to python dependencies being imported from python rather than C code. """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 17:28:39 2010 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 12 Jul 2010 15:28:39 +0000 Subject: [issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others. In-Reply-To: <1268131645.26.0.730387379265.issue8098@psf.upfronthosting.co.za> Message-ID: <1278948519.76.0.693583242158.issue8098@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'm curious - do the mod_wsgi problems go away if you arrange for the main module to run with the import lock held? Or do they turn into deadlocks? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 17:35:29 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Jul 2010 15:35:29 +0000 Subject: [issue6290] cPickle can misread data type In-Reply-To: <1245107994.41.0.726587002709.issue6290@psf.upfronthosting.co.za> Message-ID: <1278948929.79.0.604808388519.issue6290@psf.upfronthosting.co.za> Mark Dickinson added the comment: However, here's a patch. I haven't tested it on Windows. ---------- keywords: +patch Added file: http://bugs.python.org/file17965/issue6290.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 17:40:37 2010 From: report at bugs.python.org (Jack Diederich) Date: Mon, 12 Jul 2010 15:40:37 +0000 Subject: [issue7761] telnetlib Telnet.interact fails on Windows but not Linux In-Reply-To: <1264212900.62.0.226780855818.issue7761@psf.upfronthosting.co.za> Message-ID: <1278949237.14.0.835492449781.issue7761@psf.upfronthosting.co.za> Jack Diederich added the comment: Can you check this on 3.1.2 or 3.2? There were a few bugfixes of the bytes handling in that timeframe. ---------- assignee: -> jackdied nosy: +jackdied priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 17:47:45 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Mon, 12 Jul 2010 15:47:45 +0000 Subject: [issue9233] json.load failure when C optimizations aren't built In-Reply-To: <1278949665.57.0.214129757073.issue9233@psf.upfronthosting.co.za> Message-ID: <1278949665.57.0.214129757073.issue9233@psf.upfronthosting.co.za> New submission from Fred L. Drake, Jr. : The json decoder doesn't pass tests when the C optimizations in the _json module aren't available. The actual test failures appear fairly superficial, but aren't the limit of the problems. Empty objects are converted to empty lists instead of empty dictionaries when _json isn't available; test attached. Issue 5723 notes that the pure-Python implementation isn't tested; fixing that might have avoided these problems. Test failures from Python 2.6.5: ====================================================================== ERROR: test_c_encode_basestring_ascii (json.tests.test_encode_basestring_ascii.TestEncodeBaseStringAscii) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/fdrake/src/Python-2.6.5/Lib/json/tests/test_encode_basestring_ascii.py", line 29, in test_c_encode_basestring_ascii self._test_encode_basestring_ascii(json.encoder.c_encode_basestring_ascii) File "/home/fdrake/src/Python-2.6.5/Lib/json/tests/test_encode_basestring_ascii.py", line 32, in _test_encode_basestring_ascii fname = encode_basestring_ascii.__name__ AttributeError: 'NoneType' object has no attribute '__name__' ====================================================================== ERROR: test_c_scanstring (json.tests.test_scanstring.TestScanString) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/fdrake/src/Python-2.6.5/Lib/json/tests/test_scanstring.py", line 13, in test_c_scanstring self._test_scanstring(json.decoder.c_scanstring) File "/home/fdrake/src/Python-2.6.5/Lib/json/tests/test_scanstring.py", line 17, in _test_scanstring scanstring('"z\\ud834\\udd20x"', 1, None, True), TypeError: 'NoneType' object is not callable ====================================================================== FAIL: test_encode_basestring_ascii (json.tests.test_speedups.TestSpeedups) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/fdrake/src/Python-2.6.5/Lib/json/tests/test_speedups.py", line 13, in test_encode_basestring_ascii self.assertEquals(encoder.encode_basestring_ascii.__module__, "_json") AssertionError: 'json.encoder' != '_json' ====================================================================== FAIL: test_scanstring (json.tests.test_speedups.TestSpeedups) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/fdrake/src/Python-2.6.5/Lib/json/tests/test_speedups.py", line 9, in test_scanstring self.assertEquals(decoder.scanstring.__module__, "_json") AssertionError: 'json.decoder' != '_json' Test failures from 2.7: ====================================================================== ERROR: test_c_scanstring (json.tests.test_scanstring.TestScanString) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/fdrake/src/Python-2.7/Lib/json/tests/test_scanstring.py", line 13, in test_c_scanstring self._test_scanstring(json.decoder.c_scanstring) File "/home/fdrake/src/Python-2.7/Lib/json/tests/test_scanstring.py", line 17, in _test_scanstring scanstring('"z\\ud834\\udd20x"', 1, None, True), TypeError: 'NoneType' object is not callable ====================================================================== FAIL: test_encode_basestring_ascii (json.tests.test_speedups.TestSpeedups) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/fdrake/src/Python-2.7/Lib/json/tests/test_speedups.py", line 12, in test_encode_basestring_ascii self.assertEquals(encoder.encode_basestring_ascii.__module__, "_json") AssertionError: 'json.encoder' != '_json' ====================================================================== FAIL: test_scanstring (json.tests.test_speedups.TestSpeedups) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/fdrake/src/Python-2.7/Lib/json/tests/test_speedups.py", line 8, in test_scanstring self.assertEquals(decoder.scanstring.__module__, "_json") AssertionError: 'json.decoder' != '_json' ---------- components: Library (Lib) files: test-empty-json-object.diff keywords: patch messages: 110099 nosy: fdrake priority: normal severity: normal status: open title: json.load failure when C optimizations aren't built type: behavior versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file17966/test-empty-json-object.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 17:48:29 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 12 Jul 2010 15:48:29 +0000 Subject: [issue7761] telnetlib Telnet.interact fails on Windows but not Linux In-Reply-To: <1264212900.62.0.226780855818.issue7761@psf.upfronthosting.co.za> Message-ID: <1278949709.72.0.909830719924.issue7761@psf.upfronthosting.co.za> Mark Lawrence added the comment: I get the same error on Windows for 3.1.2 as the OP did for 3.1.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 17:48:43 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Mon, 12 Jul 2010 15:48:43 +0000 Subject: [issue5723] Incomplete json tests In-Reply-To: <1239205406.15.0.353111609778.issue5723@psf.upfronthosting.co.za> Message-ID: <1278949723.2.0.740107008281.issue5723@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: This lack of tests is an issue for Python 2.6 as well. Issue 9233 might have been avoided were the pure-Python implementation tested. ---------- nosy: +fdrake versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 17:49:18 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 12 Jul 2010 15:49:18 +0000 Subject: [issue9233] json.load failure when C optimizations aren't built In-Reply-To: <1278949665.57.0.214129757073.issue9233@psf.upfronthosting.co.za> Message-ID: <1278949758.15.0.467367734013.issue9233@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +bob.ippolito, ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 17:49:54 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 12 Jul 2010 15:49:54 +0000 Subject: [issue5723] Incomplete json tests In-Reply-To: <1239205406.15.0.353111609778.issue5723@psf.upfronthosting.co.za> Message-ID: <1278949794.16.0.993300889718.issue5723@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 17:51:04 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Jul 2010 15:51:04 +0000 Subject: [issue1076790] test test_codecs failed Message-ID: <1278949864.32.0.0486098888179.issue1076790@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Amaury's suggestion sounds good to me. ---------- nosy: +pitrou status: pending -> closed superseder: -> remove --with-wctype-functions configure option _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 18:05:41 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 12 Jul 2010 16:05:41 +0000 Subject: [issue7761] telnetlib Telnet.interact fails on Windows but not Linux In-Reply-To: <1278949237.14.0.835492449781.issue7761@psf.upfronthosting.co.za> Message-ID: <20100712160434.GA27705@yoda.bytereef.org> Stefan Krah added the comment: 3.2 is affected as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 18:07:11 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Jul 2010 16:07:11 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1278950831.38.0.490683626473.issue9079@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Instead of being defined in _time.h, perhaps the new API function should be provided by core Python? It would probably help in certain threading primitives. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 18:08:44 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Jul 2010 16:08:44 +0000 Subject: [issue8844] Condition.wait() doesn't raise KeyboardInterrupt In-Reply-To: <1275065292.27.0.238026363438.issue8844@psf.upfronthosting.co.za> Message-ID: <1278950924.27.0.0231463989044.issue8844@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Actually, there is a problem in Lock.acquire and RLock.acquire. If a signal occurs and signal handling returns successfully, acquiring the lock will be retried without decrementing the timeout first. Therefore, we may end up waiting longer than the user wanted. I'm not sure how to tackle that: either we accept that an incoming signal will make the wait longer, or we fix it by properly decrementing the timeout (which will complicate things a bit, especially for cross-platform time querying - but see issue9079 which might help us). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 18:12:36 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 12 Jul 2010 16:12:36 +0000 Subject: [issue4932] Little improvement on urlparse module, urlparse function. In-Reply-To: <1231867955.83.0.32658151911.issue4932@psf.upfronthosting.co.za> Message-ID: <1278951156.36.0.54465272815.issue4932@psf.upfronthosting.co.za> Mark Lawrence added the comment: Andres, do you wish to provide more patches or can we close this issue? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 18:19:49 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Jul 2010 16:19:49 +0000 Subject: [issue5321] I/O error during one-liner gives no (!) diagnostic (and fails to return OS error status) In-Reply-To: <1235065804.66.0.913102056215.issue5321@psf.upfronthosting.co.za> Message-ID: <1278951589.43.0.703220743221.issue5321@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I agree that errors while flushing stdout shouldn't be silenced but instead reported (on stderr, obviously :-)). It is especially important when scripts are used for data processing. I'd like to have Guido's opinion, though. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 18:30:02 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 12 Jul 2010 16:30:02 +0000 Subject: [issue849662] reading shelves is really slow Message-ID: <1278952202.88.0.275915595343.issue849662@psf.upfronthosting.co.za> Mark Lawrence added the comment: Raymond - can we close this ticket? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 18:35:32 2010 From: report at bugs.python.org (Mark Hammond) Date: Mon, 12 Jul 2010 16:35:32 +0000 Subject: [issue8954] wininst regression: errors when building on linux In-Reply-To: <1276093244.44.0.895217979727.issue8954@psf.upfronthosting.co.za> Message-ID: <1278952532.81.0.206043441916.issue8954@psf.upfronthosting.co.za> Mark Hammond added the comment: With the caveat that I haven't tested it (I'm currently traveling), the patch looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 18:45:53 2010 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 12 Jul 2010 16:45:53 +0000 Subject: [issue8844] Condition.wait() doesn't raise KeyboardInterrupt In-Reply-To: <1275065292.27.0.238026363438.issue8844@psf.upfronthosting.co.za> Message-ID: <1278953153.97.0.270188955971.issue8844@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Accepting that the timeout is not perfect in the face of signals as a caveat is fine (document the possibility) and can be improved later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 18:51:37 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Mon, 12 Jul 2010 16:51:37 +0000 Subject: [issue9233] json.load failure when C optimizations aren't built In-Reply-To: <1278949665.57.0.214129757073.issue9233@psf.upfronthosting.co.za> Message-ID: <1278953497.76.0.215685161713.issue9233@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: The attached test only fails for Python 2.7; removing Python 2.6 from this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 19:01:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 12 Jul 2010 17:01:20 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1278950831.38.0.490683626473.issue9079@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Mon, Jul 12, 2010 at 12:07 PM, Antoine Pitrou wrote: .. > Instead of being defined in _time.h, perhaps the new API function should be provided by core Python? This is an interesting idea, but proposed Py_gettimeofday inherits float_time logic of falling back on ftime and then plain time in case gettimeofday is not available. I am not sure this behavior is always beneficial. I notice that Python/ceval_gil.h has a comment /* We assume all modern POSIX systems have gettimeofday() */, which means it handles windows completely differently and using Py_gettimeofday instead of GETTIMEOFDAY in gil code may not be appropriate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 19:06:14 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Jul 2010 17:06:14 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: Message-ID: <1278954367.3134.4.camel@localhost.localdomain> Antoine Pitrou added the comment: > > Instead of being defined in _time.h, perhaps the new API function should be provided by core Python? > > This is an interesting idea, but proposed Py_gettimeofday inherits > float_time logic of falling back on ftime and then plain time in case > gettimeofday is not available. I am not sure this behavior is always > beneficial. I would say this is fine as long as it's "documented". The whole point of this API is precisely to avoid having to code the various fallbacks and conversions by yourself. People wanting full control over the code path can just write their own routine. > I notice that Python/ceval_gil.h has a comment /* We > assume all modern POSIX systems have gettimeofday() */, which means it > handles windows completely differently and using Py_gettimeofday > instead of GETTIMEOFDAY in gil code may not be appropriate. Indeed, the GIL code would probably still use its own code paths. However, other less sensitive code could rely on the new API. For example, it is not critical for lock timeouts to benefit from the full gettimeofday() precision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 19:16:44 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 12 Jul 2010 17:16:44 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1278954367.3134.4.camel@localhost.localdomain> Message-ID: Alexander Belopolsky added the comment: On Mon, Jul 12, 2010 at 1:06 PM, Antoine Pitrou wrote: .. > Indeed, the GIL code would probably still use its own code paths. > However, other less sensitive code could rely on the new API. For > example, it is not critical for lock timeouts to benefit from the full > gettimeofday() precision. That may be true, but I would rather proceed in small steps. First expose it in _time.h so that it is shared by time and datetime modulesand then if specific uses are found inside core python, move it to a more appropriate header. Lock timeouts are not a good use case for gettimeofday because POSIX APIs use nonoseconds instead of microseconds. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 19:45:13 2010 From: report at bugs.python.org (Greg Brockman) Date: Mon, 12 Jul 2010 17:45:13 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278956713.95.0.137025844982.issue9207@psf.upfronthosting.co.za> Greg Brockman added the comment: With pool.py:272 commented out, running about 50k iterations, I saw 4 tracebacks giving an exception on pool.py:152. So this seems to imply the race does exist (i.e. that the thread is in _maintain_pool rather than time.sleep when shutdown begins). It looks like the _maintain_pool run takes O(10^-4)s, so it's not surprising the error is so rare. That being said, the patch I submitted in issue 9205 should handle this case as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 20:02:24 2010 From: report at bugs.python.org (Jesse Noller) Date: Mon, 12 Jul 2010 18:02:24 +0000 Subject: [issue9207] multiprocessing occasionally spits out exception during shutdown (_handle_workers) In-Reply-To: <1278619533.83.0.0853433126095.issue9207@psf.upfronthosting.co.za> Message-ID: <1278957744.96.0.139716730907.issue9207@psf.upfronthosting.co.za> Jesse Noller added the comment: Thank you for doing that footwork Greg, it means a lot to me. I'm leaning towards the patch to swallow the errors - I just wanted to ponder it just a tiny bit longer before I pull the trigger. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 20:06:42 2010 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 12 Jul 2010 18:06:42 +0000 Subject: [issue9132] Documentation for comparing dictionaries is out of date In-Reply-To: <1277927951.56.0.908504944608.issue9132@psf.upfronthosting.co.za> Message-ID: <1278958002.55.0.0942786510686.issue9132@psf.upfronthosting.co.za> Eli Bendersky added the comment: I agree with Terry's proposal. Here's a patch file for Doc/reference/expressions.rst that implements the change. ---------- Added file: http://bugs.python.org/file17967/issue9132.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 20:11:50 2010 From: report at bugs.python.org (John J Lee) Date: Mon, 12 Jul 2010 18:11:50 +0000 Subject: [issue8975] Bug in cookiejar In-Reply-To: <1276277689.33.0.403419112347.issue8975@psf.upfronthosting.co.za> Message-ID: <1278958310.65.0.00813760718306.issue8975@psf.upfronthosting.co.za> John J Lee added the comment: This is a duplicate of issue3924 ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 20:14:26 2010 From: report at bugs.python.org (John J Lee) Date: Mon, 12 Jul 2010 18:14:26 +0000 Subject: [issue2277] MozillaCookieJar does not support Firefox3 cookie files In-Reply-To: <1205310956.06.0.761612370729.issue2277@psf.upfronthosting.co.za> Message-ID: <1278958466.54.0.985211614232.issue2277@psf.upfronthosting.co.za> John J Lee added the comment: There is code in PyPI project mechanize that implements this feature. That code is marked experimental though, due to lack of testing. ---------- nosy: +jjlee _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 20:17:56 2010 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 12 Jul 2010 18:17:56 +0000 Subject: [issue9222] IDLE: Fix open/saveas 'Files of type' choices In-Reply-To: <1278809052.13.0.969100167059.issue9222@psf.upfronthosting.co.za> Message-ID: <1278958676.85.0.665240531835.issue9222@psf.upfronthosting.co.za> Eli Bendersky added the comment: Attaching a patch file for Lib/idlelib/IOBinding.py, diffed against the latest SVN trunk. ---------- keywords: +patch nosy: +eli.bendersky Added file: http://bugs.python.org/file17968/issue9122.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 20:18:15 2010 From: report at bugs.python.org (John J Lee) Date: Mon, 12 Jul 2010 18:18:15 +0000 Subject: [issue2190] MozillaCookieJar ignore HttpOnly cookies In-Reply-To: <1203957546.34.0.123660895963.issue2190@psf.upfronthosting.co.za> Message-ID: <1278958695.53.0.105250879763.issue2190@psf.upfronthosting.co.za> John J Lee added the comment: Is deprecation really necessary? lynx still uses that format. lynx doesn't write the header that MozillaCookieJar insists on being present, but a trivial subclass can read cookies files written by lynx. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 20:37:32 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Jul 2010 18:37:32 +0000 Subject: [issue9232] Allow trailing comma in any function argument list. In-Reply-To: <1278945017.29.0.842296068848.issue9232@psf.upfronthosting.co.za> Message-ID: <1278959852.39.0.189264181102.issue9232@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch. I've checked with PEP 306, but besides changing Grammar, test_grammar.py and the parser module (which there's a separate issue open for), I don't think any other changes are required. ---------- keywords: +patch Added file: http://bugs.python.org/file17969/trailing_commas.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 20:46:35 2010 From: report at bugs.python.org (Andrew Farrell) Date: Mon, 12 Jul 2010 18:46:35 +0000 Subject: [issue6026] test_(zipfile|zipimport|gzip|distutils|sqlite) fail if zlib is not available In-Reply-To: <1242349106.59.0.466065396405.issue6026@psf.upfronthosting.co.za> Message-ID: <1278960395.39.0.492189678349.issue6026@psf.upfronthosting.co.za> Andrew Farrell added the comment: In the midst of installing from http://www.python.org/ftp/python/2.7/Python-2.7.tgz I get this same error on test_distutils when I run make test. this is on debian lenny, amd64 distutils_test output: ================================================= afarrell:~/Python-2.7$ ./python Lib/test/regrtest.py -v test_distutils== CPython 2.7 (r27:82500, Jul 12 2010, 13:29:51) [GCC 4.3.2] == Linux-2.6.26-2-amd64-x86_64-with-debian-5.0.5 little-endian == /home/afarrell/Python-2.7/build/test_python_26242 test_distutils test_byte_compile (distutils.tests.test_install_lib.InstallLibTestCase) ... ok test_dont_write_bytecode (distutils.tests.test_install_lib.InstallLibTestCase) ... ok test_finalize_options (distutils.tests.test_install_lib.InstallLibTestCase) ... ok test_get_inputs (distutils.tests.test_install_lib.InstallLibTestCase) ... ok test_get_outputs (distutils.tests.test_install_lib.InstallLibTestCase) ... ok test_clean (distutils.tests.test_config_cmd.ConfigTestCase) ... ok test_dump_file (distutils.tests.test_config_cmd.ConfigTestCase) ... ok test_finalize_options (distutils.tests.test_config_cmd.ConfigTestCase) ... ok test_search_cpp (distutils.tests.test_config_cmd.ConfigTestCase) ... ok test_check_all (distutils.tests.test_check.CheckTestCase) ... ok test_check_document (distutils.tests.test_check.CheckTestCase) ... ok test_check_metadata (distutils.tests.test_check.CheckTestCase) ... ok test_check_restructuredtext (distutils.tests.test_check.CheckTestCase) ... ok test_newer (distutils.tests.test_dep_util.DepUtilTestCase) ... ok test_newer_group (distutils.tests.test_dep_util.DepUtilTestCase) ... ok test_newer_pairwise (distutils.tests.test_dep_util.DepUtilTestCase) ... ok test_runtime_libdir_option (distutils.tests.test_unixccompiler.UnixCCompilerTestCase) ... ok VersionPredicate (distutils.versionpredicate) Doctest: distutils.versionpredicate.VersionPredicate ... ok split_provision (distutils.versionpredicate) Doctest: distutils.versionpredicate.split_provision ... ok test_server_empty_registration (distutils.tests.test_config.PyPIRCCommandTestCase) ... ok test_server_registration (distutils.tests.test_config.PyPIRCCommandTestCase) ... ok test_debug_print (distutils.tests.test_filelist.FileListTestCase) ... ok test_glob_to_re (distutils.tests.test_filelist.FileListTestCase) ... ok test_process_template_line (distutils.tests.test_filelist.FileListTestCase) ... ok test_default_settings (distutils.tests.test_install_scripts.InstallScriptsTestCase) ... ok test_installation (distutils.tests.test_install_scripts.InstallScriptsTestCase) ... ok test_finalize_options (distutils.tests.test_build.BuildTestCase) ... ok test_check_archive_formats (distutils.tests.test_archive_util.ArchiveUtilTestCase) ... ok test_compress_deprecated (distutils.tests.test_archive_util.ArchiveUtilTestCase) ... skipped 'The compress program is required' test_make_archive (distutils.tests.test_archive_util.ArchiveUtilTestCase) ... ok test_make_archive_cwd (distutils.tests.test_archive_util.ArchiveUtilTestCase) ... ok test_make_archive_owner_group (distutils.tests.test_archive_util.ArchiveUtilTestCase) ... skipped 'Requires zlib' test_make_tarball (distutils.tests.test_archive_util.ArchiveUtilTestCase) ... skipped 'requires zlib' test_make_zipfile (distutils.tests.test_archive_util.ArchiveUtilTestCase) ... skipped 'Requires zlib' test_tarfile_root_owner (distutils.tests.test_archive_util.ArchiveUtilTestCase) ... skipped 'Requires zlib' test_tarfile_vs_tar (distutils.tests.test_archive_util.ArchiveUtilTestCase) ... skipped 'Requires zlib' test_formats (distutils.tests.test_bdist.BuildTestCase) ... ok test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase) ... skipped 'xxmodule.c not found' test_build_ext_inplace (distutils.tests.test_build_ext.BuildExtTestCase) ... ok test_build_ext_path_cross_platform (distutils.tests.test_build_ext.BuildExtTestCase) ... ok test_build_ext_path_with_os_sep (distutils.tests.test_build_ext.BuildExtTestCase) ... ok test_check_extensions_list (distutils.tests.test_build_ext.BuildExtTestCase) ... ok test_compiler_option (distutils.tests.test_build_ext.BuildExtTestCase) ... ok test_ext_fullpath (distutils.tests.test_build_ext.BuildExtTestCase) ... ok test_finalize_options (distutils.tests.test_build_ext.BuildExtTestCase) ... ok test_get_outputs (distutils.tests.test_build_ext.BuildExtTestCase) ... ok test_get_source_files (distutils.tests.test_build_ext.BuildExtTestCase) ... ok test_setuptools_compat (distutils.tests.test_build_ext.BuildExtTestCase) ... skipped 'No module named setuptools_build_ext' test_solaris_enable_shared (distutils.tests.test_build_ext.BuildExtTestCase) ... ok test_no_optimize_flag (distutils.tests.test_bdist_rpm.BuildRpmTestCase) ... ok test_quiet (distutils.tests.test_bdist_rpm.BuildRpmTestCase) ... ok test_finalize_options (distutils.tests.test_upload.uploadTestCase) ... ok test_saved_password (distutils.tests.test_upload.uploadTestCase) ... ok test_server_empty_registration (distutils.tests.test_upload.uploadTestCase) ... ok test_server_registration (distutils.tests.test_upload.uploadTestCase) ... ok test_upload (distutils.tests.test_upload.uploadTestCase) ... ok test_class (distutils.tests.test_text_file.TextFileTestCase) ... ok test_home_installation_scheme (distutils.tests.test_install.InstallTestCase) ... ok test_simple_run (distutils.tests.test_install_data.InstallDataTestCase) ... ok test_simple_run (distutils.tests.test_clean.cleanTestCase) ... ok test_announce (distutils.tests.test_dist.DistributionTestCase) ... ok test_command_packages_cmdline (distutils.tests.test_dist.DistributionTestCase) ... ok test_command_packages_configfile (distutils.tests.test_dist.DistributionTestCase) ... ok test_command_packages_unspecified (distutils.tests.test_dist.DistributionTestCase) ... ok test_debug_mode (distutils.tests.test_dist.DistributionTestCase) ... ok test_empty_options (distutils.tests.test_dist.DistributionTestCase) ... ok test_finalize_options (distutils.tests.test_dist.DistributionTestCase) ... ok test_find_config_files_disable (distutils.tests.test_dist.DistributionTestCase) ... ok test_get_command_packages (distutils.tests.test_dist.DistributionTestCase) ... ok test_write_pkg_file (distutils.tests.test_dist.DistributionTestCase) ... ok test_custom_pydistutils (distutils.tests.test_dist.MetadataTestCase) ... ok test_fix_help_options (distutils.tests.test_dist.MetadataTestCase) ... ok test_long_description (distutils.tests.test_dist.MetadataTestCase) ... ok test_obsoletes (distutils.tests.test_dist.MetadataTestCase) ... ok test_obsoletes_illegal (distutils.tests.test_dist.MetadataTestCase) ... ok test_provides (distutils.tests.test_dist.MetadataTestCase) ... ok test_provides_illegal (distutils.tests.test_dist.MetadataTestCase) ... ok test_read_metadata (distutils.tests.test_dist.MetadataTestCase) ... ok test_requires (distutils.tests.test_dist.MetadataTestCase) ... ok test_requires_illegal (distutils.tests.test_dist.MetadataTestCase) ... ok test_show_help (distutils.tests.test_dist.MetadataTestCase) ... ok test_simple_metadata (distutils.tests.test_dist.MetadataTestCase) ... ok test_get_exe_bytes (distutils.tests.test_bdist_wininst.BuildWinInstTestCase) ... ok test_cmp (distutils.tests.test_version.VersionTestCase) ... ok test_cmp_strict (distutils.tests.test_version.VersionTestCase) ... ok test_prerelease (distutils.tests.test_version.VersionTestCase) ... ok test_customize_compiler (distutils.tests.test_ccompiler.CCompilerTestCase) ... ok test_debug_print (distutils.tests.test_ccompiler.CCompilerTestCase) ... ok test_gen_lib_options (distutils.tests.test_ccompiler.CCompilerTestCase) ... ok test_minial (distutils.tests.test_bdist_msi.BDistMSITestCase) ... skipped 'These tests are only for win32' test_debug_print (distutils.tests.test_cmd.CommandTestCase) ... ok test_dump_options (distutils.tests.test_cmd.CommandTestCase) ... ok test_ensure_dirname (distutils.tests.test_cmd.CommandTestCase) ... ok test_ensure_filename (distutils.tests.test_cmd.CommandTestCase) ... ok test_ensure_string (distutils.tests.test_cmd.CommandTestCase) ... ok test_ensure_string_list (distutils.tests.test_cmd.CommandTestCase) ... ok test_make_file (distutils.tests.test_cmd.CommandTestCase) ... ok test_nt_quote_args (distutils.tests.test_spawn.SpawnTestCase) ... ok test_spawn (distutils.tests.test_spawn.SpawnTestCase) ... ok test_copy_tree_verbosity (distutils.tests.test_dir_util.DirUtilTestCase) ... ok test_create_tree_verbosity (distutils.tests.test_dir_util.DirUtilTestCase) ... ok test_ensure_relative (distutils.tests.test_dir_util.DirUtilTestCase) ... ok test_mkpath_remove_tree_verbosity (distutils.tests.test_dir_util.DirUtilTestCase) ... ok test_dont_write_bytecode (distutils.tests.test_util.UtilTestCase) ... ok test_check_metadata_deprecated (distutils.tests.test_register.RegisterTestCase) ... ok test_create_pypirc (distutils.tests.test_register.RegisterTestCase) ... ok test_password_not_in_file (distutils.tests.test_register.RegisterTestCase) ... ok test_password_reset (distutils.tests.test_register.RegisterTestCase) ... ok test_registering (distutils.tests.test_register.RegisterTestCase) ... ok test_server_empty_registration (distutils.tests.test_register.RegisterTestCase) ... ok test_server_registration (distutils.tests.test_register.RegisterTestCase) ... ok test_strict (distutils.tests.test_register.RegisterTestCase) ... ok test_debug_mode (distutils.tests.test_core.CoreTestCase) ... ok test_run_setup_provides_file (distutils.tests.test_core.CoreTestCase) ... ok test_run_setup_uses_current_dir (distutils.tests.test_core.CoreTestCase) ... ok test_build (distutils.tests.test_build_scripts.BuildScriptsTestCase) ... ok test_default_settings (distutils.tests.test_build_scripts.BuildScriptsTestCase) ... ok test_version_int (distutils.tests.test_build_scripts.BuildScriptsTestCase) ... ok test_simple_run (distutils.tests.test_install_headers.InstallHeadersTestCase) ... ok test_finalize_options (distutils.tests.test_bdist_dumb.BuildDumbTestCase) ... ok test_simple_built (distutils.tests.test_bdist_dumb.BuildDumbTestCase) ... skipped 'requires zlib' test_copy_file (distutils.tests.test_file_util.FileUtilTestCase) ... ok test_move_file_verbosity (distutils.tests.test_file_util.FileUtilTestCase) ... ok test_write_file (distutils.tests.test_file_util.FileUtilTestCase) ... ok test_dont_write_bytecode (distutils.tests.test_build_py.BuildPyTestCase) ... ok test_empty_package_dir (distutils.tests.test_build_py.BuildPyTestCase) ... ok test_package_data (distutils.tests.test_build_py.BuildPyTestCase) ... ok test_package_data_pyc (distutils.tests.test_build_py.BuildPyTestCase) ... ok test_no_compiler (distutils.tests.test_msvc9compiler.msvc9compilerTestCase) ... skipped 'These tests are only for win32' test_reg_class (distutils.tests.test_msvc9compiler.msvc9compilerTestCase) ... skipped 'These tests are only for win32' test_remove_visual_c_ref (distutils.tests.test_msvc9compiler.msvc9compilerTestCase) ... skipped 'These tests are only for win32' test_get_python_inc (distutils.tests.test_sysconfig.SysconfigTestCase) ... ok test_get_python_lib (distutils.tests.test_sysconfig.SysconfigTestCase) ... ok test_parse_makefile_base (distutils.tests.test_sysconfig.SysconfigTestCase) ... ok test_parse_makefile_literal_dollar (distutils.tests.test_sysconfig.SysconfigTestCase) ... ok test_add_defaults (distutils.tests.test_sdist.SDistTestCase) ... skipped 'requires zlib' test_check_metadata_deprecated (distutils.tests.test_sdist.SDistTestCase) ... ok test_finalize_options (distutils.tests.test_sdist.SDistTestCase) ... ok test_get_file_list (distutils.tests.test_sdist.SDistTestCase) ... ERROR Exception AttributeError: "_Stream instance has no attribute 'cmp'" in > ignored test_make_distribution (distutils.tests.test_sdist.SDistTestCase) ... skipped 'requires zlib' test_make_distribution_owner_group (distutils.tests.test_sdist.SDistTestCase) ... skipped 'requires zlib' test_metadata_check_option (distutils.tests.test_sdist.SDistTestCase) ... skipped 'requires zlib' test_prune_file_list (distutils.tests.test_sdist.SDistTestCase) ... skipped 'requires zlib' test_server_empty_registration (distutils.tests.test_sdist.SDistTestCase) ... ok test_server_registration (distutils.tests.test_sdist.SDistTestCase) ... ok test_show_formats (distutils.tests.test_sdist.SDistTestCase) ... ok test_build_libraries (distutils.tests.test_build_clib.BuildCLibTestCase) ... ok test_check_library_dist (distutils.tests.test_build_clib.BuildCLibTestCase) ... ok test_finalize_options (distutils.tests.test_build_clib.BuildCLibTestCase) ... ok test_get_source_files (distutils.tests.test_build_clib.BuildCLibTestCase) ... ok test_run (distutils.tests.test_build_clib.BuildCLibTestCase) ... ok ====================================================================== ERROR: test_get_file_list (distutils.tests.test_sdist.SDistTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/afarrell/Python-2.7/Lib/distutils/tests/test_sdist.py", line 357, in test_get_file_list cmd.run() File "/home/afarrell/Python-2.7/Lib/distutils/command/sdist.py", line 168, in run self.make_distribution() File "/home/afarrell/Python-2.7/Lib/distutils/command/sdist.py", line 435, in make_distribution owner=self.owner, group=self.group) File "/home/afarrell/Python-2.7/Lib/distutils/cmd.py", line 392, in make_archive owner=owner, group=group) File "/home/afarrell/Python-2.7/Lib/distutils/archive_util.py", line 237, in make_archive filename = func(base_name, base_dir, **kwargs) File "/home/afarrell/Python-2.7/Lib/distutils/archive_util.py", line 101, in make_tarball tar = tarfile.open(archive_name, 'w|%s' % tar_compression[compress]) File "/home/afarrell/Python-2.7/Lib/tarfile.py", line 1687, in open _Stream(name, filemode, comptype, fileobj, bufsize), File "/home/afarrell/Python-2.7/Lib/tarfile.py", line 425, in __init__ raise CompressionError("zlib module is not available") CompressionError: zlib module is not available ---------------------------------------------------------------------- Ran 151 tests in 0.439s FAILED (errors=1, skipped=18) test test_distutils failed -- Traceback (most recent call last): File "/home/afarrell/Python-2.7/Lib/distutils/tests/test_sdist.py", line 357, in test_get_file_list cmd.run() File "/home/afarrell/Python-2.7/Lib/distutils/command/sdist.py", line 168, in run self.make_distribution() File "/home/afarrell/Python-2.7/Lib/distutils/command/sdist.py", line 435, in make_distribution owner=self.owner, group=self.group) File "/home/afarrell/Python-2.7/Lib/distutils/cmd.py", line 392, in make_archive owner=owner, group=group) File "/home/afarrell/Python-2.7/Lib/distutils/archive_util.py", line 237, in make_archive filename = func(base_name, base_dir, **kwargs) File "/home/afarrell/Python-2.7/Lib/distutils/archive_util.py", line 101, in make_tarball tar = tarfile.open(archive_name, 'w|%s' % tar_compression[compress]) File "/home/afarrell/Python-2.7/Lib/tarfile.py", line 1687, in open _Stream(name, filemode, comptype, fileobj, bufsize), File "/home/afarrell/Python-2.7/Lib/tarfile.py", line 425, in __init__ raise CompressionError("zlib module is not available") CompressionError: zlib module is not available 1 test failed: test_distutils ---------- nosy: +afarrell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 20:48:16 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 12 Jul 2010 18:48:16 +0000 Subject: [issue9216] FIPS support for hashlib In-Reply-To: <1278721335.16.0.522410247151.issue9216@psf.upfronthosting.co.za> Message-ID: <1278960496.8.0.822531480807.issue9216@psf.upfronthosting.co.za> Dave Malcolm added the comment: Attached is a patch against the py3k branch which implements this. I've checked that it builds against openssl-0.9.8o.tar.gz, openssl-1.0.0a.tar.gz, and against Fedora 12 and 13's heavily-patched openssl-1.0.0. The bulk of my testing has been against Fedora's openssl. I've added selftests to try to verify the new API. I try to detect if the OpenSSL enforces FIPS, via trying to run "openssl md5" as a subprocess, and seeing if I can trigger an error. With FIPS enforcement off, all tests pass when built against 0.9.8o and 1.0.0a and F13's 1.0.0, other than those for FIPS enforcement itself, which skip. With FIPS enforcement on, all tests pass when built against F13's openssl. (I haven't yet figured out how to get the fips selftest to pass for the other builds, it's testing checksums against the wrong libcrypto for some reason; see caveat below): $ ./python Lib/test/test_hashlib.py $ OPENSSL_FORCE_FIPS_MODE=1 ./python Lib/test/test_hashlib.py For all of the various contexts stored in _hashopenssl.c, we now store two: one with the override flag, one without. This required some reworking of the various preprocessor magic in that file, so I've gathered everything related to an algorithm into a structure, and moved most of the logic into functions, rather than macros. I'm assuming that these will get inlined under optimization, and that the bulk of the time that you're trying to optimize out are the EVP lookups and initializations, rather than function call overhead. How's this looking? Do I need to add a dummy "usedforsecurity" arg to all of the non-openssl message digest implementations within the tree? Unfortunately, if fips mode is on, and the fips selftest fails for the openssl library, every hash use will fail, both with and without the flag: ValueError: error:2D07D06A:FIPS routines:EVP_DigestInit_ex:fips selftest failed and this leads to a crippled hashlib module. It's not clear to me if there's a good way to handle this. (Having said that, a site that has the technical expertise to opt-in to FIPS mode is hopefully able to diagnose this, and fix their openssl library) ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file17970/py3k-hashlib-fips-issue9216.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 21:27:00 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Jul 2010 19:27:00 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1278962820.04.0.959351993764.issue9079@psf.upfronthosting.co.za> Mark Dickinson added the comment: Assigning back to Alexander; sorry I haven't had time to look at this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 21:31:32 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Jul 2010 19:31:32 +0000 Subject: [issue9215] test_float crashes with assertion failure on Ubuntu buildbot. In-Reply-To: <1278709313.21.0.942874068814.issue9215@psf.upfronthosting.co.za> Message-ID: <1278963092.95.0.42117647737.issue9215@psf.upfronthosting.co.za> Mark Dickinson added the comment: And I see that test_float is passing again. Thanks, Matthias! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 21:41:33 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 12 Jul 2010 19:41:33 +0000 Subject: [issue849662] reading shelves is really slow Message-ID: <1278963693.42.0.620324038758.issue849662@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 21:52:00 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Jul 2010 19:52:00 +0000 Subject: [issue9132] Documentation for comparing dictionaries is out of date In-Reply-To: <1277927951.56.0.908504944608.issue9132@psf.upfronthosting.co.za> Message-ID: <1278964320.7.0.73705780597.issue9132@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Looks good to me. Thanks Eli. ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 21:55:08 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 12 Jul 2010 19:55:08 +0000 Subject: [issue9222] IDLE: Fix open/saveas 'Files of type' choices In-Reply-To: <1278809052.13.0.969100167059.issue9222@psf.upfronthosting.co.za> Message-ID: <1278964508.5.0.276285671284.issue9222@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 22:03:22 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 12 Jul 2010 20:03:22 +0000 Subject: [issue6026] test_(zipfile|zipimport|gzip|distutils|sqlite) fail if zlib is not available In-Reply-To: <1242349106.59.0.466065396405.issue6026@psf.upfronthosting.co.za> Message-ID: <1278965002.11.0.772092999252.issue6026@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks for the report, fixed in r82839 (py3k), r82840 (release27-maint), and r82841 (release31-maint). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 22:08:34 2010 From: report at bugs.python.org (Ask Solem) Date: Mon, 12 Jul 2010 20:08:34 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1278965314.94.0.434866560237.issue9205@psf.upfronthosting.co.za> Ask Solem added the comment: termination.patch, in the result handler you've added: while cache and thread._state != TERMINATE and not failed why are you terminating the second pass after finding a failed process? Unpickleable errors and other errors occurring in the worker body are not exceptional cases, at least not now that the pool is supervised by _handle_workers. I think the result should be set also in this case, so the user can inspect the exception after the fact. I have some other suggestions too, so I will review this patch tomorrow. For shutdown.patch, I thought this only happened in the worker handler, but you've enabled this for the result handler too? I don't care about the worker handler, but with the result handler I'm worried that I don't know what ignoring these exceptions actually means. For example, is there a possibility that we may lose results at shutdown? ---------- nosy: +asksol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 22:09:07 2010 From: report at bugs.python.org (Adrian Sampson) Date: Mon, 12 Jul 2010 20:09:07 +0000 Subject: [issue9234] argparse: aliases for positional arguments (subparsers) In-Reply-To: <1278965347.63.0.908625805717.issue9234@psf.upfronthosting.co.za> Message-ID: <1278965347.63.0.908625805717.issue9234@psf.upfronthosting.co.za> New submission from Adrian Sampson : The argparse module supports "subparsers," which allow CLI tools to support invocation of subcommands (much like the svn or hg programs). For these subcommands, it is often useful to allow multiple names for the same command. For instance, in Mercurial, "hg blame" does the same thing as "hg annotate". You should be able to create subparsers with command aliases, like this: >>> subparsers.add_parser("annotate", aliases=('ann', 'blame')) The help message for the program should display the aliases alongisde the command names. I'm attaching an example script that adds an Action to the library to accomplish this. This isn't a patch, but if this approach seems right to other people, I'll turn it into a patch. Here's this bug on argparse's old tracker: http://code.google.com/p/argparse/issues/detail?id=23 ---------- components: Library (Lib) files: aliases.py messages: 110130 nosy: asampson priority: normal severity: normal status: open title: argparse: aliases for positional arguments (subparsers) type: feature request versions: Python 2.7 Added file: http://bugs.python.org/file17971/aliases.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 22:15:57 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Jul 2010 20:15:57 +0000 Subject: [issue7696] Improve Memoryview/Buffer documentation In-Reply-To: <1263418431.81.0.407262013758.issue7696@psf.upfronthosting.co.za> Message-ID: <1278965757.41.0.472041044928.issue7696@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Craig, thanks for pointing it out. I've committed a patch to fix the doc. It should probably appear online soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 22:17:53 2010 From: report at bugs.python.org (Andrew Farrell) Date: Mon, 12 Jul 2010 20:17:53 +0000 Subject: [issue6026] test_(zipfile|zipimport|gzip|distutils|sqlite) fail if zlib is not available In-Reply-To: <1242349106.59.0.466065396405.issue6026@psf.upfronthosting.co.za> Message-ID: <1278965873.35.0.721212131451.issue6026@psf.upfronthosting.co.za> Andrew Farrell added the comment: The attempt to install setuptools indicates that zlib may actually be required it seems. I download setuptools-0.6c11-py2.7.egg from http://pypi.python.org/pypi/setuptools and, as instructed at http://pypi.python.org/pypi/setuptools#id4 and run `sh setuptools-0.6c11-py2.7.egg` however get the following exception: Traceback (most recent call last): File "", line 1, in zipimport.ZipImportError: can't decompress data; zlib not available dlafarrell:/localhome/afarrell$ sh setuptools-0.6c11-py2.7.egg Traceback (most recent call last): File "", line 1, in zipimport.ZipImportError: can't decompress data; zlib not available Given that this is an import error, I infer that this may just be a problem with the egg; no import may be needed. If thats the case then the egg should change to reflect that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 22:23:33 2010 From: report at bugs.python.org (Derek Morr) Date: Mon, 12 Jul 2010 20:23:33 +0000 Subject: [issue3461] smtplib does not fully support IPv6 in EHLO In-Reply-To: <1217282925.26.0.916204427354.issue3461@psf.upfronthosting.co.za> Message-ID: <1278966213.75.0.40743373805.issue3461@psf.upfronthosting.co.za> Derek Morr added the comment: I'm not sure how to best write a unit test for this. The patch should only be invoked if the client doesn't have a name-served hostname and has IPv6 enabled. Also, there are several IPv4-isms in the smtplib tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 22:31:34 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 12 Jul 2010 20:31:34 +0000 Subject: [issue8975] Bug in cookiejar In-Reply-To: <1276277689.33.0.403419112347.issue8975@psf.upfronthosting.co.za> Message-ID: <1278966694.84.0.151054014024.issue8975@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> cookielib chokes on non-integer cookie version, should ignore it instead type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 22:35:20 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Jul 2010 20:35:20 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1278966920.1.0.871823079902.issue9079@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: mark.dickinson -> belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 22:40:36 2010 From: report at bugs.python.org (Yaroslav Halchenko) Date: Mon, 12 Jul 2010 20:40:36 +0000 Subject: [issue9235] missing "import sys" in Tools/gdb/libpython.py In-Reply-To: <1278967235.19.0.848515468243.issue9235@psf.upfronthosting.co.za> Message-ID: <1278967235.19.0.848515468243.issue9235@psf.upfronthosting.co.za> New submission from Yaroslav Halchenko : as you can see from below, sys. is used, but never imported (besides a docstring) $> git describe upstream/0.5.0.dev-875-gf06319e $> grep -5 'sys' /home/yoh/proj/misc/python/Tools/gdb/libpython.py """ During development, I've been manually invoking the code in this way: (gdb) python import sys sys.path.append('/home/david/coding/python-gdb') import libpython end then reloading it after each edit like this: (gdb) python reload(libpython) -- def print_summary(self): if self.is_evalframeex(): pyop = self.get_pyop() if pyop: sys.stdout.write('#%i %s\n' % (self.get_index(), pyop.get_truncated_repr(MAX_OUTPUT_LEN))) sys.stdout.write(pyop.current_line()) else: sys.stdout.write('#%i (unable to read python frame information)\n' % self.get_index()) else: sys.stdout.write('#%i\n' % self.get_index()) class PyList(gdb.Command): '''List the current Python source code, if any Use -- for i, line in enumerate(all_lines[start-1:end]): linestr = str(i+start) # Highlight current line: if i + start == lineno: linestr = '>' + linestr sys.stdout.write('%4s %s' % (linestr, line)) # ...and register the command: PyList() ---------- components: Demos and Tools messages: 110134 nosy: Yaroslav.Halchenko priority: normal severity: normal status: open title: missing "import sys" in Tools/gdb/libpython.py versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 22:41:59 2010 From: report at bugs.python.org (Yaroslav Halchenko) Date: Mon, 12 Jul 2010 20:41:59 +0000 Subject: [issue9235] missing "import sys" in Tools/gdb/libpython.py In-Reply-To: <1278967235.19.0.848515468243.issue9235@psf.upfronthosting.co.za> Message-ID: <1278967319.78.0.855999963597.issue9235@psf.upfronthosting.co.za> Yaroslav Halchenko added the comment: sorry -- git describe was by mistake in there... report is based on SVN revision 82502 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 22:48:07 2010 From: report at bugs.python.org (Greg Brockman) Date: Mon, 12 Jul 2010 20:48:07 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1278967687.18.0.513692146617.issue9205@psf.upfronthosting.co.za> Greg Brockman added the comment: Thanks much for taking a look at this! > why are you terminating the second pass after finding a failed > process? Unfortunately, if you've lost a worker, you are no longer guaranteed that cache will eventually be empty. In particular, you may have lost a task, which could result in an ApplyResult waiting forever for a _set call. More generally, my chief assumption that went into this is that the unexpected death of a worker process is unrecoverable. It would be nice to have a better workaround than just aborting everything, but I couldn't see a way to do that. > Unpickleable errors and other errors occurring in the worker body are > not exceptional cases, at least not now that the pool is supervised > by _handle_workers. I could be wrong, but that's not what my experiments were indicating. In particular, if an unpickleable error occurs, then a task has been lost, which means that the relevant map, apply, etc. will wait forever for completion of the lost task. > I think the result should be set also in this case, so the user can > inspect the exception after the fact. That does sound useful. Although, how can you determine the job (and the value of i) if it's an unpickleable error? It would be nice to be able to retrieve job/i without having to unpickle the rest. > For shutdown.patch, I thought this only happened in the worker > handler, but you've enabled this for the result handler too? I don't > care about the worker handler, but with the result handler I'm > worried that I don't know what ignoring these exceptions actually > means. You have a good point. I didn't think about the patch very hard. I've only seen these exceptions from the worker handler, but AFAICT there's no guarantee that bad luck with the scheduler wouldn't result in the same problem in the result handler. One option would be to narrow the breadth of the exceptions caught by _make_shutdown_safe (do we need to catch anything but TypeErrors?). Another option would be to enable only for the worker handler. I don't have a particularly great sense of what the Right Thing to do here is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 22:52:16 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 12 Jul 2010 20:52:16 +0000 Subject: [issue3461] smtplib does not fully support IPv6 in EHLO In-Reply-To: <1217282925.26.0.916204427354.issue3461@psf.upfronthosting.co.za> Message-ID: <1278967936.99.0.0752987428885.issue3461@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: You might want to take a look at Lib/test/test_ftplib.py which contains IPv6 tests including the necessary logic to decide whether or not running them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 22:59:57 2010 From: report at bugs.python.org (Andrew Farrell) Date: Mon, 12 Jul 2010 20:59:57 +0000 Subject: [issue6026] test_(zipfile|zipimport|gzip|distutils|sqlite) fail if zlib is not available In-Reply-To: <1242349106.59.0.466065396405.issue6026@psf.upfronthosting.co.za> Message-ID: <1278968397.29.0.0464476990186.issue6026@psf.upfronthosting.co.za> Andrew Farrell added the comment: No dice. unless I'm mistaken, this needs to be included in the distribution. My current best solution looks like finding the source to zlib, putting it in my path to install setuptools. then installing zlib properly traceback for your pleasure: ============================ Traceback (most recent call last): File "setup.py", line 94, in scripts = scripts, File "/usr/local/lib/python2.7/distutils/core.py", line 152, in setup dist.run_commands() File "/usr/local/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/localhome/afarrell/setuptools-0.6c11/setuptools/command/install.py", line 76, in run self.do_egg_install() File "/localhome/afarrell/setuptools-0.6c11/setuptools/command/install.py", line 96, in do_egg_install self.run_command('bdist_egg') File "/usr/local/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/local/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/localhome/afarrell/setuptools-0.6c11/setuptools/command/bdist_egg.py", line 236, in run dry_run=self.dry_run, mode=self.gen_header()) File "/localhome/afarrell/setuptools-0.6c11/setuptools/command/bdist_egg.py", line 527, in make_zipfile z = zipfile.ZipFile(zip_filename, mode, compression=compression) File "/usr/local/lib/python2.7/zipfile.py", line 651, in __init__ "Compression requires the (missing) zlib module" RuntimeError: Compression requires the (missing) zlib module ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 23:03:59 2010 From: report at bugs.python.org (Jesse Noller) Date: Mon, 12 Jul 2010 21:03:59 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1278968639.69.0.177194012404.issue9205@psf.upfronthosting.co.za> Jesse Noller added the comment: Greg - I asked Ask to take a look - his celery package is a huge consumer of multiprocessing, and so I tend to run things past him as well. That said - to both of you - the fundamental problem the shutdown patch is trying to scratch is located in issue 9207 - greg's termination patch just exposes the problem in 9207 a lot more. Focusing specifically on the shutdown patch; our issue is that during interpreter shutdown, sys.modules is iterated, and entries are set to None - for threads which "live on" well into that cycle can end up losing imported functions/modules/etc. The multiple daemon threads in the Pool code are exposing this as code which executed imported functions (such as the debug() statement in handle_workers) which will fire after the pool has exited and the interpreter is shut down. We can work around the shutdown issue (really, bug 9207) by ignoring the exception such as shutdown.patch does, or passing in references/adding references to the functions those methods need. Or (as Brett suggested) converting them to class methods and adding references to the class. Or passing them in via the signature like this _handle_workers(arg, _debug=debug), etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 23:07:10 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 12 Jul 2010 21:07:10 +0000 Subject: [issue9236] Invalid reads in fastsearch.h In-Reply-To: <1278968830.4.0.450614560792.issue9236@psf.upfronthosting.co.za> Message-ID: <1278968830.4.0.450614560792.issue9236@psf.upfronthosting.co.za> New submission from Stefan Krah : In test_bytes Valgrind finds two reads with negative array indices. test_bytes ==7341== Invalid read of size 1 ==7341== at 0x4EDA24: fastsearch (fastsearch.h:143) ==7341== by 0x4F170E: bytearray_find_internal (find.h:42) ==7341== by 0x4F17BD: bytearray_rindex (bytearrayobject.c:1267) ==7341== by 0x49DDA0: PyEval_EvalFrameEx (ceval.c:4322) ==7341== by 0x49FD2A: PyEval_EvalCodeEx (ceval.c:3252) ==7341== by 0x49D741: PyEval_EvalFrameEx (ceval.c:4108) ==7341== by 0x49E155: PyEval_EvalFrameEx (ceval.c:4098) ==7341== by 0x49FD2A: PyEval_EvalCodeEx (ceval.c:3252) ==7341== by 0x4FE1BE: function_call (funcobject.c:526) ==7341== by 0x41AE8C: PyObject_Call (abstract.c:2522) ==7341== by 0x49B9AB: PyEval_EvalFrameEx (ceval.c:4325) ==7341== by 0x49FD2A: PyEval_EvalCodeEx (ceval.c:3252) ==7341== Address 0xcfd37df is 1 bytes before a block of size 6 alloc'd ==7341== at 0x4C2412C: malloc (vg_replace_malloc.c:195) ==7341== by 0x4C241A6: realloc (vg_replace_malloc.c:476) ==7341== by 0x4EF441: PyByteArray_Resize (bytearrayobject.c:259) ==7341== by 0x4F0F8A: bytearray_iconcat (bytearrayobject.c:340) ==7341== by 0x4F113E: bytearray_init (bytearrayobject.c:810) ==7341== by 0x468531: type_call (typeobject.c:723) ==7341== by 0x41AE8C: PyObject_Call (abstract.c:2522) ==7341== by 0x499129: PyEval_EvalFrameEx (ceval.c:4230) ==7341== by 0x49E155: PyEval_EvalFrameEx (ceval.c:4098) ==7341== by 0x49FD2A: PyEval_EvalCodeEx (ceval.c:3252) ==7341== by 0x4FE1BE: function_call (funcobject.c:526) ==7341== by 0x41AE8C: PyObject_Call (abstract.c:2522) ==7341== ==7341== ==7341== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- y ==7341== starting debugger with cmd: /usr/bin/gdb -nw /proc/7507/fd/1014 7507 GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu"... Attaching to program: /proc/7507/fd/1014, process 7507 fastsearch (s=0xcfd37e0 "world", n=0, p=0xa0170b4 "worm", m=4, maxcount=, mode=2) at Objects/stringlib/fastsearch.h:143 143 if (!STRINGLIB_BLOOM(mask, s[i-1])) (gdb) p i $1 = 0 ==7341== ==7341== Debugger has detached. Valgrind regains control. We continue. ==7341== Invalid read of size 1 ==7341== at 0x4ED9B0: fastsearch (fastsearch.h:149) ==7341== by 0x4F0938: bytearray_rsplit (split.h:311) ==7341== by 0x49E6C1: PyEval_EvalFrameEx (ceval.c:4012) ==7341== by 0x49E155: PyEval_EvalFrameEx (ceval.c:4098) ==7341== by 0x49FD2A: PyEval_EvalCodeEx (ceval.c:3252) ==7341== by 0x4FE1BE: function_call (funcobject.c:526) ==7341== by 0x41AE8C: PyObject_Call (abstract.c:2522) ==7341== by 0x49B9AB: PyEval_EvalFrameEx (ceval.c:4325) ==7341== by 0x49FD2A: PyEval_EvalCodeEx (ceval.c:3252) ==7341== by 0x4FE1BE: function_call (funcobject.c:526) ==7341== by 0x41AE8C: PyObject_Call (abstract.c:2522) ==7341== by 0x42237E: instancemethod_call (classobject.c:2578) ==7341== Address 0xf7c508f is 1 bytes before a block of size 12 alloc'd ==7341== at 0x4C2412C: malloc (vg_replace_malloc.c:195) ==7341== by 0x4C241A6: realloc (vg_replace_malloc.c:476) ==7341== by 0x4EF441: PyByteArray_Resize (bytearrayobject.c:259) ==7341== by 0x4F0F8A: bytearray_iconcat (bytearrayobject.c:340) ==7341== by 0x4F113E: bytearray_init (bytearrayobject.c:810) ==7341== by 0x468531: type_call (typeobject.c:723) ==7341== by 0x41AE8C: PyObject_Call (abstract.c:2522) ==7341== by 0x499129: PyEval_EvalFrameEx (ceval.c:4230) ==7341== by 0x49E155: PyEval_EvalFrameEx (ceval.c:4098) ==7341== by 0x49FD2A: PyEval_EvalCodeEx (ceval.c:3252) ==7341== by 0x4FE1BE: function_call (funcobject.c:526) ==7341== by 0x41AE8C: PyObject_Call (abstract.c:2522) ==7341== ==7341== ==7341== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- y ==7341== starting debugger with cmd: /usr/bin/gdb -nw /proc/7534/fd/1014 7534 GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu"... Attaching to program: /proc/7534/fd/1014, process 7534 fastsearch (s=0xf7c5090 "mississippi", n=0, p=0x9eba16c "ss", m=2, maxcount=-1, mode=2) at Objects/stringlib/fastsearch.h:149 149 if (!STRINGLIB_BLOOM(mask, s[i-1])) (gdb) p i $1 = 0 ---------- components: Interpreter Core messages: 110140 nosy: skrah priority: normal severity: normal status: open title: Invalid reads in fastsearch.h type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 23:11:13 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 12 Jul 2010 21:11:13 +0000 Subject: [issue9235] missing "import sys" in Tools/gdb/libpython.py In-Reply-To: <1278967235.19.0.848515468243.issue9235@psf.upfronthosting.co.za> Message-ID: <1278969073.46.0.761169419171.issue9235@psf.upfronthosting.co.za> Changes by Dave Malcolm : ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 23:17:50 2010 From: report at bugs.python.org (Andrew Farrell) Date: Mon, 12 Jul 2010 21:17:50 +0000 Subject: [issue6026] test_(zipfile|zipimport|gzip|distutils|sqlite) fail if zlib is not available In-Reply-To: <1242349106.59.0.466065396405.issue6026@psf.upfronthosting.co.za> Message-ID: <1278969470.37.0.482116194881.issue6026@psf.upfronthosting.co.za> Andrew Farrell added the comment: Apologies. Error on my part. For those that run into the same problem: Though zlib is installed on an earlier version of python, you need to have (ob debian) the package zlib1g-dev installed when you build python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 23:19:57 2010 From: report at bugs.python.org (Ask Solem) Date: Mon, 12 Jul 2010 21:19:57 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1278969597.77.0.994311547679.issue9205@psf.upfronthosting.co.za> Ask Solem added the comment: > Unfortunately, if you've lost a worker, you are no > longer guaranteed that cache will eventually be empty. > In particular, you may have lost a task, which could > result in an ApplyResult waiting forever for a _set call. > More generally, my chief assumption that went into this > is that the unexpected death of a worker process is > unrecoverable. It would be nice to have a better workaround > than just aborting everything, but I couldn't see a way > to do that. It would be a problem if the process simply disappeared, But in this case you have the ability to put a result on the queue, so it doesn't have to wait forever. For processes disappearing (if that can at all happen), we could solve that by storing the jobs a process has accepted (started working on), so if a worker process is lost, we can mark them as failed too. > I could be wrong, but that's not what my experiments > were indicating. In particular, if an unpickleable error occurs, > then a task has been lost, which means that the relevant map, > apply, etc. will wait forever for completion of the lost task. It's lost now, but not if we handle the error... For a single map operation this behavior may make sense, but what about someone running the pool as s long-running service for users to submit map operations to? Errors in this context are expected to happen, even unpickleable errors. I guess that the worker handler works as a supervisor is a side effect, as it was made for the maxtasksperchild feature, but for me it's a welcome one. With the supervisor in place, multiprocessing.pool is already fairly stable to be used for this use case, and there's not much to be done to make it solid (Celery is already running for months without issue, unless there's a pickling error...) > That does sound useful. Although, how can you determine the > job (and the value of i) if it's an unpickleable error? > It would be nice to be able to retrieve job/i without having > to unpickle the rest. I was already working on this issue last week actually, and I managed to do that in a way that works well enough (at least for me): http://github.com/ask/celery/commit/eaa4d5ddc06b000576a21264f11e6004b418bda1#diff-1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 23:24:57 2010 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 12 Jul 2010 21:24:57 +0000 Subject: [issue9232] Allow trailing comma in any function argument list. In-Reply-To: <1278945017.29.0.842296068848.issue9232@psf.upfronthosting.co.za> Message-ID: <1278969897.59.0.242924171821.issue9232@psf.upfronthosting.co.za> Nick Coghlan added the comment: I take it the AST generation just throws the extra comma away? You're sure this doesn't upset any of the node counts in that stage of the compiler? ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 23:29:23 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 12 Jul 2010 21:29:23 +0000 Subject: [issue9236] Invalid reads in fastsearch.h In-Reply-To: <1278968830.4.0.450614560792.issue9236@psf.upfronthosting.co.za> Message-ID: <1278970163.84.0.535640552904.issue9236@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 12 23:30:33 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 12 Jul 2010 21:30:33 +0000 Subject: [issue9193] Versioned .so files In-Reply-To: <1278527607.97.0.766712002778.issue9193@psf.upfronthosting.co.za> Message-ID: <1278970233.97.0.333561438434.issue9193@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Actually, the changes to distutils are not strictly necessary for PEP 3149 implementation (what the PEP-in-progress will be numbered). Once PEP 384 is implemented, it might be useful, but OTOH there might be a better way to support that. In any case, here's a new patch that just provides the configure switch. ---------- Added file: http://bugs.python.org/file17972/2010-07-12.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 00:29:24 2010 From: report at bugs.python.org (rocky bernstein) Date: Mon, 12 Jul 2010 22:29:24 +0000 Subject: [issue9237] Add sys.call_tracing to on-line sys module documentation In-Reply-To: <1278973764.17.0.0501374635668.issue9237@psf.upfronthosting.co.za> Message-ID: <1278973764.17.0.0501374635668.issue9237@psf.upfronthosting.co.za> New submission from rocky bernstein : sys.call_tracing doesn't appear in Python documents and I think it should. For a start, one could use the docstring from sysmodule.c: call_tracing(func, args) -> object Call func(*args), while tracing is enabled. The tracing state is saved, and restored afterwards. This is intended to be called from a debugger from a checkpoint, to recursively debug some other code. Thanks. ---------- assignee: docs at python components: Documentation messages: 110145 nosy: docs at python, rocky priority: normal severity: normal status: open title: Add sys.call_tracing to on-line sys module documentation type: feature request versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 00:46:54 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 12 Jul 2010 22:46:54 +0000 Subject: [issue3196] Option in pydoc to show docs from private methods In-Reply-To: <1214386355.64.0.670337337662.issue3196@psf.upfronthosting.co.za> Message-ID: <1278974814.77.0.0896368418066.issue3196@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This option would be more useful if it became an optional argument to the help() function. For someone working at the python command line prompt, having to switch to pydoc to see private method documentation may be inconvenient. It is more natural to write >>> help(foo, show_private=True) ---------- stage: -> needs patch versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 01:33:24 2010 From: report at bugs.python.org (Ryan Kelly) Date: Mon, 12 Jul 2010 23:33:24 +0000 Subject: [issue9238] zipfile incorrectly documented as not supporting archive comments In-Reply-To: <1278977604.77.0.794237265554.issue9238@psf.upfronthosting.co.za> Message-ID: <1278977604.77.0.794237265554.issue9238@psf.upfronthosting.co.za> New submission from Ryan Kelly : The zipfile module is prominently documented as "This module does not currently handle...ZIP files which have appended comments". But as far as I can tell, it handles them fine - there's even a "comment" property on the ZipFile object that you can set to modify the comment. I attach a simple doc patch that removes the apparently out-of-date information. ---------- assignee: docs at python components: Documentation files: zipfile_comment_doc.patch keywords: patch messages: 110147 nosy: docs at python, rfk priority: normal severity: normal status: open title: zipfile incorrectly documented as not supporting archive comments versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file17973/zipfile_comment_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 01:35:37 2010 From: report at bugs.python.org (Joe Neeman) Date: Mon, 12 Jul 2010 23:35:37 +0000 Subject: [issue3290] python-config --cflags includes irrelevant flags In-Reply-To: <1215284947.23.0.370691849564.issue3290@psf.upfronthosting.co.za> Message-ID: <1278977737.21.0.0774784382061.issue3290@psf.upfronthosting.co.za> Joe Neeman added the comment: It's still an issue in Python 2.6.5 as packaged by openSUSE 11.2. ---------- nosy: +Joe.Neeman _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 01:56:46 2010 From: report at bugs.python.org (Ryan Kelly) Date: Mon, 12 Jul 2010 23:56:46 +0000 Subject: [issue9239] zipfile: truncating comment can corrupt the zipfile In-Reply-To: <1278979006.42.0.00730549521889.issue9239@psf.upfronthosting.co.za> Message-ID: <1278979006.42.0.00730549521889.issue9239@psf.upfronthosting.co.za> New submission from Ryan Kelly : If you open a ZipFile in append mode and modify the comment to be shorter than what was originally there, the file will become corrupted. Truncated data from the original comment is left "dangling" at the end of the zipfile. A much more trivial bug discovered while writing tests for this: setting the "comment" attribute doesn't mark the zipfile as modified, so the change won't be written out unless you also modify one of the archive files. The attached patch fixes (and adds tests for) these issues. ---------- components: Library (Lib) files: zipfile_appendmode_comment.patch keywords: patch messages: 110149 nosy: rfk priority: normal severity: normal status: open title: zipfile: truncating comment can corrupt the zipfile type: performance versions: Python 3.2 Added file: http://bugs.python.org/file17974/zipfile_appendmode_comment.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 02:11:13 2010 From: report at bugs.python.org (Diego Jacobi) Date: Tue, 13 Jul 2010 00:11:13 +0000 Subject: [issue9240] different behaviour with for loop... interpreted vs scripted In-Reply-To: <1278979872.82.0.311259826309.issue9240@psf.upfronthosting.co.za> Message-ID: <1278979872.82.0.311259826309.issue9240@psf.upfronthosting.co.za> New submission from Diego Jacobi : Hi. I am not a python expert and i was trying to reduce this next code: data = [] i = 0 for j in range(packetlen+1): print i, self.channels_in[ channels[i] ] data.append( self.channels_in[ channels[i] ].pop() ) i += 1 if i >= len(channels): i=0 into something like this: data = [] for j in range(packetlen+1), i in channels: print j, i data.append( self.channels_in[ i ].pop() ) which is much more readable and short. But i didnt know if this sintax is really supported (also i didnt found examples on internet), so i just tried. I runned the script and it didnt complains with errors, BUT i found that the behavior is not what i expected. I expected j to take value of range() and i to take the values of channels until range() gets empty. well, the actual behavior is that j takes the value of the complete range() as in j = range(..) and the for loop iterates as in for i in channels: ALSO i tested this un the python command line and it produces different behaviours: the same sintax writen as: for j in range(1,5), i in range(120,500,12): print j, i produces Traceback (most recent call last): File "", line 1, in NameError: name 'i' is not defined Thats all. I guess that if it produces different results, then there is an error happening here. If there is a pythonic way to do this: for j in range(packetlen+1), i in channels: please tell me. Cheers. Diego ---------- messages: 110150 nosy: jacobidiego priority: normal severity: normal status: open title: different behaviour with for loop... interpreted vs scripted type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 02:26:24 2010 From: report at bugs.python.org (Ryan Kelly) Date: Tue, 13 Jul 2010 00:26:24 +0000 Subject: [issue5950] Make zipimport work with zipfile containing comments In-Reply-To: <1241628586.95.0.0801479384158.issue5950@psf.upfronthosting.co.za> Message-ID: <1278980784.8.0.327425899243.issue5950@psf.upfronthosting.co.za> Ryan Kelly added the comment: I can't imagine anyone depending on this lack-of-feature, but there's no arguing with the technicality of it. One more small incentive to make the jump to Python 3 then. Anyway, I've revisited the patch to clean up the logic and control flow, and added another test to ensure that it works even when the EOCD record crosses a chunk boundary. Also checked that it works on win32, which fortunately it did without modification. ---------- Added file: http://bugs.python.org/file17975/zipimport_with_comments.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 02:28:24 2010 From: report at bugs.python.org (Ryan Kelly) Date: Tue, 13 Jul 2010 00:28:24 +0000 Subject: [issue5950] Make zipimport work with zipfile containing comments In-Reply-To: <1241628586.95.0.0801479384158.issue5950@psf.upfronthosting.co.za> Message-ID: <1278980904.15.0.0570781197795.issue5950@psf.upfronthosting.co.za> Changes by Ryan Kelly : Removed file: http://bugs.python.org/file17944/zipimport_with_comments.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 02:43:48 2010 From: report at bugs.python.org (Greg Brockman) Date: Tue, 13 Jul 2010 00:43:48 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1278981828.27.0.860583952551.issue9205@psf.upfronthosting.co.za> Greg Brockman added the comment: > For processes disappearing (if that can at all happen), we could solve > that by storing the jobs a process has accepted (started working on), > so if a worker process is lost, we can mark them as failed too. Sure, this would be reasonable behavior. I had considered it but decided it as a larger change than I wanted to make without consulting the devs. > I was already working on this issue last week actually, and I managed > to do that in a way that works well enough (at least for me): If I'm reading this right, you catch the exception upon pickling the result (at which point you have the job/i information already; totally reasonable). I'm worried about the case of unpickling the task failing. (Namely, the "task = get()" line of the "worker" method.) Try running the following: """ #!/usr/bin/env python import multiprocessing p = multiprocessing.Pool(1) def foo(x): pass p.apply(foo, [1]) """ And if "task = get()" fails, then the worker doesn't know what the relevant job/i values are. Anyway, so I guess the question that is forming in my mind is, what sorts of errors do we want to handle, and how do we want to handle them? My answer is I'd like to handle all possible errors with some behavior that is not "hang forever". This includes handling children processes dying by signals or os._exit, raising unpickling errors, etc. I believe my patch provides this functionality. By adding the extra mechanism that you've written/proposed, we can improve the error handling in specific recoverable cases (which probably constitute the vast majority of real-world cases). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 04:11:34 2010 From: report at bugs.python.org (Kurt B. Kaiser) Date: Tue, 13 Jul 2010 02:11:34 +0000 Subject: [issue1028] Tkinter binding involving Control-spacebar raises unicode error In-Reply-To: <1188161311.7.0.864205774814.issue1028@psf.upfronthosting.co.za> Message-ID: <1278987094.54.0.827557776671.issue1028@psf.upfronthosting.co.za> Changes by Kurt B. Kaiser : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 04:21:50 2010 From: report at bugs.python.org (Kurt B. Kaiser) Date: Tue, 13 Jul 2010 02:21:50 +0000 Subject: [issue7738] IDLE hang when tooltip comes up in Linux In-Reply-To: <1263889833.11.0.812168606755.issue7738@psf.upfronthosting.co.za> Message-ID: <1278987710.98.0.531462663815.issue7738@psf.upfronthosting.co.za> Kurt B. Kaiser added the comment: Works for me on 2.6.4, trunk, and 3.2a0 - arch linux Tk 8.4 ---------- keywords: +needs review resolution: -> works for me _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 04:26:26 2010 From: report at bugs.python.org (Graham Dumpleton) Date: Tue, 13 Jul 2010 02:26:26 +0000 Subject: [issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others. In-Reply-To: <1268131645.26.0.730387379265.issue8098@psf.upfronthosting.co.za> Message-ID: <1278987986.53.0.994892235046.issue8098@psf.upfronthosting.co.za> Graham Dumpleton added the comment: Nick, there is no main module in the same way there is when using the Python command line. Ie., there is no module that has __name__ being __main__. The closest thing is the WSGI script file which holds the application object for the WSGI application. There could technically be many of these for the one (sub)interpreter. These WSGI script files are already imported as a module with magic name based on file system path to the WSGI script file and so the module import lock would already be held while doing so. The specific situation which is coming up is not related to the import of those script files but after the WSGI script file has already been loaded. That is, when threads from an external thread pool are later calling into the WSGI application to handle individual HTTP requests to the WSGI application. Being multithreaded, two such HTTP requests could be handled at the same time. If one of those threads lazily imports a Python module and thus acquires the module import lock while doing so, and at the same time another thread calls into any of the various Python library functions which internally use PyImport_ImportModuleNoBlock() then you will get the exception described. Because it relates to what multiple threads are doing at the same, then it is totally unpredictable as whether one can get hit by this problem. This is why the problem is so frustrating. Your code could work fine most of the time then all of a sudden you could have one request which hits this problem if it is the first time to call these functions and another thread just happens to be importing a totally unrelate module at the same time. So, that is the more in depth problem that is occurring in practice. I boiled it down to the simple example so people could see it and reproduce it independent of mod_wsgi. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 04:41:50 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 13 Jul 2010 02:41:50 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278988910.64.0.593495656273.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: issue9206b.diff fixes test_datetime in issue9206a.diff by restoring sys.modules in-place in tearDown method. Based on python-dev discussion, I am marking this as accepted and uploading the patch to Rietveld for commit review. Please comment on the code at http://codereview.appspot.com/1824041 . Unfortunately upload tool does not recognize copied/moved files. ---------- resolution: -> accepted stage: patch review -> commit review Added file: http://bugs.python.org/file17976/issue9206b.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 05:18:33 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 13 Jul 2010 03:18:33 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278991113.85.0.00876684715058.issue7989@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17977/issue9206b.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 05:18:42 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 13 Jul 2010 03:18:42 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278991122.52.0.210987852225.issue7989@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17977/issue9206b.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 05:18:48 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 13 Jul 2010 03:18:48 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278991128.8.0.816665516459.issue7989@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17976/issue9206b.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 05:19:16 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 13 Jul 2010 03:19:16 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1278991156.08.0.943126798341.issue7989@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17978/issue9206b.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 05:32:12 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 13 Jul 2010 03:32:12 +0000 Subject: [issue9222] IDLE: Fix open/saveas 'Files of type' choices In-Reply-To: <1278809052.13.0.969100167059.issue9222@psf.upfronthosting.co.za> Message-ID: <1278991932.35.0.772046732933.issue9222@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +kbk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 06:12:10 2010 From: report at bugs.python.org (Reid Kleckner) Date: Tue, 13 Jul 2010 04:12:10 +0000 Subject: [issue8844] Condition.wait() doesn't raise KeyboardInterrupt In-Reply-To: <1275065292.27.0.238026363438.issue8844@psf.upfronthosting.co.za> Message-ID: <1278994330.64.0.704026802337.issue8844@psf.upfronthosting.co.za> Reid Kleckner added the comment: Alternatively, do you think it would be better to ignore interrupts when a timeout is passed? If a timeout is passed, the lock acquire will eventually fail in a deadlock situation, and the signal will be handled in the eval loop. However, if the timeout is sufficiently long, this is still a problem. I'd prefer to do that or use gettimeofday from _time than leave this as is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 06:53:22 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 13 Jul 2010 04:53:22 +0000 Subject: [issue5950] Make zipimport work with zipfile containing comments In-Reply-To: <1241628586.95.0.0801479384158.issue5950@psf.upfronthosting.co.za> Message-ID: <1278996802.93.0.0349917698032.issue5950@psf.upfronthosting.co.za> Terry J. Reedy added the comment: >I can't imagine anyone depending on this lack-of-feature, Neither can I, but I can imaging someone writing code that depended on the feature. If added to 3.1.3, then code that depended on it would not run on 3.1, 3.1.1, and 3.1.2. The same is true, of course, for bug fixes, but the doc does not need changing for bug fixes, and the impact is otherwise less. > One more small incentive to make the jump to Python 3 then. Or to 3.2 from any 3.1 version, which is the normal progession absent the dual track anomaly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 07:12:13 2010 From: report at bugs.python.org (Reid Kleckner) Date: Tue, 13 Jul 2010 05:12:13 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1278997933.06.0.119216625086.issue9079@psf.upfronthosting.co.za> Reid Kleckner added the comment: The patch looks good to me FWIW. I would be interested in using this perhaps in issue8844, which involves lock timeouts. It may be true that the POSIX API uses nanoseconds, but pythreads only exposes microsecond precision. In order to use it from the thread module, it need to get moved into Python/. My best guess at the best place to put it would be sysmodule.c, since that already wraps other system calls. Or, you know, we could live a little and make a new file for it. :) ---------- nosy: +rnk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 08:05:08 2010 From: report at bugs.python.org (Stefan Behnel) Date: Tue, 13 Jul 2010 06:05:08 +0000 Subject: [issue1158231] string.Template does not allow step-by-step replacements Message-ID: <1279001108.41.0.198653702949.issue1158231@psf.upfronthosting.co.za> Stefan Behnel added the comment: I actually am no longer interested (after 5 years), but if the patch solves the problem, it'd be good to apply it. Lacks a docs patch, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 10:26:02 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 13 Jul 2010 08:26:02 +0000 Subject: [issue9240] different behaviour with for loop... interpreted vs scripted In-Reply-To: <1278979872.82.0.311259826309.issue9240@psf.upfronthosting.co.za> Message-ID: <1279009562.8.0.673817010312.issue9240@psf.upfronthosting.co.za> Ezio Melotti added the comment: "for j in range(1,5), i in range(120,500,12):" is equivalent to "for j in (range(1,5), i in range(120,500,12)):" so the sequence here is a tuple that contains range(1,5) as first element and "i in range(120,500,12)" as second element. Since 'i' is needed before the loop starts to check if it's in range(120,500,12), if you don't define it, it raises a NameError. If 'i' already had some value before, then the code works, but it doesn't do what you expect. I.e., this code: >>> i = 0 >>> for j in (range(1,5), i in range(120,500,12)): ... j,i ... results in : (range(1, 5), 0) (False, 0) because the first element of the sequence is range(1,5) so at the first iteration j = range(1,5) and since 'i' is untouched it's still 0, so the first line ends up being (range(1,5), 0). At the second iteration the value of j is "i in range(120,500,12)" and since 'i' is 0 and 0 is not in range(120,500,12), that evaluates to False. So we have j = False and 'i' is still 0, hence the (False, 0) in the second line. The different results are because probably you had 'i = ' in your program but not in the interpreter. What you want is "for j, i in zip(range(packetlen+1), channels): ..." or possibly "for j, i in enumerate(channels): ...". I'm not sure anything can be done in this case, except maybe require () in case the sequence contains an 'in', but I'm not sure it's worth doing it. I'll leave this open for a while to see if other developers have any comment. ---------- nosy: +ezio.melotti status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 10:37:16 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 13 Jul 2010 08:37:16 +0000 Subject: [issue9232] Allow trailing comma in any function argument list. In-Reply-To: <1278945017.29.0.842296068848.issue9232@psf.upfronthosting.co.za> Message-ID: <1279010236.62.0.490042738614.issue9232@psf.upfronthosting.co.za> Mark Dickinson added the comment: No, I'm not sure. :) I'll double check. So I'm looking at ast_for_arguments and handle_keywordonly_args in ast.c. As far as I can tell, that's the only relevant bit; is there anywhere else I should be checking? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 11:01:51 2010 From: report at bugs.python.org (Mickey Killianey) Date: Tue, 13 Jul 2010 09:01:51 +0000 Subject: [issue876421] logging handlers raise exception on level Message-ID: <1279011711.0.0.73794307078.issue876421@psf.upfronthosting.co.za> Mickey Killianey added the comment: Vinay: thanks for the response. My use case is that I've inherited a legacy application with a problematic third-party module (call it 'foo'). I want to sprinkle in some file-logging for the 'foo' logger to trace what's going on, while making the minimal impact on the module. Since 'foo' does some reflection on itself, I also want to avoid introducing new symbols in the module, if possible. You said: > If you're after convenience, you could use the dictionary > configuration API which allows you to set the levels > declaratively. If by "dictionary configuration API" you're suggesting logging.config.dictConfig, then yes, it does meet my criteria, although the minimal amount of code to configure one file handler looks pretty long-winded for what seems like a fairly common request: logging.config.dictConfig({ 'version' : 1, 'handlers' : { 'handler_name' : { 'class' : 'logging.FileHandler', 'level' : logging.DEBUG, 'filename' : 'foo.log', }, }, 'loggers' : { 'foo' : { 'handlers' : [ 'handler_name', ], }, }, }) Or were you suggesting logging.basicConfig? The limitation of basicConfig seems to be that it only works on an unconfigured root logger, not on a named logger, and it doesn't work if anyone else has touched root. I was hoping for something that's simple, easy-to-remember, easy-to-type, and makes a minimal impact on the module I'm debugging. For example, how do any of these sound...? ...if basicConfig had an optional 'name' argument, so that it could config loggers other than root logger: logging.basicConfig(name='foo', filename='foo.log', level=DEBUG) ...if 'basicConfig' was a method on Logger: logging.getLogger('foo').basicConfig(filename='foo.log', level=DEBUG) ...if the handlers' setters supported the builder pattern and returned self from setLevel: logging.getLogger('foo').addHandler(FileHandler('foo.log').setLevel(DEBUG)) (Instead of commenting on this closed bug, should I enter this as a new issue and set it as a feature request?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 11:04:36 2010 From: report at bugs.python.org (Gianfranco) Date: Tue, 13 Jul 2010 09:04:36 +0000 Subject: [issue9241] SAXParseError on unicode (Japanese) file In-Reply-To: <1279011876.88.0.998505025151.issue9241@psf.upfronthosting.co.za> Message-ID: <1279011876.88.0.998505025151.issue9241@psf.upfronthosting.co.za> New submission from Gianfranco : When parsing a UTF-16 little-endian encoded XML file containing some japanese characters, the xml.sax.parse function raises a SAXParseException exception saying "no element found". Problem arises with/on: Python 2.5.2/Windows XP Pro SP3 32 bit Python 2.6.4/Windows XP Pro SP3 32 bit Python 2.5.2/Windows 2008 Server SP2 64 bit The same file is successfully processed with/on: Python 2.4.3/CentOS 5.4 Python 2.6.3/CentOS 5.4 I've attached a minimal XML file that contains a single U+FF1A japanese character that triggers the exception. Code for parsing the file follows: import xml.sax xml.sax.parse(open("ff1a.xml"), xml.sax.ContentHandler()) Best regards, Gianfranco ---------- components: XML files: ff1a.xml messages: 110163 nosy: gianzula priority: normal severity: normal status: open title: SAXParseError on unicode (Japanese) file type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file17979/ff1a.xml _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 11:13:40 2010 From: report at bugs.python.org (Eric Smith) Date: Tue, 13 Jul 2010 09:13:40 +0000 Subject: [issue9240] different behaviour with for loop... interpreted vs scripted In-Reply-To: <1278979872.82.0.311259826309.issue9240@psf.upfronthosting.co.za> Message-ID: <1279012420.5.0.0269505990048.issue9240@psf.upfronthosting.co.za> Eric Smith added the comment: Excellent explanation. It's just a misunderstanding of how the language works, so nothing to do here. Closing. ---------- nosy: +eric.smith resolution: -> invalid status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 11:24:48 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 13 Jul 2010 09:24:48 +0000 Subject: [issue9242] unicodeobject.c: use of uninitialized values In-Reply-To: <1279013088.42.0.0403163187541.issue9242@psf.upfronthosting.co.za> Message-ID: <1279013088.42.0.0403163187541.issue9242@psf.upfronthosting.co.za> New submission from Stefan Krah : Not sure if this is valid or if there is some internal trickery that Valgrind isn't aware of. If it's the latter, perhaps an entry to Misc/valgrind.supp could be added. test_bug1175396 (__main__.UTF32Test) ... ==26861== Conditional jump or move depends on uninitialised value(s) ==26861== at 0x48A2DD: PyUnicodeUCS2_DecodeUTF32Stateful (unicodeobject.c:2282) ==26861== by 0x50E25C: utf_32_le_decode (_codecsmodule.c:420) ==26861== by 0x52E727: PyCFunction_Call (methodobject.c:81) ==26861== by 0x4B4EB7: call_function (ceval.c:4012) ==26861== by 0x4B1402: PyEval_EvalFrameEx (ceval.c:2665) ==26861== by 0x4B31DA: PyEval_EvalCodeEx (ceval.c:3252) ==26861== by 0x4B52C0: fast_function (ceval.c:4108) ==26861== by 0x4B4FE1: call_function (ceval.c:4033) ==26861== by 0x4B1402: PyEval_EvalFrameEx (ceval.c:2665) ==26861== by 0x4B31DA: PyEval_EvalCodeEx (ceval.c:3252) ==26861== by 0x4B52C0: fast_function (ceval.c:4108) ==26861== by 0x4B4FE1: call_function (ceval.c:4033) ==26861== ==26861== ==26861== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- y ==26861== starting debugger with cmd: /usr/bin/gdb -nw /proc/26862/fd/1014 26862 GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu"... Attaching to program: /proc/26862/fd/1014, process 26862 0x000000000048a2dd in PyUnicodeUCS2_DecodeUTF32Stateful (s=0x5bd6a54 "\n", size=1, errors=0x5add144 "strict", byteorder=0x7feffb18c, consumed=0x7feffb170) at Objects/unicodeobject.c:2282 2282 if (qq[iorder[2]] != 0 || qq[iorder[3]] != 0) (gdb) p s $1 = 0x5bd6a54 "\n" (gdb) p qq $2 = (const unsigned char *) 0x5bd6a54 "\n" (gdb) p iorder[2] $3 = 2 (gdb) p iorder[3] $4 = 3 (gdb) p bo $5 = -1 (gdb) p *byteorder $6 = -1 ---------- messages: 110165 nosy: lemburg, skrah priority: normal severity: normal status: open title: unicodeobject.c: use of uninitialized values type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 11:57:00 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 13 Jul 2010 09:57:00 +0000 Subject: [issue6668] locale.py: can't parse sr_RS@latin locale In-Reply-To: <1278856449.68.0.129254638269.issue6668@psf.upfronthosting.co.za> Message-ID: <4C3C3869.8090209@egenix.com> Marc-Andre Lemburg added the comment: This should be fixed in Python 2.7. It added a few more aliases: 'sr_rs': 'sr_RS.UTF-8', 'sr_rs.utf8 at latn': 'sr_RS.UTF-8 at latin', 'sr_rs at latin': 'sr_RS.UTF-8 at latin', 'sr_rs at latn': 'sr_RS.UTF-8 at latin', ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 11:59:22 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 13 Jul 2010 09:59:22 +0000 Subject: [issue1076790] test test_codecs failed In-Reply-To: <1278883579.65.0.16731174573.issue1076790@psf.upfronthosting.co.za> Message-ID: <4C3C38EB.8030004@egenix.com> Marc-Andre Lemburg added the comment: Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > The OP compiled python with --with-wctype-functions, and the libc wctype functions work differently depending on the locale. > I suggest closing this issue as "won't fix", and favor the removal of the "--with-wctype-functions" option proposed in issue9210. +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 12:29:08 2010 From: report at bugs.python.org (P. Henrique Silva) Date: Tue, 13 Jul 2010 10:29:08 +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: <1279016948.45.0.293613374279.issue7946@psf.upfronthosting.co.za> Changes by P. Henrique Silva : ---------- nosy: +phsilva _______________________________________ Python tracker _______________________________________ From mal at egenix.com Tue Jul 13 11:56:57 2010 From: mal at egenix.com (M.-A. Lemburg) Date: Tue, 13 Jul 2010 11:56:57 +0200 Subject: [issue6668] locale.py: can't parse sr_RS@latin locale In-Reply-To: <1278856449.68.0.129254638269.issue6668@psf.upfronthosting.co.za> References: <1278856449.68.0.129254638269.issue6668@psf.upfronthosting.co.za> Message-ID: <4C3C3869.8090209@egenix.com> This should be fixed in Python 2.7. It added a few more aliases: 'sr_rs': 'sr_RS.UTF-8', 'sr_rs.utf8 at latn': 'sr_RS.UTF-8 at latin', 'sr_rs at latin': 'sr_RS.UTF-8 at latin', 'sr_rs at latn': 'sr_RS.UTF-8 at latin', -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jul 13 2010) >>> Python/Zope Consulting and Support ... http://www.egenix.com/ >>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/ >>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/ ________________________________________________________________________ 2010-07-19: EuroPython 2010, Birmingham, UK 5 days to go ::: Try our new mxODBC.Connect Python Database Interface for free ! :::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 http://www.egenix.com/company/contact/ From report at bugs.python.org Tue Jul 13 12:45:47 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 13 Jul 2010 10:45:47 +0000 Subject: [issue9242] unicodeobject.c: use of uninitialized values In-Reply-To: <1279013088.42.0.0403163187541.issue9242@psf.upfronthosting.co.za> Message-ID: <4C3C43D7.3060900@egenix.com> Marc-Andre Lemburg added the comment: Stefan Krah wrote: > > New submission from Stefan Krah : > > Not sure if this is valid or if there is some internal trickery that Valgrind isn't aware of. If it's the latter, perhaps an entry to > Misc/valgrind.supp could be added. > > > test_bug1175396 (__main__.UTF32Test) ... ==26861== Conditional jump or move depends on uninitialised value(s) > ==26861== at 0x48A2DD: PyUnicodeUCS2_DecodeUTF32Stateful (unicodeobject.c:2282) > ==26861== by 0x50E25C: utf_32_le_decode (_codecsmodule.c:420) > ==26861== by 0x52E727: PyCFunction_Call (methodobject.c:81) > ==26861== by 0x4B4EB7: call_function (ceval.c:4012) > ==26861== by 0x4B1402: PyEval_EvalFrameEx (ceval.c:2665) > ==26861== by 0x4B31DA: PyEval_EvalCodeEx (ceval.c:3252) > ==26861== by 0x4B52C0: fast_function (ceval.c:4108) > ==26861== by 0x4B4FE1: call_function (ceval.c:4033) > ==26861== by 0x4B1402: PyEval_EvalFrameEx (ceval.c:2665) > ==26861== by 0x4B31DA: PyEval_EvalCodeEx (ceval.c:3252) > ==26861== by 0x4B52C0: fast_function (ceval.c:4108) > ==26861== by 0x4B4FE1: call_function (ceval.c:4033) > ==26861== > ==26861== > ==26861== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- y > ==26861== starting debugger with cmd: /usr/bin/gdb -nw /proc/26862/fd/1014 26862 > GNU gdb 6.8-debian > Copyright (C) 2008 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "x86_64-linux-gnu"... > Attaching to program: /proc/26862/fd/1014, process 26862 > 0x000000000048a2dd in PyUnicodeUCS2_DecodeUTF32Stateful (s=0x5bd6a54 "\n", size=1, errors=0x5add144 "strict", byteorder=0x7feffb18c, > consumed=0x7feffb170) at Objects/unicodeobject.c:2282 > 2282 if (qq[iorder[2]] != 0 || qq[iorder[3]] != 0) > (gdb) p s > $1 = 0x5bd6a54 "\n" > (gdb) p qq > $2 = (const unsigned char *) 0x5bd6a54 "\n" > (gdb) p iorder[2] > $3 = 2 > (gdb) p iorder[3] > $4 = 3 > (gdb) p bo > $5 = -1 > (gdb) p *byteorder > $6 = -1 Could you check whether the report goes away when using the following definition of iorder in that function: #ifdef BYTEORDER_IS_LITTLE_ENDIAN const int iorder[4] = {0, 1, 2, 3}; #else const int iorder[4] = {3, 2, 1, 0}; #endif I guess that the missing dimension is causing the valgrind report. >From a code perspective, everything is in order, in fact I'd expect the compiler to optimize the array away. It may even be a good idea to replace the array with symbols: #ifdef BYTEORDER_IS_LITTLE_ENDIAN # define BYTEORDER_0 0 # define BYTEORDER_1 1 # define BYTEORDER_2 2 # define BYTEORDER_3 3 #else # define BYTEORDER_0 3 # define BYTEORDER_1 2 # define BYTEORDER_2 1 # define BYTEORDER_3 0 #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 13:11:33 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 13 Jul 2010 11:11:33 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279019493.77.0.0179034508326.issue9205@psf.upfronthosting.co.za> Ask Solem added the comment: I think I misunderstood the purpose of the patch. This is about handling errors on get(), not on put() like I was working on. So sorry for that confusion. What kind of errors are you having that makes the get() call fail? If the queue is not working, then I guess the only sensible approach is to shutdown the pool like suggested. I'll open up another issue for unpickleable errors then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 13:15:58 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 13 Jul 2010 11:15:58 +0000 Subject: [issue9185] os.getcwd causes infinite loop on solaris In-Reply-To: <1278492997.35.0.523630408468.issue9185@psf.upfronthosting.co.za> Message-ID: <1279019758.81.0.912910465821.issue9185@psf.upfronthosting.co.za> Stefan Krah added the comment: Here's a patch. If PATH_MAX is defined, a static buffer is used. I left the arbitrary path length version since apparently some systems (HURD) don't have any limits for PATH_MAX. In case anyone is mystified how to reproduce the original problem on OpenSolaris: # This worked fine: ./python Lib/test/regrtest.py -uall test_posix # This showed the bug: ./python Lib/test/test_posix.py The bug could also be reproduced by creating a path name longer than 1024 chars, changing into that directory and attempting to start python. Antoine, could I ask you to comment on the patch? ---------- keywords: +needs review, patch nosy: +pitrou stage: needs patch -> patch review Added file: http://bugs.python.org/file17980/issue9185.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 13:40:10 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 13 Jul 2010 11:40:10 +0000 Subject: [issue9242] unicodeobject.c: use of uninitialized values In-Reply-To: <1279013088.42.0.0403163187541.issue9242@psf.upfronthosting.co.za> Message-ID: <1279021210.52.0.977549548315.issue9242@psf.upfronthosting.co.za> Stefan Krah added the comment: > const int iorder[4] = {0, 1, 2, 3}; const isn't possible, iorder is modified later on. Adding the array dimension did not change anything. Making everything const (see below) did not change anything either. I presume that Valgrind regards qq[2] or qq[3] as uninitialized. Index: Objects/unicodeobject.c =================================================================== --- Objects/unicodeobject.c (revision 82816) +++ Objects/unicodeobject.c (working copy) @@ -2216,10 +2216,12 @@ int bo = 0; /* assume native ordering by default */ const char *errmsg = ""; /* Offsets from q for retrieving bytes in the right order. */ + const int iorder_le[] = {0, 1, 2, 3}; + const int iorder_be[] = {3, 2, 1, 0}; #ifdef BYTEORDER_IS_LITTLE_ENDIAN - int iorder[] = {0, 1, 2, 3}; + const int *iorder = iorder_le; #else - int iorder[] = {3, 2, 1, 0}; + const int *iorder = iorder_be; #endif PyObject *errorHandler = NULL; PyObject *exc = NULL; @@ -2262,17 +2264,11 @@ if (bo == -1) { /* force LE */ - iorder[0] = 0; - iorder[1] = 1; - iorder[2] = 2; - iorder[3] = 3; + iorder = iorder_le; } else if (bo == 1) { /* force BE */ - iorder[0] = 3; - iorder[1] = 2; - iorder[2] = 1; - iorder[3] = 0; + iorder = iorder_be; } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 13:47:49 2010 From: report at bugs.python.org (James Lee) Date: Tue, 13 Jul 2010 11:47:49 +0000 Subject: [issue9243] sndhdr erroneously detects files as vox In-Reply-To: <1279021669.64.0.945928628097.issue9243@psf.upfronthosting.co.za> Message-ID: <1279021669.64.0.945928628097.issue9243@psf.upfronthosting.co.za> New submission from James Lee : http://svn.python.org/view/python/branches/py3k/Lib/sndhdr.py?r1=56957&r2=56987 seems to have broken sndhdr as it incorrectly detects files as voc (all that time ago and nobody has noticed...): [jbit at miku]~$ xxd test.wav | head -n 1 0000000: 5249 4646 2478 e001 5741 5645 666d 7420 RIFF$x..WAVEfmt [jbit at miku]~$ python3.1 >>> import sndhdr >>> sndhdr.what("test.wav") ('voc', 0, 1, -1, 8) I'm a little unsure why it got changed from indexing to startswith() at all, but changes like the following are just totally incorrect. - if h[:20] != b'Creative Voice File\032': + if h.startswith(b'Creative Voice File\032'): Attached is a patch against the py3k branch which fixes the issue as well as some other things obviously broken by the same changelist, although it might be a good idea to review the changelist again to make sure there's nothing else obviously broken :) >>> sndhdr.what("test.wav") ('wav', 48000, 2, -1, 16) ---------- components: Library (Lib) files: sndhdr-fix.patch keywords: patch messages: 110172 nosy: jbit priority: normal severity: normal status: open title: sndhdr erroneously detects files as vox type: behavior versions: Python 3.1 Added file: http://bugs.python.org/file17981/sndhdr-fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 13:51:55 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 13 Jul 2010 11:51:55 +0000 Subject: [issue9244] multiprocessing.pool: Pool crashes if worker can't encode result (with patch) In-Reply-To: <1279021915.02.0.743108448879.issue9244@psf.upfronthosting.co.za> Message-ID: <1279021915.02.0.743108448879.issue9244@psf.upfronthosting.co.za> New submission from Ask Solem : If the target function returns an unpickleable value the worker process crashes. This patch tries to safely handle unpickleable errors, while enabling the user to inspect such errors after the fact. In addition a new argument has been added to apply_async: error_callback. This is an optional callback that is called if the job raises an exception. The signature of the callback is `callback(exc)`. ---------- components: Library (Lib) files: multiprocessing-trunk at 82502-handle_worker_encoding_errors.patch keywords: patch messages: 110173 nosy: asksol, jnoller priority: normal severity: normal status: open title: multiprocessing.pool: Pool crashes if worker can't encode result (with patch) type: behavior versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file17982/multiprocessing-trunk at 82502-handle_worker_encoding_errors.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 13:52:54 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 13 Jul 2010 11:52:54 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279021974.83.0.55386814925.issue9205@psf.upfronthosting.co.za> Ask Solem added the comment: For reference I opened up a new issue for the put() case here: http://bugs.python.org/issue9244 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 13:55:09 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 13 Jul 2010 11:55:09 +0000 Subject: [issue9244] multiprocessing.pool: Worker crashes if result can't be encoded result (with patch) In-Reply-To: <1279021915.02.0.743108448879.issue9244@psf.upfronthosting.co.za> Message-ID: <1279022109.53.0.363104362247.issue9244@psf.upfronthosting.co.za> Changes by Ask Solem : ---------- title: multiprocessing.pool: Pool crashes if worker can't encode result (with patch) -> multiprocessing.pool: Worker crashes if result can't be encoded result (with patch) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 13:56:29 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 13 Jul 2010 11:56:29 +0000 Subject: [issue9244] multiprocessing.pool: Worker crashes if result can't be encoded In-Reply-To: <1279021915.02.0.743108448879.issue9244@psf.upfronthosting.co.za> Message-ID: <1279022189.5.0.310542168486.issue9244@psf.upfronthosting.co.za> Changes by Ask Solem : ---------- title: multiprocessing.pool: Worker crashes if result can't be encoded result (with patch) -> multiprocessing.pool: Worker crashes if result can't be encoded _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 13:58:36 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 13 Jul 2010 11:58:36 +0000 Subject: [issue9245] "from itertools imoprt *" crashes 2to3 In-Reply-To: <1279022316.28.0.141997544186.issue9245@psf.upfronthosting.co.za> Message-ID: <1279022316.28.0.141997544186.issue9245@psf.upfronthosting.co.za> New submission from Ronald Oussoren : a script containing the following line crashes 2to3 with an assertion error. The line: from itertools import * File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib2to3/fixes/fix_itertools_imports.py", line 24, in transform assert child.type == syms.import_as_name AssertionError ---------- components: 2to3 (2.x to 3.0 conversion tool) messages: 110175 nosy: ronaldoussoren priority: normal severity: normal status: open title: "from itertools imoprt *" crashes 2to3 versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 14:06:03 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Jul 2010 12:06:03 +0000 Subject: [issue9185] os.getcwd causes infinite loop on solaris In-Reply-To: <1278492997.35.0.523630408468.issue9185@psf.upfronthosting.co.za> Message-ID: <1279022763.71.0.470174223778.issue9185@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not sure I understand the cause of the problem. Does getcwd() fail on Solaris when the path length is higher than PATH_MAX, even if you pass a big enough buffer? First, your patch makes getcwd() return an error when the path length is longer than PATH_MAX, which it doesn't today. This is a regression and shouldn't probably go in. Second, the test_posix change is a bit too tolerant. IMO it should check that the error is ERANGE, and that we are under Solaris. Otherwise the error shouldn't happen, should it? Also, I wonder why py3k uses a simple hard-coded buffer of 1026 bytes (not even PATH_MAX+2). This is even worse than what you are proposing. I'll open a separate issue for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 14:10:59 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Jul 2010 12:10:59 +0000 Subject: [issue9246] os.getcwd() hardcodes max path len In-Reply-To: <1279023059.26.0.245683093399.issue9246@psf.upfronthosting.co.za> Message-ID: <1279023059.26.0.245683093399.issue9246@psf.upfronthosting.co.za> New submission from Antoine Pitrou : In 2.x, os.getcwd() uses a dynamic allocation scheme to accomodate whatever buffer size the current path needs to be represented. In 3.x, the max path length is hardcoded to 1026 bytes or characters, and an error is raised if the current path length is larger than that. Even on systems where MAX_PATH is 1024 (a common value), it is still valid to create paths larger than that (using e.g. os.mkdir()). The attached script shows that os.getcwd() works with a 1032-character path in 2.x, but fails in 3.x. ---------- components: Extension Modules files: bigpath.py messages: 110177 nosy: haypo, loewis, pitrou, skrah priority: normal severity: normal stage: needs patch status: open title: os.getcwd() hardcodes max path len type: behavior versions: Python 3.1, Python 3.2 Added file: http://bugs.python.org/file17983/bigpath.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 14:21:44 2010 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 13 Jul 2010 12:21:44 +0000 Subject: [issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others. In-Reply-To: <1268131645.26.0.730387379265.issue8098@psf.upfronthosting.co.za> Message-ID: <1279023704.3.0.407512157916.issue8098@psf.upfronthosting.co.za> Nick Coghlan added the comment: OK, finally tracked down some of the history here. Issue 1567 is the one where Christian developed the relevant patch which was then committed as r59678. Issue 7980 is also potentially related (although that's apparently a Mac OS X crash involving time.strptime rather than an ImportError exception). I think what it boils down to is that this approach to the import deadlock problem is far too pessimistic. If any other import is going on when an implicit import is triggered using this function makes the assumption that the other thread is going to be waiting for the current thread at some point, so this thread can't afford to wait for the import lock and should throw an exception instead. That's going to disallow a lot of perfectly legitimate imports, particularly when the Python interpreter is embedded in a multi-threaded application rather than running standalone. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 14:22:34 2010 From: report at bugs.python.org (Jesse Noller) Date: Tue, 13 Jul 2010 12:22:34 +0000 Subject: [issue9244] multiprocessing.pool: Worker crashes if result can't be encoded In-Reply-To: <1279021915.02.0.743108448879.issue9244@psf.upfronthosting.co.za> Message-ID: <1279023754.19.0.0956531086838.issue9244@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: -> jnoller nosy: +gdb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 14:27:40 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 13 Jul 2010 12:27:40 +0000 Subject: [issue9245] "from itertools imoprt *" crashes 2to3 In-Reply-To: <1279022316.28.0.141997544186.issue9245@psf.upfronthosting.co.za> Message-ID: <1279024060.01.0.479888389372.issue9245@psf.upfronthosting.co.za> Ronald Oussoren added the comment: A related issue: from itertools import chain, izip, imap This results in an invalid transformation: -from itertools import chain, izip, imap +from itertools import chain, The translated version is an invalid import statement with a ',' at the end of the line. A workaround for the first issue: use explicit imports. A workaround for this one: use "from itertools import izip, imap, chain". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 14:29:30 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Jul 2010 12:29:30 +0000 Subject: [issue9246] os.getcwd() hardcodes max path len In-Reply-To: <1279023059.26.0.245683093399.issue9246@psf.upfronthosting.co.za> Message-ID: <1279024170.24.0.279365389359.issue9246@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Even on systems where MAX_PATH is 1024 (a common value), it is still > valid to create paths larger than that (using e.g. os.mkdir()). It seems I am mistaken on that. MAX_PATH is actually 4096 on the Linux system I am testing on. Calling getcwd() in a path longer than that fails with ENAMETOOLONG. Still, 1026 shouldn't be the hard coded max length. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 14:34:14 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 13 Jul 2010 12:34:14 +0000 Subject: [issue9241] SAXParseError on unicode (Japanese) file In-Reply-To: <1279011876.88.0.998505025151.issue9241@psf.upfronthosting.co.za> Message-ID: <1279024454.16.0.146268419678.issue9241@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Your file contains the byte \x1a == EOF. You should not open it in text mode, but in binary mode, otherwise it's truncated. import xml.sax xml.sax.parse(open("ff1a.xml", 'rb'), xml.sax.ContentHandler()) works on all versions I tried. ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 14:41:56 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 13 Jul 2010 12:41:56 +0000 Subject: [issue9185] os.getcwd causes infinite loop on solaris In-Reply-To: <1279022763.71.0.470174223778.issue9185@psf.upfronthosting.co.za> Message-ID: <20100713124047.GA12009@yoda.bytereef.org> Stefan Krah added the comment: Thanks for having a look at the patch! Antoine Pitrou wrote: > I'm not sure I understand the cause of the problem. Does getcwd() fail on Solaris when the path length is higher than PATH_MAX, even if you pass a big enough buffer? If the path length exceeds PATH_MAX, getcwd() keeps returning NULL and setting ERANGE, so it enters an infinite loop, exhausting all memory. This is a bug in Solaris getcwd(). > First, your patch makes getcwd() return an error when the path length is longer than PATH_MAX, which it doesn't today. This is a regression and shouldn't probably go in. Hm, on Linux I can't use os.getcwd() with paths longer than PATH_MAX as things are now: $ cd /tmp/ $ for i in `seq 1 410`; do mkdir "123456789"; cd "123456789"; done cd: error retrieving current directory: getcwd: cannot access parent directories: File name too long $ python2.6 Python 2.6.5+ (release26-maint:81682M, Jun 6 2010, 11:22:46) [GCC 4.1.3 20080623 (prerelease) (Ubuntu 4.1.2-23ubuntu3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.getcwd() Traceback (most recent call last): File "", line 1, in OSError: [Errno 36] File name too long > Second, the test_posix change is a bit too tolerant. IMO it should check that the error is ERANGE, and that we are under Solaris. Otherwise the error shouldn't happen, should it? If you change 1027 to 4098, the test currently fails on Linux, too. I think the only reason why it never failed is that most systems have PATH_MAX=4096. OSError: [Errno 36] File name too long > Also, I wonder why py3k uses a simple hard-coded buffer of 1026 bytes (not even PATH_MAX+2). This is even worse than what you are proposing. I'll open a separate issue for it. Good question. posix_getcwdu() also uses a buffer of 1026 in 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 14:43:33 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Jul 2010 12:43:33 +0000 Subject: [issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others. In-Reply-To: <1268131645.26.0.730387379265.issue8098@psf.upfronthosting.co.za> Message-ID: <1279025013.3.0.5283390667.issue8098@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Is there some documentation somewhere of which global variables the import lock is meant to protect? Perhaps it wouldn't need to be held during the whole module initialization process. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 14:51:20 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Jul 2010 12:51:20 +0000 Subject: [issue9185] os.getcwd causes infinite loop on solaris In-Reply-To: <20100713124047.GA12009@yoda.bytereef.org> Message-ID: <1279025476.3236.24.camel@localhost.localdomain> Antoine Pitrou added the comment: > Hm, on Linux I can't use os.getcwd() with paths longer than PATH_MAX > as things are now: Oh, right. I was assuming 1024 for PATH_MAX when doing my tests, but it really is 4096. > > Second, the test_posix change is a bit too tolerant. IMO it should > check that the error is ERANGE, and that we are under Solaris. > Otherwise the error shouldn't happen, should it? > > If you change 1027 to 4098, the test currently fails on Linux, too. I > think the only > reason why it never failed is that most systems have PATH_MAX=4096. Ok, then perhaps the test should be fixed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 15:14:15 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 13 Jul 2010 13:14:15 +0000 Subject: [issue2548] Undetected error in exception handling In-Reply-To: <1207297002.01.0.980429495002.issue2548@psf.upfronthosting.co.za> Message-ID: <1279026855.15.0.331933324248.issue2548@psf.upfronthosting.co.za> Mark Lawrence added the comment: This has been fixed in Python 2.7, I suppose that the code could be backported to 2.6, or is it now too late so this can be closed as "won't fix"? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 15:14:28 2010 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 13 Jul 2010 13:14:28 +0000 Subject: [issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others. In-Reply-To: <1268131645.26.0.730387379265.issue8098@psf.upfronthosting.co.za> Message-ID: <1279026868.7.0.754753846073.issue8098@psf.upfronthosting.co.za> Nick Coghlan added the comment: Pretty much anything mentioned in PEP 302 is what is being protected. The one which causes most of the grief is the fact that we need to stick a partially initialised module into sys.modules (so the module can find itself if it needs to), then take it out again if execution of the module level code fails. That means we need to hold the import lock while the module code is executed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 15:16:47 2010 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 13 Jul 2010 13:16:47 +0000 Subject: [issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others. In-Reply-To: <1268131645.26.0.730387379265.issue8098@psf.upfronthosting.co.za> Message-ID: <1279027007.69.0.699024394951.issue8098@psf.upfronthosting.co.za> Nick Coghlan added the comment: Added Guido as well, to see how much he remembers from back when Christian's patch went in. We may want to take this over to python-dev... ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 15:28:10 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 13 Jul 2010 13:28:10 +0000 Subject: [issue9185] os.getcwd causes infinite loop on solaris In-Reply-To: <1279025476.3236.24.camel@localhost.localdomain> Message-ID: <20100713132701.GA12463@yoda.bytereef.org> Stefan Krah added the comment: Antoine Pitrou wrote: > > If you change 1027 to 4098, the test currently fails on Linux, too. I > > think the only > > reason why it never failed is that most systems have PATH_MAX=4096. > > Ok, then perhaps the test should be fixed? I wasn't really precise. The test fails on Linux, but for a different reason. Linux legitimately sets ENAMETOOLONG and raises OSError. This only becomes apparent when using 4098 in the test. Solaris, on the other hand, does not even raise, since it keeps setting ERANGE and thus does not leave the loop in posix_getcwd(). IOW, only the fix in posixmodule.c allows the test to fail properly in the first place. If you prefer, of course it's possible to be conservative and make the new version of posix_getcwd() Solaris specific. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 15:36:41 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Jul 2010 13:36:41 +0000 Subject: [issue8098] PyImport_ImportModuleNoBlock() may solve problems but causes others. In-Reply-To: <1279026868.7.0.754753846073.issue8098@psf.upfronthosting.co.za> Message-ID: <1279028192.3236.29.camel@localhost.localdomain> Antoine Pitrou added the comment: > Pretty much anything mentioned in PEP 302 is what is being protected. Alright, my question was more along the lines of "what *needs* to be protected". The import lock is currently like the GIL: a very simple (and therefore suboptimal) answer to a complex problem. I am wondering whether one could revive Marc-Andr?'s idea here: http://mail.python.org/pipermail/python-dev/2003-February/033445.html If the sole purpose is to prevent multi-threaded import of the same module, then we can have an internal dict of temporary locks for each module being imported. The "global import lock" itself can be reduced to protecting accesses to this dict. If custom (third-party) import hooks are commonly non-thread safe, then the "global import lock" can still be taken when such an import hook is called. But built-in import mechanisms can be more tolerant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 15:36:49 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 13 Jul 2010 13:36:49 +0000 Subject: [issue2919] Merge profile/cProfile in 3.0 In-Reply-To: <1211227334.77.0.551300594218.issue2919@psf.upfronthosting.co.za> Message-ID: <1279028209.08.0.602271928652.issue2919@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is there anyone who could review this, it seems a shame that someone's work has been sitting in limbo for over a year? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 15:38:57 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Jul 2010 13:38:57 +0000 Subject: [issue9247] imp.reload() doesn't take import lock In-Reply-To: <1279028337.95.0.00914211475074.issue9247@psf.upfronthosting.co.za> Message-ID: <1279028337.95.0.00914211475074.issue9247@psf.upfronthosting.co.za> New submission from Antoine Pitrou : I am not sure this is important or now, but reload() (imp.reload() in 3.x) doesn't take the import lock when reloading: $ echo 'import imp; print("lock held =", imp.lock_held())' > foo.py $ ./python -c 'import imp, foo; imp.reload(foo)' lock held = True lock held = False ---------- components: Interpreter Core messages: 110191 nosy: brett.cannon, ncoghlan, pitrou priority: normal severity: normal status: open title: imp.reload() doesn't take import lock type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 15:42:00 2010 From: report at bugs.python.org (Douglas Turk) Date: Tue, 13 Jul 2010 13:42:00 +0000 Subject: [issue7467] The zipfile module does not check files' CRCs, including in ZipFile.testzip In-Reply-To: <1260428371.84.0.68619284631.issue7467@psf.upfronthosting.co.za> Message-ID: <1279028520.86.0.731148210455.issue7467@psf.upfronthosting.co.za> Changes by Douglas Turk : ---------- keywords: +patch Added file: http://bugs.python.org/file17984/fix_zipfile_crc_issue_7467.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 15:43:53 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 13 Jul 2010 13:43:53 +0000 Subject: [issue9246] os.getcwd() hardcodes max path len In-Reply-To: <1279023059.26.0.245683093399.issue9246@psf.upfronthosting.co.za> Message-ID: <1279028633.89.0.265261237366.issue9246@psf.upfronthosting.co.za> Stefan Krah added the comment: Just as a reminder: In 2.x, posix_getcwdu() also uses a buffer of size 1026. ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 15:47:04 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 13 Jul 2010 13:47:04 +0000 Subject: [issue9248] multiprocessing.pool: Proposal: "waitforslot" In-Reply-To: <1279028823.93.0.963356654708.issue9248@psf.upfronthosting.co.za> Message-ID: <1279028823.93.0.963356654708.issue9248@psf.upfronthosting.co.za> New submission from Ask Solem : This patch adds the `waitforslot` argument to apply_async. If set to `True`, apply_async will not return until there is a worker available to process the job. This is implemented by a semaphore that is released by the result handler whenever a new result is ready. The semaphore is also released when the supervisor (worker_handler) finds a worker process that has been unexpectedly terminated. This is already in use by Celery 2.0, which ships with its own modified version of multiprocessing.pool. I'm not sure about the name ``waitforslot``, I think I may even hate it, but haven't been able to come up with a better name for it yet. ---------- components: Library (Lib) messages: 110193 nosy: asksol, jnoller priority: normal severity: normal status: open title: multiprocessing.pool: Proposal: "waitforslot" versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 15:47:29 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 13 Jul 2010 13:47:29 +0000 Subject: [issue9248] multiprocessing.pool: Proposal: "waitforslot" In-Reply-To: <1279028823.93.0.963356654708.issue9248@psf.upfronthosting.co.za> Message-ID: <1279028849.84.0.83826484745.issue9248@psf.upfronthosting.co.za> Changes by Ask Solem : ---------- keywords: +patch Added file: http://bugs.python.org/file17985/multiprocessing-trunk at 82502-apply-semaphore.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 15:56:54 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Jul 2010 13:56:54 +0000 Subject: [issue9246] os.getcwd() hardcodes max path len In-Reply-To: <1279028633.89.0.265261237366.issue9246@psf.upfronthosting.co.za> Message-ID: <1279029409.3236.30.camel@localhost.localdomain> Antoine Pitrou added the comment: > Just as a reminder: In 2.x, posix_getcwdu() also uses a buffer of size > 1026. I suppose the implementation was simply copied into py3k, then. Still, it's not a very good idea and it will also be a regression when porting scripts from 2.x to 3.x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 16:00:47 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 13 Jul 2010 14:00:47 +0000 Subject: [issue3402] test_nis is hanging on Solaris In-Reply-To: <1216346193.57.0.216784355152.issue3402@psf.upfronthosting.co.za> Message-ID: <1279029647.15.0.319561732826.issue3402@psf.upfronthosting.co.za> Mark Lawrence added the comment: This test is still disabled in Python 2.7 and 3.1. ---------- nosy: +BreamoreBoy, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 16:01:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Jul 2010 14:01:01 +0000 Subject: [issue9185] os.getcwd causes infinite loop on solaris In-Reply-To: <20100713132701.GA12463@yoda.bytereef.org> Message-ID: <1279029655.3236.34.camel@localhost.localdomain> Antoine Pitrou added the comment: > I wasn't really precise. The test fails on Linux, but for a different reason. > Linux legitimately sets ENAMETOOLONG and raises OSError. This only becomes > apparent when using 4098 in the test. > > Solaris, on the other hand, does not even raise, since it keeps setting > ERANGE and thus does not leave the loop in posix_getcwd(). IOW, only the > fix in posixmodule.c allows the test to fail properly in the first place. Ok. Still, silencing all OSErrors in test_posix is much too broad. The code should check for expected error codes, possibly depending on the OS. > If you prefer, of course it's possible to be conservative and make the new > version of posix_getcwd() Solaris specific. I think this would be the most reasonable solution for 2.7, indeed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 16:02:29 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 13 Jul 2010 14:02:29 +0000 Subject: [issue3402] test_nis is hanging on Solaris In-Reply-To: <1216346193.57.0.216784355152.issue3402@psf.upfronthosting.co.za> Message-ID: <1279029749.82.0.596125484361.issue3402@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- nosy: -ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 16:08:04 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 13 Jul 2010 14:08:04 +0000 Subject: [issue9246] os.getcwd() hardcodes max path len In-Reply-To: <1279023059.26.0.245683093399.issue9246@psf.upfronthosting.co.za> Message-ID: <1279030084.86.0.729644760709.issue9246@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 16:10:29 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 13 Jul 2010 14:10:29 +0000 Subject: [issue9245] "from itertools imoprt *" crashes 2to3 In-Reply-To: <1279022316.28.0.141997544186.issue9245@psf.upfronthosting.co.za> Message-ID: <1279030229.23.0.347237326918.issue9245@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 16:11:02 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 13 Jul 2010 14:11:02 +0000 Subject: [issue9245] "from itertools imoprt *" crashes 2to3 In-Reply-To: <1279022316.28.0.141997544186.issue9245@psf.upfronthosting.co.za> Message-ID: <1279030262.3.0.935019377557.issue9245@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- type: -> behavior versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 16:32:34 2010 From: report at bugs.python.org (Greg Brockman) Date: Tue, 13 Jul 2010 14:32:34 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279031554.22.0.922758404022.issue9205@psf.upfronthosting.co.za> Greg Brockman added the comment: > What kind of errors are you having that makes the get() call fail? Try running the script I posted. It will fail with an AttributeError (raised during unpickling) and hang. I'll note that the particular issues that I've run into in practice are: - OOM kill destroying my workers but leaving the parent silently waiting - KeyboardInterrupting the workers, and then having the parent hang This AttributeError problem is one that I discovered while generating test cases for the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 16:33:03 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 13 Jul 2010 14:33:03 +0000 Subject: [issue9243] sndhdr erroneously detects files as vox In-Reply-To: <1279021669.64.0.945928628097.issue9243@psf.upfronthosting.co.za> Message-ID: <1279031583.09.0.638399041638.issue9243@psf.upfronthosting.co.za> R. David Murray added the comment: Since email uses this and it doesn't look like anyone else is likely to have much knowledge of this module, I'm going to assign it to myself so I don't forget about it. This module has no unit tests. It would be really great if you could create some to at least test for this regression. I'll be glad to provide guidance on the test suite if you need it, but I don't know all that much about audio files so I'm not in a position to write the tests myself at the moment. The first changeset is just the translation to bytes, I don't see any issues there. I'm adding Victor as nosy since he wrote the second changeset, but the fix looks straightforwardly correct to me. By the way, if you had written r56957 and r56987, roundup would have turned them into links, instead of quoting the link you did supply so that it wasn't usable :) ---------- assignee: -> r.david.murray nosy: +haypo, r.david.murray stage: -> unit test needed versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 16:35:00 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 13 Jul 2010 14:35:00 +0000 Subject: [issue9243] sndhdr erroneously detects files as vox In-Reply-To: <1279021669.64.0.945928628097.issue9243@psf.upfronthosting.co.za> Message-ID: <1279031700.46.0.654713468364.issue9243@psf.upfronthosting.co.za> R. David Murray added the comment: Oh, and the reason it got changed to startswith is probably a micro-optimization: startswith is more efficient than doing a slice-and-compare. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 16:37:55 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 13 Jul 2010 14:37:55 +0000 Subject: [issue3620] test_smtplib is flaky In-Reply-To: <1219244969.03.0.636728598981.issue3620@psf.upfronthosting.co.za> Message-ID: <1279031875.63.0.144265583841.issue3620@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- resolution: -> fixed stage: -> committed/rejected type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 16:54:05 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 13 Jul 2010 14:54:05 +0000 Subject: [issue9234] argparse: aliases for positional arguments (subparsers) In-Reply-To: <1278965347.63.0.908625805717.issue9234@psf.upfronthosting.co.za> Message-ID: <1279032845.82.0.0441198654574.issue9234@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +bethard versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 16:54:44 2010 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 13 Jul 2010 14:54:44 +0000 Subject: [issue876421] logging handlers raise exception on level In-Reply-To: <1279011711.0.0.73794307078.issue876421@psf.upfronthosting.co.za> Message-ID: <290329.56363.qm@web25803.mail.ukl.yahoo.com> Vinay Sajip added the comment: ----- Original Message ---- > Mickey Killianey added the comment: > > Or were you suggesting logging.basicConfig? The limitation of basicConfig >seems to be that it only works on an unconfigured root logger, not on a named >logger, and it doesn't work if anyone else has touched root. True, but if you use basicConfig to configure the root logger, descendant loggers (such as 'foo') will use those handlers. Of course, if someone else has configured a handler for the root logger already, then you may not be able to use this. > > I was hoping for something that's simple, easy-to-remember, easy-to-type, and >makes a minimal impact on the module I'm debugging. For example, how do any of >these sound...? > > ...if basicConfig had an optional 'name' argument, so that it could config >loggers other than root logger: > > logging.basicConfig(name='foo', filename='foo.log', level=DEBUG) > > ...if 'basicConfig' was a method on Logger: > > logging.getLogger('foo').basicConfig(filename='foo.log', level=DEBUG) > > ...if the handlers' setters supported the builder pattern and returned self >from setLevel: > > logging.getLogger('foo').addHandler(FileHandler('foo.log').setLevel(DEBUG)) > > > (Instead of commenting on this closed bug, should I enter this as a new issue >and set it as a feature request?) > I'd like to avoid making the kinds of changes which are stylistic in nature; the existing APIs will need to remain for backward compatiblity reasons, and I don't want to add the same functionality using different idioms based on what are essentially stylistic preferences. Also, remember that Python 2.x is essentially frozen in terms of new releases (as 2.7 has been released and no 2.8 is planned) so any API changes would apply to 3.2 and later only - I'm guessing you're still on Python 2.x if you're using a legacy application. When all's said and done, to configure a logger for 'foo' with a FileHandler and a specific level will not require more than a few lines of code, so I'd just go ahead and code them up and not worry about trying to get the whole thing to fit on a single line :-) Regards, Vinay Sajip . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 17:00:09 2010 From: report at bugs.python.org (hannes reuter) Date: Tue, 13 Jul 2010 15:00:09 +0000 Subject: [issue9249] struct.pack and Long Integer datatype should be 4, but is 8 bytes In-Reply-To: <1279033209.41.0.410142321642.issue9249@psf.upfronthosting.co.za> Message-ID: <1279033209.41.0.410142321642.issue9249@psf.upfronthosting.co.za> New submission from hannes reuter : on http://docs.python.org/library/struct.html in section 7.3.2.2. Format Characters in the table one can find that L -> unsigned long -> integer-> should have a 4 byte dataspace. (same applies for l), which seems to be correct -> 32bit/8=4 On a Ubuntu 64 , Python 2.6, a) calcsize reports it uses 8 byte b) by writing data to a file and reading it back in I could confirm that it uses as well 8 bytes of binary data -> ofile2.write(struct.pack('LL',int(x[0]), int(x[1]))) Q: Is that behavior what we see a Docu error ? Q: Is that behavior what we see general struct problem ? add1: in # 2263 e.g. we see problems for L type data in relation to np ? add2: IMHO certainly not a padding problem like in #7355 for reproduction: from struct import * calcsize('H') 2 -> correct to docu calcsize('f') 4 -> correct to docu calcsize('L') 8 -> should be 4 calcsize('l') 8 -> should be 4 calcsize('x') 1 -> correct to docu So either docu is wrong, or struct has an error. ---------- assignee: theller components: ctypes messages: 110201 nosy: hannes.reuter, theller priority: normal severity: normal status: open title: struct.pack and Long Integer datatype should be 4, but is 8 bytes type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 17:02:57 2010 From: report at bugs.python.org (Laurent Mazuel) Date: Tue, 13 Jul 2010 15:02:57 +0000 Subject: [issue1596321] KeyError at exit after 'import threading' in other thread Message-ID: <1279033377.69.0.515225522886.issue1596321@psf.upfronthosting.co.za> Laurent Mazuel added the comment: Another solution for cx-freeze problem: http://code.google.com/p/modwsgi/issues/detail?id=197#c5 Which can be added in ConsoleKeepPath.c for instance ---------- nosy: +Laurent.Mazuel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 17:24:47 2010 From: report at bugs.python.org (Greg Brockman) Date: Tue, 13 Jul 2010 15:24:47 +0000 Subject: [issue9244] multiprocessing.pool: Worker crashes if result can't be encoded In-Reply-To: <1279021915.02.0.743108448879.issue9244@psf.upfronthosting.co.za> Message-ID: <1279034687.05.0.589588184987.issue9244@psf.upfronthosting.co.za> Greg Brockman added the comment: This looks pretty reasonable to my untrained eye. I successfully applied and ran the test suite. To be clear, the errback change and the unpickleable result change are actually orthogonal, right? Anyway, I'm not really familiar with the protocol here, but assuming that you're open to code review: > - def apply_async(self, func, args=(), kwds={}, callback=None): > + def apply_async(self, func, args=(), kwds={}, callback=None, > + error_callback=None): > ''' > Asynchronous equivalent of `apply()` builtin > ''' > assert self._state == RUN > - result = ApplyResult(self._cache, callback) > + result = ApplyResult(self._cache, callback, error_callback) > self._taskqueue.put(([(result._job, None, func, args, kwds)], None)) > return result Sure. Why not add an error_callback for map_async as well? > - def __init__(self, cache, callback): > + def __init__(self, cache, callback, error_callback=None): > self._cond = threading.Condition(threading.Lock()) > self._job = job_counter.next() > self._cache = cache > self._ready = False > self._callback = callback > + self._errback = error_callback > cache[self._job] = self Any reason you chose to use a different internal name (errback versus error_callback)? It seems cleaner to me to be consistent about the name. > def sqr(x, wait=0.0): > time.sleep(wait) > return x*x > + > class _TestPool(BaseTestCase): > def test_apply(self): > @@ -1020,6 +1021,7 @@ class _TestPool(BaseTestCase): > self.assertEqual(get(), 49) > self.assertTimingAlmostEqual(get.elapsed, TIMEOUT1) > > + > def test_async_timeout(self): In general, I'm wary of nonessential whitespace changes... did you mean to include these? > + scratchpad = [None] > + def errback(exc): > + scratchpad[0] = exc > + > + res = p.apply_async(raising, error_callback=errback) > + self.assertRaises(KeyError, res.get) > + self.assertTrue(scratchpad[0]) > + self.assertIsInstance(scratchpad[0], KeyError) > + > + p.close() Using "assertTrue" seems misleading. "assertIsNotNone" is what you really mean, right? Although, I believe that's redundant, since presumably self.assertIsInstance(None, KeyError) will error out anyway (I haven't verified this). > + def test_unpickleable_result(self): > + from multiprocessing.pool import MaybeEncodingError > + p = multiprocessing.Pool(2) > + > + # Make sure we don't lose pool processes because of encoding errors. > + for iteration in xrange(20): > + > + scratchpad = [None] > + def errback(exc): > + scratchpad[0] = exc > + > + res = p.apply_async(unpickleable_result, error_callback=errback) > + self.assertRaises(MaybeEncodingError, res.get) > + wrapped = scratchpad[0] > + self.assertTrue(wrapped) Again, assertTrue is probably not what you want, and is probably redundant. > + self.assertIsInstance(scratchpad[0], MaybeEncodingError) Why use scratchpad[0] rather than wrapped? > + self.assertIsNotNone(wrapped.exc) > + self.assertIsNotNone(wrapped.value) Under what circumstances would these be None? (Perhaps you want wrapped.exc != 'None'?) The initializer for MaybeEncodingError enforces the invariant that exc/value are strings, right? > + > class _TestPoolWorkerLifetime(BaseTestCase): > > ALLOWED_TYPES = ('processes', ) Three line breaks there seems excessive. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 17:25:33 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 13 Jul 2010 15:25:33 +0000 Subject: [issue4841] io's close() not handling errors correctly In-Reply-To: <1231151389.71.0.297079127324.issue4841@psf.upfronthosting.co.za> Message-ID: <1279034733.47.0.852246855196.issue4841@psf.upfronthosting.co.za> Mark Lawrence added the comment: Please note the comment from Victor:- "Python 3.x is also affected by this issue: file_init() and dircheck() ignore self->closefd." ---------- nosy: +BreamoreBoy versions: +Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 17:32:07 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 13 Jul 2010 15:32:07 +0000 Subject: [issue5544] test_fileio fails on windows MSVC Assertion In-Reply-To: <1237824452.26.0.278609096502.issue5544@psf.upfronthosting.co.za> Message-ID: <1279035127.66.0.458908301207.issue5544@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closed as stated fixed in revision 70582. ---------- nosy: +BreamoreBoy resolution: -> fixed stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 17:44:07 2010 From: report at bugs.python.org (James Lee) Date: Tue, 13 Jul 2010 15:44:07 +0000 Subject: [issue9243] sndhdr erroneously detects files as vox In-Reply-To: <1279021669.64.0.945928628097.issue9243@psf.upfronthosting.co.za> Message-ID: <1279035847.46.0.923612451045.issue9243@psf.upfronthosting.co.za> James Lee added the comment: Thanks for the update... The link was actually just a "diff to previous" of the changelist that caused the problem (r56987), sorry for the confusion. :) Attached is a quick and dirty unittest complete with some test files. It only tests the format of the file though, not any of the additional information returned. With an untouched sndhdr.py it finds the issue reported, and with sndhdr-fix.patch applied it reports only one issue: Traceback (most recent call last): File "test_sndhdr.py", line 22, in test_aiff self.assertEqual(ret[0], 'aiff') AssertionError: b'aiff' != 'aiff' I'm thinking that on line 65 of sndhdr.py the b'aiff' should be just 'aiff' (like everything else). At least I can't see a reason for it to be different. (Changing this fixes the unittest issue) Cheers ---------- Added file: http://bugs.python.org/file17986/test_sndhdr.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 17:47:21 2010 From: report at bugs.python.org (Greg Brockman) Date: Tue, 13 Jul 2010 15:47:21 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279036041.72.0.261536778004.issue9205@psf.upfronthosting.co.za> Greg Brockman added the comment: While looking at your patch in issue 9244, I realized that my code fails to handle an unpickleable task, as in: """ #!/usr/bin/env python import multiprocessing foo = lambda x: x p = multiprocessing.Pool(1) p.apply(foo, [1]) """ This should be fixed by the attached pickling_error.patch (independent of my other patches). ---------- Added file: http://bugs.python.org/file17987/pickling_error.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 17:49:50 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 13 Jul 2010 15:49:50 +0000 Subject: [issue4236] Crash when importing builtin module during interpreter shutdown In-Reply-To: <1225328266.56.0.143062114726.issue4236@psf.upfronthosting.co.za> Message-ID: <1279036190.75.0.813873716796.issue4236@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The bug is still present in 2.7, and 3.2. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 17:52:56 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 13 Jul 2010 15:52:56 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <1279036376.11.0.147561601553.issue6074@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +brian.curtin versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 18:03:12 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 13 Jul 2010 16:03:12 +0000 Subject: [issue4112] Subprocess: Popen'ed children hang due to open pipes In-Reply-To: <1223894179.31.0.303015562598.issue4112@psf.upfronthosting.co.za> Message-ID: <1279036992.65.0.799283810856.issue4112@psf.upfronthosting.co.za> R. David Murray added the comment: The suggestion looks reasonable to me, and the current behavior does not look like an intentional design. Boye, would you be interested in proposing a patch with unit tests? ---------- nosy: +r.david.murray stage: -> unit test needed versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 18:14:27 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 13 Jul 2010 16:14:27 +0000 Subject: [issue4179] pdb: Allow the "list" command to return to the currently debugged line In-Reply-To: <1224709654.06.0.420157536807.issue4179@psf.upfronthosting.co.za> Message-ID: <1279037667.7.0.425486464455.issue4179@psf.upfronthosting.co.za> R. David Murray added the comment: I think this sounds like a reasonable suggestion. Adding Georg to nosy since he seems to have had the most interest in pdb features according to the svn log ;) ---------- nosy: +georg.brandl, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 18:36:13 2010 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 13 Jul 2010 16:36:13 +0000 Subject: [issue9250] sys.modules changes size during iteration in regrtest module In-Reply-To: <1279038973.54.0.16228117882.issue9250@psf.upfronthosting.co.za> Message-ID: <1279038973.54.0.16228117882.issue9250@psf.upfronthosting.co.za> New submission from Xavier de Gaye : Python 2.7 - svn revision 82852 Bug description =============== Test script foo.py ------------------ #!/usr/bin/env python import distutils.core import test.regrtest Exception when running foo.py ----------------------------- Traceback (most recent call last): File "foo.py", line 3, in import test.regrtest File "/usr/local/lib/python2.7/test/regrtest.py", line 184, in for module in sys.modules.itervalues(): RuntimeError: dictionary changed size during iteration Workaround ========== Revese the order of the imports in foo.py. Proposed patch ============== Root cause: email modules are being imported inside the loop. The following patch (svn revision 82852) forces the import of the email modules before the main iteration. These modules have been lazily imported in email/__init__.py and need to be effectively imported before updating the __file__ and __path__ attributes. The patch is also attached to this report. --- release27-maint/Lib/test/regrtest.py 2010-07-13 18:11:32.000000000 +0200 +++ /usr/local/lib/python2.7/test/regrtest.py 2010-07-13 18:00:52.000000000 +0200 @@ -181,6 +181,12 @@ # (site.py absolutize them), the __file__ and __path__ will be absolute too. # Therefore it is necessary to absolutize manually the __file__ and __path__ of # the packages to prevent later imports to fail when the CWD is different. + +# Email modules are imported lazily, force their import first. +if 'email' in sys.modules: + [hasattr(sys.modules[name], '__foo__') for name in list(sys.modules) + if name.startswith('email.')] + for module in sys.modules.itervalues(): if hasattr(module, '__path__'): module.__path__ = [os.path.abspath(path) for path in module.__path__] ---------- components: Tests files: sys.modules_regrtest.patch keywords: patch messages: 110211 nosy: xdegaye priority: normal severity: normal status: open title: sys.modules changes size during iteration in regrtest module type: crash versions: Python 2.7 Added file: http://bugs.python.org/file17988/sys.modules_regrtest.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 18:50:18 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 13 Jul 2010 16:50:18 +0000 Subject: [issue9185] os.getcwd causes infinite loop on solaris In-Reply-To: <1278492997.35.0.523630408468.issue9185@psf.upfronthosting.co.za> Message-ID: <1279039818.55.0.896382025622.issue9185@psf.upfronthosting.co.za> Stefan Krah added the comment: OpenBSD has the same getcwd() bug. It was uncovered by raising current_path_length to 4099 in test_posix. Here is a new patch that enables the changed posix_getcwd() function on Solaris and OpenBSD only. I've tested the patch on Linux, OpenSolaris, OpenBSD and FreeBSD. So far, there are three categories of behavior if PATH_MAX is exceeded: 1) Solaris, OpenBSD: buggy, getcwd() keeps returning NULL/ERANGE. 2) Linux: getcwd() returns NULL/ENAMETOOLONG. 3) FreeBSD: getcwd() returns SUCCESS/0. So FreeBSD is one of the systems that benefits from principally unlimited path lengths (though I doubt it is used much). I think the changes in the unit test handle all categories well, and perhaps they will uncover more problem systems. ---------- Added file: http://bugs.python.org/file17989/issue9185-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 19:03:26 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Jul 2010 17:03:26 +0000 Subject: [issue9185] os.getcwd causes infinite loop on solaris In-Reply-To: <1278492997.35.0.523630408468.issue9185@psf.upfronthosting.co.za> Message-ID: <1279040606.08.0.949427917737.issue9185@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Nice! The patch looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 19:10:02 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 13 Jul 2010 17:10:02 +0000 Subject: [issue9250] sys.modules changes size during iteration in regrtest module In-Reply-To: <1279038973.54.0.16228117882.issue9250@psf.upfronthosting.co.za> Message-ID: <1279041002.7.0.418565629025.issue9250@psf.upfronthosting.co.za> R. David Murray added the comment: Why are you importing regrtest? It isn't designed to be imported, really. Or at least, not any more. ---------- nosy: +r.david.murray type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 20:50:58 2010 From: report at bugs.python.org (Brett Cannon) Date: Tue, 13 Jul 2010 18:50:58 +0000 Subject: [issue2548] Undetected error in exception handling In-Reply-To: <1207297002.01.0.980429495002.issue2548@psf.upfronthosting.co.za> Message-ID: <1279047058.99.0.046186662286.issue2548@psf.upfronthosting.co.za> Brett Cannon added the comment: It theoretically could be backported so it can stay open for now if someone feels adventurous to backport before 2.6.6. Once that's out the door, though, this can get closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 20:54:11 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 13 Jul 2010 18:54:11 +0000 Subject: [issue2919] Merge profile/cProfile in 3.0 In-Reply-To: <1211227334.77.0.551300594218.issue2919@psf.upfronthosting.co.za> Message-ID: <1279047251.6.0.151777675475.issue2919@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Is this a case of pure python implementation with a C speedup? Can you upload the patch to Rietveld? I'll take a look once it is there. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 20:55:43 2010 From: report at bugs.python.org (Brett Cannon) Date: Tue, 13 Jul 2010 18:55:43 +0000 Subject: [issue2919] Merge profile/cProfile in 3.0 In-Reply-To: <1211227334.77.0.551300594218.issue2919@psf.upfronthosting.co.za> Message-ID: <1279047343.31.0.168319745039.issue2919@psf.upfronthosting.co.za> Brett Cannon added the comment: Alexandre has commit privs so he could just go ahead and commit if he wants. I do hope to look at this code at some point in my life. I will see if I can't find time at EuroPython next week, especially if Alexander has fixes to it and still feels the need for a review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 21:00:02 2010 From: report at bugs.python.org (Brett Cannon) Date: Tue, 13 Jul 2010 19:00:02 +0000 Subject: [issue9247] imp.reload() doesn't take import lock In-Reply-To: <1279028337.95.0.00914211475074.issue9247@psf.upfronthosting.co.za> Message-ID: <1279047602.0.0.0863213232707.issue9247@psf.upfronthosting.co.za> Brett Cannon added the comment: So the import lock is to prevent trying to import the same module, right? If you are doing a reload, the module is basically already there. But what if you context switch while reloading? That would be bad as that would give you inconsistent state. So it probably should hold the lock (unless I am off about what the import lock should truly be used for). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 21:05:32 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Jul 2010 19:05:32 +0000 Subject: [issue9251] Test for the import lock In-Reply-To: <1279047931.75.0.287450849516.issue9251@psf.upfronthosting.co.za> Message-ID: <1279047931.75.0.287450849516.issue9251@psf.upfronthosting.co.za> New submission from Antoine Pitrou : The import lock is lacking tests that it functions properly. Coming up with a way of checking it was unexpectedly hard. I finally managed to write a script which quite reliably fails if you patch Python/import.c to not take the import lock. The script relies on garbage collection trickery to release the GIL at arbitrary moments. It should probably be converted to an unit test. ---------- components: Interpreter Core, Tests files: mtimport.py messages: 110219 nosy: brett.cannon, ncoghlan, pitrou priority: normal severity: normal stage: needs patch status: open title: Test for the import lock versions: Python 3.2 Added file: http://bugs.python.org/file17990/mtimport.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 21:06:52 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Jul 2010 19:06:52 +0000 Subject: [issue9251] Test for the import lock In-Reply-To: <1279047931.75.0.287450849516.issue9251@psf.upfronthosting.co.za> Message-ID: <1279048012.64.0.256965066956.issue9251@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file17990/mtimport.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 21:06:59 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Jul 2010 19:06:59 +0000 Subject: [issue9251] Test for the import lock In-Reply-To: <1279047931.75.0.287450849516.issue9251@psf.upfronthosting.co.za> Message-ID: <1279048019.46.0.199910825659.issue9251@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Added file: http://bugs.python.org/file17991/mtimport.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 21:15:11 2010 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 13 Jul 2010 19:15:11 +0000 Subject: [issue9250] sys.modules changes size during iteration in regrtest module In-Reply-To: <1279038973.54.0.16228117882.issue9250@psf.upfronthosting.co.za> Message-ID: <1279048511.52.0.735149999339.issue9250@psf.upfronthosting.co.za> Xavier de Gaye added the comment: http://pyclewn.sourceforge.net uses the regrtest module to run its testsuite. The test package is documented in the Standard Library documentation, quote: "The test package contains all regression tests for Python as well as the modules test.test_support and test.regrtest. test.test_support is used to enhance your tests while test.regrtest drives the testing ^^^ suite." It is not clear why regrtest "isn't designed to be imported, really. Or at least, not any more." when test/autotest.py in the python source code does import regrtest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 21:22:37 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 13 Jul 2010 19:22:37 +0000 Subject: [issue9185] os.getcwd causes infinite loop on solaris In-Reply-To: <1278492997.35.0.523630408468.issue9185@psf.upfronthosting.co.za> Message-ID: <1279048957.64.0.756212586029.issue9185@psf.upfronthosting.co.za> Stefan Krah added the comment: Antoine, thanks! Committed in release27-maint (r82853). Zsolt, could you confirm that issue9185-2.patch (or r82853) works for you? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 21:40:14 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 13 Jul 2010 19:40:14 +0000 Subject: [issue7384] curses crash on FreeBSD In-Reply-To: <1259006628.77.0.121355571453.issue7384@psf.upfronthosting.co.za> Message-ID: <1279050014.78.0.239375488062.issue7384@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: These changes break building of Python 3.* in some locales in Gentoo. running build running build_ext Traceback (most recent call last): File "./setup.py", line 1812, in main() File "./setup.py", line 1807, in main "Tools/scripts/2to3"] File "/var/tmp/portage/dev-lang/python-3.2_pre20100711/work/Python-3.2_pre20100711/Lib/distutils/core.py", line 152, in setup dist.run_commands() File "/var/tmp/portage/dev-lang/python-3.2_pre20100711/work/Python-3.2_pre20100711/Lib/distutils/dist.py", line 946, in run_commands self.run_command(cmd) File "/var/tmp/portage/dev-lang/python-3.2_pre20100711/work/Python-3.2_pre20100711/Lib/distutils/dist.py", line 965, in run_command cmd_obj.run() File "/var/tmp/portage/dev-lang/python-3.2_pre20100711/work/Python-3.2_pre20100711/Lib/distutils/command/build.py", line 127, in run self.run_command(cmd_name) File "/var/tmp/portage/dev-lang/python-3.2_pre20100711/work/Python-3.2_pre20100711/Lib/distutils/cmd.py", line 315, in run_command self.distribution.run_command(command) File "/var/tmp/portage/dev-lang/python-3.2_pre20100711/work/Python-3.2_pre20100711/Lib/distutils/dist.py", line 965, in run_command cmd_obj.run() File "/var/tmp/portage/dev-lang/python-3.2_pre20100711/work/Python-3.2_pre20100711/Lib/distutils/command/build_ext.py", line 393, in run self.build_extensions() File "./setup.py", line 151, in build_extensions missing = self.detect_modules() File "./setup.py", line 539, in detect_modules for ln in fp: File "/var/tmp/portage/dev-lang/python-3.2_pre20100711/work/Python-3.2_pre20100711/Lib/encodings/ascii.py", line 26, in decode return codecs.ascii_decode(input, self.errors)[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc5 in position 20: ordinal not in range(128) make: *** [sharedmods] Error 1 In lt_LT.UTF-8 locale, readline_termcap_lib file contains: ne dinaminis paleid?iamasis failas In en_US.UTF-8 locale, this file would contain: not a dynamic executable do_readline is "/usr/lib64/libreadline.so". /usr/lib64/libreadline.so is a linker script with the following content: /* GNU ld script Since Gentoo has critical dynamic libraries in /lib, and the static versions in /usr/lib, we need to have a "fake" dynamic lib in /usr/lib, otherwise we run into linking problems. This "fake" dynamic lib is a linker script that redirects the linker to the real lib. And yes, this works in the cross- compiling scenario as the sysroot-ed linker will prepend the real path. See bug http://bugs.gentoo.org/4411 for more info. */ OUTPUT_FORMAT ( elf64-x86-64 ) GROUP ( /lib64/libreadline.so.6 ) I think that using ldd is a wrong idea. ---------- nosy: +Arfrever status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 21:49:39 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 13 Jul 2010 19:49:39 +0000 Subject: [issue9250] sys.modules changes size during iteration in regrtest module In-Reply-To: <1279038973.54.0.16228117882.issue9250@psf.upfronthosting.co.za> Message-ID: <1279050579.61.0.607678051132.issue9250@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 21:57:16 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 13 Jul 2010 19:57:16 +0000 Subject: [issue9249] struct.pack and Long Integer datatype should be 4, but is 8 bytes In-Reply-To: <1279033209.41.0.410142321642.issue9249@psf.upfronthosting.co.za> Message-ID: <1279051036.14.0.17698051549.issue9249@psf.upfronthosting.co.za> Mark Dickinson added the comment: Please read the three sentences directly preceding that table and tell me whether they clear this up for you. ---------- assignee: theller -> mark.dickinson nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 22:05:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 13 Jul 2010 20:05:05 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1279051505.19.0.976197860032.issue7989@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 22:07:35 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 13 Jul 2010 20:07:35 +0000 Subject: [issue7384] curses crash on FreeBSD In-Reply-To: <1259006628.77.0.121355571453.issue7384@psf.upfronthosting.co.za> Message-ID: <1279051655.3.0.110659947589.issue7384@psf.upfronthosting.co.za> Stefan Krah added the comment: In Ubuntu I can build just fine with lt_LT.UTF-8. So perhaps this problem should be addressed in Gentoo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 22:08:10 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 13 Jul 2010 20:08:10 +0000 Subject: [issue1581183] pickle protocol 2 failure on int subclass Message-ID: <1279051690.86.0.200059602882.issue1581183@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- components: +Documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 22:44:06 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 13 Jul 2010 20:44:06 +0000 Subject: [issue7384] curses crash on FreeBSD In-Reply-To: <1259006628.77.0.121355571453.issue7384@psf.upfronthosting.co.za> Message-ID: <1279053846.03.0.578354864977.issue7384@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: You shouldn't use ldd. I suggest that setup.py try to link a small executable, which would use a function from libcurses and would be linked against libreadline, but not libcurses. If linking succeeds, then you libreadline is linked against libcurses. If linking fails, then repeat this procedure with libcursesw, libncurses, libncursesw, libtinfo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 22:54:25 2010 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 13 Jul 2010 20:54:25 +0000 Subject: [issue9251] Test for the import lock In-Reply-To: <1279048019.55.0.638618423121.issue9251@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: test_threaded_import is designed to check the import lock (and it does at least to some degree - I changed runpy's handling of the import lock because my original approach broke that test). (Haven't looked at this patch in detail as yet) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 23:04:47 2010 From: report at bugs.python.org (Brett Cannon) Date: Tue, 13 Jul 2010 21:04:47 +0000 Subject: [issue9250] sys.modules changes size during iteration in regrtest module In-Reply-To: <1279038973.54.0.16228117882.issue9250@psf.upfronthosting.co.za> Message-ID: <1279055087.19.0.603734350862.issue9250@psf.upfronthosting.co.za> Brett Cannon added the comment: The wording is poor. I'm going to fix them so it's obvious that the test package is meant for core developers only. ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 23:19:13 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 13 Jul 2010 21:19:13 +0000 Subject: [issue9252] PyImport_Import calls __import__ with dummy fromlist In-Reply-To: <1279055953.69.0.493320308989.issue9252@psf.upfronthosting.co.za> Message-ID: <1279055953.69.0.493320308989.issue9252@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : I have discovered this issue while working on the unit tests for issue 7989. In the first version of the setUp/tearDown overrides, I made a mistake when restoring sys.modules after the test run. The fix was to do sys.modules.__init__(saved_sys_modules) instead of sys.modules = saved_sys_modules Interestingly, _pickle.c and pickle.py behaved differently when sys.modules was restored incorrectly: pickle.py, using __import__(name, ..) mod = sys.modules[name] picked up the incorrectly restored sys.modules, while _pickle.c, using PyImport_Import, which is effectively mod = __import__(name, fromlist=["__doc__"], ..) failed. >From discussion on python-dev [1], I realize that pickle.py approach is the correct one even though in my case it would probably mask an error in my code. At the minimum, I think _pickle.c and pickle.py should be changed to do the same thing - probably call importlib.import_module(..). I don't know whether PyImport_Import should be fixed or deprecated. [1] "Peculiar import code in pickle.py" . ---------- assignee: brett.cannon components: Interpreter Core messages: 110228 nosy: belopolsky, brett.cannon priority: normal severity: normal stage: needs patch status: open title: PyImport_Import calls __import__ with dummy fromlist type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 23:26:05 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 13 Jul 2010 21:26:05 +0000 Subject: [issue9250] sys.modules changes size during iteration in regrtest module In-Reply-To: <1279038973.54.0.16228117882.issue9250@psf.upfronthosting.co.za> Message-ID: <1279056365.65.0.828178103262.issue9250@psf.upfronthosting.co.za> R. David Murray added the comment: Autotest runs the Python regression suite, it just does it a different way. And it still works on trunk. Since it isn't documented (I wasn't even aware it existed), maybe we should just delete it. :) Note that I'm not saying there's no bug here. But importing regrtest in the general case is not supported by the core team, so we may well break that usage for any number of good reasons. In this case, it was to support changing the CWD when running tests to facilitate test cleanup. The loop expects a limited number of modules to be in sys.modules when it runs (it is fixing a test-only startup issue with __file__ in early-imported modules when run from Lib). Note that the change that triggered the error you are seeing was made relatively recently (it worked before I updated and failed afterward, and my checkout was fairly up to date). There were no regrtest changes, but there were distutils changes (utils and sysconfig were the modules I noticed getting updated). I'm adding ezio and flox to nosy since I believe they added the regrtest loop in question, but I think we will probably close this won't fix. ---------- nosy: +ezio.melotti, flox -brett.cannon priority: normal -> low resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 23:28:05 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 13 Jul 2010 21:28:05 +0000 Subject: [issue9245] "from itertools imoprt *" crashes 2to3 In-Reply-To: <1279022316.28.0.141997544186.issue9245@psf.upfronthosting.co.za> Message-ID: <1279056485.25.0.341389394012.issue9245@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Star import problem was already fixed. Snared the other one in r82855. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 23:29:49 2010 From: report at bugs.python.org (Vincent Driessen) Date: Tue, 13 Jul 2010 21:29:49 +0000 Subject: [issue9253] optional subparsers In-Reply-To: <1279056589.03.0.566167994161.issue9253@psf.upfronthosting.co.za> Message-ID: <1279056589.03.0.566167994161.issue9253@psf.upfronthosting.co.za> New submission from Vincent Driessen : **NOTE**: This is a re-post of http://code.google.com/p/argparse/issues/detail?id=47 What steps will reproduce the problem? parser = argparse.ArgumentParser() sub = parser.add_subparsers() sub.add_parser("info") parser.add_argument("paths", "+") parser.parse_args(["foo", "bar"]) What is the expected output? What do you see instead? Expected behavior is that, failing to match one of the subparser inputs ("info"), the parser checks if the argument matches any of the top-level arguments, in this case the 'paths' multi-arg. In other words, it should be possible to make the subparser be optional, such that when the subparser argument fails to retrieve any valid subparser, the remaining args are parsed as if no subparser exists. At present, it does not seem possible to make a subparser be optional at all. Perhaps this could be exposed to the user as: parser.add_subparsers(nargs=argparse.OPTIONAL) or something to that effect. Or, allow a default subparser to be specified. I.e., sub = parser.add_subparsers() info = sub.add_parser("info") main = sub.add_parser("main") sub.default = main I'm sure the point will come up that the current behavior is correct, because given a subparser like "info", a user could easily make a mistake like "myapp ino foo bar" and rather than get a safe error be given something unexpected. For this reason, I think the default behavior is usually going to be correct. BUT, it would still be nice if it could be optional, so that developers could be free to make that call. Sometimes the potential user errors aren't really an issue, and having to explicitly set a subparse arg every time can be a nuissance. ---------- components: Library (Lib) messages: 110231 nosy: nvie priority: normal severity: normal status: open title: optional subparsers type: feature request versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 23:30:39 2010 From: report at bugs.python.org (Vincent Driessen) Date: Tue, 13 Jul 2010 21:30:39 +0000 Subject: [issue9253] argparse: optional subparsers In-Reply-To: <1279056589.03.0.566167994161.issue9253@psf.upfronthosting.co.za> Message-ID: <1279056639.48.0.126767862353.issue9253@psf.upfronthosting.co.za> Vincent Driessen added the comment: Changed the title, so it shows that the feature request is for argparse. ---------- title: optional subparsers -> argparse: optional subparsers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 23:34:24 2010 From: report at bugs.python.org (Jonathan Halcrow) Date: Tue, 13 Jul 2010 21:34:24 +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: <1279056864.0.0.205684153054.issue2636@psf.upfronthosting.co.za> Jonathan Halcrow added the comment: The most recent version on pypi (20100709) seems to be missing _regex_core from py_modules in setup.py. Currently import regex fails, unable to locate _regex_core. ---------- nosy: +jhalcrow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 23:49:29 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 13 Jul 2010 21:49:29 +0000 Subject: [issue9254] __import__ docstring should recommend importlib.import_module() In-Reply-To: <1279057769.02.0.398615806235.issue9254@psf.upfronthosting.co.za> Message-ID: <1279057769.02.0.398615806235.issue9254@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : On Tue, Jul 13, 2010 at 4:52 PM, Brett Cannon wrote [1]: .. > I say this every time I give an import talk and it has been brought up here > before but obviously not everyone catches it (which is understandable as I > think when it came up on python-dev it was at the tail end of a discussion), > so I am just going to repeat myself: > ??Do not put junk in fromlist if you call __import__ directly! Use > importlib.import_module! Or if you have a *really* good reason to not use > it, then use ``__import__(name); module = sys.modules[name]``. I think one of the reasons the message does not sink in (at least this is the reason in my case) is that a user who discovers that __import__('foo.bar') returns foo instead of bar, looks up help(__import__) to find that """ When importing a module from a package, note that __import__('A.B', ...) returns package A when fromlist is empty, but its submodule B when fromlist is not empty. """ Passing fromlist=["dummy"] seems like a natural solution after reading this. The ReST documentation [2] is slightly better as it contain a recommendation that says: "If you simply want to import a module (potentially within a package) by name, you can call __import__() and then look it up in sys.modules." However this still fails to mention the (better IMO) alternative of using importlib.import_module(). I believe the __import__ docstring should start with a recommendation not to use it directly and use importlib.import_module() instead, while the ReST documentation should grow a warning not to use dummy fromlist and the recommendation to use __import__() followed by sys.modules lookup should be changed to a recommendation to use mportlib.import_module(). [1] "Peculiar import code in pickle.py" . [2] http://docs.python.org/dev/library/functions.html?#__import__ ---------- messages: 110234 nosy: belopolsky, brett.cannon priority: normal severity: normal status: open title: __import__ docstring should recommend importlib.import_module() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 23:49:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 13 Jul 2010 21:49:59 +0000 Subject: [issue9254] __import__ docstring should recommend importlib.import_module() In-Reply-To: <1279057769.02.0.398615806235.issue9254@psf.upfronthosting.co.za> Message-ID: <1279057799.89.0.0842830474141.issue9254@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python stage: -> needs patch type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 23:53:45 2010 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 13 Jul 2010 21:53:45 +0000 Subject: [issue9250] sys.modules changes size during iteration in regrtest module In-Reply-To: <1279038973.54.0.16228117882.issue9250@psf.upfronthosting.co.za> Message-ID: <1279058025.17.0.510518936656.issue9250@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Thanks for your comments, that was fast! I will skip using the test package then. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 23:53:48 2010 From: report at bugs.python.org (Brett Cannon) Date: Tue, 13 Jul 2010 21:53:48 +0000 Subject: [issue9255] document that the 'test' package is for core developers only In-Reply-To: <1279058028.22.0.187583087672.issue9255@psf.upfronthosting.co.za> Message-ID: <1279058028.22.0.187583087672.issue9255@psf.upfronthosting.co.za> New submission from Brett Cannon : The documentation for the 'test' package should specify that the things that are documented are really meant for people contributing to Python and not for personal use. This will help lead to people no longer using the package outside of Python itself and eventually getting the module back to being an internal detail. ---------- assignee: brett.cannon components: Documentation keywords: easy messages: 110236 nosy: brett.cannon priority: normal severity: normal stage: needs patch status: open title: document that the 'test' package is for core developers only versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 23:54:57 2010 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 13 Jul 2010 21:54:57 +0000 Subject: [issue9250] sys.modules changes size during iteration in regrtest module In-Reply-To: <1279038973.54.0.16228117882.issue9250@psf.upfronthosting.co.za> Message-ID: <1279058097.33.0.115685699643.issue9250@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 13 23:56:50 2010 From: report at bugs.python.org (Alex Willmer) Date: Tue, 13 Jul 2010 21:56:50 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1279056864.0.0.205684153054.issue2636@psf.upfronthosting.co.za> Message-ID: Alex Willmer added the comment: On 13 July 2010 22:34, Jonathan Halcrow wrote: > The most recent version on pypi (20100709) seems to be missing _regex_core from py_modules in setup.py. Sorry, my fault. I've uploaded a corrected version http://pypi.python.org/pypi/regex/0.1.20100709.1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 00:13:23 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 13 Jul 2010 22:13:23 +0000 Subject: [issue7384] curses crash on FreeBSD In-Reply-To: <1259006628.77.0.121355571453.issue7384@psf.upfronthosting.co.za> Message-ID: <1279059203.42.0.644733775217.issue7384@psf.upfronthosting.co.za> STINNER Victor added the comment: > "In lt_LT.UTF-8 locale, readline_termcap_lib file contains: > ne dinaminis paleid?iamasis failas" You can run ldd without LANG variable to get the original (english, ascii only) message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 00:18:24 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 13 Jul 2010 22:18:24 +0000 Subject: [issue9255] document that the 'test' package is for core developers only In-Reply-To: <1279058028.22.0.187583087672.issue9255@psf.upfronthosting.co.za> Message-ID: <1279059504.43.0.198020417367.issue9255@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It would be nice if at the same time the facilities available in test.support and test.regrtest were reviewed and some promoted to user facing unittest package. They can even be placed in unittest.support and unittest.regrtest modules for easy discovery. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 00:35:53 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 13 Jul 2010 22:35:53 +0000 Subject: [issue9169] Deprecate use of more than 3 positional arguments in timedelta constructor In-Reply-To: <1278349650.72.0.868837064663.issue9169@psf.upfronthosting.co.za> Message-ID: <1279060553.8.0.320533062897.issue9169@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 00:52:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 13 Jul 2010 22:52:23 +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: <1279061543.77.0.750672834209.issue7584@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Adding issue 7989 as a dependency because having pure python implementation in the CPython tree will make it much easier to experiment with new datetime features. I am still -1 on adding specialized formatting methods to the datetime class. I think this should be done in specialized modules. On the other hand, datetime module should provide facilities to easily implement such methods and there does not seem to be a good solution for implementing locale independent formats. I would like to consider the idea of adding datetime.cstrftime() which provides formatting equivalent to datetime.strftime() in "C" locale. Another feature that will be needed to implement rfcformat, would be a GNU date style "%:z" code. ---------- dependencies: +Add pure Python implementation of datetime module to CPython _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 01:24:17 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 13 Jul 2010 23:24:17 +0000 Subject: [issue9254] __import__ docstring should recommend importlib.import_module() In-Reply-To: <1279057769.02.0.398615806235.issue9254@psf.upfronthosting.co.za> Message-ID: <1279063457.46.0.765722016252.issue9254@psf.upfronthosting.co.za> ?ric Araujo added the comment: More rationale for not using a dummy fromlist, from Brett Cannon: ?Pulling from sys.modules is the correct way to do this. There are subtle issues when using a bunk fromlist argument (empty modules, double initialization, etc.). If one does not use importlib.import_module -- written *specifically* to prevent people from doing the nasty hack with the fromlist -- then you should use the sys.modules approach, period? ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 01:28:26 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 13 Jul 2010 23:28:26 +0000 Subject: [issue9255] document that the 'test' package is for core developers only In-Reply-To: <1279058028.22.0.187583087672.issue9255@psf.upfronthosting.co.za> Message-ID: <1279063706.26.0.741199296451.issue9255@psf.upfronthosting.co.za> R. David Murray added the comment: Alexander: issue8273 addresses this, but I don't think Brett's doc change should be held up pending the resolution of that issue. Also, the entire set of test.support documentation should move to a set of 'developer' docs (which I think Brett plans to write eventually...) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 01:33:26 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 13 Jul 2010 23:33:26 +0000 Subject: [issue9243] sndhdr erroneously detects files as vox In-Reply-To: <1279021669.64.0.945928628097.issue9243@psf.upfronthosting.co.za> Message-ID: <1279064006.56.0.549586262575.issue9243@psf.upfronthosting.co.za> STINNER Victor added the comment: > Oh, and the reason it got changed to startswith is probably > a micro-optimization: startswith is more efficient than doing > a slice-and-compare. Not really. I changed it because it's more readable (it's easier to understand that the code). -- James: I commited all your fixes + your test suite to 3.1 (r82859 + r82860) and 3.2 (r82856 + r82857) and added your name to Misc/ACKS. Thanks for your contribution. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 01:42:10 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 13 Jul 2010 23:42:10 +0000 Subject: [issue9253] argparse: optional subparsers In-Reply-To: <1279056589.03.0.566167994161.issue9253@psf.upfronthosting.co.za> Message-ID: <1279064530.7.0.0736944312046.issue9253@psf.upfronthosting.co.za> R. David Murray added the comment: I've added Steven as nosy so he knows this was reposted here. I've also set the priority to low. Personally I'm at least -0 on this, since if I use a command that has subcommands I expect to get an error if I supply an invalid subcommand. As you say, however, the command designer *could* be supplied with the opportunity to shoot themselves in the foot :) The issue isn't going to go anywhere unless someone proposes a patch, though. ---------- nosy: +bethard, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 01:42:26 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 13 Jul 2010 23:42:26 +0000 Subject: [issue9253] argparse: optional subparsers In-Reply-To: <1279056589.03.0.566167994161.issue9253@psf.upfronthosting.co.za> Message-ID: <1279064546.4.0.399856985352.issue9253@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 01:42:39 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 13 Jul 2010 23:42:39 +0000 Subject: [issue9253] argparse: optional subparsers In-Reply-To: <1279056589.03.0.566167994161.issue9253@psf.upfronthosting.co.za> Message-ID: <1279064559.64.0.943087856297.issue9253@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 02:02:13 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 14 Jul 2010 00:02:13 +0000 Subject: [issue9255] document that the 'test' package is for core developers only In-Reply-To: <1279058028.22.0.187583087672.issue9255@psf.upfronthosting.co.za> Message-ID: <1279065733.89.0.456420141345.issue9255@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Issue 8273 is in some sense the opposite of this - it calls for blessing of everything in in test.support while this issue calls for wholesale "unblessing". I don't think either approach is right. While users should definitely never import test_* modules, I think test.regrtest and test.support are borderline enough that many users already started using it in their test suites. (I am one of these users: on several projects, I actually renamed project-specific test directories to something else in order to be able to import stuff from test.) I think the warning should be less than absolute. Certainly users should not use things in test in their application code. However, for use in test suites, it should be more of "use it at your own risk". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 02:32:52 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 14 Jul 2010 00:32:52 +0000 Subject: [issue9255] document that the 'test' package is for core developers only In-Reply-To: <1279058028.22.0.187583087672.issue9255@psf.upfronthosting.co.za> Message-ID: <1279067572.37.0.211966197647.issue9255@psf.upfronthosting.co.za> R. David Murray added the comment: "Use it at your own risk" is always an option. Brett is saying that test.support docs need to make it clear that anyone using it is doing so at their own risk: it is for core development only and so we might change anything at any time without considering backward compatibility, and possibly even including incompatible changes in dot releases.[*] Given this, if you want your test suite to continue to pass without change across releases (barring bugs revealed by bug fixes, of course), then you should *not* use test.support even in your own test code. Issue 8273 is saying, "Some of this stuff is generally useful and users want it, so we should put it in unittest". And then the standard library can used the improved unittest versions instead of the test.support ones. So the two issues are complimentary, not opposites :) [*] Others may disagree with me on this and perhaps we will not make incompatible changes in test.support in dot releases. But we *will* make incompatible changes in major releases without going through a deprecation process. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 03:03:08 2010 From: report at bugs.python.org (ipatrol) Date: Wed, 14 Jul 2010 01:03:08 +0000 Subject: [issue7511] msvc9compiler.py: ValueError: [u'path'] In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1279069388.64.0.962638483876.issue7511@psf.upfronthosting.co.za> ipatrol added the comment: Aren't there two ValueErrors in the file? One is a platform and (in the now-fixed version) the other would indicate a problem with I/O or vcvars execution (like permissions). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 03:29:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 14 Jul 2010 01:29:20 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1279070960.18.0.14805226378.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: In issue7989c.diff, I reverted to lazy import of _strptime, added cleanup of _xyz helper functions, and made test_datetime more robust by restoring sys.modules more thoroughly. Unfortunately I've encountered an issue with Rietveld that prevents me from uploading the latest patch for review. See http://code.google.com/p/rietveld/issues/detail?id=208 ---------- Added file: http://bugs.python.org/file17992/issue7989c.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 03:34:04 2010 From: report at bugs.python.org (Wim) Date: Wed, 14 Jul 2010 01:34:04 +0000 Subject: =?utf-8?q?=5Bissue9256=5D_plistlib_should_create_non-na=C3=AFve_datetime_?= =?utf-8?q?objects?= In-Reply-To: <1279071244.17.0.181964010836.issue9256@psf.upfronthosting.co.za> Message-ID: <1279071244.17.0.181964010836.issue9256@psf.upfronthosting.co.za> New submission from Wim : The plistlib module parses elements in the plist into datetime objects. (This is good.) However, it produces na?ve datetimes, even though the elements include an explicit timezone specification ('Z' for UTC, since they're in ISO 8601 format). Now that issue 5094 has been fixed, this should be a pretty trivial thing to fix??just pass tzinfo=UTC when creating the datetime (since the regex it uses won't even accept a date that doesn't have the 'Z' suffix, this will be correct). As an aside: RFC 3339 section 4.3 suggests a convention for distinguishing between "timestamps in UTC" and "timestamps which happen to be defined in terms of UTC, but don't really live in any particular timezone". The python datetime module is not currently able to make this distinction AFAIK, but even though the plist date strings don't follow the RFC 3339 convention, they are most accurately described as having an unknown local offset (like POSIX timestamps, they are UTC-referenced but cannot carry local-timezone info). ---------- files: plistdt.py messages: 110249 nosy: wiml priority: normal severity: normal status: open title: plistlib should create non-na?ve datetime objects type: behavior versions: Python 2.5, Python 2.6 Added file: http://bugs.python.org/file17993/plistdt.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 03:42:12 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 14 Jul 2010 01:42:12 +0000 Subject: =?utf-8?q?=5Bissue9256=5D_plistlib_should_create_non-na=C3=AFve_datetime_?= =?utf-8?q?objects?= In-Reply-To: <1279071244.17.0.181964010836.issue9256@psf.upfronthosting.co.za> Message-ID: <1279071732.46.0.543268872155.issue9256@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Yes, parsing elements ending with 'Z' into aware datetime objects makes perfect sense, but this should be done carefully because doing so will break any code that mixes the result with naive datetimes. There is a lengthy RFC 3339 discussion in issue 7584. ---------- assignee: -> belopolsky components: +Library (Lib) nosy: +belopolsky stage: -> needs patch versions: +Python 3.2 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 03:45:24 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 14 Jul 2010 01:45:24 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1279071924.51.0.695376982202.issue2986@psf.upfronthosting.co.za> Terry J. Reedy added the comment: [copied from pydev post] Summary: adding an autojunk heuristic to difflib without also adding a way to turn it off was a bug because it disabled running code. 2.6 and 3.1 each have, most likely, one final version each. Don't fix for these but add something to the docs explaining the problem and future fix. 2.7 will have several more versions over several years and will be used by newcomers who might encounter the problem but not know to diagnose it and patch a private copy of the module. So it should have a fix. Solutions thought of so far. 1. Modify the heuristic to somewhat fix the problem. Bad (unacceptable) because this would silently change behavior and could break tests. 2. Add a parameter that defaults to using the heuristic but allows turning it off. Perhaps better, but code that used the new API would crash if run on 2.7.0 3. Tim Peters > Think the most pressing thing is to give people a way to turn the damn > thing off. An ugly way would be to trigger on an unlikely > input-output behavior of the existing isjunk argument. For example, > if > > isjunk("what's the airspeed velocity of an unladen swallow?") > > returned > > "don't use auto junk!" > > and 2.7.1 recognized that as meaning "don't use auto junk", code could > be written under 2.7.1 that didn't blow up under 2.7. It could > _behave_ differently, although that's true of any way of disabling the > auto-junk heuristics. Ugly, but perhaps crazy brilliant. Use of such a hack would obviously be temporary. Perhaps its use could be made to issue a -3 warning if such were enabled. I would simplify the suggestion to something like isjunk("disable!heuristic") == True so one could pass lambda s:s=="disable!heuristic" It should be something easy to document and write. This issue is the only place such a string should appear, so it should be safe. Tim and Antoine: if you two can agree on what to do for 2.7, Eli and I will code it. This suggestion amounts to a suggestion that the fix for 2.7 be decoupled from a better fix for 3.2. I agree. The latter can be discussed once 2.7 is settled. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 04:56:21 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 14 Jul 2010 02:56:21 +0000 Subject: [issue9249] struct.pack and Long Integer datatype should be 4, but is 8 bytes In-Reply-To: <1279033209.41.0.410142321642.issue9249@psf.upfronthosting.co.za> Message-ID: <1279076181.85.0.556625621119.issue9249@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- components: +Extension Modules -ctypes resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 05:27:47 2010 From: report at bugs.python.org (Eric Talevich) Date: Wed, 14 Jul 2010 03:27:47 +0000 Subject: [issue9257] cElementTree iterparse requires events as bytes; ElementTree uses strings In-Reply-To: <1279078067.06.0.575324977312.issue9257@psf.upfronthosting.co.za> Message-ID: <1279078067.06.0.575324977312.issue9257@psf.upfronthosting.co.za> New submission from Eric Talevich : In xml.etree, ElementTree and cElementTree implement different interfaces for the iterparse function/class. In ElementTree, the argument "events" must be a tuple of strings: from xml.etree import ElementTree as ET for result in ET.iterparse('example.xml', events=('start', 'end')): print(result) That works, given a valid XML file 'example.xml'. If the event names are given as bytes instead of strings (b'start', b'end'), there's no crash, but no events are recognized. In cElementTree, it's the opposite: the events argument must be a tuple of bytes: from xml.etree import cElementTree as cET for result in cET.iterparse('example.xml', events=(b'start', b'end')): print(result) Giving a tuple of strings instead of bytes results in: >>> for result in cET.iterparse('example.xml', events=('start', 'end')): ... print(result) TypeError: invalid event tuple This makes it difficult to use ElementTree as a backup for cElementTree, or at least very awkward. ---------- components: Library (Lib) messages: 110252 nosy: eric-talevich priority: normal severity: normal status: open title: cElementTree iterparse requires events as bytes; ElementTree uses strings versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 06:56:58 2010 From: report at bugs.python.org (Reid Kleckner) Date: Wed, 14 Jul 2010 04:56:58 +0000 Subject: [issue6033] LOOKUP_METHOD and CALL_METHOD optimization In-Reply-To: <1242438240.35.0.944379800728.issue6033@psf.upfronthosting.co.za> Message-ID: <1279083418.33.0.686175533725.issue6033@psf.upfronthosting.co.za> Reid Kleckner added the comment: I have an patch for unladen-swallow out for review here: http://codereview.appspot.com/160063/show It resolves the correctness issues I mentioned previously by emitting guards if necessary. If the type is predictable and uses slots, then we don't need to check the instance dict. It gives a 5% speedup on the unpickle benchmark. Presumably the other benchmarks do not do as many method calls. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 08:13:29 2010 From: report at bugs.python.org (Reid Kleckner) Date: Wed, 14 Jul 2010 06:13:29 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1279088009.3.0.578773124354.issue5673@psf.upfronthosting.co.za> Reid Kleckner added the comment: I went through the trouble of building and testing Python on Windows Vista, and with some small modifications I got the tests I added to pass. Here's an updated patch. I'm still not really sure how those threads work on Windows, so I'd rather leave that TODO in until someone with Windows expertise checks it. ---------- Added file: http://bugs.python.org/file17994/subprocess-timeout-v4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 09:56:29 2010 From: report at bugs.python.org (Retro) Date: Wed, 14 Jul 2010 07:56:29 +0000 Subject: [issue9258] Typos in docs for methods kqueue and kevent of module 'select' In-Reply-To: <1279094189.8.0.55376365851.issue9258@psf.upfronthosting.co.za> Message-ID: <1279094189.8.0.55376365851.issue9258@psf.upfronthosting.co.za> New submission from Retro : Fix the docs for every selected Python version. They all have the same typos. The typos appear in the documentation of the 'select' module. These are the methods that need typo fixes: select.kqueue() (Only supported on BSD.) Returns a kernel queue object object ... [remove one of the words 'object' here because they are unnecessarily repeated] select.kevent(ident, filter=KQ_FILTER_READ, flags=KQ_EV_ADD, fflags=0, data=0, udata=0) (Only supported on BSD.) Returns a kernel event object object; see section Kevent Objects below for the methods supported by kqueue objects. [again, remove one of the words 'object' here because they are unnecessarily repeated; also, fix the word 'kqueue' to 'kevent'] ---------- assignee: docs at python components: Documentation messages: 110255 nosy: Retro, docs at python, georg.brandl priority: normal severity: normal status: open title: Typos in docs for methods kqueue and kevent of module 'select' versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 09:58:16 2010 From: report at bugs.python.org (Ask Solem) Date: Wed, 14 Jul 2010 07:58:16 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279094296.21.0.17444669581.issue9205@psf.upfronthosting.co.za> Ask Solem added the comment: There's one more thing if exitcode is not None: cleaned = True if exitcode != 0 and not worker._termination_requested: abnormal.append((worker.pid, exitcode)) Instead of restarting crashed worker processes it will simply bring down the pool, right? If so, then I think it's important to decide whether we want to keep the supervisor functionality, and if so decide on a recovery strategy. Some alternatives are: A) Any missing worker brings down the pool. B) Missing workers will be replaced one-by-one. A maximum-restart-frequency decides when the supervisor should give up trying to recover the pool, and crash it. C) Same as B, except that any process crashing when trying to get() will bring down the pool. I think the supervisor is a good addition, so I would very much like to keep it. It's also a step closer to my goal of adding the enhancements added by Celery to multiprocessing.pool. Using C is only a few changes away from this patch, but B would also be possible in combination with my accept_callback patch. It does pose some overhead, so it depends on the level of recovery we want to support. accept_callback: this is a callback that is triggered when the job is reserved by a worker process. The acks are sent to an additional Queue, with an additional thread processing the acks (hence the mentioned overhead). This enables us to keep track of what the worker processes are doing, also get the PID of the worker processing any given job (besides from recovery, potential uses are monitoring and the ability to terminate a job (ApplyResult.terminate?). See http://github.com/ask/celery/blob/master/celery/concurrency/processes/pool.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 10:00:34 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 14 Jul 2010 08:00:34 +0000 Subject: [issue9258] Typos in docs for methods kqueue and kevent of module 'select' In-Reply-To: <1279094189.8.0.55376365851.issue9258@psf.upfronthosting.co.za> Message-ID: <1279094434.98.0.568870133778.issue9258@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r82871. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 10:05:27 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 14 Jul 2010 08:05:27 +0000 Subject: [issue9258] Typos in docs for methods kqueue and kevent of module 'select' In-Reply-To: <1279094189.8.0.55376365851.issue9258@psf.upfronthosting.co.za> Message-ID: <1279094727.51.0.988245904227.issue9258@psf.upfronthosting.co.za> ?ric Araujo added the comment: Just for your information, there is no 3.3 version yet. This value is useful for bugs that won?t be fixed in 3.2 (a.k.a. the py3k trunk). ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 10:20:51 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 14 Jul 2010 08:20:51 +0000 Subject: [issue9258] Typos in docs for methods kqueue and kevent of module 'select' In-Reply-To: <1279094189.8.0.55376365851.issue9258@psf.upfronthosting.co.za> Message-ID: <1279095651.32.0.967952104581.issue9258@psf.upfronthosting.co.za> Georg Brandl added the comment: Ah yes, and please don't add me to the nosy list on doc issues. docs at python is enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 10:56:21 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 14 Jul 2010 08:56:21 +0000 Subject: [issue9235] missing "import sys" in Tools/gdb/libpython.py In-Reply-To: <1278967235.19.0.848515468243.issue9235@psf.upfronthosting.co.za> Message-ID: <1279097781.24.0.708514232634.issue9235@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r82874. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 11:06:50 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Jul 2010 09:06:50 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1279071924.51.0.695376982202.issue2986@psf.upfronthosting.co.za> Message-ID: <1279098401.3128.6.camel@localhost.localdomain> Antoine Pitrou added the comment: Le mercredi 14 juillet 2010 ? 01:45 +0000, Terry J. Reedy a ?crit : > > 2. Add a parameter that defaults to using the heuristic but allows > turning it off. Perhaps better, but code that used the new API would > crash if run on 2.7.0 Yes, but this is an exceptional situation. We normally don't add new APIs in bugfix versions. We'll have to live with it. > 3. > [...] > Ugly, but perhaps crazy brilliant. Use of such a hack would obviously > be temporary. Perhaps its use could be made to issue a -3 warning if > such were enabled. It's still incredibly ugly. Besides, code written for 2.7.1 might not "blow up" with 2.7, but it will still have different behaviour. If you are using the new parameter, it's because you *need* it, hence different behaviour will be unacceptable; therefore, better to raise an error as the API change proposal does. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 11:54:12 2010 From: report at bugs.python.org (Tiago Antao) Date: Wed, 14 Jul 2010 09:54:12 +0000 Subject: [issue9217] 2to3 crashes with some doctests In-Reply-To: <1278790070.07.0.615684286831.issue9217@psf.upfronthosting.co.za> Message-ID: <1279101252.86.0.343526377621.issue9217@psf.upfronthosting.co.za> Tiago Antao added the comment: I've re-opened this bug because of the late examples that I've included that still crash. I can open a new bug if you prefer with the late examples (just tell me and I will open a new bug). This is somewhat important for us: In order to be able to release a Python3 version of biopython we need to have 2to3 doctest processing working. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 12:38:23 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Jul 2010 10:38:23 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1279103903.91.0.0553771682244.issue5673@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +brian.curtin versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 12:46:02 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Jul 2010 10:46:02 +0000 Subject: [issue9251] Test for the import lock In-Reply-To: Message-ID: <1279104356.3128.8.camel@localhost.localdomain> Antoine Pitrou added the comment: > test_threaded_import is designed to check the import lock (and it does > at least to some degree - I changed runpy's handling of the import > lock because my original approach broke that test). Apparently, Lib/test/test_threaded_import only works if run directly. If run through regrtest, it succeeds even with the import lock disabled (probably because random.py is already included by regrtest). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 12:54:58 2010 From: report at bugs.python.org (sorin) Date: Wed, 14 Jul 2010 10:54:58 +0000 Subject: [issue7231] Windows installer does not add \Scripts folder to the path In-Reply-To: <1256749152.57.0.801313448944.issue7231@psf.upfronthosting.co.za> Message-ID: <1279104898.13.0.238265607189.issue7231@psf.upfronthosting.co.za> sorin added the comment: Additional information that will enable the installer to update the path without requiring a relogin/restart: http://support.microsoft.com/kb/104011 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 12:57:53 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 14 Jul 2010 10:57:53 +0000 Subject: [issue5842] Move test outside of urlparse module In-Reply-To: <1240686074.24.0.993637087915.issue5842@psf.upfronthosting.co.za> Message-ID: <1279105073.24.0.963748291852.issue5842@psf.upfronthosting.co.za> ?ric Araujo added the comment: Done in r82881 to 82883. Thanks orsenthil! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 13:01:27 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 14 Jul 2010 11:01:27 +0000 Subject: [issue5842] Move test outside of urlparse module In-Reply-To: <1240686074.24.0.993637087915.issue5842@psf.upfronthosting.co.za> Message-ID: <1279105287.22.0.055992877819.issue5842@psf.upfronthosting.co.za> ?ric Araujo added the comment: FTR, r82884 too for 2.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 13:27:12 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Jul 2010 11:27:12 +0000 Subject: [issue9251] Test for the import lock In-Reply-To: <1279047931.75.0.287450849516.issue9251@psf.upfronthosting.co.za> Message-ID: <1279106832.21.0.186855373492.issue9251@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, here is a patch for test_threaded_import that makes it work for regrtest too. I've removed all global variables and converted it to unittest. ---------- keywords: +patch Added file: http://bugs.python.org/file17995/threadimp.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 13:53:18 2010 From: report at bugs.python.org (Ariel Ben-Yehuda) Date: Wed, 14 Jul 2010 11:53:18 +0000 Subject: [issue9259] Python 2.7 breaks assigned __exit__s In-Reply-To: <1279108398.28.0.504653003054.issue9259@psf.upfronthosting.co.za> Message-ID: <1279108398.28.0.504653003054.issue9259@psf.upfronthosting.co.za> New submission from Ariel Ben-Yehuda : Hello, I think there is a problem with Python 2.7: I installed it, and tried to compile GObject-Introspection 0.9.2. Here is the result: ... GISCAN GLib-2.0.gir Traceback (most recent call last): File "../tools/g-ir-scanner", line 36, in from giscanner.scannermain import scanner_main File "/sources/gobject-introspection-0.9.2/giscanner/scannermain.py", line 31, in from giscanner.dumper import compile_introspection_binary File "/sources/gobject-introspection-0.9.2/giscanner/dumper.py", line 26, in from .glibtransformer import IntrospectionBinary File "/sources/gobject-introspection-0.9.2/giscanner/glibtransformer.py", line 34, in from .transformer import Names File "/sources/gobject-introspection-0.9.2/giscanner/transformer.py", line 31, in from .girparser import GIRParser File "/sources/gobject-introspection-0.9.2/giscanner/girparser.py", line 32, in from .girwriter import COMPATIBLE_GIR_VERSION File "/sources/gobject-introspection-0.9.2/giscanner/girwriter.py", line 30, in from .xmlwriter import XMLWriter File "/sources/gobject-introspection-0.9.2/giscanner/xmlwriter.py", line 70, in with LibtoolImporter: AttributeError: __exit__ Oops, no GObject-Introspection for me. Investigating the bug, I looked in the recent changes in Python2.7 for something interesting, and found this: A new opcode was added to perform the initial setup for with statements, looking up the __enter__() and __exit__() methods. (Contributed by Benjamin Peterson.) Finally, I made 3 test cases to the bug. All 3 produce no input in Python 2.6, but crash pretty nicely in 2.7, the first 2 not finding __exit__ and the last missing __enter__. I will try to make a patch, however my CPython skills are not so great, so you will probably make a better one. ---------- components: Interpreter Core files: tests.tar.xz messages: 110268 nosy: arielbyd priority: normal severity: normal status: open title: Python 2.7 breaks assigned __exit__s versions: Python 2.7 Added file: http://bugs.python.org/file17996/tests.tar.xz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 13:57:25 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Jul 2010 11:57:25 +0000 Subject: [issue9251] Test for the import lock In-Reply-To: <1279047931.75.0.287450849516.issue9251@psf.upfronthosting.co.za> Message-ID: <1279108645.77.0.169169195612.issue9251@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've committed the fix in r82885 (3.2) and r82886 (3.1). The reliance on random still looks a bit quirky to me, but at least the test now does what it should do, and has a cleaned up coding style. I'm leaving this issue open, for the other test might be interesting to integrate as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 13:57:30 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 14 Jul 2010 11:57:30 +0000 Subject: [issue4932] Little improvement on urlparse module, urlparse function. In-Reply-To: <1231867955.83.0.32658151911.issue4932@psf.upfronthosting.co.za> Message-ID: <1279108650.7.0.688850539715.issue4932@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I reviewed the patch and we may not go with it. - There is recent improvements in parsing and the patch does not go well with it, especially the clear_cache removal. Also there is a mistake in the patch: - scheme, url = url[:i].lower(), url[i+1:] + url = url[i+1:] This can create problems for certain parsing logic as scheme is being used later in the code. Closing the bug is invalid. ---------- resolution: -> invalid stage: unit test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 14:02:38 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Jul 2010 12:02:38 +0000 Subject: [issue9259] Python 2.7 breaks assigned __exit__s In-Reply-To: <1279108398.28.0.504653003054.issue9259@psf.upfronthosting.co.za> Message-ID: <1279108958.65.0.979586954436.issue9259@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 14:05:17 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 14 Jul 2010 12:05:17 +0000 Subject: [issue7384] curses crash on FreeBSD In-Reply-To: <1259006628.77.0.121355571453.issue7384@psf.upfronthosting.co.za> Message-ID: <1279109117.06.0.541915694172.issue7384@psf.upfronthosting.co.za> Stefan Krah added the comment: So you have garbage from stderr in readline_termcap_lib. Since that's useless anyway (no matter what locale is set), let's check the return value of os.system(). The attached patch skips readline linkage detection if ldd fails. In that case, linking will be done in the same manner as before r81830. Please report if the patch allows you to build py3k in the problematic locale. Your method of detecting readline linkage looks interesting, but I doubt that I'm going to implement it: These cross platform issues take an *immense* amount of time, since you have to test on all buildbot platforms (+ OpenBSD and OpenSolaris), with different compilers (icc, suncc). If you want that done, the best way is to open another issue, submit a patch (probably for configure.in) _and_ do all the testing. ---------- Added file: http://bugs.python.org/file17997/ldd-retval-py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 14:08:11 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Jul 2010 12:08:11 +0000 Subject: [issue6033] LOOKUP_METHOD and CALL_METHOD optimization In-Reply-To: <1242438240.35.0.944379800728.issue6033@psf.upfronthosting.co.za> Message-ID: <1279109291.52.0.831360968706.issue6033@psf.upfronthosting.co.za> Antoine Pitrou added the comment: First, are these benchmark results jitted or non-jitted? Right now, non-jitted results are a stronger motivation for inclusion in main CPython, IMHO. Second, 2.7 won't receive any features / performance improvements anymore. It would be nice to have 3.2 (non-jitted) benchmark results. Third, if removing intermediate allocations is the kind of optimizations a JIT will do anyway, does it make sense or not to make these optimizations explicit at the bytecode level? (this is really an open question, not a rhetorical one) ---------- nosy: +collinwinter, jyasskin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 14:11:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Jul 2010 12:11:47 +0000 Subject: [issue6033] LOOKUP_METHOD and CALL_METHOD optimization In-Reply-To: <1242438240.35.0.944379800728.issue6033@psf.upfronthosting.co.za> Message-ID: <1279109507.57.0.316034486837.issue6033@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> patch review versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 14:34:05 2010 From: report at bugs.python.org (Ask Solem) Date: Wed, 14 Jul 2010 12:34:05 +0000 Subject: [issue9244] multiprocessing.pool: Worker crashes if result can't be encoded In-Reply-To: <1279021915.02.0.743108448879.issue9244@psf.upfronthosting.co.za> Message-ID: <1279110845.05.0.789573736584.issue9244@psf.upfronthosting.co.za> Ask Solem added the comment: > To be clear, the errback change and the unpickleable result > change are actually orthogonal, right? Yes, it could be a separate issue. Jesse, do you think I should I open up a separate issue for this? > Why not add an error_callback for map_async as well? That's a good idea! > Any reason you chose to use a different internal name > (errback versus error_callback)? It seems cleaner to me > to be consistent about the name. It was actually a mistake. The argument was ``errback`` before, so it's just a leftover from the previous name. > In general, I'm wary of nonessential whitespace changes... > did you mean to include these? Of course not. > Using "assertTrue" seems misleading. "assertIsNotNone" is what > really mean, right? Although, I believe that's redundant, > since presumably self.assertIsInstance(None, KeyError) will > error out anyway (I haven't verified this). bool(KeyError("foo")) is True and bool(None) is False, so it works either way. It could theoretically result in a false negative if the exception class tested overrides __nonzero__, but that is unlikely to happen as the target always returns KeyError anyway (and the test below ensures it) It's just a habit of mine, unless I really want to test for Noneness, I just use assertTrue, but I'm not against changing it to assertIsNotNone either. > Under what circumstances would these be None? (Perhaps you > want wrapped.exc != 'None'?) The initializer for > MaybeEncodingError enforces the invariant that exc/value are strings > right? It's just to test that these are actually set to something. Even an empty string passes with assertIsNone instead of assertTrue. Maybe it's better to test the values set, but I didn't bother. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 15:07:33 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 14 Jul 2010 13:07:33 +0000 Subject: [issue9259] Python 2.7 breaks assigned __exit__s In-Reply-To: <1279108398.28.0.504653003054.issue9259@psf.upfronthosting.co.za> Message-ID: <1279112853.55.0.10225967224.issue9259@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thank you for the report. Unfortunately, the 2.6 behavior was a bug, as I explained on #9220: Magic methods are looked up on the object?s class, not in the object?s __dict__. (Your test with class methods was a clever idea, but a class is a type instance, so it?s the same behavior: __enter__ is looked up on type, not on the class. Nice try :) Tip for future bug reports: We prefer regular files over archives. Thanks again! ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 15:07:51 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 14 Jul 2010 13:07:51 +0000 Subject: [issue9259] Python 2.7 breaks assigned __exit__s In-Reply-To: <1279108398.28.0.504653003054.issue9259@psf.upfronthosting.co.za> Message-ID: <1279112871.69.0.595349478427.issue9259@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 15:09:31 2010 From: report at bugs.python.org (Ariel Ben-Yehuda) Date: Wed, 14 Jul 2010 13:09:31 +0000 Subject: [issue9259] Python 2.7 breaks assigned __exit__s In-Reply-To: <1279108398.28.0.504653003054.issue9259@psf.upfronthosting.co.za> Message-ID: <1279112971.0.0.150103143817.issue9259@psf.upfronthosting.co.za> Ariel Ben-Yehuda added the comment: Bug or not bug, Python2.7 breaks Gobject-Introspection. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 15:11:01 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 14 Jul 2010 13:11:01 +0000 Subject: [issue9259] Python 2.7 breaks assigned __exit__s In-Reply-To: <1279108398.28.0.504653003054.issue9259@psf.upfronthosting.co.za> Message-ID: <1279113061.77.0.979468848713.issue9259@psf.upfronthosting.co.za> ?ric Araujo added the comment: Please produce a test to prove that Python behaves in contradiction to the documentation. Otherwise I?m afraid it?s a GI bug, like in your tests :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 15:16:27 2010 From: report at bugs.python.org (hannes reuter) Date: Wed, 14 Jul 2010 13:16:27 +0000 Subject: [issue9249] struct.pack and Long Integer datatype should be 4, but is 8 bytes In-Reply-To: <1279051036.14.0.17698051549.issue9249@psf.upfronthosting.co.za> Message-ID: hannes reuter added the comment: Dear Marc, Thanks for taking time to answer that question. I understand that this comes from the native formating i specified, >>> calcsize('L') 8 >>> calcsize(' wrote: > > Mark Dickinson added the comment: > > Please read the three sentences directly preceding that table and tell me > whether they clear this up for you. > > ---------- > assignee: theller -> mark.dickinson > nosy: +mark.dickinson > > _______________________________________ > Python tracker > > _______________________________________ > ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 15:20:10 2010 From: report at bugs.python.org (Ariel Ben-Yehuda) Date: Wed, 14 Jul 2010 13:20:10 +0000 Subject: [issue9259] Python 2.7 breaks assigned __exit__s In-Reply-To: <1279108398.28.0.504653003054.issue9259@psf.upfronthosting.co.za> Message-ID: <1279113610.0.0.519494653011.issue9259@psf.upfronthosting.co.za> Ariel Ben-Yehuda added the comment: My test on Class Methods was based on the GI Code that does not run on Python 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 15:29:45 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 14 Jul 2010 13:29:45 +0000 Subject: [issue9259] Python 2.7 breaks assigned __exit__s In-Reply-To: <1279108398.28.0.504653003054.issue9259@psf.upfronthosting.co.za> Message-ID: <1279114185.68.0.994669586095.issue9259@psf.upfronthosting.co.za> ?ric Araujo added the comment: I am afraid we have conflicting viewpoints. You are saying that upgrading Python broke code, and I agree it?s a bad thing. Usually such regression reports are accepted and fixed. In this case however, the code was already broken in the previous version, it was only working because of a problem in the implementation. So from the viewpoint of GI users, it?s a regression, but from the viewpoint of Python the 2.7 behavior fixes a regression in 2.6. It is not supported to find magic methods (?__name__?) on instances. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 15:35:19 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 14 Jul 2010 13:35:19 +0000 Subject: [issue1448060] gettext.py breaks on plural-forms header (PATCH) Message-ID: <1279114519.87.0.495296980472.issue1448060@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- dependencies: -patch fixing #1448060 (gettext.py bug) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 15:36:58 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 14 Jul 2010 13:36:58 +0000 Subject: [issue9259] Python 2.7 breaks assigned __exit__s In-Reply-To: <1279108398.28.0.504653003054.issue9259@psf.upfronthosting.co.za> Message-ID: <1279114618.39.0.950526842944.issue9259@psf.upfronthosting.co.za> ?ric Araujo added the comment: Since Benjamin Peterson, release manager for 2.7, confirmed that the change was intentional, I?m closing again. To solve the bug in GI, you need to define a metaclass with those __enter__ and __exit__ methods, then use it as metaclass for LibtoolImporter. Please send me private email if you want more details. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 15:59:26 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 14 Jul 2010 13:59:26 +0000 Subject: [issue1574217] isinstance swallows exceptions Message-ID: <1279115966.94.0.388342697152.issue1574217@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we get this closed as the patch is in 2.6 already, just needs to be applied to the later versions. Or have I missed something? ---------- nosy: +BreamoreBoy versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 16:05:04 2010 From: report at bugs.python.org (Ask Solem) Date: Wed, 14 Jul 2010 14:05:04 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279116304.24.0.939985197727.issue9205@psf.upfronthosting.co.za> Ask Solem added the comment: Jesse wrote, > We can work around the shutdown issue (really, bug 9207) by > ignoring the exception such as shutdown.patch does, or passing in > references/adding references to the functions those methods need. Or (as Brett suggested) converting them to class methods and adding references to the class. Or passing them in via the signature like this _handle_workers(arg, _debug=debug), etc. Greg wrote, > Another option would be to enable only for the worker handler. I > don't have a particularly great sense of what the Right Thing to > do here is. I don't think _make_shutdown_safe should be added to the result handler. If the error can indeed happen there, then we need to solve it in a way that enables it to finish the work. Jesse, how hard is it to fix the worker handler by passing the references? Note that _worker_handler is not important to complete shutdown at this point, but it may be in the future (it seems termination.patch already changes this) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 16:20:53 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 14 Jul 2010 14:20:53 +0000 Subject: [issue1574217] isinstance swallows exceptions Message-ID: <1279117253.16.0.978727149569.issue1574217@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I don't see it being applied. Tres Seaver above reports that issue1574217_dont_mask_errors.txt applies cleanly to 2.6 branch, which means that it has not been applied yet. Someone needs to check if the patch is current for 2.7 and py3k branches to move this forward. ---------- nosy: +belopolsky versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 16:26:13 2010 From: report at bugs.python.org (Jesse Noller) Date: Wed, 14 Jul 2010 14:26:13 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279117573.73.0.442717538089.issue9205@psf.upfronthosting.co.za> Jesse Noller added the comment: Passing the references seems to be a losing game; for _handle_workers - we only need 1 function (debug) - for others (say _join_exited_workers), we need references to reversed/range/len. A possible alternative is to make those threads non-daemon threads; but I'd have to test that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 16:32:11 2010 From: report at bugs.python.org (Alex Rodriguez) Date: Wed, 14 Jul 2010 14:32:11 +0000 Subject: [issue9227] can't import Tkinter / use IDLE after installing Python 2.7 on Mac OS X In-Reply-To: <1278883906.89.0.545374403914.issue9227@psf.upfronthosting.co.za> Message-ID: <1279117931.14.0.289272102058.issue9227@psf.upfronthosting.co.za> Changes by Alex Rodriguez : ---------- nosy: +Alex.Rodriguez _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 16:41:08 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 14 Jul 2010 14:41:08 +0000 Subject: [issue9227] can't import Tkinter / use IDLE after installing Python 2.7 on Mac OS X In-Reply-To: <1278883906.89.0.545374403914.issue9227@psf.upfronthosting.co.za> Message-ID: <1279118468.22.0.292123301567.issue9227@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm going to experiment with embedding a minimal version of Tk in the installer, which would both fix this issue and ensure that we use a version of Tk that is better adjusted to OSX (which should remove some other issues) I want to do this during the europython sprint days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 16:44:23 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Jul 2010 14:44:23 +0000 Subject: [issue9260] A finer grained import lock In-Reply-To: <1279118663.3.0.514954672422.issue9260@psf.upfronthosting.co.za> Message-ID: <1279118663.3.0.514954672422.issue9260@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This is an implementation of the idea suggested in: http://mail.python.org/pipermail/python-dev/2003-February/033445.html The patch creates a dictionary of reentrant locks keyed by module full name. Trying to import a module or package will first get the lock for that module (or, if necessary, create it) and then acquire it. This is done for any module type. The global import lock is still there, but only used for two things: - serializing first time creation of module-specific locks - protection of imports based on import hooks, since we don't know whether third-party import hooks are themselves thread-safe Semantics of the public C API are unchanged, because it is not clear whether they should be or not (concerns of usefulness vs. compatibility). For example, PyImport_ImportModuleNoBlock() still uses the global import lock but this could be relaxed in a later patch. ---------- components: Interpreter Core files: implock.patch keywords: patch messages: 110287 nosy: brett.cannon, christian.heimes, grahamd, gvanrossum, ncoghlan, pitrou priority: normal severity: normal status: open title: A finer grained import lock type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file17998/implock.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 16:47:00 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Jul 2010 14:47:00 +0000 Subject: [issue9260] A finer grained import lock In-Reply-To: <1279118663.3.0.514954672422.issue9260@psf.upfronthosting.co.za> Message-ID: <1279118820.33.0.20419800004.issue9260@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file17998/implock.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 16:48:55 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Jul 2010 14:48:55 +0000 Subject: [issue9260] A finer grained import lock In-Reply-To: <1279118663.3.0.514954672422.issue9260@psf.upfronthosting.co.za> Message-ID: <1279118935.36.0.619360765245.issue9260@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Added file: http://bugs.python.org/file17999/implock.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 16:56:03 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 14 Jul 2010 14:56:03 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1279119363.84.0.664162268761.issue9012@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 16:56:58 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 14 Jul 2010 14:56:58 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279119418.94.0.816344748076.issue9079@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 17:01:20 2010 From: report at bugs.python.org (Greg Brockman) Date: Wed, 14 Jul 2010 15:01:20 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279119680.82.0.0572801240655.issue9205@psf.upfronthosting.co.za> Greg Brockman added the comment: Before I forget, looks like we also need to deal with the result from a worker being un-unpickleable: """ #!/usr/bin/env python import multiprocessing def foo(x): global bar def bar(x): pass return bar p = multiprocessing.Pool(1) p.apply(foo, [1]) """ This shouldn't require much more work, but I'll hold off on submitting a patch until we have a better idea of where we're going in this arena. > Instead of restarting crashed worker processes it will simply bring down > the pool, right? Yep. Again, as things stand, once you've lost an worker, you've lost a task, and you can't really do much about it. I guess that depends on your application though... is your use-case such that you can lose a task without it mattering? If tasks are idempotent, one could have the task handler resubmit them, etc.. But really, thinking about the failure modes I've seen (OOM kills/user-initiated interrupt) I'm not sure under what circumstances I'd like the pool to try to recover. The idea of recording the mapping of tasks -> workers seems interesting. Getting all of the corner cases could be hard (e.g. making removing a task from the queue and recording which worker did the removing atomic, detecting if the worker crashed while still holding the queue lock) and doing this would require extra mechanism. This feature does seem to be useful for pools running many different jobs, because that way a crashed worker need only terminate one job. Anyway, I'd be curious to know more about the kinds of crashes you've encountered from which you'd like to be able to recover. Is it just Unpickleable exceptions, or are there others? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 17:04:48 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 14 Jul 2010 15:04:48 +0000 Subject: [issue9260] A finer grained import lock In-Reply-To: <1279118663.3.0.514954672422.issue9260@psf.upfronthosting.co.za> Message-ID: <1279119888.66.0.86324852346.issue9260@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 17:10:37 2010 From: report at bugs.python.org (Tres Seaver) Date: Wed, 14 Jul 2010 15:10:37 +0000 Subject: [issue1574217] isinstance swallows exceptions Message-ID: <1279120237.85.0.113536351626.issue1574217@psf.upfronthosting.co.za> Tres Seaver added the comment: This bug exists in Python 2.6 and 3.1, which are still being maintained, AFAIK. ---------- versions: +Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 17:30:39 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 14 Jul 2010 15:30:39 +0000 Subject: [issue1574217] isinstance swallows exceptions Message-ID: <1279121439.19.0.84039709309.issue1574217@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This looks like a borderline case between a bug and a feature request. If this is deemed to be a feature, it is not appropriate for 2.x or 3.1. In any case, I think the first step should be to consider this for py3k branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 17:31:12 2010 From: report at bugs.python.org (Jan Killian) Date: Wed, 14 Jul 2010 15:31:12 +0000 Subject: [issue444582] Finding programs in PATH, adding shutil.which Message-ID: <1279121472.45.0.859442631866.issue444582@psf.upfronthosting.co.za> Jan Killian added the comment: * updated tests ---------- Added file: http://bugs.python.org/file18000/shutil_which_82778.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 17:31:46 2010 From: report at bugs.python.org (Jan Killian) Date: Wed, 14 Jul 2010 15:31:46 +0000 Subject: [issue444582] Finding programs in PATH, adding shutil.which Message-ID: <1279121506.15.0.242593141702.issue444582@psf.upfronthosting.co.za> Changes by Jan Killian : Added file: http://bugs.python.org/file18001/which.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 17:37:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 14 Jul 2010 15:37:18 +0000 Subject: [issue1574217] isinstance swallows exceptions Message-ID: <1279121838.24.0.576138302238.issue1574217@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I have verified that the issue is present in py3k. The unit test portion of the patch applies cleanly in py3k an the added tests fail. The code portion applies with patch -l and fixes the issue. I'll upload a patch with fixed white space. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 17:41:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 14 Jul 2010 15:41:18 +0000 Subject: [issue1574217] isinstance swallows exceptions Message-ID: <1279122078.86.0.478461605989.issue1574217@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file18002/issue1574217.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 18:09:38 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 14 Jul 2010 16:09:38 +0000 Subject: [issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long) Message-ID: <1279123778.14.0.977498492036.issue1646068@psf.upfronthosting.co.za> Mark Lawrence added the comment: As this is a small patch about which there is one statement from Martin that says "I believe the proposed patch is fine", there is only one query from Antoine, and because the issue discussed refers to problems with 32 and 64 bit sizes, could someone with the relevant knowledge please take a look with a view to moving this forward. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 18:11:39 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Jul 2010 16:11:39 +0000 Subject: [issue9251] Test for the import lock In-Reply-To: <1279047931.75.0.287450849516.issue9251@psf.upfronthosting.co.za> Message-ID: <1279123899.52.0.674202768606.issue9251@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is another patch that also tests that calls to path hooks and meta_path entries are serialized. Again, they pass in normal conditions and fail when the import lock is disabled. ---------- Added file: http://bugs.python.org/file18003/threadimp2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 18:13:52 2010 From: report at bugs.python.org (Ariel Ben-Yehuda) Date: Wed, 14 Jul 2010 16:13:52 +0000 Subject: [issue9259] Python 2.7 breaks assigned __exit__s In-Reply-To: <1279108398.28.0.504653003054.issue9259@psf.upfronthosting.co.za> Message-ID: <1279124032.9.0.138108491194.issue9259@psf.upfronthosting.co.za> Ariel Ben-Yehuda added the comment: Done it for myself. However, I am not a GI Maintainer - you should talk with them and send them this patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 18:20:37 2010 From: report at bugs.python.org (Dan OD) Date: Wed, 14 Jul 2010 16:20:37 +0000 Subject: [issue9261] include higher (../../) dirs fails In-Reply-To: <1279124437.89.0.789068978786.issue9261@psf.upfronthosting.co.za> Message-ID: <1279124437.89.0.789068978786.issue9261@psf.upfronthosting.co.za> New submission from Dan OD : MANIFEST.in example: recursive-include ../../this *.that fails to include files with "warning: no files found matching '*.that' under directory '../../this'" and also include ../../this *.that fails with "warning: no files found matching '../../this'" - odd situation I know, but including files in higher directories shouldn't be impossible should it? Thanks, Dan ---------- assignee: tarek components: Distutils messages: 110296 nosy: indiedan, tarek priority: normal severity: normal status: open title: include higher (../../) dirs fails type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 18:23:53 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 14 Jul 2010 16:23:53 +0000 Subject: [issue1669539] Change (fix!) os.path.isabs() semantics on Win32 Message-ID: <1279124633.11.0.586246575776.issue1669539@psf.upfronthosting.co.za> Mark Lawrence added the comment: Nosy list changed as both have an interest in Windows issues. ---------- nosy: +BreamoreBoy, brian.curtin, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 18:45:24 2010 From: report at bugs.python.org (Reid Kleckner) Date: Wed, 14 Jul 2010 16:45:24 +0000 Subject: [issue6033] LOOKUP_METHOD and CALL_METHOD optimization In-Reply-To: <1242438240.35.0.944379800728.issue6033@psf.upfronthosting.co.za> Message-ID: <1279125924.47.0.545192744839.issue6033@psf.upfronthosting.co.za> Reid Kleckner added the comment: Sorry, I was just posting it so Benjamin could see what this bought us. I'm not pushing to get this in CPython. The results are for JITed code. I forget what the interpreted results are. I think they are good for the microbenchmarks, but not as good for the macro. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 18:54:56 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 14 Jul 2010 16:54:56 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1279126496.44.0.963975102672.issue5673@psf.upfronthosting.co.za> Brian Curtin added the comment: I'm looking into the TODO details right now, but the patch as-is didn't pass for me. The last line of test_communicate_timeout fails on Windows 7 with "pineapple\r\npear\r\n" not matching "pineapple\npear\n". Creating the Popen object with universal_newlines=1 fixes the issue locally (haven't tried on other OSes), but it should probably follow the convention laid out in test_universal_newlines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 19:27:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 14 Jul 2010 17:27:09 +0000 Subject: [issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long) Message-ID: <1279128429.48.0.559721384304.issue1646068@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Responding to Antoine question, I don't understand how you would use a union here. Certainly you cannot define Py_dicthashcache_t as a union of long and Py_ssize_t because it will not be able to easily assign long or Py_ssize_t values to it. I don't think ANSI C allows a cast from integer type to a union. I am OK with the patch, but if this goes into 2.7/3.x, I think the same change should be applied to the set type. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 19:31:49 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 14 Jul 2010 17:31:49 +0000 Subject: [issue9262] IDLE: Use ttk.Notebook for tabbed windows In-Reply-To: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> Message-ID: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> New submission from Terry J. Reedy : The addition of tabbed windows to web browsers was a great advance that is now standard. For Windows, it eliminated the crowding of the taskbar. I suspect it made switching easier on all systems. The addition of the same to IDLE would have similar benefits. I often have a shell and two edit windows open. This would require, I believe, the use of ttk.Notebook, which requires tcl/tk 8.5+ or the Tile extension. Can this be made a requirement for IDLE in 3.2? Windows has 8.5 now. *nix users can add Tile if they have 8.4. I do not know the situation for Mac. ---------- components: IDLE messages: 110301 nosy: tjreedy priority: normal severity: normal stage: needs patch status: open title: IDLE: Use ttk.Notebook for tabbed windows type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 19:34:49 2010 From: report at bugs.python.org (Dan OD) Date: Wed, 14 Jul 2010 17:34:49 +0000 Subject: [issue9261] include higher (../../) dirs fails In-Reply-To: <1279124437.89.0.789068978786.issue9261@psf.upfronthosting.co.za> Message-ID: <1279128889.96.0.72203437322.issue9261@psf.upfronthosting.co.za> Dan OD added the comment: Thinking about this - maybe including dirs above ./ is bad as it's not obvious where they should live in the sdist. My alternative would be to create links to ../../this in ./ but then distutils creates links rather than hard copies in sdist - is this something that can be avoided? Thanks again, Dan ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 19:41:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 14 Jul 2010 17:41:40 +0000 Subject: [issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long) Message-ID: <1279129300.27.0.929691532618.issue1646068@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: On the second thought, this comment: - /* Cached hash code of me_key. Note that hash codes are C longs. - * We have to use Py_ssize_t instead because dict_popitem() abuses - * me_hash to hold a search finger. - */ suggests that a union may be appropriate here. I am not sure of the standards standing of anonymous unions, but if we could do union { Py_ssize_t me_finger; long me_hash; }; it would cleanly solve the problem. If anonymous unions are not available, a regular union could also do the trick: union { Py_ssize_t finger; long hash; } me; and use me.finger where me is used as search finger and me.hash where it stores hash. Less clever naming scheme would be welcome, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 19:49:08 2010 From: report at bugs.python.org (Dan OD) Date: Wed, 14 Jul 2010 17:49:08 +0000 Subject: [issue9261] include higher (../../) dirs fails In-Reply-To: <1279124437.89.0.789068978786.issue9261@psf.upfronthosting.co.za> Message-ID: <1279129748.56.0.423920204943.issue9261@psf.upfronthosting.co.za> Dan OD added the comment: Sorry for all the noise - this dynamic link thing seems to be fixed in 2.7 rendering this report 'closed' Dan ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 19:51:33 2010 From: report at bugs.python.org (Guilherme Polo) Date: Wed, 14 Jul 2010 17:51:33 +0000 Subject: [issue9262] IDLE: Use ttk.Notebook for tabbed windows In-Reply-To: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> Message-ID: <1279129893.29.0.841738243868.issue9262@psf.upfronthosting.co.za> Guilherme Polo added the comment: It is possible to create a tabbed window without ttk.Notebook. This is already being done in the configuration dialog. The real issue goes much beyond ttk.Notebook, check the patch "tabs_ttk_and_co.diff" at http://code.google.com/p/python-ttk/downloads/list for an earlier work on this (there is also a screenshot in the wiki over there showing the final result). ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 19:52:19 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 14 Jul 2010 17:52:19 +0000 Subject: [issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long) Message-ID: <1279129939.66.0.783389765858.issue1646068@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Please ignore my comment about set type. Sets don't have this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 19:57:15 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 14 Jul 2010 17:57:15 +0000 Subject: [issue1669539] Change (fix!) os.path.isabs() semantics on Win32 Message-ID: <1279130235.88.0.885759442465.issue1669539@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 19:58:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 14 Jul 2010 17:58:32 +0000 Subject: [issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long) Message-ID: <1279130312.41.0.261083160482.issue1646068@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Yet it looks like set has a bigger problem whenever sizeof(Py_ssize_t) > sizeof(long). setentry.hash is defined as long, but set_pop() stores a Py_ssize_t index in it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 20:02:01 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 14 Jul 2010 18:02:01 +0000 Subject: [issue9262] IDLE: Use tabbed shell and edit windows In-Reply-To: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> Message-ID: <1279130521.37.0.452868293654.issue9262@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Changed title to match new info. Tabs might also be used for any pop-up windows that would benefit from persistence. [JEdit does this, but being non-language-specific, it does not have a shell with error traceback.] ---------- title: IDLE: Use ttk.Notebook for tabbed windows -> IDLE: Use tabbed shell and edit windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 20:08:51 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 14 Jul 2010 18:08:51 +0000 Subject: [issue9262] IDLE: Use tabbed shell and edit windows In-Reply-To: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> Message-ID: <1279130931.3.0.512322628105.issue9262@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 20:18:41 2010 From: report at bugs.python.org (Vincent Driessen) Date: Wed, 14 Jul 2010 18:18:41 +0000 Subject: [issue9253] argparse: optional subparsers In-Reply-To: <1279056589.03.0.566167994161.issue9253@psf.upfronthosting.co.za> Message-ID: <1279131521.34.0.825290926608.issue9253@psf.upfronthosting.co.za> Vincent Driessen added the comment: Actually, this is a rather common concept. Broadly used tools like for example Git use this kind of subcommand handling. This command shows all remotes: git remote (i.e. is like git remote list) Showing/removing remotes is done using subsubcommands: git remote show [...] git remote rm [...] That, in combination with the explicit design goal that "[argparse] isn't dogmatic about what your command line interface should look like" should be enough reason to be wanting this, in my humble opinion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 20:20:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 14 Jul 2010 18:20:59 +0000 Subject: [issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long) Message-ID: <1279131659.03.0.554614209957.issue1646068@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a patch that uses a regular union of long and Py_ssize_t to store cached hash/index value in both set and dict entry. Using an anonymous union would simplify the patch and would reduce the likelihood of breaking extensions that access entry structs. ---------- Added file: http://bugs.python.org/file18004/issue1646068.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 20:53:59 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 14 Jul 2010 18:53:59 +0000 Subject: [issue1349732] urllib.urlencode provides two features in one param Message-ID: <1279133639.5.0.500397011301.issue1349732@psf.upfronthosting.co.za> Senthil Kumaran added the comment: This was fixed as part of Issue8788. Closing this. ---------- resolution: -> duplicate stage: unit test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 20:59:51 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 14 Jul 2010 18:59:51 +0000 Subject: [issue9249] struct.pack and Long Integer datatype should be 4, but is 8 bytes In-Reply-To: <1279033209.41.0.410142321642.issue9249@psf.upfronthosting.co.za> Message-ID: <1279133991.81.0.16058318543.issue9249@psf.upfronthosting.co.za> Mark Dickinson added the comment: > However, as my system is a little endian one(e.g. > sys.byteorder=little), whats the difference between native and little Native mode uses: native size, native byteorder and alignment that matches your platform Little endian: standard size, little-endian, no alignment The *native* size means the size of the corresponding C type (e.g., as computed by sizeof) on your platform. So on a typical 64-bit Unix-alike platform, that's 8 for 'l' and 'L'; on 64-bit Windows and most 32-bit platforms, it's 4 for 'l' and 'L'. The *standard* size is as given by the table. It's the same on all platforms. It's true that on most common platforms the 'l' and 'L' codes are the only ones likely to differ. > b) Where could I look up/find such a native format table ? Why not just use struct.calcsize? This is all explained in the docs; I'm going to close this issue, since I don't think there's any discrepancy between the docs and the behaviour of the module. However, if you have ideas for specific improvements to the documentation, please do open another issue. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 21:08:49 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 14 Jul 2010 19:08:49 +0000 Subject: [issue3163] module struct support for ssize_t and size_t In-Reply-To: <1214071551.33.0.650558563727.issue3163@psf.upfronthosting.co.za> Message-ID: <1279134529.45.0.0712871387502.issue3163@psf.upfronthosting.co.za> Mark Dickinson added the comment: Jean, if you're still around: Do you still have interest in pursuing this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 21:09:32 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 14 Jul 2010 19:09:32 +0000 Subject: [issue5843] Possible normalization error in urlparse.urlunparse In-Reply-To: <1240686759.57.0.0410680082249.issue5843@psf.upfronthosting.co.za> Message-ID: <1279134572.0.0.332785303159.issue5843@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Currently this claim will fail: >>> obj = urlparse.urlparse('http://a/b/c?') >>> urlparse.urlunparse(obj) 'http://a/b/c' >>> obj = urlparse.urlparse('http://a/b/c#') >>> urlparse.urlunparse(obj) 'http://a/b/c' If we move away from the current behavior, there will surely be some test failures that can be observed for urljoins. We will have to consider those cases too while fixing this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 21:09:32 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 14 Jul 2010 19:09:32 +0000 Subject: [issue3163] module struct support for ssize_t and size_t In-Reply-To: <1214071551.33.0.650558563727.issue3163@psf.upfronthosting.co.za> Message-ID: <1279134572.42.0.890225319869.issue3163@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 21:11:44 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 14 Jul 2010 19:11:44 +0000 Subject: [issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long) Message-ID: <1279134704.01.0.923082461436.issue1646068@psf.upfronthosting.co.za> Martin v. L?wis added the comment: If this goes in, it can't go into bug fix releases, as it may break the ABI. ---------- versions: -Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 21:12:31 2010 From: report at bugs.python.org (Brett Cannon) Date: Wed, 14 Jul 2010 19:12:31 +0000 Subject: [issue9260] A finer grained import lock In-Reply-To: <1279118663.3.0.514954672422.issue9260@psf.upfronthosting.co.za> Message-ID: <1279134751.86.0.556944373629.issue9260@psf.upfronthosting.co.za> Brett Cannon added the comment: So I say we don't worry about loaders being thread-safe. If __import__ handles the locking for a specific module then it will hold the lock on behalf of the loader. Now if someone decides to call load_module on their own, that's there business, but they should be aware of what could happen if they do that without acquiring the lock themselves. Otherwise we just make sure to provide a context manager that takes the name of the module and people can use that when they make their call to loader.load_module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 21:26:38 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 14 Jul 2010 19:26:38 +0000 Subject: [issue6853] system proxy not used for https (on windows) In-Reply-To: <1252298794.29.0.673935576663.issue6853@psf.upfronthosting.co.za> Message-ID: <1279135598.28.0.572036495734.issue6853@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in r82890 and branches. Thanks Mark for bringing these issues out. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 21:34:35 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Jul 2010 19:34:35 +0000 Subject: [issue9260] A finer grained import lock In-Reply-To: <1279134751.86.0.556944373629.issue9260@psf.upfronthosting.co.za> Message-ID: <1279136070.3128.11.camel@localhost.localdomain> Antoine Pitrou added the comment: > So I say we don't worry about loaders being thread-safe. If __import__ > handles the locking for a specific module then it will hold the lock > on behalf of the loader. Yes but what happens if two different modules are imported from two different threads, and handled by the same loader? The loader could have global structures which rely on serialization of imports for consistency. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 21:37:01 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 14 Jul 2010 19:37:01 +0000 Subject: [issue6960] test_telnetlib gives spurious output In-Reply-To: <1253568852.27.0.259606507401.issue6960@psf.upfronthosting.co.za> Message-ID: <1279136221.25.0.285165606227.issue6960@psf.upfronthosting.co.za> Senthil Kumaran added the comment: No problems observed now. I randomized and ran the tests a couple of times. I don't know what the scenario was when this was observed, so I will let __ap__ close the issue. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 21:37:58 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Jul 2010 19:37:58 +0000 Subject: [issue6960] test_telnetlib gives spurious output In-Reply-To: <1253568852.27.0.259606507401.issue6960@psf.upfronthosting.co.za> Message-ID: <1279136278.92.0.875270540748.issue6960@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, let's say this was an exceptional failure. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 21:40:40 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 14 Jul 2010 19:40:40 +0000 Subject: [issue9259] Python 2.7 breaks assigned __exit__s In-Reply-To: <1279108398.28.0.504653003054.issue9259@psf.upfronthosting.co.za> Message-ID: <1279136440.45.0.668626482015.issue9259@psf.upfronthosting.co.za> ?ric Araujo added the comment: Since you know the project, the bug and the fix, I think you?re in a better position than me to talk with them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 21:43:31 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 14 Jul 2010 19:43:31 +0000 Subject: [issue7965] Problem with urlparse in Windows XP after a drag and drop In-Reply-To: <1266589212.06.0.504228462246.issue7965@psf.upfronthosting.co.za> Message-ID: <1279136611.48.0.92976774859.issue7965@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The resultant url you get after doing a urlparse is not a Windows PATH, but url path component. So, when you use in relative manner by doing urljoin, you will see that the original will get constructed properly. So, there is really no a problem here. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 21:59:37 2010 From: report at bugs.python.org (Brett Cannon) Date: Wed, 14 Jul 2010 19:59:37 +0000 Subject: [issue9260] A finer grained import lock In-Reply-To: <1279136070.3128.11.camel@localhost.localdomain> Message-ID: Brett Cannon added the comment: On Wed, Jul 14, 2010 at 12:34, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > > So I say we don't worry about loaders being thread-safe. If __import__ > > handles the locking for a specific module then it will hold the lock > > on behalf of the loader. > > Yes but what happens if two different modules are imported from two > different threads, and handled by the same loader? The loader could have > global structures which rely on serialization of imports for > consistency. > That's why I said we should supply a context decorator (or function) which will handle the lock appropriately, taking the name of the module to import as an argument so the locking is fine-grained. ---------- Added file: http://bugs.python.org/file18005/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------

On Wed, Jul 14, 2010 at 12:34, Antoine Pitrou <report at bugs.python.org> wrote:

Antoine Pitrou <pitrou at free.fr> added the comment:

> So I say we don't worry about loaders being thread-safe. If __import__
> handles the locking for a specific module then it will hold the lock
> on behalf of the loader.

Yes but what happens if two different modules are imported from two
different threads, and handled by the same loader? The loader could have
global structures which rely on serialization of imports for
consistency.

That's why I said we should supply a context decorator (or function) which will handle the lock appropriately, taking the name of the module to import as an argument so the locking is fine-grained.
From report at bugs.python.org Wed Jul 14 22:03:40 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Jul 2010 20:03:40 +0000 Subject: [issue9260] A finer grained import lock In-Reply-To: Message-ID: <1279137815.3128.13.camel@localhost.localdomain> Antoine Pitrou added the comment: > That's why I said we should supply a context decorator (or function) which > will handle the lock appropriately, taking the name of the module to import > as an argument so the locking is fine-grained. Ok, so what are you saying is that we can break compatibility for non thread-safe import loaders which currently work fine? (I have nothing against it, just trying to be sure we agree on the implications) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 22:31:37 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 14 Jul 2010 20:31:37 +0000 Subject: [issue5437] Singleton MemoryError can hold traceback data and locals indefinitely In-Reply-To: <1236475192.44.0.322213447469.issue5437@psf.upfronthosting.co.za> Message-ID: <1279139497.31.0.847428015928.issue5437@psf.upfronthosting.co.za> Mark Lawrence added the comment: Would someone please check out thie patch, it's mostly changes to C code that I'm not qualified to comment on. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 22:34:52 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 14 Jul 2010 20:34:52 +0000 Subject: [issue9132] Documentation for comparing dictionaries is out of date In-Reply-To: <1277927951.56.0.908504944608.issue9132@psf.upfronthosting.co.za> Message-ID: <1279139692.28.0.958913199572.issue9132@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The patch was pretty good. Committed it in r82899 and r82900. Thanks Eli for the patch & Terry for the review. ---------- nosy: +orsenthil resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 22:45:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 14 Jul 2010 20:45:05 +0000 Subject: [issue9261] include higher (../../) dirs fails In-Reply-To: <1279124437.89.0.789068978786.issue9261@psf.upfronthosting.co.za> Message-ID: <1279140305.09.0.236353637725.issue9261@psf.upfronthosting.co.za> ?ric Araujo added the comment: Can you tell if the docs fail to mention that? If they do, please reopen this as a documentation bug (change title, select component Documentation, and set status to open). Thank you! ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 22:51:41 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 14 Jul 2010 20:51:41 +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: <1279140701.52.0.756677962335.issue7732@psf.upfronthosting.co.za> Mark Lawrence added the comment: Quote from ncoghlan on msg102699 "Florent's patch looks correct". Does anyone else wish to comment or can this be taken forward? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 22:56:08 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 14 Jul 2010 20:56:08 +0000 Subject: [issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long) Message-ID: <1279140968.11.0.935782807465.issue1646068@psf.upfronthosting.co.za> Mark Dickinson added the comment: The approach in Alexander's patch looks fine to me. +1 on applying this patch if someone can test it on a platform where sizeof(long) > sizeof(Py_ssize_t), and also verify that there are current test failures that are fixed by this patch. (If there are no such tests, we should add some.) I've only tested this on machines with sizeof(long) == sizeof(Py_ssize_t) == 4 and sizeof(long) == sizeof(Py_ssize_t) == 8, which isn't really much of a test at all. ked-tao, if you're still listening: are you in a position to test Alexander's patch on a relevant machine? ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 23:12:41 2010 From: report at bugs.python.org (Jean Brouwers) Date: Wed, 14 Jul 2010 21:12:41 +0000 Subject: [issue3163] module struct support for ssize_t and size_t In-Reply-To: <1279134529.45.0.0712871387502.issue3163@psf.upfronthosting.co.za> Message-ID: Jean Brouwers added the comment: Yes I am and I will get back to you on this after check my (old) notes. /Jean On Wed, Jul 14, 2010 at 12:08 PM, Mark Dickinson wrote: > > Mark Dickinson added the comment: > > Jean, if you're still around: > > Do you still have interest in pursuing this? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file18006/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Yes I am and I will get back to you on this after check my (old) notes.

/Jean



On Wed, Jul 14, 2010 at 12:08 PM, Mark Dickinson <report at bugs.python.org> wrote:

Mark Dickinson <dickinsm at gmail.com> added the comment:

Jean, if you're still around:

Do you still have interest in pursuing this?

----------

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

From report at bugs.python.org Wed Jul 14 23:29:05 2010 From: report at bugs.python.org (Brett Cannon) Date: Wed, 14 Jul 2010 21:29:05 +0000 Subject: [issue9260] A finer grained import lock In-Reply-To: <1279118663.3.0.514954672422.issue9260@psf.upfronthosting.co.za> Message-ID: <1279142945.08.0.232082974925.issue9260@psf.upfronthosting.co.za> Brett Cannon added the comment: What I'm saying is that loaders are quite possibly not thread-safe already, so we don't need to do any special for them. If you look at PEP 302 you will notice not a single mention of loaders needing to care about the import lock because there is no mention of the import lock! So changing the locking mechanism most likely won't break loaders because they are not using the current import lock anyway and so already have their own issues. As long as __import__ does the proper locking on behalf of loaders and we provide a way for people to use the lock if they want to then I am not worried about the impact on loaders. For example, this will change the logic in importlib where the current import lock is grabbed, but otherwise won't change a thing in terms of the code for the various loaders it implements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 14 23:47:31 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 14 Jul 2010 21:47:31 +0000 Subject: [issue9260] A finer grained import lock In-Reply-To: <1279142945.08.0.232082974925.issue9260@psf.upfronthosting.co.za> Message-ID: <1279144046.3128.20.camel@localhost.localdomain> Antoine Pitrou added the comment: > So changing the locking mechanism most likely won't break loaders > because they are not using the current import lock anyway and so > already have their own issues. Are you sure they aren't using it implicitly? In vanilla py3k, PyImport_ImportModuleLevel() takes the import lock therefore it protects any inner code, including the various hooks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 00:06:25 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 14 Jul 2010 22:06:25 +0000 Subject: [issue731991] find correct socklen_t type Message-ID: <1279145185.72.0.83706330792.issue731991@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can this be closed, I can't see anyone going to the trouble of porting a patch prepared for 2.3 over 7 years ago to 2.7 or 3.2? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 00:16:11 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 14 Jul 2010 22:16:11 +0000 Subject: [issue754016] urlparse goes wrong with IP:port without scheme Message-ID: <1279145771.58.0.655865870966.issue754016@psf.upfronthosting.co.za> Mark Lawrence added the comment: The patch will need to be reworked for the 2.7, 3.1 and 3.2 branches. ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 00:23:57 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 14 Jul 2010 22:23:57 +0000 Subject: [issue9260] A finer grained import lock In-Reply-To: <1279118663.3.0.514954672422.issue9260@psf.upfronthosting.co.za> Message-ID: <1279146237.47.0.93063248187.issue9260@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file18005/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 00:26:51 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 14 Jul 2010 22:26:51 +0000 Subject: [issue775321] plistlib error handling Message-ID: <1279146411.05.0.562462214893.issue775321@psf.upfronthosting.co.za> Mark Lawrence added the comment: If anything is to be done the patch needs updating. I'd be inclined to close this as "won't fix" unless someone can come up with a really compelling reason to implement it. ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 00:36:09 2010 From: report at bugs.python.org (Graham Dumpleton) Date: Wed, 14 Jul 2010 22:36:09 +0000 Subject: [issue9260] A finer grained import lock In-Reply-To: <1279118663.3.0.514954672422.issue9260@psf.upfronthosting.co.za> Message-ID: <1279146969.89.0.055637673447.issue9260@psf.upfronthosting.co.za> Graham Dumpleton added the comment: How is this going to deal with cyclical imports where different threads could import at the same time different modules within that cycle? I need to look through the proposed patch and work out exactly what it does, but am concerned about whether this approach would cause the classic deadlock problem if not done right? FWIW, this concept of a lock per module is what I used in the mod_python module importer when it was rewritten. I would have to go look back over that code and see how the way the concept is being implemented differs, but there was one remaining potential race condition in the mod_python code which could in rare instances cause a problem. I never did get around to fixing it. Anyway, what I did learn was that this approach isn't necessarily as simple as it may seem so it will need some really good analysis on whatever solution is developed to ensure subtle problems don't come up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 00:42:32 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 14 Jul 2010 22:42:32 +0000 Subject: [issue812369] module shutdown procedure based on GC Message-ID: <1279147352.88.0.140208252212.issue812369@psf.upfronthosting.co.za> Mark Lawrence added the comment: issue1545463 has been closed as "won't fix", so wouldn't implementing this patch kill two birds with one stone? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 00:47:10 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 14 Jul 2010 22:47:10 +0000 Subject: [issue839159] iterators broken for weak dicts Message-ID: <1279147630.26.0.248919365833.issue839159@psf.upfronthosting.co.za> Mark Lawrence added the comment: If this is to go forward the patch will need porting to 2.7, 3.1 and 3.2 ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 01:09:24 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 14 Jul 2010 23:09:24 +0000 Subject: [issue887237] Machine integers Message-ID: <1279148964.58.0.231505531756.issue887237@psf.upfronthosting.co.za> Mark Lawrence added the comment: Perhaps people could review the latest patch in view of the following. 1) Quote from Mark Dickinson msg75815 "I think this would be valuable for rapid prototyping of an algorithm in Python before translating it into C. In particular, it might help with detecting some common C code bugs involving undefined behaviour---for example, overflow in signed-integer arithmetic." 2) issue1621 "Do not assume signed integer overflow behavior" Perhaps this could be treated as purely experimental? (This might have been suggested already, sorry if I've missed it). Whatever happens I'd be glad to help out if possible, the big asset I have compared to others is time as I only work part time. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 01:40:14 2010 From: report at bugs.python.org (Brett Cannon) Date: Wed, 14 Jul 2010 23:40:14 +0000 Subject: [issue9260] A finer grained import lock In-Reply-To: <1279118663.3.0.514954672422.issue9260@psf.upfronthosting.co.za> Message-ID: <1279150814.96.0.0597715098853.issue9260@psf.upfronthosting.co.za> Brett Cannon added the comment: That's my point; loaders are using the lock implicitly so that's why we don't need to worry about the global import lock just for path hooks. It seems like you are suggesting using the global import lock purely for compatibility, and what I am saying is that loaders don't care so there is no compatibility to care about. I say only use the global import lock for serializing creation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 01:50:50 2010 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 14 Jul 2010 23:50:50 +0000 Subject: [issue9263] Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) In-Reply-To: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> Message-ID: <1279151450.93.0.973335817084.issue9263@psf.upfronthosting.co.za> New submission from Dave Malcolm : Modules/gcmodule.c contains various assertions which can fail due to reference counting errors elsewhere in either python, or an extension module. These can be difficult to track down. In the hope of maximizing the information from crash reports, the attached patch (against py3k) introduces a new assertion macro to Objects/object.h and Objects.c, which provides a richer debug message. In particular, it identifies which object has the issue, and can more clearly spell out the problem. The patch replaces all uses of assert() in Modules/gcmodule.c for which a specific object has an issue (e.g. bogus reference count). The implementation may play somewhat fast-and-loose with rules about object invariants: you might have an only partially valid object, but the process is about to abort, so it seems acceptable to try to glean extra information on stderr. (This may turn an abort into a segfault, of course) Caveats: - exact name of the API probably could be better - I don't yet have a specific use for the "callback" idea; I was thinking of trying to display all objects that reference that object. Might need a void* closure to be useful. Might be a useless complication. - Only tested on gcc-4.4.3 so far; the __STRING(expr) and __PRETTY_FUNCTION__ look non-portable. - no test case; I thought about using ctypes to extract PyObject_IncRef from the implementation, but this is likely to lead to brittle test cases. Alternatively, is xxmodule to be used for this kind of thing? Thoughts? ---------- components: Interpreter Core files: py3k-repr-on-gcmodule-assertions.patch keywords: patch messages: 110341 nosy: dmalcolm priority: normal severity: normal stage: patch review status: open title: Try to print repr() when an C-level assert fails (in the garbage collector, beyond?) type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file18007/py3k-repr-on-gcmodule-assertions.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 03:39:32 2010 From: report at bugs.python.org (Jack Diederich) Date: Thu, 15 Jul 2010 01:39:32 +0000 Subject: [issue6960] test_telnetlib gives spurious output In-Reply-To: <1253568852.27.0.259606507401.issue6960@psf.upfronthosting.co.za> Message-ID: <1279157972.73.0.968468456279.issue6960@psf.upfronthosting.co.za> Jack Diederich added the comment: r76133 (which came after this bug) fixed most test_telnetlib bugs by using mocks instead of trying to setup full-blown client/server TCP cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 05:54:08 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 03:54:08 +0000 Subject: [issue998998] pickle bug - recursively memoizing class? Message-ID: <1279166048.68.0.862282776473.issue998998@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This looks like a duplicate of issue 1581183. The issue is still present in py3k, but only shows up in picklecycle.py when using pickle.py version. I am attaching picklecycle3.py which is py3k version of picklecycle.py using python pickler. ---------- assignee: -> belopolsky nosy: +alexandre.vassalotti, belopolsky stage: -> needs patch type: -> behavior versions: +Python 3.2 Added file: http://bugs.python.org/file18008/picklecycle3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 06:11:25 2010 From: report at bugs.python.org (Eli Bendersky) Date: Thu, 15 Jul 2010 04:11:25 +0000 Subject: [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> New submission from Eli Bendersky : The documentation of the standard 'trace' module (Doc/library/trace.rst) is sorely lacking. Arguments are not explained, some key methods are not documented at all, and the CoverageResults class isn't documented. Usage of these appears in the example but leaves the user confused as the only source of documentation for the example is the source code of the module. I'm attaching a patch that fixes this issue, by providing documentation for the missing parts. The patch was generated vs. the latest SVN trunk. ---------- assignee: docs at python components: Documentation files: tracedoc.3.patch keywords: patch messages: 110344 nosy: docs at python, eli.bendersky, tjreedy priority: normal severity: normal status: open title: trace.py documentation is incomplete type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file18009/tracedoc.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 06:58:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 04:58:59 +0000 Subject: [issue8738] cPickle dumps(tuple) != dumps(loads(dumps(tuple))) In-Reply-To: <1274093120.19.0.592599712369.issue8738@psf.upfronthosting.co.za> Message-ID: <1279169939.04.0.796157572604.issue8738@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: There seems to be a bug somewhere in 2.x cPickle. Here is a somewhat simpler way to demonstrate the bug: the following code from pickletools import dis import cPickle t = 1L, # use long for easy 3.x comparison s1 = cPickle.dumps(t) s2 = cPickle.dumps(cPickle.loads(s1)) print(s1 == s2) dis(s1) dis(s2) prints False 0: ( MARK 1: L LONG 1L 5: t TUPLE (MARK at 0) 6: p PUT 1 9: . STOP highest protocol among opcodes = 0 0: ( MARK 1: L LONG 1L 5: t TUPLE (MARK at 0) 6: . STOP highest protocol among opcodes = 0 The difference is probably immaterial because nothing in the pickle uses the tuple again and PUT is redundant, but the difference does not show up when python pickle module is used instead of cPickle and is not present in py3k. The comparable py3k code: from pickletools import dis import pickle t = 1, s1 = pickle.dumps(t, 0) s2 = pickle.dumps(pickle.loads(s1), 0) print(s1 == s2) dis(s1) dis(s2) produces True 0: ( MARK 1: L LONG 1 5: t TUPLE (MARK at 0) 6: p PUT 0 9: . STOP highest protocol among opcodes = 0 0: ( MARK 1: L LONG 1 5: t TUPLE (MARK at 0) 6: p PUT 0 9: . STOP highest protocol among opcodes = 0 Most likely the bug is benign and not worth fixing, but I would like to figure out what's going on and what changed in 3.x. ---------- assignee: -> belopolsky nosy: +belopolsky versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 07:20:54 2010 From: report at bugs.python.org (Narnie Harshoe) Date: Thu, 15 Jul 2010 05:20:54 +0000 Subject: [issue9265] Can choose other shell in subprocess module. Includes fix. In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> New submission from Narnie Harshoe : Popen from the subprocess module when called with shell=True and executable=/bin/bash still runs in the /bin/sh shell. The error has been found and corrected in the subprocess module and is as follows: change: lines 1018-1022 for python v 2.6 lines 1092-1096 for python v 2.7 lines 1046-1050 for python v 3.1 from this: if shell: args = ["/bin/sh", "-c"] + args if executable is None: executable = args[0] to this: if shell: if executable is None: args = ["/bin/sh", "-c"] + args executable = args[0] else: args = [executable, "-c"] + args # if executable is None: # executable = args[0] Of course the last 2 lines can just be deleted but were left in to better highlight the change. This change corrects the bug allowing shell=True and executable=/bin/bash to run in a bash shell or any other shell sub'd for /bin/bash. Hope this will make it into the module. I've included my temp fix which I have simply called subprocess2 for my purposes for v 2.6. ---------- components: Library (Lib) files: subprocess2.py messages: 110346 nosy: narnie priority: normal severity: normal status: open title: Can choose other shell in subprocess module. Includes fix. type: behavior versions: Python 2.6, Python 2.7, Python 3.1 Added file: http://bugs.python.org/file18010/subprocess2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 07:22:55 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 05:22:55 +0000 Subject: [issue8738] cPickle dumps(tuple) != dumps(loads(dumps(tuple))) In-Reply-To: <1274093120.19.0.592599712369.issue8738@psf.upfronthosting.co.za> Message-ID: <1279171375.92.0.808704270811.issue8738@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: OK, the 2.7 behavior is explainable and correct. cPickle checks the reference count and does not generate PUT for objects that don't have references: >>> from pickletools import dis >>> from cPickle import dumps >>> dis(dumps(tuple([1]))) 0: ( MARK 1: I INT 1 4: t TUPLE (MARK at 0) 5: . STOP highest protocol among opcodes = 0 >>> t = 1, >>> dis(dumps(t)) 0: ( MARK 1: I INT 1 4: t TUPLE (MARK at 0) 5: p PUT 1 8: . STOP highest protocol among opcodes = 0 This optimization is not available from python, of course so pickle.py behaves differently. The remaining question is why this optimization was removed from 3.x. ---------- versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 07:38:00 2010 From: report at bugs.python.org (Narnie Harshoe) Date: Thu, 15 Jul 2010 05:38:00 +0000 Subject: [issue9265] Can't choose other shell in subprocess module. Includes fix. In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279172280.5.0.37080401253.issue9265@psf.upfronthosting.co.za> Changes by Narnie Harshoe : ---------- title: Can choose other shell in subprocess module. Includes fix. -> Can't choose other shell in subprocess module. Includes fix. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 07:50:22 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 05:50:22 +0000 Subject: [issue8738] cPickle dumps(tuple) != dumps(loads(dumps(tuple))) In-Reply-To: <1274093120.19.0.592599712369.issue8738@psf.upfronthosting.co.za> Message-ID: <1279173022.5.0.807482592353.issue8738@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am speculating here while Alexandre probably knows the answer. The skip PUT on unreferenced objects optimization was probably removed because doing so makes _pickle module behave more like pickle and because pickletools now has optimize method which can provide a more thorough removal of unused unused PUT opcodes. Closing as "invalid". ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed versions: +Python 2.7 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 08:04:49 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 06:04:49 +0000 Subject: [issue616013] cPickle documentation incomplete Message-ID: <1279173889.55.0.0917007342586.issue616013@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I've just closed issue8738 as invalid and surely a document explaining the differences between cPickle and _pickle would save me a lot of effort. It will also help anyone porting from 2.x to 3.x. Alexandre, do you have any notes that you can share? ---------- nosy: +belopolsky stage: -> needs patch type: -> feature request versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 08:34:47 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 06:34:47 +0000 Subject: [issue1062277] Pickle breakage with reduction of recursive structures Message-ID: <1279175687.16.0.648185822202.issue1062277@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The issue is still present in py3k. Attaching an updated patch with tests only. Is this the same as issue998998? ---------- assignee: -> belopolsky nosy: +alexandre.vassalotti, belopolsky stage: -> needs patch versions: +Python 3.2 Added file: http://bugs.python.org/file18011/issue1062277-test-py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 08:52:47 2010 From: report at bugs.python.org (Jyrki Wahlstedt) Date: Thu, 15 Jul 2010 06:52:47 +0000 Subject: [issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X In-Reply-To: <1278323219.73.0.148043211343.issue9164@psf.upfronthosting.co.za> Message-ID: <1279176767.57.0.32761481991.issue9164@psf.upfronthosting.co.za> Jyrki Wahlstedt added the comment: For some reason I unintentionally managed to change status, putting it back to pending. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 08:55:37 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 06:55:37 +0000 Subject: [issue1724366] cPickle module doesn't work with universal line endings Message-ID: <1279176937.86.0.741313838638.issue1724366@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This does not look like a valid bug to me. OP does not show that pickle files are different on different systems, he mangles pickle file with unix2dos instead. This would certainly produce an invalid pickle because pickle format requires '\n' and no other character as an opcode terminator. If incompatible pickle files were produced on windows, most likely that was because the data was written in files opened in text rather than binary mode. ---------- assignee: -> belopolsky nosy: +belopolsky resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 09:02:07 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 07:02:07 +0000 Subject: [issue1520662] support all of strftime(3) Message-ID: <1279177327.9.0.818313984071.issue1520662@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 09:11:00 2010 From: report at bugs.python.org (Ask Solem) Date: Thu, 15 Jul 2010 07:11:00 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279177860.09.0.522238435505.issue9205@psf.upfronthosting.co.za> Ask Solem added the comment: Greg, > Before I forget, looks like we also need to deal with the > result from a worker being un-unpickleable: This is what my patch in bug 9244 does... > Yep. Again, as things stand, once you've lost an worker, > you've lost a task, and you can't really do much about it. > I guess that depends on your application though... is your > use-case such that you can lose a task without it mattering? > If tasks are idempotent, one could have the task handler > resubmit them, etc.. But really, thinking about the failure > modes I've seen (OOM kills/user-initiated interrupt) I'm not > sure under what circumstances I'd like the pool to try to > recover. Losing a task is not fun, but there may still be other tasks running that are just as important. I think you're thinking from a map_async perspective here. user-initiated interrupts, this is very important to recover from, think of some badly written library code suddenly raising SystemExit, this shouldn't terminate other jobs, and it's probably easy to recover from, so why shouldn't it try? > The idea of recording the mapping of tasks -> workers > seems interesting. Getting all of the corner cases could > be hard (e.g. making removing a task from the queue and > recording which worker did the removing atomic, detecting if the worker crashed while still holding the queue lock) and doing > this would require extra mechanism. This feature does seem > to be useful for pools running many different jobs, because > that way a crashed worker need only terminate one job. I think I may have an alternative solution. Instead of keeping track of what the workers are doing, we could simply change the result handler so it gives up when there are no more alive processes. while state != TERMINATE: result = get(timeout=1) if all_processes_dead(): break; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 09:38:06 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 15 Jul 2010 07:38:06 +0000 Subject: [issue9164] 2.7 sysconfig should handle arch duplicates while building universal on OS X In-Reply-To: <1278323219.73.0.148043211343.issue9164@psf.upfronthosting.co.za> Message-ID: <1279179486.83.0.349515576005.issue9164@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Thanks for investigation why MacPorts can use duplicate flags. My patch is in the repository and will be in the next releases of all 4 actively maintained branches. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 09:50:23 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 15 Jul 2010 07:50:23 +0000 Subject: [issue1724366] cPickle module doesn't work with universal line endings Message-ID: <1279180223.8.0.969109353483.issue1724366@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Antoine, to answer your question about universal newlines in pickle in msg87622. The pickle.py docsstrings in 2.7+ contain the following text (amongst others): The optional protocol argument tells the pickler to use the given protocol; supported protocols are 0, 1, 2. The default protocol is 0, to be backwards compatible. (Protocol 0 is the only protocol that can be written to a file opened in text mode and read back successfully. When using a protocol higher than 0, make sure the file is opened in binary mode, both when pickling and unpickling.) This clearly indicates that protocol 0 is supposed to compatible with text-mode files. That would mean this issue probably is not invalid, the documentation above implies that a pickle file written in text mode on Windows should be readable on a Unix system. That said, I'd advise anyone to use the highest possible protocol because higher protocol levels are more efficient and better support newstyle classes. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 12:49:08 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 15 Jul 2010 10:49:08 +0000 Subject: [issue9260] A finer grained import lock In-Reply-To: <1279146969.89.0.055637673447.issue9260@psf.upfronthosting.co.za> Message-ID: <1279190942.3149.2.camel@localhost.localdomain> Antoine Pitrou added the comment: > Graham Dumpleton added the comment: > > How is this going to deal with cyclical imports where different > threads could import at the same time different modules within that > cycle? I need to look through the proposed patch and work out exactly > what it does, but am concerned about whether this approach would cause > the classic deadlock problem if not done right? You're right, I hadn't thought about that. Additional machinery will be needed to detect potential deadlocks (and break them). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 13:32:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 15 Jul 2010 11:32:47 +0000 Subject: [issue9260] A finer grained import lock In-Reply-To: <1279150814.96.0.0597715098853.issue9260@psf.upfronthosting.co.za> Message-ID: <1279193563.3149.3.camel@localhost.localdomain> Antoine Pitrou added the comment: > That's my point; loaders are using the lock implicitly so that's why > we don't need to worry about the global import lock just for path > hooks. It seems like you are suggesting using the global import lock > purely for compatibility, and what I am saying is that loaders don't > care so there is no compatibility to care about. I say only use the > global import lock for serializing creation. What is your take on the threadimp2.patch in issue9251? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 13:44:50 2010 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 15 Jul 2010 11:44:50 +0000 Subject: [issue9110] contextlib.ContextDecorator In-Reply-To: <1277765898.65.0.314299135702.issue9110@psf.upfronthosting.co.za> Message-ID: <1279194290.89.0.210237606853.issue9110@psf.upfronthosting.co.za> Nick Coghlan added the comment: Bumping back to open until the documentation is tweaked. ---------- components: +Documentation -Library (Lib) status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 13:46:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 15 Jul 2010 11:46:31 +0000 Subject: [issue9110] contextlib.ContextDecorator In-Reply-To: <1277765898.65.0.314299135702.issue9110@psf.upfronthosting.co.za> Message-ID: <1279194391.49.0.893117022123.issue9110@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +docs at python stage: committed/rejected -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 13:49:51 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 15 Jul 2010 11:49:51 +0000 Subject: [issue9265] Can't choose other shell in subprocess In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279194591.56.0.0426704766742.issue9265@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thank you for the report. The docs indeed say ?If shell=True, the executable argument specifies which shell to use?. Could you provide your change as a diff file following the guidelines on http://www.python.org/dev/patches/ ? Diffs are easier to review than whole files. A unit test is needed too, to make sure the bug is fixed, would you like to write a patch for test_subprocess.py? Thanks again! ---------- nosy: +merwok resolution: -> accepted stage: -> unit test needed title: Can't choose other shell in subprocess module. Includes fix. -> Can't choose other shell in subprocess versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 14:00:46 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 15 Jul 2010 12:00:46 +0000 Subject: [issue9265] Can't choose other shell in subprocess In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279195246.69.0.00502819414415.issue9265@psf.upfronthosting.co.za> Stefan Krah added the comment: I think this is invalid. Please run: >>> from subprocess import Popen >>> Popen("echo $SHELL", executable="/bin/bash", shell=True) /bin/bash >>> ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 14:07:35 2010 From: report at bugs.python.org (Eric Smith) Date: Thu, 15 Jul 2010 12:07:35 +0000 Subject: [issue9265] Can't choose other shell in subprocess In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279195655.39.0.120277018646.issue9265@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 14:10:02 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 15 Jul 2010 12:10:02 +0000 Subject: [issue9265] Can't choose other shell in subprocess In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279195802.42.0.651445886474.issue9265@psf.upfronthosting.co.za> ?ric Araujo added the comment: The SHELL variable is not to be trusted, since e.g. dash (my system?s /bin/sh) in a bash will have SHELL=bash. I tested this command: "help set >/dev/null && echo ok". Bash prints ok but dash gives an error. This test worked for versions 2.4 up to 3.2. Narnie, perhaps you have a /bin/sh configuration problem? Is there a test for this in test_subprocess? If not, we should add one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 14:55:50 2010 From: report at bugs.python.org (Greg Hazel) Date: Thu, 15 Jul 2010 12:55:50 +0000 Subject: [issue9266] ctypes "ValueError: NULL pointer access" on Win7 x64 In-Reply-To: <1279198550.56.0.12735266712.issue9266@psf.upfronthosting.co.za> Message-ID: <1279198550.56.0.12735266712.issue9266@psf.upfronthosting.co.za> New submission from Greg Hazel : ctypes on Windows on a 64bit Python installation gets a NULL pointer access where one is not expected. To reproduce the problem, run make.bat then "python ctypes_test.py" Failure output looks like this: Three! 1 2 <__main__.LP_Some object at 0x000000000209C4C8> <__main__.Some object at 0x000000000209C548> 91 Four! 1 2 3 <__main__.LP_Some object at 0x000000000209C4C8> Traceback (most recent call last): File "_ctypes/callbacks.c", line 291, in 'calling callback function' File "ctypes_test.py", line 21, in fourprinter print(to.contents) ValueError: NULL pointer access Otherwise, successful output looks something like: Three! 1 2 <__main__.Some object at 0x2acc9482ae50> 91 Four! 1 2 3 <__main__.Some object at 0x2acc9482ae50> 91 Environments exhibiting this problem: Python 2.7 (r27:82525, Jul 4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import platform >>> platform.architecture() ('64bit', 'WindowsPE') Python 3.1.2 (r312:79149, Mar 20 2010, 22:55:39) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import platform >>> platform.architecture() ('64bit', 'WindowsPE') Environments NOT exhibiting the problem: Python 2.4.3 (#1, Sep 3 2009, 15:37:37) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import platform >>> platform.architecture() ('64bit', 'ELF') Also Windows on a 32bit architecture seems unaffected. ---------- assignee: theller components: ctypes files: ctypes_test.zip messages: 110362 nosy: ghazel, theller priority: normal severity: normal status: open title: ctypes "ValueError: NULL pointer access" on Win7 x64 type: crash versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file18012/ctypes_test.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 15:00:15 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 15 Jul 2010 13:00:15 +0000 Subject: [issue9265] Can't choose other shell in subprocess In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279198815.06.0.426638359044.issue9265@psf.upfronthosting.co.za> R. David Murray added the comment: >From looking at the code, it appears that what happens currently is that executable is used to run /bin/sh when shell=True. So I'm pretty sure there is a bug here. What isn't clear is whether or not fixing this bug will cause currently working code to break (that is, we may not be able to backport the fix.) The patch as given in the message has at minimum some formatting problems, but in any case is not complete. Later logic in the subprocess code uses 'executable' to run the 'args' string, which means that with this fix you'd be using executable to execute executable. This might be benign in most cases, but it is certainly wrong and could lead to subtle bugs. There should also be some doc updates as the current docs implicitly assume that '/bin/sh' is the shell when discussing shell=True cases. This assumption should be made explicit. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 15:16:10 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 15 Jul 2010 13:16:10 +0000 Subject: [issue9265] Can't choose other shell in subprocess In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279199770.05.0.376652928398.issue9265@psf.upfronthosting.co.za> Stefan Krah added the comment: Isn't just the name of the executable wrong? /bin/bash is executed all right, but the name is set to "/bin/sh". Index: Lib/subprocess.py =================================================================== --- Lib/subprocess.py (revision 82816) +++ Lib/subprocess.py (working copy) @@ -1091,6 +1091,8 @@ if shell: args = ["/bin/sh", "-c"] + args + if executable: + args[0] = executable In general though, I'd prefer to specify another shell by shell="bin/bash". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 15:37:03 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 15 Jul 2010 13:37:03 +0000 Subject: [issue9265] Incorrect name passed as arg[0] when shell=True and executable specified In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279201023.15.0.252000350335.issue9265@psf.upfronthosting.co.za> R. David Murray added the comment: Stephan: that might be a cleaner API, rather than overloading the semantics of 'executable'. But that would be a separate feature request. I see what you are saying about "just the name". I misread ?ric's message as saying he'd confirmed the bug, but I guess he's saying he confirmed that it works as documented. It does look like subprocess lacks a test for this case. ---------- title: Can't choose other shell in subprocess -> Incorrect name passed as arg[0] when shell=True and executable specified _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 15:56:04 2010 From: report at bugs.python.org (Ask Solem) Date: Thu, 15 Jul 2010 13:56:04 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279202164.75.0.266821889129.issue9205@psf.upfronthosting.co.za> Ask Solem added the comment: Ok. I implemented my suggestions in the patch attached (multiprocessing-trunk at 82502-termination2.patch) What do you think? Greg, Maybe we could keep the behavior in termination.patch as an option for map jobs? It is certainly a problem that map jobs won't terminate until the pool is joined. ---------- Added file: http://bugs.python.org/file18013/multiprocessing-trunk at 82502-termination2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 15:59:28 2010 From: report at bugs.python.org (hannes reuter) Date: Thu, 15 Jul 2010 13:59:28 +0000 Subject: [issue9249] struct.pack and Long Integer datatype should be 4, but is 8 bytes In-Reply-To: <1279133991.81.0.16058318543.issue9249@psf.upfronthosting.co.za> Message-ID: hannes reuter added the comment: Hi Mark, If you would add a footnote to the L/l formats table and mention what you wrote, it would make things clearer. Something along the lines like that I reformulated from your explanation: On most common platforms the 'l' and 'L' codes are the only ones likely to differ due to formating differences between Native and Little are. The Size for 'l' and 'L' on a typical 64-bit Unix-alike platform will be 8 for 'l' and 'L'; on 64-bit Windows and most 32-bit platforms, it's 4. This is due to the fact that in Native mode native size, native byteorder and alignment will be set, while with a Little endian formating standard size, little-endian, no alignment will be set. << Cheers Hannes On 7/14/10, Mark Dickinson wrote: > > Mark Dickinson added the comment: > >> However, as my system is a little endian one(e.g. >> sys.byteorder=little), whats the difference between native and little > > Native mode uses: native size, native byteorder and alignment that > matches your platform > Little endian: standard size, little-endian, no alignment > > The *native* size means the size of the corresponding C type (e.g., as > computed by sizeof) on your platform. So on a typical 64-bit Unix-alike > platform, that's 8 for 'l' and 'L'; on 64-bit Windows and most 32-bit > platforms, it's 4 for 'l' and 'L'. > > The *standard* size is as given by the table. It's the same on all > platforms. > > It's true that on most common platforms the 'l' and 'L' codes are the only > ones likely to differ. > >> b) Where could I look up/find such a native format table ? > Why not just use struct.calcsize? > > This is all explained in the docs; I'm going to close this issue, since I > don't think there's any discrepancy between the docs and the behaviour of > the module. > > However, if you have ideas for specific improvements to the documentation, > please do open another issue. > > ---------- > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 16:05:30 2010 From: report at bugs.python.org (Ask Solem) Date: Thu, 15 Jul 2010 14:05:30 +0000 Subject: [issue9244] multiprocessing.pool: Worker crashes if result can't be encoded In-Reply-To: <1279021915.02.0.743108448879.issue9244@psf.upfronthosting.co.za> Message-ID: <1279202730.28.0.934678617604.issue9244@psf.upfronthosting.co.za> Ask Solem added the comment: Updated patch with Greg's suggestions. (multiprocessing-trunk at 82502-handle_worker_encoding_errors2.patch) ---------- Added file: http://bugs.python.org/file18014/multiprocessing-trunk at 82502-handle_worker_encoding_errors2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 16:17:50 2010 From: report at bugs.python.org (Greg Brockman) Date: Thu, 15 Jul 2010 14:17:50 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279203470.17.0.864527074777.issue9205@psf.upfronthosting.co.za> Greg Brockman added the comment: >> Before I forget, looks like we also need to deal with the >> result from a worker being un-unpickleable: >This is what my patch in bug 9244 does... Really? I could be misremembering, but I believe you deal with the case of the result being unpickleable. I.e. you deal with the put(result) failing, but not the get() in the result handler. Does my sample program work with your patch applied? > while state != TERMINATE: > result = get(timeout=1) > if all_processes_dead(): > break; Will this sort of approach work with the supervisor, which continually respawns workers? > user-initiated interrupts, this is very important to recover from, > think of some badly written library code suddenly raising SystemExit, > this shouldn't terminate other jobs, and it's probably easy to > recover from, so why shouldn't it try? To be clear, in this case I was thinking of KeyboardInterrupts. I'll take a look at your patch in a bit. From our differing use-cases, I do think it could make sense as a configuration option, but where it probably belongs is on the wait() call of ApplyResult. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 16:25:11 2010 From: report at bugs.python.org (Ask Solem) Date: Thu, 15 Jul 2010 14:25:11 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279203911.54.0.542071522142.issue9205@psf.upfronthosting.co.za> Ask Solem added the comment: Just some small cosmetic changes to the patch. (added multiprocessing-trunk at 82502-termination3.patch) ---------- Added file: http://bugs.python.org/file18015/multiprocessing-trunk at 82502-termination3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 16:25:17 2010 From: report at bugs.python.org (Ask Solem) Date: Thu, 15 Jul 2010 14:25:17 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279203917.82.0.482208296497.issue9205@psf.upfronthosting.co.za> Changes by Ask Solem : Removed file: http://bugs.python.org/file18013/multiprocessing-trunk at 82502-termination2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 17:04:35 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 15 Jul 2010 15:04:35 +0000 Subject: [issue9265] Incorrect name passed as arg[0] when shell=True and executable specified In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279206275.91.0.577905150494.issue9265@psf.upfronthosting.co.za> Stefan Krah added the comment: Here's a patch with a test case. Without the fix in subprocess.py, the test prints: ====================================================================== FAIL: test_specific_shell (__main__.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_subprocess.py", line 650, in test_specific_shell self.assertEqual(p.stdout.read().strip(), sh) AssertionError: '/bin/sh' != '/bin/bash' I think trying bash and ksh is sufficient; "echo $0" works for both (for csh it does not). David, does the patch look good? ?ric, I'm by no means a tracker expert, so I wonder why you set the resolution to 'accepted' at such an early stage. Does 'accepted' mean 'This is a valid report.' or does it mean 'I think the patch is correct.'? ---------- keywords: +needs review stage: unit test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 17:07:08 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 15 Jul 2010 15:07:08 +0000 Subject: [issue9265] Incorrect name passed as arg[0] when shell=True and executable specified In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279206428.05.0.611672416478.issue9265@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- keywords: +patch Added file: http://bugs.python.org/file18016/issue9265.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 17:39:02 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 15 Jul 2010 15:39:02 +0000 Subject: [issue9265] Incorrect name passed as arg[0] when shell=True and executable specified In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279208342.85.0.17561497494.issue9265@psf.upfronthosting.co.za> R. David Murray added the comment: The test unfortunately is too fragile. There is no guarantee that those shells will exist with those paths on any given system. Maybe you could use 'which' to find the path to the alternate shell for use in the test, and skip it if you can't find said shell.[*] I don't think there's a need to test more than one alternate shell. Does this combo (executable + shell=True) have a meaning on Windows? [*] or make issue 444582 a dependency for this bug :) ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 17:41:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 15:41:32 +0000 Subject: [issue1724366] cPickle module doesn't work with universal line endings Message-ID: <1279208492.55.0.902419791605.issue1724366@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > The pickle.py docsstrings in 2.7+ contain the following text > (amongst others): > > .. Protocol 0 is the > only protocol that can be written to a file opened in text > mode and read back successfully. Hmm, indeed. The ReST documentation also has the following note: """ Note: Be sure to always open pickle files created with protocols >= 1 in binary mode. For the old ASCII-based pickle protocol 0 you can use either text mode or binary mode as long as you stay consistent. """ but as Gabriel mentioned above, this should be qualified by at least adding unless pickle contains unicode strings with embedded '\r' on platforms that use '\r' as a part of its end of line sequence. I don't think changing the way unicode is pickled is an option. Fixing this aspect of cPickle to behave more like pickle.py given the number of other differences does not look like a good use of developer's time. I think this is the case were existing behavior should just be better documented. See also issue616013. ---------- assignee: belopolsky -> components: +Documentation dependencies: +cPickle documentation incomplete resolution: invalid -> versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 17:41:43 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 15 Jul 2010 15:41:43 +0000 Subject: [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1279208503.47.0.512999222709.issue9264@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am reviewing doc + patch against the code. Do not commit yet. ---------- assignee: docs at python -> tjreedy stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 17:51:37 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 15 Jul 2010 15:51:37 +0000 Subject: [issue9265] Incorrect name passed as arg[0] when shell=True and executable specified In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279209097.92.0.485703849023.issue9265@psf.upfronthosting.co.za> ?ric Araujo added the comment: David: My message was ambiguous. Your second reading was correct :) Stefan: $0 works with dash too (no reason why it should not, but I still tested :). ?Accepted? means ?valid bug report?; to say that the patch is good people use a message or commit directly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 18:10:51 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 15 Jul 2010 16:10:51 +0000 Subject: [issue1448060] gettext.py breaks on plural-forms header (PATCH) Message-ID: <1279210251.6.0.658185888776.issue1448060@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm closing this as a duplicate of 1475523 as the latter has a unit test patch file attached, I'll also merge the nosy lists. ---------- nosy: +BreamoreBoy resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 18:13:47 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 15 Jul 2010 16:13:47 +0000 Subject: [issue9265] Incorrect name passed as arg[0] when shell=True and executable specified In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279210427.6.0.00300495993228.issue9265@psf.upfronthosting.co.za> Stefan Krah added the comment: Hm, /bin/sh should actually be removed from the list. It might be a symlink to csh, for example. I know this isn't an exhaustive test. If /bin/bash or /bin/ksh don't exist, the test is skipped. I thought this is good enough, since the majority of systems have one of those, so the test is guaranteed to fail on one of the buildbots should the changes to subprocess.py be removed in the future. If a system only has /bin/csh, I wouldn't know how to write the test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 18:13:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 15 Jul 2010 16:13:59 +0000 Subject: [issue1448060] gettext.py breaks on plural-forms header (PATCH) Message-ID: <1279210439.72.0.611667340236.issue1448060@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- superseder: -> patch fixing #1448060 (gettext.py bug) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 18:14:11 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Thu, 15 Jul 2010 16:14:11 +0000 Subject: [issue7384] curses crash on FreeBSD In-Reply-To: <1259006628.77.0.121355571453.issue7384@psf.upfronthosting.co.za> Message-ID: <1279210451.08.0.307104994413.issue7384@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: This patch allows to build Python 3.* in this locale. It might be safer to open tmpfile in binary mode to avoid potential problems with non-ASCII characters in paths to libraries. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 18:14:16 2010 From: report at bugs.python.org (Brett Cannon) Date: Thu, 15 Jul 2010 16:14:16 +0000 Subject: [issue9260] A finer grained import lock In-Reply-To: <1279118663.3.0.514954672422.issue9260@psf.upfronthosting.co.za> Message-ID: <1279210456.39.0.887873576009.issue9260@psf.upfronthosting.co.za> Brett Cannon added the comment: I'll have a look when I can (hopefully EuroPython). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 18:24:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 15 Jul 2010 16:24:16 +0000 Subject: [issue1475523] gettext breaks on plural-forms header Message-ID: <1279211056.14.0.824530236126.issue1475523@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> accepted title: patch fixing #1448060 (gettext.py bug) -> gettext breaks on plural-forms header versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 18:24:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 15 Jul 2010 16:24:52 +0000 Subject: [issue1475523] gettext breaks on plural-forms header Message-ID: <1279211092.12.0.600490341109.issue1475523@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 18:51:41 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 15 Jul 2010 16:51:41 +0000 Subject: [issue9265] Incorrect name passed as arg[0] when shell=True and executable specified In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279212701.12.0.0128983263498.issue9265@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, I misread the test the first time. Well, I'd prefer a test that always did a real test on posix, but I suppose this has to be good enough since there could be systems that Python otherwise supports that *only* have /bin/sh. Actually I suppose one could create a local symlink to /bin/sh and call through that...but I don't think this issue warrants going to any more effort, so I think the patch is fine as is. You could argue that /bin/sh is good to have in the list since it makes sure that arg[0] doesn't get changed inappropriately in the default case. I'd be more comfortable if the test generated a skip message if the only one of the shells that is found is /bin/sh, but I'm not going to insist on it. (This will be true, for example, on FreeBSD (at least on 6, which is the install I can easily check...maybe you could add /usr/local/bin/bash as one of your candidates? Most FreeBSDs will end up having that one installed, though not of course all of them). I vote we don't worry about the csh only case :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 19:00:43 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 15 Jul 2010 17:00:43 +0000 Subject: [issue9028] test_support.run_unittest cmdline options and arguments In-Reply-To: <1276866224.2.0.777930943128.issue9028@psf.upfronthosting.co.za> Message-ID: <1279213243.29.0.523340423328.issue9028@psf.upfronthosting.co.za> anatoly techtonik added the comment: Cool, unittest.main() worked for me, but I still lack the introspection to see what tests are available inside the file. Would there be any objections against quickly adding -l, --list option to expose the result of test discovery as it works now? What are requirements for the old test_support.run_unittest code to reach unittest compatibility? Can't you just deprecate test_support.run_unittest() so maintainers get signal to upgrade their tests suite? Then the upgrade happen faster. P.S. I do not need many plugin use cases right now. The test suite tools are often separated into three components - test discovery, test runner and test formatting, but that's all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 19:01:33 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 15 Jul 2010 17:01:33 +0000 Subject: [issue9028] test_support.run_unittest cmdline options and arguments In-Reply-To: <1276866224.2.0.777930943128.issue9028@psf.upfronthosting.co.za> Message-ID: <1279213293.3.0.56119825374.issue9028@psf.upfronthosting.co.za> anatoly techtonik added the comment: s/need/have/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 19:50:05 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 17:50:05 +0000 Subject: [issue5180] 3.1 cannot unpickle 2.7-created pickle In-Reply-To: <1234045735.61.0.752787259691.issue5180@psf.upfronthosting.co.za> Message-ID: <1279216205.81.0.893173281624.issue5180@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Antoine, I think I have found a better solution. Since we are dealing with classic classes, they should not define __new__. If in porting to 3.x, users introduce __new__ that requires arguments, they will not be able to unpickle 2.x pickles no matter what we do. Therefore, I propose to replace _EmptyClass trick in pickle.py with a call to klass.__new__: - value = _EmptyClass() - value.__class__ = klass + value = klass.__new__(klass) and do the same in _pickle.c's instantiate: r = PyObject_CallMethod(cls, "__new__", "O", cls); Note that I am not even calling tp_new here directly, so all the hoops in tp_new_wrapper get jumped through. The advantage of this scheme is that python and C code will work exactly the same and users that have corner cases for which the scheme does not work will be able to figure out what is going on by looking at the python code. Attaching issue5180a.diff ---------- Added file: http://bugs.python.org/file18017/issue5180a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 20:13:01 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 18:13:01 +0000 Subject: [issue9267] Update pickle opcode documentation in pickletools for 3.x In-Reply-To: <1279217581.88.0.294098163632.issue9267@psf.upfronthosting.co.za> Message-ID: <1279217581.88.0.294098163632.issue9267@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Pickle opcode documentation in pickletools still refers to old/new style classes and changes made in 2.x series. Opcodes such as INT, INST, and OBJ that are no longer produced by 3.x pickling code should be described as such and discussion added on how 2.x features that are removed in 3.x are emulated when 2.x pickles are loaded in 3.x. See also issue5180. ---------- assignee: belopolsky components: Documentation keywords: easy messages: 110384 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: Update pickle opcode documentation in pickletools for 3.x type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 20:14:04 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 18:14:04 +0000 Subject: [issue9267] Update pickle opcode documentation in pickletools for 3.x In-Reply-To: <1279217581.88.0.294098163632.issue9267@psf.upfronthosting.co.za> Message-ID: <1279217644.33.0.515999688113.issue9267@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- dependencies: +3.1 cannot unpickle 2.7-created pickle nosy: +alexandre.vassalotti, lemburg, mark.dickinson, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 20:22:05 2010 From: report at bugs.python.org (Jean Brouwers) Date: Thu, 15 Jul 2010 18:22:05 +0000 Subject: [issue3163] module struct support for ssize_t and size_t In-Reply-To: <1214071551.33.0.650558563727.issue3163@psf.upfronthosting.co.za> Message-ID: <1279218125.58.0.251407612916.issue3163@psf.upfronthosting.co.za> Changes by Jean Brouwers : Removed file: http://bugs.python.org/file18006/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 20:29:51 2010 From: report at bugs.python.org (Jean Brouwers) Date: Thu, 15 Jul 2010 18:29:51 +0000 Subject: [issue3163] module struct support for ssize_t and size_t In-Reply-To: <1214071551.33.0.650558563727.issue3163@psf.upfronthosting.co.za> Message-ID: <1279218591.7.0.913040957502.issue3163@psf.upfronthosting.co.za> Jean Brouwers added the comment: It would be sufficient to support size_t/ssize_t in native mode for my usage. The workaround I have been using is in this recipe in the function calcsize. That maps the 'z' and 'Z' format to either 'l', 'L' or 'P' for lack of anything better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 21:04:31 2010 From: report at bugs.python.org (Ask Solem) Date: Thu, 15 Jul 2010 19:04:31 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279220671.55.0.0176296542071.issue9205@psf.upfronthosting.co.za> Ask Solem added the comment: > Really? I could be misremembering, but I believe you deal > with the case of the result being unpickleable. I.e. you > deal with the put(result) failing, but not the get() in the > result handler. Your example is demonstrating the pickle error on put(), not on get(). > Does my sample program work with your patch applied? Yeah, check this out: /opt/devel/Python/trunk(master)$> patch -p1 < multiprocessing-trunk at 82502-handle_worker_encoding_errors2.patch patching file Lib/multiprocessing/pool.py patching file Lib/test/test_multiprocessing.py /opt/devel/Python/trunk(master)$> ./python.exe Python 2.7 (unknown, Jul 13 2010, 13:28:35) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import multiprocessing >>> def foo(): ... return lambda: 42 ... >>> p = multiprocessing.Pool(2) >>> p.apply_async(foo).get() Traceback (most recent call last): File "", line 1, in File "/opt/devel/Python/trunk/Lib/multiprocessing/pool.py", line 518, in get raise self._value multiprocessing.pool.MaybeEncodingError: Error sending result: ' at 0x1005477d0>'. Reason: 'Can't pickle : attribute lookup __builtin__.function failed' >>> import operator >>> p.apply_async(operator.add, (2, 2)).get() 4 > To be clear, in this case I was thinking of KeyboardInterrupts. In termination2.patch I handle BaseExceptions, by exiting the worker process, and then letting the _worker_handler replace the process. It's very useful, because then people can kill -INT the worker process if they want to cancel the job, and without breaking other jobs running. > From our differing use-cases, I do think it could make sense as > a configuration option, but where it probably belongs is on the > wait() call of ApplyResult. Indeed! This could be done by adding listeners for this type of errors. pool.add_worker_missing_callback(fun) So MapResults could install a callback like this: def __init__(): ... _pool.add_worker_missing_callback(self._on_worker_missing) ... def _on_worker_missing(self): err = WorkerLostError( "Worker lost while running map job") self._set(None, (False, err)) What do you think about that? IMHO, even though the worker lost could be unrelated to the map job in question, it would still be a better alternative than crashing the whole pool. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 21:21:18 2010 From: report at bugs.python.org (Greg Brockman) Date: Thu, 15 Jul 2010 19:21:18 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279221678.21.0.944098021426.issue9205@psf.upfronthosting.co.za> Greg Brockman added the comment: Actually, the program you demonstrate is nonequivalent to the one I posted. The one I posted pickles just fine because 'bar' is a global name, but doesn't unpickle because it doesn't exist in the parent's namespace. (See http://docs.python.org/library/pickle.html#what-can-be-pickled-and-unpickled.) Although, if you're able to run my test program verbatim, then it's entirely possible I'm just missing something. Anyway, I do think that adding a 'worker_missing_callback' could work. You'd still have to make sure the ApplyResult (or MapResult) can crash the pool if it deems necessary though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 21:37:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 19:37:18 +0000 Subject: [issue9268] Add annotation option to pickletools.dis In-Reply-To: <1279222638.31.0.459529413565.issue9268@psf.upfronthosting.co.za> Message-ID: <1279222638.31.0.459529413565.issue9268@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Example: >>> dis(pickle.dumps(T, 3), annotate=1) 0: \x80 PROTO 3 | Protocol version indicator. 2: ] EMPTY_LIST | Push an empty list. 3: q BINPUT 0 | Store the stack top into the memo. The stack is not popped. 5: h BINGET 0 | Read an object from the memo and push it on the stack. 7: \x85 TUPLE1 | One-tuple. 8: q BINPUT 1 | Store the stack top into the memo. The stack is not popped. 10: a APPEND | Append an object to a list. 11: 0 POP | Discard the top stack item, shrinking the stack by one item. 12: h BINGET 1 | Read an object from the memo and push it on the stack. 14: . STOP | Stop the unpickling machine. ---------- assignee: belopolsky files: pickletools-annotate.diff keywords: easy, patch messages: 110388 nosy: alexandre.vassalotti, belopolsky, lemburg, mark.dickinson, pitrou priority: normal severity: normal stage: unit test needed status: open title: Add annotation option to pickletools.dis type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file18018/pickletools-annotate.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 23:50:45 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 15 Jul 2010 21:50:45 +0000 Subject: [issue1475523] gettext breaks on plural-forms header Message-ID: <1279230645.36.0.114413473985.issue1475523@psf.upfronthosting.co.za> Mark Lawrence added the comment: Attached patch is my take on the fix to this, it's a two line change to gettext.py for 2.7. If the change is accepted I'll provide another patch for py3k. Nosy list updated while I'm at it. ---------- nosy: +BreamoreBoy, dsegan, potorange -merwok versions: -Python 2.6 Added file: http://bugs.python.org/file18019/gettext.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 15 23:55:55 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 21:55:55 +0000 Subject: [issue1581183] pickle protocol 2 failure on int subclass Message-ID: <1279230955.55.0.188895108285.issue1581183@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am going to close this as a duplicate of issue 1062277. The later has a patch, but Raymond questioned whether proposed feature is desirable. [msg47268] I am -1, but will look at the patch there. ---------- nosy: +rhettinger resolution: -> duplicate status: open -> pending superseder: -> Pickle breakage with reduction of recursive structures _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 00:08:49 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 15 Jul 2010 22:08:49 +0000 Subject: [issue900092] hotshot.stats.load fails with AssertionError Message-ID: <1279231729.92.0.173705988624.issue900092@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is it worth leaving this open, given this from section 26.5 of the 2.7 docs. "For common usage it is recommended to use cProfile instead. hotshot is not maintained and might be removed from the standard library in the future." ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 00:17:02 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 15 Jul 2010 22:17:02 +0000 Subject: [issue991266] Cookie.py does not correctly quote Morsels Message-ID: <1279232222.48.0.202237824993.issue991266@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can someone please take a look at this Cookie.py two line patch. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 00:17:16 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 15 Jul 2010 22:17:16 +0000 Subject: [issue9236] Invalid reads in fastsearch.h In-Reply-To: <1278968830.4.0.450614560792.issue9236@psf.upfronthosting.co.za> Message-ID: <1279232236.73.0.222255679263.issue9236@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Stringlib fastsearch can read beyond the front of an array _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 00:17:56 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 15 Jul 2010 22:17:56 +0000 Subject: [issue991266] Cookie.py does not correctly quote Morsels Message-ID: <1279232276.02.0.0795155340554.issue991266@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 00:18:58 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 15 Jul 2010 22:18:58 +0000 Subject: [issue8530] Stringlib fastsearch can read beyond the front of an array In-Reply-To: <1272218711.28.0.946765845832.issue8530@psf.upfronthosting.co.za> Message-ID: <1279232338.26.0.0749441094455.issue8530@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 00:39:52 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 15 Jul 2010 22:39:52 +0000 Subject: [issue5404] Cross-compiling Python In-Reply-To: <1235984629.04.0.168155698084.issue5404@psf.upfronthosting.co.za> Message-ID: <1279233592.05.0.670565339657.issue5404@psf.upfronthosting.co.za> Mark Lawrence added the comment: I understand that cross-compilation is not supported so this must now be aimed at 3.2. ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 00:41:13 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 15 Jul 2010 22:41:13 +0000 Subject: [issue1597850] Cross compiling patches for MINGW Message-ID: <1279233673.42.0.604740082941.issue1597850@psf.upfronthosting.co.za> Mark Lawrence added the comment: I understand that cross-compilation is not supported so this must now be aimed at 3.2. ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 00:42:54 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 15 Jul 2010 22:42:54 +0000 Subject: [issue1006238] cross compile patch Message-ID: <1279233774.0.0.0104364667546.issue1006238@psf.upfronthosting.co.za> Mark Lawrence added the comment: As a cross compile patch and being a feature request this must target 3.2. ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 00:53:27 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 15 Jul 2010 22:53:27 +0000 Subject: [issue1475523] gettext breaks on plural-forms header Message-ID: <1279234407.76.0.685273969339.issue1475523@psf.upfronthosting.co.za> Mark Lawrence added the comment: Sorry, forgot to say that the patched code passed all tests in the patched unit test file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 01:01:43 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 23:01:43 +0000 Subject: [issue9269] Cannot pickle self-referencing sets In-Reply-To: <1279234902.88.0.629141543515.issue9269@psf.upfronthosting.co.za> Message-ID: <1279234902.88.0.629141543515.issue9269@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Attached script, cycle.py demonstrates a simplification of the behavior reported by mike bayer in msg77200. Essentially, the script attempts to pickle a set that contains a class instance that has an attribute referring back to the set: class C: pass c = C() cycle = set([c]) c.foo = cycle An attempt to pickle the *cycle* object triggers an assertion error in 2.7 or in 3.2 with disabled _pickle acceleration and produces a broken cycle in 3.2 or if cPickle is used instead of pickle in 2.7. $ python3 cycle.py FAIILURE .. $ python2 cycle.py Traceback (most recent call last): .. File ".../pickle.py", line 244, in memoize assert id(obj) not in self.memo AssertionError If you run cycle.py with an argument, it uses a dict instead of set to create the cycle and shows that the cycles with dict can be pickled correctly: $ python3 cycle.py dict SUCCESS .. After reporting success or failure, cycle.py, prints a disassembly of the pickle stream which makes it clear what happens: In case of dict, we see the following: $ python3 cycle.py dict SUCCESS .. 2: } EMPTY_DICT 3: q BINPUT 0 .. 26: X BINUNICODE 'foo' .. 36: h BINGET 0 38: s SETITEM .. 40: N NONE 41: s SETITEM An empty dict is created and saved in the memo. Then a C object is built with foo attribute is set to the dict retrieved from the memo. Finally, the same dict is updated with (C object, None) key-value pair. The result is the cycle identical to the one we built in python code. The sets, however, are built differently. There is no pickle opcode to add items to a set, so all set items must exist by the time set is built. So here is what we see: $ python3 cycle.py FAIILURE 2: c GLOBAL 'builtins set' 16: q BINPUT 0 .. instead of empty set the constructor is saved in memo 42: X BINUNICODE 'foo' 52: h BINGET 0 .. 63: R REDUCE .. a set object containing c is constructed 66: s SETITEM .. and assigned to c.foo 72: R REDUCE .. another set object is constructed containing c As a result, we have cycle = {c} c.foo = {c} Instead of c.foo = cycle ---------- assignee: belopolsky components: Interpreter Core files: cycle.py messages: 110397 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: Cannot pickle self-referencing sets type: behavior versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file18020/cycle.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 01:03:40 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 15 Jul 2010 23:03:40 +0000 Subject: [issue1043706] External storage protocol for large email messages Message-ID: <1279235020.6.0.851577973205.issue1043706@psf.upfronthosting.co.za> Mark Lawrence added the comment: The patch if fairly small and if accepted could be implemented quite easily despite its age as the code doesn't appear to have changed much in the interim. ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 01:03:44 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 23:03:44 +0000 Subject: [issue9269] Cannot pickle self-referencing sets In-Reply-To: <1279234902.88.0.629141543515.issue9269@psf.upfronthosting.co.za> Message-ID: <1279235024.48.0.887042413274.issue9269@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +alexandre.vassalotti, grubert, rhettinger, schmir, zzzeek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 01:05:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 23:05:18 +0000 Subject: [issue9269] Cannot pickle self-referencing sets In-Reply-To: <1279234902.88.0.629141543515.issue9269@psf.upfronthosting.co.za> Message-ID: <1279235118.72.0.260348030129.issue9269@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file18021/cycle.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 01:05:29 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 23:05:29 +0000 Subject: [issue9269] Cannot pickle self-referencing sets In-Reply-To: <1279234902.88.0.629141543515.issue9269@psf.upfronthosting.co.za> Message-ID: <1279235129.4.0.801630753068.issue9269@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file18020/cycle.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 01:07:52 2010 From: report at bugs.python.org (Greg Brockman) Date: Thu, 15 Jul 2010 23:07:52 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279235272.94.0.843883378856.issue9205@psf.upfronthosting.co.za> Greg Brockman added the comment: Started looking at your patch. It seems to behave reasonably, although it still doesn't catch all of the failure cases. In particular, as you note, crashed jobs won't be noticed until the pool shuts down... but if you make a blocking call such as in the following program, you'll get a hang: """ #!/usr/bin/env python import multiprocessing, os, signal def foo(x): os.kill(os.getpid(), signal.SIGKILL) multiprocessing.Pool(1).apply(foo, [1]) """ The tests also occasionally hang in e.g. test_job_killed_by_signal (__main__.WithProcessesTestPoolSupervisor) ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 01:10:15 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 23:10:15 +0000 Subject: [issue998998] pickle bug - recursively memoizing class? Message-ID: <1279235415.35.0.894017244131.issue998998@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: There are two issues here. The original issue is a duplicate of #1062277. The other issue is specific to cycles containing a set. [msg77200] I am opening a separate issue for that. See #9269. ---------- resolution: -> duplicate status: open -> pending superseder: -> Cannot pickle self-referencing sets _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 01:12:22 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 15 Jul 2010 23:12:22 +0000 Subject: [issue9120] Reduce pickle size for an empty set In-Reply-To: <1277839720.0.0.346517516652.issue9120@psf.upfronthosting.co.za> Message-ID: <1279235542.21.0.00417630395922.issue9120@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Chances are we will need to add protocol support for sets. See issue9269. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 01:32:23 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 15 Jul 2010 23:32:23 +0000 Subject: [issue9269] Cannot pickle self-referencing sets In-Reply-To: <1279234902.88.0.629141543515.issue9269@psf.upfronthosting.co.za> Message-ID: <1279236743.54.0.931679525067.issue9269@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 02:17:00 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 00:17:00 +0000 Subject: [issue9269] Cannot pickle self-referencing sets In-Reply-To: <1279234902.88.0.629141543515.issue9269@psf.upfronthosting.co.za> Message-ID: <1279239420.6.0.58008658097.issue9269@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am reclassifying this as an RFE because as a bug, this is a duplicate of issue1062277. The later contains an excellent description of the problem by Dima Dorfman: Our pickle implementations don't check for reduce cycles. This is somewhat cosmetic except that stack overflow protection is imperfect (for cPickle), causing crashes, and some kinds of cycles trigger asserts (in pickle). [msg47267] This is undeniably a bug and the solution offered in issue1062277 is quite reasonable: detect reduce cycles and bail out with an informative message. This will not solve the problem of pickling self-referencing sets, but at least once documented can be defended as expected behavior. What remains after issue1062277 is a feature request to allow pickling of self-referencing sets. I would argue that this is really a pathological case. Sets are not supposed to contain mutable items and immutable objects cannot create reference cycles among themselves. The test case in cycle.py tricks set into accepting mutable objects by creating a class with default __hash__. This falls into a category of "don't do it". I am lowering the priority and adding #1062277 as a dependency. Once #1062277 is fixed, I would not mind closing this as "won't fix". ---------- dependencies: +Pickle breakage with reduction of recursive structures priority: normal -> low type: behavior -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 02:26:39 2010 From: report at bugs.python.org (mike bayer) Date: Fri, 16 Jul 2010 00:26:39 +0000 Subject: [issue9269] Cannot pickle self-referencing sets In-Reply-To: <1279234902.88.0.629141543515.issue9269@psf.upfronthosting.co.za> Message-ID: <1279239999.22.0.237682571159.issue9269@psf.upfronthosting.co.za> mike bayer added the comment: where is it defined that sets are not "supposed" to contain mutable items? such a requirement vastly limits the usefulness of sets. Consider that relational database rows are mutable. A result set containing multiple rows which each have a primary key comprises a set, hashed on primary key. But other attributes of each row can be updated. Surely this is not controversial ? What Python data structure should I (and a whole bunch of Python ORMs) be using to represent mutable, relational database rows, unordered and unique on primary key, in memory ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 02:26:56 2010 From: report at bugs.python.org (Austin English) Date: Fri, 16 Jul 2010 00:26:56 +0000 Subject: [issue7991] test_ntpath fails on Windows XP In-Reply-To: <1266862639.58.0.407151128158.issue7991@psf.upfronthosting.co.za> Message-ID: <1279240016.4.0.858326771743.issue7991@psf.upfronthosting.co.za> Austin English added the comment: Runs fine in 3.1.2 on that machine. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 02:27:08 2010 From: report at bugs.python.org (Austin English) Date: Fri, 16 Jul 2010 00:27:08 +0000 Subject: [issue7991] test_ntpath fails on Windows XP In-Reply-To: <1266862639.58.0.407151128158.issue7991@psf.upfronthosting.co.za> Message-ID: <1279240028.16.0.887973444148.issue7991@psf.upfronthosting.co.za> Austin English added the comment: Runs fine in 3.1.2 on that machine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 02:31:25 2010 From: report at bugs.python.org (Austin English) Date: Fri, 16 Jul 2010 00:31:25 +0000 Subject: [issue7645] test_distutils fails on Windows XP In-Reply-To: <1262807781.76.0.367553383725.issue7645@psf.upfronthosting.co.za> Message-ID: <1279240285.65.0.699265011867.issue7645@psf.upfronthosting.co.za> Austin English added the comment: Still present in 3.1.2. ---------- Added file: http://bugs.python.org/file18022/distutils.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 02:52:50 2010 From: report at bugs.python.org (Jack Diederich) Date: Fri, 16 Jul 2010 00:52:50 +0000 Subject: [issue9269] Cannot pickle self-referencing sets In-Reply-To: <1279234902.88.0.629141543515.issue9269@psf.upfronthosting.co.za> Message-ID: <1279241570.02.0.528782133103.issue9269@psf.upfronthosting.co.za> Jack Diederich added the comment: Mike, it is better to think of database rows as immutable tuples. During the course of a query the contents of the database are considered static - hence all that locking and kvetching about this or that database not having "true" foreign key support. If database rows were mutable the results of a JOIN could be nonsensical. ---------- nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 02:57:04 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 00:57:04 +0000 Subject: [issue9269] Cannot pickle self-referencing sets In-Reply-To: <1279239999.22.0.237682571159.issue9269@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Thu, Jul 15, 2010 at 8:26 PM, mike bayer wrote: .. > where is it defined that sets are not "supposed" to contain mutable items? ? such a requirement vastly limits the usefulness of sets. > Well, there is no such requirement. The actual requirement is that they should be hashable. For built-in types, however hashable is the same as immutable. Arguably, user-defined classes should emulate that. > Consider that relational database rows are mutable. ?A result set containing multiple rows which each have a primary key comprises a set, hashed on primary key. ?But other attributes of each row can be updated. ? Surely this is not controversial ? ?What Python data structure should I (and a whole bunch of Python ORMs) be using to represent mutable, relational database rows, unordered and unique on primary key, in memory ? Why wouldn't you represent a result set as a dict mapping primary key (tuple) to list of column values? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 02:59:49 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 00:59:49 +0000 Subject: [issue9269] Cannot pickle self-referencing sets In-Reply-To: <1279241570.02.0.528782133103.issue9269@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Thu, Jul 15, 2010 at 8:52 PM, Jack Diederich wrote: .. > ?If database rows were mutable the results of a JOIN could be nonsensical. And if your result set is self-referential you have a bigger problem on your hands than not being able to pickle it. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 04:05:33 2010 From: report at bugs.python.org (mike bayer) Date: Fri, 16 Jul 2010 02:05:33 +0000 Subject: [issue9269] Cannot pickle self-referencing sets In-Reply-To: <1279234902.88.0.629141543515.issue9269@psf.upfronthosting.co.za> Message-ID: <1279245933.93.0.0486710211332.issue9269@psf.upfronthosting.co.za> mike bayer added the comment: OK, more specifically, here's the kind of situation where items in a set are mutable: company = Session.query(Company).first() # company.employees is a set() company.employees # each employee references the parent company for e in company.employees: assert e.company is company So nothing is mutated relationally in this case. It's just a plain old bidirectional structure. If two objects are related via many-to-many, then you might have a set in both directions. I'm not sure if this specific situation produces the pickle bug, however, it's been awhile since I've seen which specific case causes the problem. But there are mutable items in a set in these examples and it doesn't seem unreasonable to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 05:27:58 2010 From: report at bugs.python.org (bugs-python@vendor.thewrittenword.com) Date: Fri, 16 Jul 2010 03:27:58 +0000 Subject: [issue9270] distutils.util.getplatform and sysconfig.getplatform differ In-Reply-To: <1279250878.74.0.870585975763.issue9270@psf.upfronthosting.co.za> Message-ID: <1279250878.74.0.870585975763.issue9270@psf.upfronthosting.co.za> New submission from bugs-python at vendor.thewrittenword.com : We had issues building python 2.7 on hppa-hp-hpux machines because sysconfig and distutils had different ideas of the platform name. ./python -c 'import os, sys; from distutils.util import get_platform as plat1; from sysconfig import get_platform as plat2; print plat1();print plat2()' hp-ux-B.11.11-9000_785 hp-ux-B.11.11-9000-785 Notice that one has an underscore, the other a dash. Either the code is sysconfig or distutils needs to change slightly so that they match. e.g. Index: Lib/sysconfig.py =================================================================== --- Lib/sysconfig.py.orig 2010-05-19 22:20:14.000000000 +0000 +++ Lib/sysconfig.py 2010-07-16 02:52:39.385322407 +0000 @@ -569,3 +569,3 @@ machine = machine.replace(' ', '_') - machine = machine.replace('/', '-') + machine = machine.replace('/', '_') ---------- assignee: tarek components: Distutils messages: 110411 nosy: bugs-python at vendor.thewrittenword.com, tarek priority: normal severity: normal status: open title: distutils.util.getplatform and sysconfig.getplatform differ type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 06:15:33 2010 From: report at bugs.python.org (Greg Hazel) Date: Fri, 16 Jul 2010 04:15:33 +0000 Subject: [issue9266] ctypes "ValueError: NULL pointer access" on Win7 x64 In-Reply-To: <1279198550.56.0.12735266712.issue9266@psf.upfronthosting.co.za> Message-ID: <1279253733.69.0.478505953938.issue9266@psf.upfronthosting.co.za> Changes by Greg Hazel : Removed file: http://bugs.python.org/file18012/ctypes_test.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 06:29:07 2010 From: report at bugs.python.org (Greg Hazel) Date: Fri, 16 Jul 2010 04:29:07 +0000 Subject: [issue9266] ctypes "ValueError: NULL pointer access" on Win7 x64 In-Reply-To: <1279198550.56.0.12735266712.issue9266@psf.upfronthosting.co.za> Message-ID: <1279254547.58.0.636737341251.issue9266@psf.upfronthosting.co.za> Greg Hazel added the comment: Ok, this issue is worse, and much easier to reproduce, than I thought. Here is an updated ctypes_test.zip with a repro using only integers and callbacks. Correct output: ('three', (1, 2, 3)) ('four', (1, 2, 3, 4)) ('five', (1, 2, 3, 4, 5)) Incorrect output: ('three', (1, 2, 3)) ('four', (1, 2, 3, 0)) ('five', (1, 2, 3, 0, 5)) I built Python 2.7 from source with MSVC 9. This is not reproducible in Debug mode, or Win32 Release mode. It only happens in x64 Release mode. One very interesting discovery is that if I set these options: Optimization: Disabled (/Od) Enable Instrinsic Functions: No the error does not occur! ---------- Added file: http://bugs.python.org/file18023/ctypes_test.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 07:45:55 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 16 Jul 2010 05:45:55 +0000 Subject: [issue1475523] gettext breaks on plural-forms header Message-ID: <1279259155.13.0.48563757171.issue1475523@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Minor change request. +class Bug1448060(GettextBaseTest): Can you name the test class something more meaningful like PluralFormsTest or something like that. It is helpful when looking at it later. (Btw, this can be done by the committer during checkin too) ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 07:49:07 2010 From: report at bugs.python.org (Jason Gross) Date: Fri, 16 Jul 2010 05:49:07 +0000 Subject: [issue9271] Python throws `IOError: [Errno 27] File too large' on long file names In-Reply-To: <1279259347.56.0.547870211974.issue9271@psf.upfronthosting.co.za> Message-ID: <1279259347.56.0.547870211974.issue9271@psf.upfronthosting.co.za> New submission from Jason Gross : On attempting to open files with sufficiently long file names, python throws IOError: [Errno 27] File too large. This is misleading, and perhaps should be relabeled as 'File name too long.' I have only tested this on unix with Python 2.5.2. This error was thrown when I opened /afs/athena.mit.edu/user/j/g/jgross/web_scripts/alphabets/results/turk/armenian_01_A3NOO9K3CY1YU5.cstroke for writing. ---------- components: IO messages: 110414 nosy: Jason.Gross priority: normal severity: normal status: open title: Python throws `IOError: [Errno 27] File too large' on long file names type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 08:13:11 2010 From: report at bugs.python.org (Ned Deily) Date: Fri, 16 Jul 2010 06:13:11 +0000 Subject: [issue9073] Tkinter module missing from install on OS X 10.6.4 In-Reply-To: <1277409787.07.0.389158105025.issue9073@psf.upfronthosting.co.za> Message-ID: <1279260791.05.0.578574390323.issue9073@psf.upfronthosting.co.za> Ned Deily added the comment: The Python 2 Tkinter has been renamed to tkinter in Python 3 and the lib-tk no longer exists. See http://docs.python.org/py3k/library/tkinter.html ---------- assignee: -> ronaldoussoren components: +Macintosh nosy: +ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 08:45:45 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 16 Jul 2010 06:45:45 +0000 Subject: [issue7645] test_distutils fails on Windows XP In-Reply-To: <1262807781.76.0.367553383725.issue7645@psf.upfronthosting.co.za> Message-ID: <1279262745.82.0.0406362145386.issue7645@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It's just a data file missing from the .msi installer. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 09:53:35 2010 From: report at bugs.python.org (Ned Deily) Date: Fri, 16 Jul 2010 07:53:35 +0000 Subject: [issue4047] test_run_abort triggers CrashReporter on MacOS X In-Reply-To: <1223212546.3.0.400600313868.issue4047@psf.upfronthosting.co.za> Message-ID: <1279266815.04.0.461381941862.issue4047@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- assignee: -> ronaldoussoren components: +Macintosh nosy: +ronaldoussoren versions: +Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 10:33:55 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 16 Jul 2010 08:33:55 +0000 Subject: [issue9271] Python throws `IOError: [Errno 27] File too large' on long file names In-Reply-To: <1279259347.56.0.547870211974.issue9271@psf.upfronthosting.co.za> Message-ID: <1279269235.99.0.026380247989.issue9271@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The file name is only 106 characters long, it's not too long. "[Errno 27] File too large" probably refers to a big file larger than 2Gb. Does your OS support large files? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 10:49:51 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 16 Jul 2010 08:49:51 +0000 Subject: [issue9272] CGIHTTPServer poisons os.environ In-Reply-To: <1279270191.51.0.568678636745.issue9272@psf.upfronthosting.co.za> Message-ID: <1279270191.51.0.568678636745.issue9272@psf.upfronthosting.co.za> New submission from anatoly techtonik : When CGIHTTPServer prepares to start child CGI program it modifies global os.environ. This implicitly changes parents application state if it also relies on some of CGI environment variables. ---------- messages: 110418 nosy: techtonik priority: normal severity: normal status: open title: CGIHTTPServer poisons os.environ versions: Python 2.6, Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 10:53:45 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 Jul 2010 08:53:45 +0000 Subject: [issue9271] Python throws `IOError: [Errno 27] File too large' on long file names In-Reply-To: <1279259347.56.0.547870211974.issue9271@psf.upfronthosting.co.za> Message-ID: <1279270425.85.0.945471368078.issue9271@psf.upfronthosting.co.za> Georg Brandl added the comment: In any case, the error message comes from the operating system, not from Python, and I don't think we should introduce special cases here. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 10:54:59 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 16 Jul 2010 08:54:59 +0000 Subject: [issue9272] CGIHTTPServer poisons os.environ In-Reply-To: <1279270191.51.0.568678636745.issue9272@psf.upfronthosting.co.za> Message-ID: <1279270499.77.0.448917865694.issue9272@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- keywords: +patch Added file: http://bugs.python.org/file18024/9272.CGIHTTPServer-poisons-os.environ.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 11:00:58 2010 From: report at bugs.python.org (gonegown) Date: Fri, 16 Jul 2010 09:00:58 +0000 Subject: [issue8988] import + coding = failure (3.1.2/win32) In-Reply-To: <1276426235.15.0.873898512927.issue8988@psf.upfronthosting.co.za> Message-ID: <1279270858.06.0.928935260712.issue8988@psf.upfronthosting.co.za> gonegown added the comment: @Amaury: error message for my bug was: SyntaxError: None and for your: ImportError: No module named b We've got at least two bugs in one testcase ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 11:07:09 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 16 Jul 2010 09:07:09 +0000 Subject: [issue8988] import + coding = failure (3.1.2/win32) In-Reply-To: <1276426235.15.0.873898512927.issue8988@psf.upfronthosting.co.za> Message-ID: <1279271229.64.0.979457325115.issue8988@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Then please tell us how to reproduce the "SyntaxError" case ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 11:16:41 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 16 Jul 2010 09:16:41 +0000 Subject: [issue4047] test_run_abort triggers CrashReporter on MacOS X In-Reply-To: <1223212546.3.0.400600313868.issue4047@psf.upfronthosting.co.za> Message-ID: <1279271801.57.0.960961047044.issue4047@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Triggering the crash reporter is unavoidable. What we could do is print a warning that this will happen at the start of the test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 11:21:18 2010 From: report at bugs.python.org (=?utf-8?q?Matthieu_Labb=C3=A9?=) Date: Fri, 16 Jul 2010 09:21:18 +0000 Subject: [issue506100] commands.getstatusoutput(): cmd.exe support Message-ID: <1279272078.25.0.391818412612.issue506100@psf.upfronthosting.co.za> Changes by Matthieu Labb? : ---------- nosy: +matthieu.labbe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 11:51:53 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 16 Jul 2010 09:51:53 +0000 Subject: [issue9269] Cannot pickle self-referencing sets In-Reply-To: <1279234902.88.0.629141543515.issue9269@psf.upfronthosting.co.za> Message-ID: <1279273913.77.0.546482512706.issue9269@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > The test case in cycle.py tricks set into accepting mutable objects by > creating a class with default __hash__. This falls into a category of > "don't do it". I beg to differ. There is a reason we allow people to define __hash__ and that's to define arbitrary hashable types (not only immutable ones). Furthermore, the default __hash__ (equivalent to id()) is also perfectly useful in some cases. And in object-oriented designs it is very common to have reference cycles. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 12:01:46 2010 From: report at bugs.python.org (=?utf-8?q?Matthieu_Labb=C3=A9?=) Date: Fri, 16 Jul 2010 10:01:46 +0000 Subject: [issue5808] Subprocess.getstatusoutput Fails Executing 'dir' Command on Windows In-Reply-To: <1240328974.09.0.446818382044.issue5808@psf.upfronthosting.co.za> Message-ID: <1279274506.7.0.144944595985.issue5808@psf.upfronthosting.co.za> Matthieu Labb? added the comment: I think this is a bug: The doc says "Availability: UNIX." but it is *available* under Windows and gives an unexpected error message. I see several way to fix this: 1) Fix the doc: "Supported only on UNIX. Behavior on other platforms is undefined." 2) Make subprocess.getstatusoutput (and subprocess.getoutput) unavailable on non-supported platforms. (Same behavior as the 'os' module.) 3) Make these convenience functions multiplatform using subprocess.Popen. I think the best thing to do is #3. What do you think? ---------- nosy: +matthieu.labbe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 12:09:41 2010 From: report at bugs.python.org (=?utf-8?q?Matthieu_Labb=C3=A9?=) Date: Fri, 16 Jul 2010 10:09:41 +0000 Subject: [issue4697] Clarification needed for subprocess convenience functions in Python 3.0 documentation In-Reply-To: <1229639926.42.0.148346295648.issue4697@psf.upfronthosting.co.za> Message-ID: <1279274981.43.0.647089557527.issue4697@psf.upfronthosting.co.za> Matthieu Labb? added the comment: I think "Availability: UNIX" is incorrect: it is *available* under Windows and gives an unexpected error message. See http://bugs.python.org/issue5808#msg110424 ---------- nosy: +matthieu.labbe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 12:31:10 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 Jul 2010 10:31:10 +0000 Subject: [issue4697] Clarification needed for subprocess convenience functions in Python 3.0 documentation In-Reply-To: <1229639926.42.0.148346295648.issue4697@psf.upfronthosting.co.za> Message-ID: <1279276270.88.0.638942226118.issue4697@psf.upfronthosting.co.za> Georg Brandl added the comment: Well, "available" in this case can also mean that it doesn't work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 13:11:01 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 16 Jul 2010 11:11:01 +0000 Subject: [issue9242] unicodeobject.c: use of uninitialized values In-Reply-To: <1279013088.42.0.0403163187541.issue9242@psf.upfronthosting.co.za> Message-ID: <1279278661.01.0.639978151533.issue9242@psf.upfronthosting.co.za> Stefan Krah added the comment: Here is a minimal example how to reproduce this issue, extracted from UTF32LETest. valgrind --db-attach=yes --suppressions=Misc/valgrind-python.supp ./python uninitialized.py It seems that in Lib/codecs.py the equivalent of "\x00".decode('utf-32-le') is called (line 477). This leads to: PyUnicodeUCS2_DecodeUTF32Stateful (s=0x5b0fc0c "", size=1, errors=0x5add144 "strict", byteorder=0x7fefff39c, consumed=0x0) So we have a string of size 1, but s[2] and s[3] will be accessed in the function. ---------- Added file: http://bugs.python.org/file18025/uninitialized.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 13:22:51 2010 From: report at bugs.python.org (Ask Solem) Date: Fri, 16 Jul 2010 11:22:51 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279279371.28.0.750025685468.issue9205@psf.upfronthosting.co.za> Ask Solem added the comment: > but if you make a blocking call such as in the following program, > you'll get a hang Yeah, and for that we could use the same approach as for the maps. But, I've just implemented the accept callback approach, which should be superior. Maps/Apply fails instantly as soon as a worker process crashes, but the pool remains fully functional. Patch multiprocessing-trunk at 82502-termination-trackjobs.patch added. There seems to be some race conditions left, because some of the tests breaks from time to time. Maybe you can pinpoint it before me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 13:23:17 2010 From: report at bugs.python.org (Ask Solem) Date: Fri, 16 Jul 2010 11:23:17 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279279397.21.0.964220636918.issue9205@psf.upfronthosting.co.za> Changes by Ask Solem : Added file: http://bugs.python.org/file18026/multiprocessing-trunk at 82502-termination-trackjobs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 14:15:23 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 12:15:23 +0000 Subject: [issue1475523] gettext breaks on plural-forms header Message-ID: <1279282523.71.0.949740388488.issue1475523@psf.upfronthosting.co.za> Mark Lawrence added the comment: Point taken I'll settle for PluralFormsTest unless there's a better idea. Assuming patch acceptance could a committer do this please? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 14:25:58 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 12:25:58 +0000 Subject: [issue1100562] deepcopying listlike and dictlike objects Message-ID: <1279283158.41.0.868706510509.issue1100562@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've made this a feature request as #1099746 title is "copy.deepcopy barfs when copying a class derived from dict". Michelle can you confirm that you have run the unit tests and that all passed ok? ---------- nosy: +BreamoreBoy type: feature request -> behavior versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 14:33:42 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 12:33:42 +0000 Subject: [issue1149798] hotshot.runctx: builtins missing Message-ID: <1279283622.98.0.06328468092.issue1149798@psf.upfronthosting.co.za> Mark Lawrence added the comment: I can't see any sense running with this as hotshot is not documented in py3k and is marked as unsupported in py2k docs. ---------- nosy: +BreamoreBoy status: open -> pending versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 14:44:55 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 12:44:55 +0000 Subject: [issue1173475] __slots__ for subclasses of variable length types Message-ID: <1279284295.61.0.922364614969.issue1173475@psf.upfronthosting.co.za> Mark Lawrence added the comment: How much rework if any is needed to get this patch into py3k? ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 15:09:37 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 13:09:37 +0000 Subject: [issue1207589] Right Click Context Menu Message-ID: <1279285777.92.0.408018485487.issue1207589@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +tjreedy versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 15:14:44 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 13:14:44 +0000 Subject: [issue1214879] Support non-file source/dest in marshal Message-ID: <1279286084.1.0.498838931076.issue1214879@psf.upfronthosting.co.za> Mark Lawrence added the comment: Unless anyone expresses an interest I belive that this should be closed. ---------- nosy: +BreamoreBoy status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 15:15:09 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 16 Jul 2010 13:15:09 +0000 Subject: [issue9265] Incorrect name passed as arg[0] when shell=True and executable specified In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279286109.98.0.591834619917.issue9265@psf.upfronthosting.co.za> Stefan Krah added the comment: Ok, here's a more comprehensive test. Comments: 1) Instead of emulating 'which' one could use find_executable from distutils.spawn. But this feels wrong. 2) Skip the test if the primary issue cannot be tested. 3) Exercise the test for /bin/sh, if it isn't a symlink. Then this part will be executed on some systems, e.g. FreeBSD. 4) The check os.path.isfile('/bin/sh') isn't necessary, but good practice nonetheless. Should this go into 2.6 and 3.1 as well? ---------- Added file: http://bugs.python.org/file18027/issue9265-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 15:23:07 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 13:23:07 +0000 Subject: [issue1218234] inspect.getsource doesn't update when a module is reloaded Message-ID: <1279286587.62.0.16287816683.issue1218234@psf.upfronthosting.co.za> Mark Lawrence added the comment: The change to inspect.py is two lines. Given that unit test patches are also supplied could someone with the knowledge give yes or no to accepting this patch? ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 15:27:44 2010 From: report at bugs.python.org (Jean-Paul Calderone) Date: Fri, 16 Jul 2010 13:27:44 +0000 Subject: [issue1218234] inspect.getsource doesn't update when a module is reloaded Message-ID: <1279286864.29.0.39053185259.issue1218234@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: Calling linecache.checkcache for every inspect.getsource call sounds like a fairly bad idea to me. linecache.checkcache does a stat() of every single cached file. ---------- nosy: +exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 15:28:50 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 13:28:50 +0000 Subject: [issue1327971] HTTPResponse instance has no attribute 'fileno' Message-ID: <1279286930.44.0.441072511356.issue1327971@psf.upfronthosting.co.za> Mark Lawrence added the comment: These patches are small and marked as easy, can they be accepted? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 15:32:01 2010 From: report at bugs.python.org (Jean-Paul Calderone) Date: Fri, 16 Jul 2010 13:32:01 +0000 Subject: [issue1218234] inspect.getsource doesn't update when a module is reloaded Message-ID: <1279287121.42.0.621128450279.issue1218234@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: > linecache.checkcache does a stat() of every single cached file. Ah, sorry. I didn't read carefully enough. I see that the patch passes in the filename and checkcache restricts the work it does in that case. Something else to consider, though, is that this change means you'll also get the new source if you *don't* reload the module, too. So, what exactly is inspect.getsource() supposed to be doing? Giving you the current on-disk contents of the relevant source file? Or giving you the actual source corresponding to the object passed to it? If the latter, then this actually needs to be more tightly integrated with module reloading somehow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 15:34:16 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 16 Jul 2010 13:34:16 +0000 Subject: [issue9272] CGIHTTPServer poisons os.environ In-Reply-To: <1279270191.51.0.568678636745.issue9272@psf.upfronthosting.co.za> Message-ID: <1279287256.67.0.755410355407.issue9272@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- components: +Library (Lib) nosy: +orsenthil, r.david.murray type: -> behavior versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 15:39:37 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 13:39:37 +0000 Subject: [issue1396946] %ehrntDRT support for time.strptime Message-ID: <1279287577.33.0.277847437019.issue1396946@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +belopolsky versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 15:49:08 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 16 Jul 2010 13:49:08 +0000 Subject: [issue9272] CGIHTTPServer poisons os.environ In-Reply-To: <1279270191.51.0.568678636745.issue9272@psf.upfronthosting.co.za> Message-ID: <1279288148.98.0.678084076111.issue9272@psf.upfronthosting.co.za> anatoly techtonik added the comment: Patch queue with other minor fixes you may consider useful http://bitbucket.org/techtonik/http.server-patches/qseries ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 15:49:19 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 13:49:19 +0000 Subject: [issue1410680] Add 'surgical editing' to ConfigParser Message-ID: <1279288159.92.0.297668170885.issue1410680@psf.upfronthosting.co.za> Mark Lawrence added the comment: As noone has shown any interest in this for over three years I suggest it is closed as rejected. Note also that #1371075 has been accepted and the OP's comments on msg49354. ---------- nosy: +BreamoreBoy status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 15:54:20 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 16 Jul 2010 13:54:20 +0000 Subject: [issue4499] redefinition of TILDE macro on AIX platform In-Reply-To: <1228258808.76.0.068417078821.issue4499@psf.upfronthosting.co.za> Message-ID: <1279288460.13.0.0803743585667.issue4499@psf.upfronthosting.co.za> R. David Murray added the comment: The define in question by that name still exists in token.h in 3.x. I've added srid to nosy since as an AIX user he probably knows if this is a real problem or not, and Benjamin because he's done a lot with the parser. ---------- nosy: +benjamin.peterson, r.david.murray, srid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 15:55:09 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 16 Jul 2010 13:55:09 +0000 Subject: [issue1410680] Add 'surgical editing' to ConfigParser Message-ID: <1279288509.8.0.207661331547.issue1410680@psf.upfronthosting.co.za> ?ric Araujo added the comment: I want to review and update the patches. I?ll probably have the time to do it in August/September. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 15:56:09 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 16 Jul 2010 13:56:09 +0000 Subject: [issue1410680] Add 'surgical editing' to ConfigParser Message-ID: <1279288569.22.0.727479227351.issue1410680@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- assignee: -> merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 16:04:44 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 16 Jul 2010 14:04:44 +0000 Subject: [issue1410680] Add 'surgical editing' to ConfigParser Message-ID: <1279289084.43.0.0639475152741.issue1410680@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks Brian, I?d forgotten I could assign to me. I feel bound now ---------- versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 16:12:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 16 Jul 2010 14:12:11 +0000 Subject: [issue8252] add a metadata section in setup.cfg In-Reply-To: <1269786516.47.0.241877166963.issue8252@psf.upfronthosting.co.za> Message-ID: <1279289531.03.0.32602668056.issue8252@psf.upfronthosting.co.za> ?ric Araujo added the comment: Update: PEP 390 is made obsolete by PEP 345, so the parts left unspecified are being worked out now. Starting point is proposals collected during PyCon 2010 and published here: http://bitbucket.org/carljm/sample-distutils2-project/src/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 16:16:05 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 14:16:05 +0000 Subject: [issue1428655] Use PyOS_snprintf for static buffers Message-ID: <1279289765.57.0.573968091987.issue1428655@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm torn by this one. Half of me says it's a good thing trying to be fail safe. The other half says it's work for something that hasn't yet happened. Any other views? ---------- nosy: +BreamoreBoy type: -> feature request versions: -Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 16:20:20 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 14:20:20 +0000 Subject: [issue1432343] Description of file-object read() method is wrong. Message-ID: <1279290020.15.0.741116856713.issue1432343@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: -> docs at python nosy: +docs at python versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 16:32:31 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 14:32:31 +0000 Subject: [issue1479611] speed up function calls Message-ID: <1279290751.91.0.99259827125.issue1479611@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm not sure if this is worth pursuing given the way performance is so often governed by networking and/or IO issues today, bearing in mind comments like msg50163 and msg59872. I'd certainly like to see more comments from core developers. Could someone in the know please put them on the nosy list. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 16:38:02 2010 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Fri, 16 Jul 2010 14:38:02 +0000 Subject: [issue1100562] deepcopying listlike and dictlike objects Message-ID: <1279291082.54.0.700515491862.issue1100562@psf.upfronthosting.co.za> Michele Orr? added the comment: Yes. Anyway, to be sure, I've just re-checked on py3.2, py3.1 and py2.7 with last svn revision. I'm pretty sure all works well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 16:48:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 14:48:56 +0000 Subject: [issue1479611] speed up function calls Message-ID: <1279291736.4.0.142475339493.issue1479611@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I think Raymond might be interested. Since this is not a bug fix, it can only be considered for 3.x. ---------- nosy: +belopolsky, rhettinger versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 16:58:03 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 14:58:03 +0000 Subject: [issue1498363] Improve super() objects support for implicit method calls Message-ID: <1279292283.07.0.176916821119.issue1498363@psf.upfronthosting.co.za> Mark Lawrence added the comment: msg50389 asked for this to be discussed on python-dev. I've searched the archives but didn't find anything obvious. Did I simply miss it or was it never discussed? ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 16:59:05 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 16 Jul 2010 14:59:05 +0000 Subject: [issue9272] CGIHTTPServer poisons os.environ In-Reply-To: <1279270191.51.0.568678636745.issue9272@psf.upfronthosting.co.za> Message-ID: <1279292345.68.0.544351082195.issue9272@psf.upfronthosting.co.za> Eric Smith added the comment: The change looks reasonable to me. It needs a test. ---------- nosy: +eric.smith stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 17:12:14 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 15:12:14 +0000 Subject: [issue9267] Update pickle opcode documentation in pickletools for 3.x In-Reply-To: <1279217581.88.0.294098163632.issue9267@psf.upfronthosting.co.za> Message-ID: <1279293134.85.0.777409946746.issue9267@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Just a reminder to myself based on Mark's suggestion on IRC. In TUPLE opcode documentation two-tuple and three-tuple are redundant in summary line. Can be replaced with just tuple without loss of clarity. See r82915. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 17:14:30 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 15:14:30 +0000 Subject: [issue1501979] syntax errors on continuation lines Message-ID: <1279293270.78.0.310037204073.issue1501979@psf.upfronthosting.co.za> Mark Lawrence added the comment: msg84825 asks if this is necessary. Strikes me as being six of one, half a dozen of the other. As few people have shown any interest I'm inclined to close this unless someone pops out of the woodwork. ---------- nosy: +BreamoreBoy status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 17:31:58 2010 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 16 Jul 2010 15:31:58 +0000 Subject: [issue1726208] SimpleHTTPServer extensions_map Message-ID: <1279294318.75.0.0292129985831.issue1726208@psf.upfronthosting.co.za> Eli Bendersky added the comment: I would like to submit a patch here. However, a decision has to be reached as for what to do exactly. The most straightforward approach is remove the extension of types_map in the SimpleHTTPServer code. Is this acceptable, or are there hidden problems? ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 17:35:24 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 15:35:24 +0000 Subject: [issue1513299] Clean up usage of map() in the stdlib Message-ID: <1279294524.84.0.468471583445.issue1513299@psf.upfronthosting.co.za> Mark Lawrence added the comment: msg69981 refers to #3390 which was closed fixed for has_key. As this is similar could this go into 3.2 subject to acceptance? The patch file is really a list of one line changes to get rid of map. ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 17:39:03 2010 From: report at bugs.python.org (Reid Kleckner) Date: Fri, 16 Jul 2010 15:39:03 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1279294743.62.0.436011812335.issue5673@psf.upfronthosting.co.za> Reid Kleckner added the comment: I forgot that I had to tweak the test as well as subprocess.py. I did a .replace('\r', ''), but universal newlines is better. Looking at the open questions I had about the Windows threads, I think it'll be OK if the user follows the pattern of: proc = subprocess.Popen(...) try: stdout, stderr = proc.communicate(timeout=...) except subprocess.TimeoutExpired: proc.kill() stdout, stderr = proc.communicate() If the child process is deadlocked and the user doesn't kill it, then the file descriptors will be leaked and the daemon threads will also live on forever. I *think* that's the worst that could happen. Or they could of course wakeup during interpreter shutdown and cause tracebacks, but that's highly unlikely, and already possible currently. Anyway, I would say we can't avoid leaking the fds in that situation, because we can't know if the user will eventually ask us for the data or not. If they want to avoid the leak, they can clean up after themselves. What's the next step for getting this in? Thanks to those who've taken time to look at this so far. ---------- Added file: http://bugs.python.org/file18028/subprocess-timeout-v5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 17:39:18 2010 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 16 Jul 2010 15:39:18 +0000 Subject: [issue9214] Most Set methods of KeysView and ItemsView do not work right In-Reply-To: <1278703905.18.0.125671722438.issue9214@psf.upfronthosting.co.za> Message-ID: <1279294758.48.0.271859947581.issue9214@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 17:46:08 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 15:46:08 +0000 Subject: [issue1515142] sgmllib should recover from unmatched quotes Message-ID: <1279295168.23.0.535474485642.issue1515142@psf.upfronthosting.co.za> Mark Lawrence added the comment: sgmllib is deprecated, I'll close unless anybody objects. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 17:48:45 2010 From: report at bugs.python.org (Tiago Antao) Date: Fri, 16 Jul 2010 15:48:45 +0000 Subject: [issue9273] 2to to simultaneously do code AND doctests In-Reply-To: <1279295325.63.0.00955742679892.issue9273@psf.upfronthosting.co.za> Message-ID: <1279295325.63.0.00955742679892.issue9273@psf.upfronthosting.co.za> New submission from Tiago Antao : Currently 2to3 has to be called twice in order to do a full code conversion: one for the code and another for the doctests. Would it be possible to do both things simultaneously (on passing a flag)? It would be nice if distutils.command.build_py.build_py_2to3 would also have this functionality (ie a single pass for both code and docutils) Thanks ---------- components: 2to3 (2.x to 3.0 conversion tool) messages: 110457 nosy: tiagoantao priority: normal severity: normal status: open title: 2to to simultaneously do code AND doctests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 17:50:39 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 16 Jul 2010 15:50:39 +0000 Subject: [issue1428655] Use PyOS_snprintf for static buffers Message-ID: <1279295439.55.0.654191318506.issue1428655@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Most usages of sprintf here cannot cause buffer overruns: the output is bounded in size (%d, %8.8x, %.200s), and the buffer is large enough. Moreover, some of them were already replaced by functions of the _FromFormat() family, which can handle unicode for example. IMO the change is not worth it. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 17:55:03 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 15:55:03 +0000 Subject: [issue1428655] Use PyOS_snprintf for static buffers Message-ID: <1279295703.5.0.408440891715.issue1428655@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'll close unless someone puts in a strong bid to keep this open. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 17:55:14 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 Jul 2010 15:55:14 +0000 Subject: [issue1513299] Clean up usage of map() in the stdlib Message-ID: <1279295714.83.0.912153225748.issue1513299@psf.upfronthosting.co.za> Georg Brandl added the comment: I'll have a look. ---------- assignee: anthonybaxter -> georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 18:08:55 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 16:08:55 +0000 Subject: [issue3657] pickle can pickle the wrong function In-Reply-To: <1219561308.34.0.393729548724.issue3657@psf.upfronthosting.co.za> Message-ID: <1279296535.24.0.359760892777.issue3657@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Revision 68903 was merged in py3k in r68908. It looks like a similar issue shows up in test_random: ====================================================================== ERROR: test_pickling (test.test_random.MersenneTwister_TestBasicOps) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_random.py", line 107, in test_pickling state = pickle.dumps(self.gen) File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/pickle.py", line 1358, in dumps Pickler(f, protocol, fix_imports=fix_imports).dump(obj) _pickle.PicklingError: Can't pickle : it's not the same object as random.Random See http://www.python.org/dev/buildbot/all/builders/amd64%20gentoo%203.1/builds/819/steps/test/logs/stdio ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 18:22:20 2010 From: report at bugs.python.org (=?utf-8?q?Matthieu_Labb=C3=A9?=) Date: Fri, 16 Jul 2010 16:22:20 +0000 Subject: [issue459007] Document sys.path on Windows Message-ID: <1279297340.69.0.235123496444.issue459007@psf.upfronthosting.co.za> Changes by Matthieu Labb? : ---------- nosy: +matthieu.labbe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 18:24:05 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 16 Jul 2010 16:24:05 +0000 Subject: [issue3657] pickle can pickle the wrong function In-Reply-To: <1279296535.24.0.359760892777.issue3657@psf.upfronthosting.co.za> Message-ID: <1279297435.3242.3.camel@localhost.localdomain> Antoine Pitrou added the comment: > Revision 68903 was merged in py3k in r68908. It looks like a similar issue shows up in test_random: > > ====================================================================== > ERROR: test_pickling (test.test_random.MersenneTwister_TestBasicOps) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/test/test_random.py", line 107, in test_pickling > state = pickle.dumps(self.gen) > File "/home/buildbot/slave/py-build/3.1.norwitz-amd64/build/Lib/pickle.py", line 1358, in dumps > Pickler(f, protocol, fix_imports=fix_imports).dump(obj) > _pickle.PicklingError: Can't pickle : it's not the same object as random.Random Actually, this might have to do with the fix I committed to test_threaded_import in r82885. In order for test_threaded_import to work, we have to unload the "Guinea pig" module before importing it from several threads at once. For whatever reason, test_threaded_import uses random as its Guinea pig module, which means random gets unloaded and reimported again. But at this point, I must admit I don't even understand the failure message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 19:10:04 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 16 Jul 2010 17:10:04 +0000 Subject: [issue9148] os.execve puts process to background on windows In-Reply-To: <1278156575.44.0.771660264126.issue9148@psf.upfronthosting.co.za> Message-ID: <1279300204.04.0.773706712684.issue9148@psf.upfronthosting.co.za> Eric Smith added the comment: I believe it's true that Windows does not offer process replacement. I'm sure you could perform some tricks by essentially writing your own loader, but the practical answer is no. It might be worth looking into how cygwin implements exec(). ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 19:21:15 2010 From: report at bugs.python.org (Eric Promislow) Date: Fri, 16 Jul 2010 17:21:15 +0000 Subject: [issue9274] code.InteractiveInterpreter fails to change locals when invoked in a function In-Reply-To: <1279300874.85.0.408315798568.issue9274@psf.upfronthosting.co.za> Message-ID: <1279300874.85.0.408315798568.issue9274@psf.upfronthosting.co.za> New submission from Eric Promislow : Similar to bug http://bugs.python.org/issue5215 which found a workaround in pdb. Here I want to use code.InteractiveInterpreter to modify code interactively (see Komodo bug http://bugs.activestate.com/show_bug.cgi?id=87405 ) I can do this at the top-level, but not inside a function. The attached file shows the problem: ---------- components: Interpreter Core files: bug87405a.py messages: 110464 nosy: ericp priority: normal severity: normal status: open title: code.InteractiveInterpreter fails to change locals when invoked in a function type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file18029/bug87405a.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 19:45:54 2010 From: report at bugs.python.org (Ned Deily) Date: Fri, 16 Jul 2010 17:45:54 +0000 Subject: [issue9275] python 2.7 OS X installer no longer installs /usr/local/bin symlinks by default In-Reply-To: <1279302354.45.0.244219891996.issue9275@psf.upfronthosting.co.za> Message-ID: <1279302354.45.0.244219891996.issue9275@psf.upfronthosting.co.za> New submission from Ned Deily : For 2.7, the set of default installed packages for the OS installer was changed for some reason to no longer select the "UNIX command-line tools" package by default so the traditional symlinks in /usr/local/bin are not being created by default. This is a change in behavior from previous installers and the installer README files were not updated to reflect this change. Users are confused by this, see for example: http://stackoverflow.com/questions/3266005/why-arent-the-python-2-7-command-line-tools-located-in-usr-local-bin-on-mac-o/ Suggest reverting the change in behavior so that the symlinks are again installed by default. ---------- assignee: ronaldoussoren components: Installation, Macintosh messages: 110465 nosy: ned.deily, ronaldoussoren priority: normal severity: normal status: open title: python 2.7 OS X installer no longer installs /usr/local/bin symlinks by default versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 20:00:38 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 18:00:38 +0000 Subject: [issue9267] Update pickle opcode documentation in pickletools for 3.x In-Reply-To: <1279217581.88.0.294098163632.issue9267@psf.upfronthosting.co.za> Message-ID: <1279303238.5.0.966189764928.issue9267@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: >From IRC: Sasha: What's the current status of pickling float inf, nan, -0.0, etc.? Mark: In py3k and release27-maint, there shouldn't be any issues with any of those. Same with release31-maint. In release26-maint, pickling infinities and nans on windows using protocol 0 is problematic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 20:03:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 18:03:20 +0000 Subject: [issue9267] Update pickle opcode documentation in pickletools for 3.x In-Reply-To: <1279217581.88.0.294098163632.issue9267@psf.upfronthosting.co.za> Message-ID: <1279303400.8.0.127664022381.issue9267@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- dependencies: +cPickle can misread data type _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 20:17:59 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 16 Jul 2010 18:17:59 +0000 Subject: [issue9268] Add annotation option to pickletools.dis In-Reply-To: <1279222638.31.0.459529413565.issue9268@psf.upfronthosting.co.za> Message-ID: <1279304279.78.0.732994269026.issue9268@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Perhaps the annotations should be wrapped at 78 chars/line, for improved readability? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 20:34:23 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 16 Jul 2010 18:34:23 +0000 Subject: [issue9274] code.InteractiveInterpreter fails to change locals when invoked in a function In-Reply-To: <1279300874.85.0.408315798568.issue9274@psf.upfronthosting.co.za> Message-ID: <1279305263.41.0.0823095660735.issue9274@psf.upfronthosting.co.za> R. David Murray added the comment: Apparently I can't even see the activestate bug without creating an account there, so posting a link to it is not helpful. Please post more details about how you are calling InteractiveInterpreter and what the problem is that you are observing. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 20:34:35 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 18:34:35 +0000 Subject: [issue9268] Add annotation option to pickletools.dis In-Reply-To: <1279222638.31.0.459529413565.issue9268@psf.upfronthosting.co.za> Message-ID: <1279305275.94.0.864495758751.issue9268@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > Perhaps the annotations should be wrapped at 78 chars/line .. I don't know. With deeply nested pickles, annotations may not even start before column 80. I think further improvement in alignment and layout algorithms will show diminishing returns. If I were to invest an effort into this, I would share it with dis.dis. You can see how larger pickles look by running pickletools -a 27.bench with a pickle from issue5180. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 20:39:26 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 16 Jul 2010 18:39:26 +0000 Subject: [issue3657] pickle can pickle the wrong function In-Reply-To: <1219561308.34.0.393729548724.issue3657@psf.upfronthosting.co.za> Message-ID: <1279305566.24.0.0133539323324.issue3657@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It should be noted that, contrary to Amaury's suggestion, pickling random.seed fails under 3.x: >>> pickle.dumps(random.seed) Traceback (most recent call last): File "", line 1, in File "/home/antoine/py3k/__svn__/Lib/pickle.py", line 1314, in dumps Pickler(f, protocol, fix_imports=fix_imports).dump(obj) _pickle.PicklingError: Can't pickle : attribute lookup builtins.method failed Furthermore, the original problem can also be reproduced under 3.x, using Amaury's trick: >>> pickle.dumps(random.random) b'\x80\x03crandom\nrandom\nq\x00.' >>> list(sys.modules.values())[0].random = random.random >>> pickle.dumps(random.random) b'\x80\x03cheapq\nrandom\nq\x00.' I think a possible heuristic in whichmodule() would be, if __module__ is not found or None, to look for a __module__ attribute on __self__: >>> random.random.__module__ >>> random.random.__self__.__module__ 'random' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 20:57:00 2010 From: report at bugs.python.org (Eric Promislow) Date: Fri, 16 Jul 2010 18:57:00 +0000 Subject: [issue9274] code.InteractiveInterpreter fails to change locals when invoked in a function In-Reply-To: <1279300874.85.0.408315798568.issue9274@psf.upfronthosting.co.za> Message-ID: <1279306620.09.0.566662656474.issue9274@psf.upfronthosting.co.za> Eric Promislow added the comment: I've modified the bug status so anyone can read it. You don't need an account to read ActiveState bugs, only to add or comment on one. Please note that I closed bug http://bugs.activestate.com/show_bug.cgi?id=87405, as we're now writing to frame->f_localsplus[] to make sure changes to locals stick. I logged a different bug on Komodo's dependence on this bug at http://bugs.activestate.com/show_bug.cgi?id=87417 ------------------------------------------------- Here's how we run into this bug: In Komodo, while you're debugging, you can push an interactive shell, that uses the current state of the program. We build each block of code the user types in a variable called source, and try executing it like so: code.InteractiveInterpreter(locals()).runsource(source, "") In other words, we're letting the Python core do all the heavy lifting identifying multi-line stmts, indented blocks, etc. We've had problems with modifying local variables in the Python debugger for years (almost a decade now). I got a C extension working using frame->f_localsplus to make sure modifications are persisted, but noticed that changes in the interactive shell weren't being persisted. I distilled the code we use into the attached file, which shows that changes aren't being persisted here. I'm not an expert on core internals, but I suspect that python code "locals()" maps to C code "frame->f_locals", and we still have the problem that inside functions, frame->f_locals is a temporary object that is rebuilt on each access. From what I've observed, frame->f_localsplus points to the actual items, and these are the pointers that need to be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 21:17:47 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 16 Jul 2010 19:17:47 +0000 Subject: [issue3657] pickle can pickle the wrong function In-Reply-To: <1219561308.34.0.393729548724.issue3657@psf.upfronthosting.co.za> Message-ID: <1279307867.75.0.510899042011.issue3657@psf.upfronthosting.co.za> Mark Dickinson added the comment: Antoine's fix in r82919 / r82920 fixes the test_random failure for me. (Before the fix, ./python.exe ./Lib/test/regrtest.py test___all__ test_threaded_import test_random was enough to produce the failure.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 21:25:20 2010 From: report at bugs.python.org (Jean-Paul Calderone) Date: Fri, 16 Jul 2010 19:25:20 +0000 Subject: [issue9276] pickle should support methods In-Reply-To: <1279308320.41.0.159043379114.issue9276@psf.upfronthosting.co.za> Message-ID: <1279308320.41.0.159043379114.issue9276@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : pickle doesn't support methods: >>> class x: ... def y(self): ... pass ... >>> import pickle >>> pickle.dumps(x.y) Traceback (most recent call last): File "", line 1, in File "/home/exarkun/Projects/python/branches/py3k/Lib/pickle.py", line 1314, in dumps Pickler(f, protocol, fix_imports=fix_imports).dump(obj) _pickle.PicklingError: Can't pickle : attribute lookup builtins.function failed It would be easy to fix this, though. Here's a link to some code that implements it: http://twistedmatrix.com/trac/browser/trunk/twisted/persisted/styles.py?rev=1 ---------- components: Library (Lib) messages: 110473 nosy: exarkun priority: normal severity: normal status: open title: pickle should support methods type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 21:26:53 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 16 Jul 2010 19:26:53 +0000 Subject: [issue558238] Pickling bound methods Message-ID: <1279308413.11.0.0502239733742.issue558238@psf.upfronthosting.co.za> Antoine Pitrou added the comment: See also issue3657. For some reasons, C bound methods aliased as module globals can be pickled, but not similarly aliased Python bound methods: >>> random.random, random.seed (, >) >>> pickle.dumps(random.random) b'\x80\x03crandom\nrandom\nq\x00.' >>> pickle.dumps(random.seed) Traceback (most recent call last): File "", line 1, in File "/home/antoine/py3k/__svn__/Lib/pickle.py", line 1314, in dumps Pickler(f, protocol, fix_imports=fix_imports).dump(obj) _pickle.PicklingError: Can't pickle : attribute lookup builtins.method failed ---------- assignee: loewis -> nosy: +belopolsky, pitrou stage: -> needs patch versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 21:33:16 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 19:33:16 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279308796.08.0.32731244501.issue9079@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: OK, can someone show me an example of how functions defined in core Python can be made available to extension modules? I thought I could model pytime.h/.c after pymath.h/.c, but the later is not used in extension modules. I must be missing something trivial here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 21:36:45 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 16 Jul 2010 19:36:45 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1279308796.08.0.32731244501.issue9079@psf.upfronthosting.co.za> Message-ID: <1279309000.3242.9.camel@localhost.localdomain> Antoine Pitrou added the comment: > OK, can someone show me an example of how functions defined in core > Python can be made available to extension modules? I thought I could > model pytime.h/.c after pymath.h/.c, but the later is not used in > extension modules. I must be missing something trivial here. You should just need to #include "pytime.h" from Include/Python.h. Actually, pymath.h is already included from there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 21:45:29 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 19:45:29 +0000 Subject: [issue1100562] deepcopying listlike and dictlike objects Message-ID: <1279309529.55.0.967950052586.issue1100562@psf.upfronthosting.co.za> Mark Lawrence added the comment: Michele, thanks for your prompt response. I should of course have said "I'm making this a behaviour type", sorry. alexandre, could you please comment on whether the patches are acceptable or not, thanks. ---------- nosy: +alexandre.vassalotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 21:51:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 19:51:40 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279309900.42.0.398420184869.issue9079@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: No it must be something else. Attached issue9079-fail.diff fails with Symbol not found: __PyTime_gettimeofday Referenced from: .../build/lib.macosx-10.4-x86_64-3.2-pydebug/datetime.so even though it is in pytime.o $ nm ./Python/pytime.o 00000000000009f0 s EH_frame1 0000000000000000 T __PyTime_gettimeofday 0000000000000a08 S __PyTime_gettimeofday.eh U _gettimeofday U _time ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 21:52:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 19:52:23 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279309943.02.0.0636866860464.issue9079@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file18030/issue9079-fail.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 21:57:11 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 16 Jul 2010 19:57:11 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1279309900.42.0.398420184869.issue9079@psf.upfronthosting.co.za> Message-ID: <1279310225.3242.10.camel@localhost.localdomain> Antoine Pitrou added the comment: Le vendredi 16 juillet 2010 ? 19:51 +0000, Alexander Belopolsky a ?crit : > Alexander Belopolsky added the comment: > > No it must be something else. Attached issue9079-fail.diff fails with Here it fails earlier: gcc -pthread -c -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Python/structmember.o Python/structmember.c Python/pytime.c: In function ?_PyTime_gettimeofday?: Python/pytime.c:37: erreur: storage size of ?t? isn?t known Python/pytime.c:38: attention : implicit declaration of function ?ftime? Python/pytime.c:37: attention : unused variable ?t? make: *** [Python/pytime.o] Erreur 1 make: *** Attente des t?ches non termin?es.... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 21:59:43 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 19:59:43 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279310383.86.0.977345637777.issue9079@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Antoine, you must be building on Windows. I'll try to guess where ftime is defined and repost the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 21:59:54 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 19:59:54 +0000 Subject: [issue459007] Document sys.path on Windows Message-ID: <1279310394.59.0.620655860485.issue459007@psf.upfronthosting.co.za> Mark Lawrence added the comment: Tim, Brian I've added you to the nosy list as I think you could assist. Unless I get a response within the next 10 years I will close this as "out of date" ---------- nosy: +BreamoreBoy, brian.curtin, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 22:02:14 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 16 Jul 2010 20:02:14 +0000 Subject: [issue3657] pickle can pickle the wrong function In-Reply-To: <1219561308.34.0.393729548724.issue3657@psf.upfronthosting.co.za> Message-ID: <1279310534.37.0.70376770297.issue3657@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: -tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 22:07:33 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 Jul 2010 20:07:33 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279310853.57.0.394285047976.issue9079@psf.upfronthosting.co.za> Georg Brandl added the comment: I'd like to help diagnose but I don't know what "Erreur 1" means. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 22:10:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 16 Jul 2010 20:10:16 +0000 Subject: [issue459007] Document sys.path on Windows Message-ID: <1279311016.75.0.36527608575.issue459007@psf.upfronthosting.co.za> ?ric Araujo added the comment: Out of date seems an inaccurate status to me. Bugs may take weeks to years to be fixed. This one is tagged easy (according to amk in msg73954), so perhaps someone will have a go at it during a Bug Day or a spring, or one of the docs people will just do it (e.g. me after my summer job). ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 22:10:11 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 20:10:11 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279311011.54.0.224016234434.issue9079@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I fixed the ftime issue (I hope), but the build still fails. I did not test on Linux, but I tested on OSX with HAVE_FTIME. Replacing the failing patch. ---------- Added file: http://bugs.python.org/file18031/issue9079-fail.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 22:10:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 20:10:18 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279311018.95.0.313688500174.issue9079@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file18030/issue9079-fail.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 22:11:26 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 16 Jul 2010 20:11:26 +0000 Subject: [issue9277] test_struct failure on ARM In-Reply-To: <1279311086.16.0.957118455274.issue9277@psf.upfronthosting.co.za> Message-ID: <1279311086.16.0.957118455274.issue9277@psf.upfronthosting.co.za> New submission from Mark Dickinson : test_struct currently fails on the ARM buildbots; see: http://www.python.org/dev//buildbot/builders/ARMv4%20Debian%203.x/builds/275/steps/test/logs/stdio ====================================================================== FAIL: test_bool (test.test_struct.StructTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea-armeabi/3.x.klose-linux-armeabi/build/Lib/test/test_struct.py", line 521, in test_bool "ExplodingBool())" % (prefix + '?')) AssertionError: Expected IOError: struct.pack('>?', ExplodingBool()) ---------- components: Extension Modules keywords: buildbot messages: 110485 nosy: mark.dickinson priority: normal severity: normal status: open title: test_struct failure on ARM versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 22:12:30 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 16 Jul 2010 20:12:30 +0000 Subject: [issue459007] Document sys.path on Windows Message-ID: <1279311150.88.0.221147374857.issue459007@psf.upfronthosting.co.za> ?ric Araujo added the comment: s/spring/sprint/ :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 22:16:51 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 16 Jul 2010 20:16:51 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1279311411.85.0.853690166966.issue5673@psf.upfronthosting.co.za> Brian Curtin added the comment: The pattern you mention should probably be documented as an example, if that's how we intend for people to use it. Other than that, I've got nothing else here. ---------- assignee: -> rnk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 22:24:08 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 20:24:08 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279311848.37.0.2141477376.issue9079@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Removing spurious configure change from the "fail" patch. ---------- Added file: http://bugs.python.org/file18032/issue9079-fail.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 22:24:14 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 20:24:14 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279311854.55.0.213330534666.issue9079@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file18031/issue9079-fail.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 22:29:21 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 16 Jul 2010 20:29:21 +0000 Subject: [issue9277] test_struct failure on ARM In-Reply-To: <1279311086.16.0.957118455274.issue9277@psf.upfronthosting.co.za> Message-ID: <1279312161.6.0.857230093277.issue9277@psf.upfronthosting.co.za> Mark Dickinson added the comment: I don't really know where to start with this. At the point of failure, struct.pack('?', so it's a bit mystifying that one of these fails while the other passes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 22:36:33 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 20:36:33 +0000 Subject: [issue1524639] Fix Tkinter Tcl-commands memory-leaks Message-ID: <1279312593.77.0.321739168178.issue1524639@psf.upfronthosting.co.za> Mark Lawrence added the comment: Given the current debate on python-dev regarding IDLE and its dependancy on tkinter, surely something as serious as a memory leak should be looked into. ---------- assignee: loewis -> nosy: +BreamoreBoy, tjreedy type: -> behavior versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 22:42:53 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 20:42:53 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279312973.43.0.533249216347.issue9079@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It looks like my reluctance to add gettimeofday to core without using it there was well founded. Simply adding a dummy call to _PyTime_gettimeofday in main() fixed the build problem. This is a hack, of course, so I am still looking for suggestions on how to make this work. =================================================================== --- Modules/python.c (revision 82921) +++ Modules/python.c (working copy) @@ -34,6 +34,8 @@ m = fpgetmask(); fpsetmask(m & ~FP_X_OFL); #endif + struct timeval tv; + _PyTime_gettimeofday(&tv); if (!argv_copy || !argv_copy2) { fprintf(stderr, "out of memory\n"); return 1; ---------- Added file: http://bugs.python.org/file18033/issue9079-builds.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 22:51:21 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 20:51:21 +0000 Subject: [issue1528167] Tweak to make string.Templates more customizable Message-ID: <1279313481.57.0.183872619025.issue1528167@psf.upfronthosting.co.za> Mark Lawrence added the comment: Anybody interested in this, if not I'll close it. ---------- nosy: +BreamoreBoy status: open -> pending versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 22:56:08 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 16 Jul 2010 20:56:08 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1279312973.43.0.533249216347.issue9079@psf.upfronthosting.co.za> Message-ID: <1279313763.3242.23.camel@localhost.localdomain> Antoine Pitrou added the comment: > It looks like my reluctance to add gettimeofday to core without using > it there was well founded. Simply adding a dummy call to > _PyTime_gettimeofday in main() fixed the build problem. It's rather strange. I'm sure we have external API functions which never get called in the core. Just a couple of attempts found one candidate: $ grep -r _PyImport_IsScript Modules/ Objects/ Python/ Include/ Python/import.c:1804:PyAPI_FUNC(int) _PyImport_IsScript(struct filedescr * fd) Include/import.h:43:PyAPI_FUNC(int) _PyImport_IsScript(struct filedescr *); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 22:58:20 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 16 Jul 2010 20:58:20 +0000 Subject: [issue9222] IDLE: Fix open/saveas 'Files of type' choices In-Reply-To: <1278809052.13.0.969100167059.issue9222@psf.upfronthosting.co.za> Message-ID: <1279313900.18.0.183930846504.issue9222@psf.upfronthosting.co.za> Terry J. Reedy added the comment: gp, do you see any reason not to commit this? If not, could you do so? ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 22:58:47 2010 From: report at bugs.python.org (Mark Hammond) Date: Fri, 16 Jul 2010 20:58:47 +0000 Subject: [issue459007] Document sys.path on Windows Message-ID: <1279313927.14.0.314410837293.issue459007@psf.upfronthosting.co.za> Mark Hammond added the comment: FWIW, I think the rules are fairly well explained in the comments in PC/getpathp.c; last time I looked at this, the only thing I couldn't really decide was where in the official docs these comments should be put (after reformatting and minor rewording etc) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 23:00:44 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 16 Jul 2010 21:00:44 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1279313763.3242.23.camel@localhost.localdomain> Message-ID: <1279314040.3242.26.camel@localhost.localdomain> Antoine Pitrou added the comment: > > It looks like my reluctance to add gettimeofday to core without using > > it there was well founded. Simply adding a dummy call to > > _PyTime_gettimeofday in main() fixed the build problem. > > It's rather strange. I'm sure we have external API functions which never > get called in the core. Just a couple of attempts found one candidate: Hmm, after thinking about it, what happens is that the C object file is not used at all, so it's probably optimized away by the linker. In any case, you could use the new API in Python/thread_pthread.h. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 23:02:02 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 21:02:02 +0000 Subject: [issue1533105] NetBSD build with --with-pydebug causes SIGSEGV Message-ID: <1279314122.34.0.130297016682.issue1533105@psf.upfronthosting.co.za> Mark Lawrence added the comment: msg29427 gives an inline patch to code. The patches attached are strictly to docs. Can we please have a staement as to the status of this issue so that we can go forward. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 23:11:29 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 16 Jul 2010 21:11:29 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279314689.86.0.15378459876.issue9079@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Hmm, after thinking about it, what happens is that the C object file is > not used at all, so it's probably optimized away by the linker. That sounds right. I recall similar problems with pymath.c at one stage: none of the functions it defined was being used in the core, so it didn't get compiled into the python executable and the build failed similarly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 23:13:55 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 21:13:55 +0000 Subject: [issue1555570] email parser incorrectly breaks headers with a CRLF at 8192 Message-ID: <1279314835.36.0.463560434302.issue1555570@psf.upfronthosting.co.za> Mark Lawrence added the comment: There are repeated statements that this impacts on Django which I understand is high profile. Can we find the resources to review the patches and get things moving, none of the attached patch files are that large? ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 23:20:23 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 21:20:23 +0000 Subject: [issue1569291] Speed-up in array_repeat() Message-ID: <1279315223.16.0.239163946824.issue1569291@psf.upfronthosting.co.za> Mark Lawrence added the comment: There are lots of positive comments on this issue, please can core developers take a bit of time to have a look and say yes or no. ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 23:21:53 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 Jul 2010 21:21:53 +0000 Subject: [issue1569291] Speed-up in array_repeat() Message-ID: <1279315313.66.0.374097531581.issue1569291@psf.upfronthosting.co.za> Georg Brandl added the comment: Uh, this slipped under my radar. Let's see if I get the chance to look at it at the core sprint next week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 23:30:29 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 21:30:29 +0000 Subject: [issue1573931] WSGI, cgi.FieldStorage incompatibility Message-ID: <1279315829.62.0.716871676368.issue1573931@psf.upfronthosting.co.za> Mark Lawrence added the comment: Practicality beats purity? The patch contains an enhancement to the unit test for cgi. Provided this gets past regrtest on all platforms why can't we go for it? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 23:34:29 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Fri, 16 Jul 2010 21:34:29 +0000 Subject: [issue9278] rename 2to3 to 2to3.py In-Reply-To: <1279316069.22.0.0186321125783.issue9278@psf.upfronthosting.co.za> Message-ID: <1279316069.22.0.0186321125783.issue9278@psf.upfronthosting.co.za> New submission from Sridhar Ratnakumar : C:\>c:\Python26\Tools\scripts\2to3 'c:\Python26\Tools\scripts\2to3' is not recognized as an internal or external command, operable program or batch file. All other scripts in Tools\scripts directory have .py extension. Only 2to3 doesn't. ---------- components: 2to3 (2.x to 3.0 conversion tool), Windows messages: 110503 nosy: srid priority: normal severity: normal status: open title: rename 2to3 to 2to3.py 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 Jul 16 23:35:19 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Fri, 16 Jul 2010 21:35:19 +0000 Subject: [issue9278] rename 2to3 & pydoc to 2to3.py & pydoc.py In-Reply-To: <1279316069.22.0.0186321125783.issue9278@psf.upfronthosting.co.za> Message-ID: <1279316119.6.0.658738563408.issue9278@psf.upfronthosting.co.za> Sridhar Ratnakumar added the comment: (Same for pydoc) ---------- title: rename 2to3 to 2to3.py -> rename 2to3 & pydoc to 2to3.py & pydoc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 23:41:27 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 16 Jul 2010 21:41:27 +0000 Subject: [issue9279] get rid of pdb.doc In-Reply-To: <1279316487.65.0.399467366411.issue9279@psf.upfronthosting.co.za> Message-ID: <1279316487.65.0.399467366411.issue9279@psf.upfronthosting.co.za> New submission from Georg Brandl : Put it into pdb.__doc__ instead. ---------- assignee: georg.brandl components: Library (Lib) keywords: easy messages: 110505 nosy: georg.brandl priority: normal severity: normal status: open title: get rid of pdb.doc versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 23:43:46 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 21:43:46 +0000 Subject: [issue1613500] Write mode option for fileinput module. Message-ID: <1279316626.81.0.201463025767.issue1613500@psf.upfronthosting.co.za> Mark Lawrence added the comment: This looks like a sizeable patch but the bulk of the changes are to test_fileinput.py. Assigning to myself to take forward, I've got to start sometime. Before I really start moving are there any basic objections to either the original proposal or me having a bash? ---------- assignee: -> BreamoreBoy nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 23:44:49 2010 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 16 Jul 2010 21:44:49 +0000 Subject: [issue9222] IDLE: Fix open/saveas 'Files of type' choices In-Reply-To: <1278809052.13.0.969100167059.issue9222@psf.upfronthosting.co.za> Message-ID: <1279316689.72.0.828380897127.issue9222@psf.upfronthosting.co.za> Guilherme Polo added the comment: I remember about another issue regarding extensions and save-as/open dialog boxes. Let me try to find it, just to be sure that the problem described here is different. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 23:52:22 2010 From: report at bugs.python.org (Reid Kleckner) Date: Fri, 16 Jul 2010 21:52:22 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279317142.86.0.0658018072861.issue9079@psf.upfronthosting.co.za> Reid Kleckner added the comment: Right, it's one of the peculiarities of archive files (I think). When none of an object file's symbols are used from the main program, the object file is dropped on the floor, ie not included. This has bizarre consequences in C++ with static initializers, which get dropped. On Windows, the PyAPI_FUNC macros should prevent the linker from stripping the datetime stuff. Jeff Yasskin says you should create a noop function in your object file and call it from PyMain for force linkage of the object file you're building. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 23:57:20 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 16 Jul 2010 21:57:20 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1279317142.86.0.0658018072861.issue9079@psf.upfronthosting.co.za> Message-ID: <1279317435.3242.29.camel@localhost.localdomain> Antoine Pitrou added the comment: > Jeff Yasskin says you should create a noop function in your object > file and call it from PyMain for force linkage of the object file > you're building. Indeed, something like _PyTime_Init(). I don't think Modules/python.c is a good place though, since it means that applications embedding Python won't get the symbol. Perhaps Python/pythonrun.c instead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 23:57:58 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 21:57:58 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279317478.49.0.970977135641.issue9079@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Reid, I am leaning towards reverting to Plan A (issue9079.diff). Would your use case be served well by a _time module exposing C API via a capsule? This what datetime does currently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 16 23:58:11 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 21:58:11 +0000 Subject: [issue1615158] POSIX capabilities support Message-ID: <1279317491.04.0.82297477974.issue1615158@psf.upfronthosting.co.za> Mark Lawrence added the comment: Matt Kern has put a lot of work into the attached patches from what I can see. Common courtesy suggests that someone make an effort to review his work which now can only go into 3.2. I would take it on myself but know nothing about POSIX and still find the Python C API intimidating. ---------- nosy: +BreamoreBoy versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 00:06:37 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 22:06:37 +0000 Subject: [issue1617161] Instance methods compare equal when their self's are equal Message-ID: <1279317997.67.0.260298851602.issue1617161@psf.upfronthosting.co.za> Mark Lawrence added the comment: msg84597 is ambiguous. At first readng I thought it meant "the patches have been committed to trunk and py3k". Second time I think it means "yes this is still a problem". What is the status? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 00:07:36 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 16 Jul 2010 22:07:36 +0000 Subject: [issue9278] rename 2to3 & pydoc to 2to3.py & pydoc.py In-Reply-To: <1279316069.22.0.0186321125783.issue9278@psf.upfronthosting.co.za> Message-ID: <1279318056.95.0.289921299917.issue9278@psf.upfronthosting.co.za> R. David Murray added the comment: That's because, unlike the other tools, they actually get installed as commands. ---------- nosy: +benjamin.peterson, r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 00:10:56 2010 From: report at bugs.python.org (Guilherme Polo) Date: Fri, 16 Jul 2010 22:10:56 +0000 Subject: [issue9222] IDLE: Fix open/saveas 'Files of type' choices In-Reply-To: <1278809052.13.0.969100167059.issue9222@psf.upfronthosting.co.za> Message-ID: <1279318256.0.0.950812642047.issue9222@psf.upfronthosting.co.za> Guilherme Polo added the comment: I was thinking of issue4832. The patch provided here seems fine to me, although the behavior remains the same in Mac. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 00:18:12 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 22:18:12 +0000 Subject: [issue1621421] normalize namespace from minidom Message-ID: <1279318692.8.0.570791136319.issue1621421@psf.upfronthosting.co.za> Mark Lawrence added the comment: msg51609 doesn't seem too enthusiastic about the patch. msg84599 states unit tests are provided and #1371937 is fixed. Can we have a definitive statement as to whether the patch is acceptable or not. ---------- nosy: +BreamoreBoy versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 00:20:41 2010 From: report at bugs.python.org (Reid Kleckner) Date: Fri, 16 Jul 2010 22:20:41 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279318841.7.0.0692847731279.issue9079@psf.upfronthosting.co.za> Reid Kleckner added the comment: I'd really rather not try to rely module loading from a threading primitive. :) I think if you follow Antoine's suggestion of adding _PyTime_Init (which does nothing in the body other than a comment) it should work fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 00:21:38 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 16 Jul 2010 22:21:38 +0000 Subject: [issue1615158] POSIX capabilities support Message-ID: <1279318898.55.0.405290687971.issue1615158@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 00:28:43 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 22:28:43 +0000 Subject: [issue1648268] Parameter list mismatches (portation problem) Message-ID: <1279319323.4.0.45707026765.issue1648268@psf.upfronthosting.co.za> Mark Lawrence added the comment: It appears that in principle this patch is acceptable but I believe that it will need pretty thorough checking from a core developer before going anywhere. It's certainly not in my league, anyone up for it? ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 00:29:22 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 16 Jul 2010 22:29:22 +0000 Subject: [issue1617161] Instance methods compare equal when their self's are equal Message-ID: <1279319362.23.0.0356968133279.issue1617161@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I believe "Confirmed in trunk and py3k." means that the issue was verified to exist in trunk and py3k branches at the time of the message. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 00:32:22 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 22:32:22 +0000 Subject: [issue1650090] doctest doesn't find nested functions Message-ID: <1279319542.26.0.652723215507.issue1650090@psf.upfronthosting.co.za> Mark Lawrence added the comment: I believe that there could be interest in this, has anyone taken over doctest from tim_one? ---------- assignee: tim_one -> nosy: +BreamoreBoy type: performance -> behavior versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 00:37:51 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 22:37:51 +0000 Subject: [issue1654367] [PATCH] Debuggers need a way to change the locals of a frame Message-ID: <1279319871.67.0.813565742716.issue1654367@psf.upfronthosting.co.za> Mark Lawrence added the comment: Fabio, could you please supply a patch as requested by Martin in msg55004? Also note Armin's comments in msg55005. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 00:40:23 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 22:40:23 +0000 Subject: [issue1659410] Minor AST tweaks Message-ID: <1279320023.58.0.840218215551.issue1659410@psf.upfronthosting.co.za> Mark Lawrence added the comment: Collin, are you in a position where you could take this issue forward? ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 00:49:23 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 22:49:23 +0000 Subject: [issue1672568] silent error in email.message.Message.get_payload Message-ID: <1279320563.48.0.74398100693.issue1672568@psf.upfronthosting.co.za> Mark Lawrence added the comment: To me a bug is a bug is a bug, but I'm sure there are different opinions so feel free to swap this back to feature request if you think that fits. I'll try and have a crack at this tomorrow. ---------- nosy: +BreamoreBoy type: feature request -> behavior versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 01:08:46 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 16 Jul 2010 23:08:46 +0000 Subject: [issue9274] code.InteractiveInterpreter fails to change locals when invoked in a function In-Reply-To: <1279300874.85.0.408315798568.issue9274@psf.upfronthosting.co.za> Message-ID: <1279321726.22.0.176177214762.issue9274@psf.upfronthosting.co.za> R. David Murray added the comment: locals() does not give you a copy of the locals dictionary that you can modify and expect the values to affect the actual locals they were copied from. This is documented: http://docs.python.org/library/functions.html#locals You would need to pass InteractiveInterpreter the "real" locals dict from the frame to make your code work, and it sounds like you've already done this. However, I don't believe that this is going to work in the general case (eg: in the face of nested scopes), which is why locals() is not updatable. The use case for InteractiveInterpreter is implementing a python-command-line-like utility, and thus has no need to update the locals in the current function. A doc note about this in InteractiveInterpreter along the lines of the one in the 'exec' docs is almost certainly appropriate, so I'll leave this open as a doc bug. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 01:14:48 2010 From: report at bugs.python.org (Eric Promislow) Date: Fri, 16 Jul 2010 23:14:48 +0000 Subject: [issue9274] code.InteractiveInterpreter fails to change locals when invoked in a function In-Reply-To: <1279300874.85.0.408315798568.issue9274@psf.upfronthosting.co.za> Message-ID: <1279322088.55.0.113144414925.issue9274@psf.upfronthosting.co.za> Eric Promislow added the comment: Thanks for the response. Note that our use case *is* to implement Python-console functionality, but sometimes we do this in the context of a currently running Python program, inside a function. That's why I wrote the repro that way. Using code.InteractiveInterpreter(locals()).runsource(...) in a function corresponds to interacting with the debugger in a function, while the second call to runsource() corresponds to interacting with the program when it's stepping through top-level code. Keep in mind that all of this takes place while control flow of the main program is stuck in the debugger's read-eval-print loop. It would be useful if there was a way of accessing the localsplus container in Python code ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 01:23:13 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 16 Jul 2010 23:23:13 +0000 Subject: [issue9274] code.InteractiveInterpreter fails to change locals when invoked in a function In-Reply-To: <1279300874.85.0.408315798568.issue9274@psf.upfronthosting.co.za> Message-ID: <1279322593.99.0.840382080636.issue9274@psf.upfronthosting.co.za> R. David Murray added the comment: Well, you could discuss that possibility on python-dev, I suppose. As long as you don't need the changes to persist outside of the debugging loop, you can use InteractiveInterpreter as designed and keep passing it the same (modified) dict every time, as was done in the pdb fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 01:29:52 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 16 Jul 2010 23:29:52 +0000 Subject: [issue1672568] silent error in email.message.Message.get_payload Message-ID: <1279322992.93.0.159666749992.issue1672568@psf.upfronthosting.co.za> R. David Murray added the comment: No, it's not a bug if it is working as documented. (Well, it might be a design bug, but fixes to those are called "feature requests" :) We're planning on addressing this is email6, by the way. I'm OK with trying to get this into 3.2, but I'll be giving higher priority to bugs. ---------- type: behavior -> feature request versions: -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 01:31:32 2010 From: report at bugs.python.org (Eric Promislow) Date: Fri, 16 Jul 2010 23:31:32 +0000 Subject: [issue9274] code.InteractiveInterpreter fails to change locals when invoked in a function In-Reply-To: <1279300874.85.0.408315798568.issue9274@psf.upfronthosting.co.za> Message-ID: <1279323092.32.0.0634079718887.issue9274@psf.upfronthosting.co.za> Eric Promislow added the comment: David, that won't work for a reason I'll get into in a bit. I would drop the priority of this ... Komodo has a had a Python debugger since late 2000, we only fixed updating variables while debugging (using the variable viewer) yesterday, and received fewer than 10 complaints about that over the years. While looking at the code, something seemed wrong with our handling of the variables in the interactive shell. I tested it, and it failed, and then wrote the standalone Python code to isolate the problem. Your solution will work sometimes, but not completely. When you're in interactive mode while debugging, you can type arbitrary Python code, but can also use the variable viewer in the UI to change variables. These two functions are handled by different code paths. My recommendation is to resolve this as a limitation, and document the module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 01:45:14 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 23:45:14 +0000 Subject: [issue1673007] urllib2 requests history + HEAD support Message-ID: <1279323914.6.0.33313961437.issue1673007@psf.upfronthosting.co.za> Mark Lawrence added the comment: Seems to be +1 for HEAD, -1 for history, keyword says easy so should be feasable for 3.2. :) ---------- nosy: +BreamoreBoy versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 01:52:33 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 16 Jul 2010 23:52:33 +0000 Subject: [issue1676820] Add a PeriodicTimer to threading Message-ID: <1279324353.81.0.826736434687.issue1676820@psf.upfronthosting.co.za> Mark Lawrence added the comment: msg52115 "Looks fine to me". The code change is small, the rest of the patch is doc changes or unit tests, could someone run with this? ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 02:04:15 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 17 Jul 2010 00:04:15 +0000 Subject: [issue9227] can't import Tkinter / use IDLE after installing Python 2.7 on Mac OS X In-Reply-To: <1278883906.89.0.545374403914.issue9227@psf.upfronthosting.co.za> Message-ID: <1279325051.0.0.972529514234.issue9227@psf.upfronthosting.co.za> Ned Deily added the comment: Note that in the interim, there is a workaround for Snow Leopard users who want to use IDLE or Tkinter: use the 32-bit-only 2.7 OS X installer ("10.3") instead. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 02:05:57 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 00:05:57 +0000 Subject: [issue1677694] test_timeout refactoring Message-ID: <1279325157.7.0.0367876011264.issue1677694@psf.upfronthosting.co.za> Mark Lawrence added the comment: The patch is purely a change to unit test code involving sockets, anyone with experience of these who could review the patch? ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 02:23:08 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 00:23:08 +0000 Subject: [issue1677872] Efficient reverse line iterator Message-ID: <1279326188.66.0.159914793875.issue1677872@psf.upfronthosting.co.za> Mark Lawrence added the comment: The OP has done everything asked of him. There are a lot of positive comments about this request. Snag is the patch is in python, I understand that io is now written in C. Could we at this late stage get this into 3.2, or even a minor release of 3.2, or will it have to be deferred until 3.3? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 03:18:26 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 17 Jul 2010 01:18:26 +0000 Subject: [issue1677872] Efficient reverse line iterator Message-ID: <1279329506.6.0.138291317185.issue1677872@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > The OP has done everything asked of him. Not quite. He split out the documentation part of his patch and it was accepted and committed. Guido raised an issue with the code. OP raised more questions. The code was never updated. Now the patch is out of date because io module has been reimplemented in C. The patch is still good as a prototype/proof of concept but needs to be updated to apply to _pyio. The idea is good, but the implementation is not ready. ---------- nosy: +belopolsky stage: patch review -> needs patch versions: +Python 3.2 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 03:42:06 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 17 Jul 2010 01:42:06 +0000 Subject: [issue1555570] email parser incorrectly breaks headers with a CRLF at 8192 Message-ID: <1279330926.49.0.129434502454.issue1555570@psf.upfronthosting.co.za> R. David Murray added the comment: Committed Tony Nelson's fix to py3k in r82922, 3.1 in r72923, 2.7 in r82924, and 2.6 in r82925. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 03:49:33 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 17 Jul 2010 01:49:33 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279331373.7.0.543169967836.issue9079@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It turns out I misunderstood how date.today() worked [1] and issue9079.diff introduced significant change in behavior. Bringing timeofday into core rather than _time.c also introduced several complications. As a result it makes sense to start with just internal restructuring: bring gettimeofday into core and reuse it in time.time and datetime.datetime.now. The new patch, issue9079a.diff contains no user visible changes. [1] "Curious datetime method" http://mail.python.org/pipermail/python-dev/2010-July/102003.html ---------- Added file: http://bugs.python.org/file18034/issue9079a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 04:03:35 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 17 Jul 2010 02:03:35 +0000 Subject: [issue5180] 3.1 cannot unpickle 2.7-created pickle In-Reply-To: <1234045735.61.0.752787259691.issue5180@psf.upfronthosting.co.za> Message-ID: <1279332215.48.0.356771803774.issue5180@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Antoine said on IRC that he is ok with the latest approach. Does anyone want to review the patch before it goes in? ---------- resolution: -> accepted stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 04:34:31 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 17 Jul 2010 02:34:31 +0000 Subject: [issue728815] test_timeout updates Message-ID: <1279334071.39.0.92055891503.issue728815@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- superseder: -> test_timeout refactoring _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 06:48:19 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 17 Jul 2010 04:48:19 +0000 Subject: [issue9280] sharedinstall target doesn't depend on sharedmods target In-Reply-To: <1279342097.68.0.765090641555.issue9280@psf.upfronthosting.co.za> Message-ID: <1279342097.68.0.765090641555.issue9280@psf.upfronthosting.co.za> New submission from Arfrever Frehtes Taifersar Arahesis : altinstall target depends on libinstall target, which depends on build_all target, which depends on sharedmods target. altinstall target also depends on sharedinstall target. Both sharedmods and sharedinstall targets call setup.py. This can cause failure of parallel installation, when setup.py is called twice at the same time. This problem was reproduced by Gentoo users: https://bugs.gentoo.org/show_bug.cgi?id=328009 I'm attaching the patch. ---------- components: Build files: python-Makefile.pre.in.patch keywords: patch messages: 110537 nosy: Arfrever priority: normal severity: normal status: open title: sharedinstall target doesn't depend on sharedmods target type: compile error versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file18035/python-Makefile.pre.in.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 07:00:40 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 17 Jul 2010 05:00:40 +0000 Subject: [issue9281] Race condition in distutils.dir_util.mkpath() In-Reply-To: <1279342839.57.0.133468665449.issue9281@psf.upfronthosting.co.za> Message-ID: <1279342839.57.0.133468665449.issue9281@psf.upfronthosting.co.za> New submission from Arfrever Frehtes Taifersar Arahesis : distutils.dir_util.mkpath() is used to create a directory and is supposed to not fail when this directory already exists. There's a chance that another process will create this directory between os.path.isdir() check and call to os.mkdir(). This was reproduced by a Gentoo user during parallel installation of Python: https://bugs.gentoo.org/show_bug.cgi?id=311437 I'm attaching the patch. ---------- assignee: tarek components: Distutils files: distutils-dir_util.patch keywords: patch messages: 110538 nosy: Arfrever, tarek priority: normal severity: normal status: open title: Race condition in distutils.dir_util.mkpath() versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file18036/distutils-dir_util.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 09:20:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 07:20:25 +0000 Subject: [issue9281] Race condition in distutils.dir_util.mkpath() In-Reply-To: <1279342839.57.0.133468665449.issue9281@psf.upfronthosting.co.za> Message-ID: <1279351225.01.0.903814040841.issue9281@psf.upfronthosting.co.za> ?ric Araujo added the comment: Note: Your patch fixes distutils, but in distutils2 dir_util is gone, use of its functions replaced by shutil calls or duplicated code with, I?m afraid, the same isdir/mkdir race condition. I wonder how we could add tests for that instead. Thanks for the heads-up, I?m adding a ?grep makedirs|rmdir? on my todo list. ---------- nosy: +merwok resolution: -> accepted stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 09:21:26 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 07:21:26 +0000 Subject: [issue9281] Race condition in distutils.dir_util.mkpath() In-Reply-To: <1279342839.57.0.133468665449.issue9281@psf.upfronthosting.co.za> Message-ID: <1279351286.63.0.149825901531.issue9281@psf.upfronthosting.co.za> ?ric Araujo added the comment: instead of waiting for user reports* ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 09:36:00 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 07:36:00 +0000 Subject: [issue8136] urllib.unquote decodes percent-escapes with Latin-1 In-Reply-To: <1268556503.05.0.747938740092.issue8136@psf.upfronthosting.co.za> Message-ID: <1279352160.65.0.430076059289.issue8136@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok, orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 09:52:37 2010 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 17 Jul 2010 07:52:37 +0000 Subject: [issue5180] 3.1 cannot unpickle 2.7-created pickle In-Reply-To: <1234045735.61.0.752787259691.issue5180@psf.upfronthosting.co.za> Message-ID: <1279353157.41.0.166596494006.issue5180@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: I have fixed some style nits in your patch. It would be nice to have tests for the different control paths in instantiate(). But, I realize that would be a bit annoying. Apart from that, the patch looks good. ---------- Added file: http://bugs.python.org/file18037/issue5180b.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 10:11:47 2010 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 17 Jul 2010 08:11:47 +0000 Subject: [issue9268] Add annotation option to pickletools.dis In-Reply-To: <1279222638.31.0.459529413565.issue9268@psf.upfronthosting.co.za> Message-ID: <1279354307.18.0.436303986426.issue9268@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 10:38:40 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 17 Jul 2010 08:38:40 +0000 Subject: [issue9282] Bug in --listfuncs option of trace.py In-Reply-To: <1279355920.89.0.901837761289.issue9282@psf.upfronthosting.co.za> Message-ID: <1279355920.89.0.901837761289.issue9282@psf.upfronthosting.co.za> New submission from Eli Bendersky : Running: py3d -m trace -C . --listfuncs trace_target.py Where py3d points to a freshly compiled Python 3 trunk interpreter, results in an error: functions called: Traceback (most recent call last): File "/home/eliben/python_src/eliben-py3k/Lib/runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/home/eliben/python_src/eliben-py3k/Lib/runpy.py", line 73, in _run_code exec(code, run_globals) File "/home/eliben/python_src/eliben-py3k/Lib/trace.py", line 816, in main() File "/home/eliben/python_src/eliben-py3k/Lib/trace.py", line 813, in main results.write_results(missing, summary=summary, coverdir=coverdir) File "/home/eliben/python_src/eliben-py3k/Lib/trace.py", line 260, in write_results for filename, modulename, funcname in sorted(calls.keys()): NameError: global name 'calls' is not defined -------------- With Python 2.x it runs fine. The cause is probably a bug introduced during the porting to Python 3. The relevant piece of code in the write_results() method in trace.py is: if self.calledfuncs: print() print("functions called:") for filename, modulename, funcname in sorted(calls.keys()): print(("filename: %s, modulename: %s, funcname: %s" % (filename, modulename, funcname))) The 'calls' variable in the loop isn't defined anywhere. Previously (in 2.6) this same chunk of code looked like this: if self.calledfuncs: print print "functions called:" calls = self.calledfuncs.keys() calls.sort() for filename, modulename, funcname in calls: print ("filename: %s, modulename: %s, funcname: %s" % (filename, modulename, funcname)) Which aliases 'calls' to 'self.calledfuncs.keys()' ------ Once this is confirmed as a bug, I will be happy to submit a patch that solves the problem. ---------- components: Library (Lib) messages: 110543 nosy: eli.bendersky, tjreedy priority: normal severity: normal status: open title: Bug in --listfuncs option of trace.py type: behavior versions: Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 10:49:10 2010 From: report at bugs.python.org (Sarth Calhoun) Date: Sat, 17 Jul 2010 08:49:10 +0000 Subject: [issue9227] can't import Tkinter / use IDLE after installing Python 2.7 on Mac OS X In-Reply-To: <1278883906.89.0.545374403914.issue9227@psf.upfronthosting.co.za> Message-ID: <1279356550.19.0.361464945382.issue9227@psf.upfronthosting.co.za> Sarth Calhoun added the comment: Have the same problem. Well, tried to install the 10.3 version over my 64-bit installation and that had no effect. Not sure how to get IDLE working. ---------- nosy: +Sarth.Calhoun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 11:10:57 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 17 Jul 2010 09:10:57 +0000 Subject: [issue9272] CGIHTTPServer poisons os.environ In-Reply-To: <1279270191.51.0.568678636745.issue9272@psf.upfronthosting.co.za> Message-ID: <1279357857.92.0.510268427267.issue9272@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't think a deepcopy of the environment is necessary here. environ.copy() is just fine. Other than that, I agree with Eric. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 11:17:46 2010 From: report at bugs.python.org (Kevin Dwyer) Date: Sat, 17 Jul 2010 09:17:46 +0000 Subject: [issue1327971] HTTPResponse instance has no attribute 'fileno' Message-ID: <1279358266.38.0.286116052452.issue1327971@psf.upfronthosting.co.za> Changes by Kevin Dwyer : ---------- nosy: +kevindication _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 11:53:04 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 09:53:04 +0000 Subject: [issue963906] Unicode email address helper Message-ID: <1279360384.41.0.611837239782.issue963906@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 11:57:15 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 17 Jul 2010 09:57:15 +0000 Subject: [issue9227] can't import Tkinter / use IDLE after installing Python 2.7 on Mac OS X In-Reply-To: <1278883906.89.0.545374403914.issue9227@psf.upfronthosting.co.za> Message-ID: <1279360635.81.0.990080671074.issue9227@psf.upfronthosting.co.za> Ned Deily added the comment: @Sarth: Odd, works for me. Using the standard GUI installer on a 64-bit-capable machine running 10.6.4, I first installed the "10.5" 2.7 metapackage and verified that both IDLE.app and /usr/local/bin/idle2.7 fail. Then, even without manually deleting anything, I installed the "10.3" 2.7 metapackage and now both work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 12:03:47 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 10:03:47 +0000 Subject: [issue4953] cgi module cannot handle POST with multipart/form-data in 3.0 In-Reply-To: <1232010166.79.0.972664060868.issue4953@psf.upfronthosting.co.za> Message-ID: <1279361027.65.0.30402216467.issue4953@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +l0nwlf, merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 12:20:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 10:20:11 +0000 Subject: [issue1685453] email package should work better with unicode Message-ID: <1279362011.4.0.577013127927.issue1685453@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 13:07:40 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Jul 2010 11:07:40 +0000 Subject: [issue9283] buggy repr for os.environ In-Reply-To: <1279364859.98.0.0796685002752.issue9283@psf.upfronthosting.co.za> Message-ID: <1279364859.98.0.0796685002752.issue9283@psf.upfronthosting.co.za> New submission from Antoine Pitrou : os.environ has the same repr as os.environb, that is, it looks as though it's a mapping of bytes to bytes, while it's a mapping of str to str. >>> repr(os.environ)[:50] "environ({b'TMP': b'/tmp/', b'XAUTHORITY': b'/var/r" >>> repr(os.environb)[:50] "environ({b'TMP': b'/tmp/', b'XAUTHORITY': b'/var/r" ---------- assignee: haypo components: Library (Lib) messages: 110547 nosy: haypo, pitrou priority: high severity: normal status: open title: buggy repr for os.environ type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 13:38:37 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 11:38:37 +0000 Subject: [issue1409460] email.Utils.parseaddr() gives arcane result Message-ID: <1279366717.37.0.39131027997.issue1409460@psf.upfronthosting.co.za> ?ric Araujo added the comment: I wonder if this bug should be reopened. This behavior does not seem right to me: parsing 'merwok' expected ('merwok', '') got ('', 'merwok') parsing 'merwok wok at rusty' expected ('', 'wok at rusty') got ('', 'merwokwok at rusty') (Generated with a twenty-line script just doing a loop and prints, not attached because boring.) Are my expectations wrong? I don?t know if a string like ?merwok? in my first example is a legal address in the relevant RFCs, nor do I know if the folding done in the second example is okay. For background, the thing I?m trying to achieve is to take a string and parse it into name and email address, and print a warning if there is no email. It?d be nice if I could always test for ?not parseaddr(s)[1]?, or pass an argument to the function to get an exception. Maybe I?ll have to restrict my format and do my own parsing with str.[r]partition. ---------- nosy: +merwok, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 13:44:39 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 11:44:39 +0000 Subject: [issue1025395] email.Utils.parseaddr fails to parse valid addresses Message-ID: <1279367079.03.0.653074628245.issue1025395@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 14:18:05 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 17 Jul 2010 12:18:05 +0000 Subject: [issue9282] Bug in --listfuncs option of trace.py In-Reply-To: <1279355920.89.0.901837761289.issue9282@psf.upfronthosting.co.za> Message-ID: <1279369085.38.0.207685904471.issue9282@psf.upfronthosting.co.za> Eli Bendersky added the comment: The fix is simple one-liner, so here's a patch. ---------- keywords: +patch Added file: http://bugs.python.org/file18038/issue9282.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 14:41:56 2010 From: report at bugs.python.org (Stefan Krah) Date: Sat, 17 Jul 2010 12:41:56 +0000 Subject: [issue7384] curses crash on FreeBSD In-Reply-To: <1259006628.77.0.121355571453.issue7384@psf.upfronthosting.co.za> Message-ID: <1279370516.74.0.917056044385.issue7384@psf.upfronthosting.co.za> Stefan Krah added the comment: ldd return value check committed in r82927, r82928, r82929 and r82930. Thanks for reporting this! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 15:16:57 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Sat, 17 Jul 2010 13:16:57 +0000 Subject: [issue9284] inspect.findsource() cannot find source for doctest code In-Reply-To: <1279372617.05.0.528440876901.issue9284@psf.upfronthosting.co.za> Message-ID: <1279372617.05.0.528440876901.issue9284@psf.upfronthosting.co.za> New submission from Dirkjan Ochtman : The fix for issue4050 broke some of my doctests. Minimal test: import doctest, inspect def test(): ''' >>> def x(): pass >>> inspect.getsource(x) 'def x(): pass\\n' ''' doctest.run_docstring_examples(test, globals()) This works in 2.6, but not in 2.7. Reason is that inspect.getsourcefile() finds the fake filename '', which it doesn't understand. In 2.6, inspect.getmodule() is also tried, which first looks at obj.__module__, and the filename can be derived from that. I suggest that inspect.getsourcefile() grows some code to use this trick if the filename seems fake (f[0] + f[-1] == '<>'). ---------- components: Library (Lib) messages: 110551 nosy: ajaksu2, brodie, djc, pitrou, r.david.murray priority: normal severity: normal stage: needs patch status: open title: inspect.findsource() cannot find source for doctest code type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 15:19:31 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Jul 2010 13:19:31 +0000 Subject: [issue9284] inspect.findsource() cannot find source for doctest code In-Reply-To: <1279372617.05.0.528440876901.issue9284@psf.upfronthosting.co.za> Message-ID: <1279372771.36.0.195638749769.issue9284@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- priority: normal -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 15:37:54 2010 From: report at bugs.python.org (Stefan Krah) Date: Sat, 17 Jul 2010 13:37:54 +0000 Subject: [issue1533105] NetBSD build with --with-pydebug causes SIGSEGV Message-ID: <1279373874.52.0.733180723205.issue1533105@psf.upfronthosting.co.za> Stefan Krah added the comment: Matt, if you still follow this: Does this problem exist in 2.6/2.7/NetBSD? I think this should be set to pending. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 15:43:45 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 17 Jul 2010 13:43:45 +0000 Subject: [issue9284] inspect.findsource() cannot find source for doctest code In-Reply-To: <1279372617.05.0.528440876901.issue9284@psf.upfronthosting.co.za> Message-ID: <1279374225.42.0.772689942209.issue9284@psf.upfronthosting.co.za> Antoine Pitrou added the comment: After chatting with Dirkjan, I misunderstood the impact of the patch. It only occurs when inspect.getsource() is called from a doctest, which isn't a very common situation. ---------- priority: critical -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 15:47:41 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 17 Jul 2010 13:47:41 +0000 Subject: [issue1659410] Minor AST tweaks Message-ID: <1279374461.28.0.543583218574.issue1659410@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm going to close this because these are mostly incompatible changes that are too late. ---------- nosy: +benjamin.peterson resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 16:01:14 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 17 Jul 2010 14:01:14 +0000 Subject: [issue9285] A decorator for cProfile and profile modules In-Reply-To: <1279375274.49.0.102313390752.issue9285@psf.upfronthosting.co.za> Message-ID: <1279375274.49.0.102313390752.issue9285@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : A patch including tests is in attachment. Example usage: >>> from cProfile import profile >>> >>> @profile ... def factorial(n): ... n = abs(int(n)) ... if n < 1: ... n = 1 ... x = 1 ... for i in range(1, n+1): ... x = i * x ... return x ... >>> >>> factorial(5) Thu Jul 15 20:58:21 2010 /tmp/tmpIDejr5 4 function calls in 0.000 CPU seconds Ordered by: internal time, call count ncalls tottime percall cumtime percall filename:lineno(function) 1 0.000 0.000 0.000 0.000 profiler.py:120(factorial) 1 0.000 0.000 0.000 0.000 {range} 1 0.000 0.000 0.000 0.000 {abs} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} 120 >>> Before including doc changes I'd like to hear whether this is actually desirable or not. ---------- assignee: collinwinter components: Benchmarks, Library (Lib) files: profile.patch keywords: needs review, patch, patch messages: 110555 nosy: collinwinter, giampaolo.rodola, pitrou priority: normal severity: normal status: open title: A decorator for cProfile and profile modules versions: Python 3.2 Added file: http://bugs.python.org/file18039/profile.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 16:07:24 2010 From: report at bugs.python.org (Mark Sapiro) Date: Sat, 17 Jul 2010 14:07:24 +0000 Subject: [issue1409460] email.Utils.parseaddr() gives arcane result Message-ID: <1279375644.46.0.981073164746.issue1409460@psf.upfronthosting.co.za> Mark Sapiro added the comment: > parsing 'merwok' > expected ('merwok', '') > got ('', 'merwok') I think ('', 'merwok') is the correct result. I think most if not all MUAs/MTAs will interpret an address without an '@', albeit invalid, as a local-part in the local domain, thus parsing 'merwok' as the address 'merwok' with no real name is probably the right thing to do with this input. The alternative would be to return ('', '') indicating failure. > parsing 'merwok wok at rusty' > expected ('', 'wok at rusty') > got ('', 'merwokwok at rusty') Here, I think failure is a more appropriate return. In any case, I think this is a new bug deserving of a new report. It is not really relevant to this issue which has to do with nested parentheses. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 16:24:47 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Sat, 17 Jul 2010 14:24:47 +0000 Subject: [issue9284] inspect.findsource() cannot find source for doctest code In-Reply-To: <1279372617.05.0.528440876901.issue9284@psf.upfronthosting.co.za> Message-ID: <1279376687.29.0.708887869415.issue9284@psf.upfronthosting.co.za> Dirkjan Ochtman added the comment: Here's a test case that doesn't require doctest trickery: import inspect, linecache fn, source = '', 'def x(): pass\n' getlines = linecache.getlines def monkey(filename, module_globals=None): if filename == fn: return source.splitlines(True) else: return getlines(filename, module_globals) linecache.getlines = monkey exec compile(source, fn, 'single') in globals() inspect.getsource(x) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 16:25:24 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 14:25:24 +0000 Subject: [issue1409460] email.Utils.parseaddr() gives arcane result Message-ID: <1279376724.88.0.505269033201.issue1409460@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thank you for the reply. The problem is that parseaddr is designed to not fail IIUC, that?s why it may return empty strings. Client code has to check for these values instead of catching an exception?a mere style issue, weren?t it for the second bug. So I?m going to report that separately, and restrict the format in my project so that my code can just use string methods. I think I won?t open a feature request for a parameter to get exceptions, since parseaddr is designed not to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 16:28:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 17 Jul 2010 14:28:20 +0000 Subject: [issue5180] 3.1 cannot unpickle 2.7-created pickle In-Reply-To: <1234045735.61.0.752787259691.issue5180@psf.upfronthosting.co.za> Message-ID: <1279376900.45.0.0932380222718.issue5180@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Alexandre, I am not sure your change form PyObject_Size(args) to Py_SIZE(args) is correct. As far as I can tell, args come from pickle machine stack without any type checks. The equivalent code in 2.x cPickle uses PyObject_Size and checks for errors. I'll try to come up with a test case for the error situation, but it is a bit tricky because pickle should be produced in 2.x in order for this function to be used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 16:31:59 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 17 Jul 2010 14:31:59 +0000 Subject: [issue9283] buggy repr for os.environ In-Reply-To: <1279364859.98.0.0796685002752.issue9283@psf.upfronthosting.co.za> Message-ID: <1279377119.42.0.0347101086797.issue9283@psf.upfronthosting.co.za> R. David Murray added the comment: Ezio, it looks like your test for issue 7310 uses exactly the same algorithm as the code itself does, and thus did not detect this breakage. ---------- nosy: +ezio.melotti, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 16:35:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 14:35:59 +0000 Subject: [issue9286] email.utils.parseaddr returns garbage for invalid input In-Reply-To: <1279377359.55.0.199569408455.issue9286@psf.upfronthosting.co.za> Message-ID: <1279377359.55.0.199569408455.issue9286@psf.upfronthosting.co.za> New submission from ?ric Araujo : This behavior does not seem right to me: parsing 'merwok' expected ('merwok', '') got ('', 'merwok') parsing 'merwok wok at rusty' expected ('', 'wok at rusty') got ('', 'merwokwok at rusty') (Generated with a small script just doing a loop and prints, not attached because boring.) Are my expectations wrong? I don?t know if a string like ?merwok? in my first example is a legal address in the relevant RFCs; Mark Sapiro replied in msg110556 that it could be consistent with most MUAs/MTAs. I don?t know either if the folding done in the second example is okay; I?d like an exception here, or if parseaddr is designed to never fail, empty strings to indicate failure. I?m also okay with ?garbage in, garbage out? as answer. ---------- components: Library (Lib) messages: 110561 nosy: merwok, r.david.murray priority: normal severity: normal status: open title: email.utils.parseaddr returns garbage for invalid input type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 16:36:50 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 14:36:50 +0000 Subject: [issue1409460] email.Utils.parseaddr() gives arcane result Message-ID: <1279377410.38.0.304551247418.issue1409460@psf.upfronthosting.co.za> ?ric Araujo added the comment: Copied my inquiry and part of your reply in #9286. ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 16:39:03 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 17 Jul 2010 14:39:03 +0000 Subject: [issue9287] Cosmetic fix in OtherFileTests.testOpenDir In-Reply-To: <1279377543.77.0.675008772529.issue9287@psf.upfronthosting.co.za> Message-ID: <1279377543.77.0.675008772529.issue9287@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : Hello. In OtherFileTests.testOpenDir(test_file), if we run this test in Lib/test, __file__ becomes "test_file.py", so os.path.dirname(__file__) becomes "". I think it is better to use os.path.abspath to get valid folder path for test purpose. # This test seems not to exist in Python2.7. ---------- components: Tests files: test_file.patch keywords: easy, patch messages: 110563 nosy: ocean-city priority: normal severity: normal stage: patch review status: open title: Cosmetic fix in OtherFileTests.testOpenDir versions: Python 2.6 Added file: http://bugs.python.org/file18040/test_file.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 16:45:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 14:45:16 +0000 Subject: [issue9287] Cosmetic fix in OtherFileTests.testOpenDir In-Reply-To: <1279377543.77.0.675008772529.issue9287@psf.upfronthosting.co.za> Message-ID: <1279377916.78.0.463587249006.issue9287@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. I have had exceptions in distutils2 tests because of this exact same thing; my fix was to use ?os.path.dirname(__file__) or os.curdir?. I?ll change that if people more knowledgeable than me say your fix is better :) ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 17:10:10 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 17 Jul 2010 15:10:10 +0000 Subject: [issue963906] Unicode email address helper Message-ID: <1279379410.32.0.931836396014.issue963906@psf.upfronthosting.co.za> R. David Murray added the comment: I'm assigning this to myself so I don't lose it. I'll need to incorporate the intent of the tests and logic into email6. And yes I set 3.3 on purpose...email6 won't be in 3.2 and I don't want to spend the cycles figuring out whether this would work in email5 (the 3.2 version of email). ---------- assignee: -> r.david.murray versions: +Python 3.3 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 17:21:01 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 15:21:01 +0000 Subject: [issue1672568] silent error in email.message.Message.get_payload Message-ID: <1279380061.51.0.227998886235.issue1672568@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've patched py3k test_email.py without patching message.py and the test passes on Windows Vista. Either the patch is wrong, I've had finger problems or I'm misunderstanding the intent, can someone please advise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 17:38:37 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 15:38:37 +0000 Subject: [issue1681333] email.header unicode fix Message-ID: <1279381117.06.0.344755858088.issue1681333@psf.upfronthosting.co.za> Mark Lawrence added the comment: Applied the patches to the test files for 2.6.5 without patching header.py and got one failure. FAIL: test_i18nheader_unicode (email.test.test_email.TestRFC2047) I also expected a failure from the equivalent test for test_email_renamed, can someone please advise. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 17:56:04 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 17 Jul 2010 15:56:04 +0000 Subject: [issue9268] Add annotation option to pickletools.dis In-Reply-To: <1279222638.31.0.459529413565.issue9268@psf.upfronthosting.co.za> Message-ID: <1279382164.28.0.625141392349.issue9268@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in r82931 with small changes based on comments here and on IRC: 1. Annotations are separated from disassembly by spaces without '|'. 2. Made a small improvement to the annotation alignment algorithm. Excessively long lines do not force the rest of the annotations off the screen. 3. Added ReST documentation for the new dis() argument. The command line behavior is still undocumented. I am watching python-dev discussion on how it should be presented in ReST. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 17:56:10 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 15:56:10 +0000 Subject: [issue1681842] splitext of dotfiles, incl backwards compat and migration Message-ID: <1279382170.88.0.605898607486.issue1681842@psf.upfronthosting.co.za> Mark Lawrence added the comment: Add Michael Foord to nosy list as he raised #1462106 which refers to #1115886 where msg24154 states "fixed this in r54204". Can this be closed? ---------- nosy: +BreamoreBoy, michael.foord versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:02:27 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 17 Jul 2010 16:02:27 +0000 Subject: [issue9268] Add annotation option to pickletools.dis In-Reply-To: <1279222638.31.0.459529413565.issue9268@psf.upfronthosting.co.za> Message-ID: <1279382547.52.0.461142200033.issue9268@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- resolution: -> fixed stage: unit test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:06:33 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 17 Jul 2010 16:06:33 +0000 Subject: [issue1681842] splitext of dotfiles, incl backwards compat and migration Message-ID: <1279382793.55.0.0239375474969.issue1681842@psf.upfronthosting.co.za> Michael Foord added the comment: On Python 2.6.5: >>> os.path.splitext('.cshrc') ('.cshrc', '') I believe this can be closed. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:09:26 2010 From: report at bugs.python.org (Stefan Krah) Date: Sat, 17 Jul 2010 16:09:26 +0000 Subject: [issue9277] test_struct failure on ARM In-Reply-To: <1279311086.16.0.957118455274.issue9277@psf.upfronthosting.co.za> Message-ID: <1279382966.54.0.488481352163.issue9277@psf.upfronthosting.co.za> Stefan Krah added the comment: The usage of char in bp_bool will not work if char is unsigned. Hopefully that is the cause. ---------- keywords: +patch nosy: +skrah Added file: http://bugs.python.org/file18041/bp_bool.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:09:46 2010 From: report at bugs.python.org (Stefan Krah) Date: Sat, 17 Jul 2010 16:09:46 +0000 Subject: [issue9277] test_struct failure on ARM In-Reply-To: <1279311086.16.0.957118455274.issue9277@psf.upfronthosting.co.za> Message-ID: <1279382986.98.0.0698826184923.issue9277@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:10:51 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 17 Jul 2010 16:10:51 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1279383051.17.0.0412057528912.issue9012@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am merging in the nosy list from issue9079 after we had a lengthy discussion there and on IRC about the best way to share code between stdlib extension modules. For the issue9079, we decided to bring the shared code into python core, but this cannot be a general solution. I still don't see any solution other than exposing C API via a capsule mechanism, but Antoine objected saying that capsule mechanism is for 3rd party modules and should not be used in stdlib. ---------- nosy: +georg.brandl, pitrou, rhettinger, rnk, tim_one _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:11:16 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 17 Jul 2010 16:11:16 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1279383076.61.0.849742931332.issue9012@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- stage: committed/rejected -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:13:30 2010 From: report at bugs.python.org (Reid Kleckner) Date: Sat, 17 Jul 2010 16:13:30 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1279383210.17.0.759249131216.issue5673@psf.upfronthosting.co.za> Reid Kleckner added the comment: I don't imagine this is going into 2.7.>0 at this point, so I ported the patch to py3k. I also added support to check_output for the timeout parameter and added docs for all of the methods/functions that now take a timeout in the module. The communicate docs include the pattern of: try: outs, errs = p.communicate(timeout=15) except subprocess.TimeoutExpired: p.kill() outs, errs = p.communicate() And check_output uses it. ---------- Added file: http://bugs.python.org/file18042/subprocess-timeout-py3k-v6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:16:33 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 17 Jul 2010 16:16:33 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1279383393.96.0.484971054962.issue5673@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:16:57 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 17 Jul 2010 16:16:57 +0000 Subject: [issue9257] cElementTree iterparse requires events as bytes; ElementTree uses strings In-Reply-To: <1279078067.06.0.575324977312.issue9257@psf.upfronthosting.co.za> Message-ID: <1279383417.6.0.43254255408.issue9257@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It seems that this has been fixed in the py3k branch (r78942). Now both bytes and unicode are accepted. Can someone check? ---------- nosy: +amaury.forgeotdarc stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:19:56 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 16:19:56 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1279383596.26.0.0609340494783.issue1682942@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could the patch be reworked for 3.2? ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:24:30 2010 From: report at bugs.python.org (Stefan Krah) Date: Sat, 17 Jul 2010 16:24:30 +0000 Subject: [issue9277] test_struct failure on ARM In-Reply-To: <1279311086.16.0.957118455274.issue9277@psf.upfronthosting.co.za> Message-ID: <1279383870.15.0.183264638685.issue9277@psf.upfronthosting.co.za> Stefan Krah added the comment: 'sizeof y' is obviously wrong now in the memcpy. Next attempt. ---------- Added file: http://bugs.python.org/file18043/bp_bool2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:28:21 2010 From: report at bugs.python.org (Stefan Krah) Date: Sat, 17 Jul 2010 16:28:21 +0000 Subject: [issue9277] test_struct failure on ARM In-Reply-To: <1279311086.16.0.957118455274.issue9277@psf.upfronthosting.co.za> Message-ID: <1279384101.09.0.993451691963.issue9277@psf.upfronthosting.co.za> Changes by Stefan Krah : Removed file: http://bugs.python.org/file18041/bp_bool.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:28:37 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 16:28:37 +0000 Subject: [issue1694663] Overloading int.__pow__ does not work Message-ID: <1279384117.23.0.402721668092.issue1694663@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could someone please review this patch to typeobject.c. ---------- components: +Extension Modules -None nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:32:30 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 16:32:30 +0000 Subject: [issue1699259] replacing char* with const char* in sysmodule.c/.h Message-ID: <1279384350.42.0.956367580073.issue1699259@psf.upfronthosting.co.za> Mark Lawrence added the comment: Drop 2.7 as that's now gone. See also #6952. ---------- nosy: +BreamoreBoy versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:32:47 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 17 Jul 2010 16:32:47 +0000 Subject: [issue9284] inspect.findsource() cannot find source for doctest code In-Reply-To: <1279372617.05.0.528440876901.issue9284@psf.upfronthosting.co.za> Message-ID: <1279384367.98.0.243710152347.issue9284@psf.upfronthosting.co.za> R. David Murray added the comment: I don't understand why monkey patching linecache produces a valid test case. Can you explain? Since I believe the same code/bugfix is in 3.x, I'm adding those versions. ---------- stage: needs patch -> unit test needed versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:34:52 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 16:34:52 +0000 Subject: [issue6952] deprecated conversion from string constant to char * In-Reply-To: <1253446186.78.0.0648542984315.issue6952@psf.upfronthosting.co.za> Message-ID: <1279384492.89.0.259414929893.issue6952@psf.upfronthosting.co.za> Mark Lawrence added the comment: Drop 2.7 as it's gone. See also #1699259. ---------- nosy: +BreamoreBoy versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:37:39 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Sat, 17 Jul 2010 16:37:39 +0000 Subject: [issue9284] inspect.findsource() cannot find source for doctest code In-Reply-To: <1279372617.05.0.528440876901.issue9284@psf.upfronthosting.co.za> Message-ID: <1279384659.39.0.129739115016.issue9284@psf.upfronthosting.co.za> Dirkjan Ochtman added the comment: Because doctest also monkeypatches linecache, and without monkeypatching linecache this also fails in 2.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:44:26 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 16:44:26 +0000 Subject: [issue1704134] minidom Level 1 DOM compliance Message-ID: <1279385066.37.0.520694774875.issue1704134@psf.upfronthosting.co.za> Mark Lawrence added the comment: Changed type to behaviour as I see many references to bugs, hence the changes to versions. This is a massive patch and will be a substancial amount of work if anyone wishes to take it on. ---------- nosy: +BreamoreBoy type: feature request -> behavior versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 18:52:42 2010 From: report at bugs.python.org (Reid Kleckner) Date: Sat, 17 Jul 2010 16:52:42 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279385562.88.0.891866433997.issue9079@psf.upfronthosting.co.za> Reid Kleckner added the comment: I think you forgot to svn add pytime.c before making the diff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 19:00:48 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 17 Jul 2010 17:00:48 +0000 Subject: [issue9284] inspect.findsource() cannot find source for doctest code In-Reply-To: <1279372617.05.0.528440876901.issue9284@psf.upfronthosting.co.za> Message-ID: <1279386048.82.0.837932518171.issue9284@psf.upfronthosting.co.za> R. David Murray added the comment: Oh, right, I remember that now. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 19:40:28 2010 From: report at bugs.python.org (Stefan Krah) Date: Sat, 17 Jul 2010 17:40:28 +0000 Subject: [issue9036] Simplify Py_CHARMASK In-Reply-To: <1277039528.15.0.539020018856.issue9036@psf.upfronthosting.co.za> Message-ID: <1279388428.83.0.295630613981.issue9036@psf.upfronthosting.co.za> Stefan Krah added the comment: [Marc-Andre] > Why not just make the casts in those cases explicit instead of > using Py_CHARMASK ? I agree that this would be the cleanest solution. It's harder to get someone to review a larger patch though. Antoine, I understood that you would prefer to leave the mask. Could I apply the second version of the patch? It will probably have an immediate benefit. On the ARM buildbot char is unsigned and gcc emits a whole page of spurious 'array subscript has type 'char' warnings. ---------- Added file: http://bugs.python.org/file18044/py_charmask2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 19:48:13 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 17:48:13 +0000 Subject: [issue1706039] Added clearerr() to clear EOF state Message-ID: <1279388893.39.0.357516867957.issue1706039@psf.upfronthosting.co.za> Mark Lawrence added the comment: The patch adds one line and moves one line in fileobject.c. The rest of the patch is new tests. I've successfully applied the patch on Windows and the tests were fine. Can someone kindly repeat the tests on OS X as this is where the problem was originally reported. ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 19:58:23 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 17:58:23 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1279389503.29.0.433854704183.issue1712522@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've run an eye over this and don't see any problems, particularly in the light of msg101043. Only 2.7 is affected as the fix has been backported from py3k. Please can we go forward with this. ---------- nosy: +BreamoreBoy versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 20:03:42 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 18:03:42 +0000 Subject: [issue1755841] Patch for [ 735515 ] urllib2 should cache 301 redir Message-ID: <1279389822.6.0.972193519855.issue1755841@psf.upfronthosting.co.za> Mark Lawrence added the comment: Just a prod in case it has gone under the radar. ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 20:12:22 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 18:12:22 +0000 Subject: [issue1777134] minidom pretty xml output improvement Message-ID: <1279390342.51.0.17543651101.issue1777134@psf.upfronthosting.co.za> Mark Lawrence added the comment: Looking at the comments here msg104801 seems like more work needs to be done on the patch. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 20:16:11 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 18:16:11 +0000 Subject: [issue1200] Allow array.array to be parsed by the t# format unit. In-Reply-To: <1190697931.82.0.81567230307.issue1200@psf.upfronthosting.co.za> Message-ID: <1279390571.35.0.629691636494.issue1200@psf.upfronthosting.co.za> Mark Lawrence added the comment: OP has stated it's ok to close. ---------- nosy: +BreamoreBoy resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 20:26:32 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 18:26:32 +0000 Subject: [issue1343] XMLGenerator: nice elements In-Reply-To: <1193492035.12.0.0580891111126.issue1343@psf.upfronthosting.co.za> Message-ID: <1279391192.05.0.0882826543223.issue1343@psf.upfronthosting.co.za> Mark Lawrence added the comment: I believe 3.2 is still open for new features. ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 20:27:06 2010 From: report at bugs.python.org (Alexandre Vassalotti) Date: Sat, 17 Jul 2010 18:27:06 +0000 Subject: [issue5180] 3.1 cannot unpickle 2.7-created pickle In-Reply-To: <1234045735.61.0.752787259691.issue5180@psf.upfronthosting.co.za> Message-ID: <1279391226.13.0.379656407078.issue5180@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: The args argument is always a tuple created with Pdata_poptuple(). You can add an explicit type check. If this check fails a RuntimeError should be raised, because this would indicate a programming error in pickle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 20:34:48 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 18:34:48 +0000 Subject: [issue1552] fromfd() and socketpair() should return wrapped sockets In-Reply-To: <1196739495.6.0.25894007336.issue1552@psf.upfronthosting.co.za> Message-ID: <1279391688.5.0.156254593295.issue1552@psf.upfronthosting.co.za> Mark Lawrence added the comment: The attached patch files are small and look ok to me. Could someone with socket experience please give a yes or no. ---------- nosy: +BreamoreBoy versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 20:48:54 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 18:48:54 +0000 Subject: [issue1554] socketmodule cleanups: allow the use of keywords in socket functions In-Reply-To: <1196784173.07.0.425557098914.issue1554@psf.upfronthosting.co.za> Message-ID: <1279392534.74.0.24952804382.issue1554@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could someone please review these patches as they stand. Will any rework of the patches be needed to get them into 3.2? ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 20:58:52 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 18:58:52 +0000 Subject: [issue1568] PATCH: Armin's attribute lookup caching for 3.0 In-Reply-To: <1197034097.09.0.871896219058.issue1568@psf.upfronthosting.co.za> Message-ID: <1279393132.86.0.116167187596.issue1568@psf.upfronthosting.co.za> Mark Lawrence added the comment: As the patch provides some performance increase which has already been proven to work in 2.6, could we get this into 3.2? I say this because I understand that performance was degraded in py3k, could this be one of the reasons why? ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 21:08:51 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 19:08:51 +0000 Subject: [issue1763] Winpath module - easy access to Windows directories like My Documents In-Reply-To: <1199812378.67.0.278096816271.issue1763@psf.upfronthosting.co.za> Message-ID: <1279393731.95.0.323254895673.issue1763@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Christian: have you any interest in keeping this open or can it be closed, gien that the last comment was 2 1/2 years ago? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 21:13:29 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 19:13:29 +0000 Subject: [issue1800] ctypes callback fails when called in Python with array argument In-Reply-To: <1200093299.88.0.890377527012.issue1800@psf.upfronthosting.co.za> Message-ID: <1279394009.36.0.856436660606.issue1800@psf.upfronthosting.co.za> Mark Lawrence added the comment: This is a very small patch against the ctypes __init__.py, could anyone with some ctypes experience please review the patch. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 21:18:18 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 19:18:18 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1279394298.04.0.386154756905.issue1818@psf.upfronthosting.co.za> Mark Lawrence added the comment: I suggest that this is closed unless anyone shows an active interest in it. ---------- nosy: +BreamoreBoy status: open -> pending versions: +Python 3.2, Python 3.3 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 21:28:54 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 19:28:54 +0000 Subject: [issue1943] improved allocation of PyUnicode objects In-Reply-To: <1201387475.19.0.206333594078.issue1943@psf.upfronthosting.co.za> Message-ID: <1279394934.99.0.300816255163.issue1943@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Antoine: do you wish to try and take this forward? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 22:39:35 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 17 Jul 2010 20:39:35 +0000 Subject: [issue9280] sharedinstall target doesn't depend on sharedmods target In-Reply-To: <1279342097.68.0.765090641555.issue9280@psf.upfronthosting.co.za> Message-ID: <1279399175.74.0.484367355722.issue9280@psf.upfronthosting.co.za> Benjamin Peterson added the comment: r82934 ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 22:58:55 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 20:58:55 +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: <1279400335.39.0.293486420681.issue8253@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: tarek -> merwok nosy: +titus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 22:59:09 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 20:59:09 +0000 Subject: [issue8252] add a metadata section in setup.cfg In-Reply-To: <1269786516.47.0.241877166963.issue8252@psf.upfronthosting.co.za> Message-ID: <1279400349.97.0.05807350493.issue8252@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: tarek -> merwok nosy: +titus _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 23:02:20 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 21:02:20 +0000 Subject: [issue8254] write a configure command In-Reply-To: <1269787284.51.0.353047597946.issue8254@psf.upfronthosting.co.za> Message-ID: <1279400540.23.0.11447464611.issue8254@psf.upfronthosting.co.za> ?ric Araujo added the comment: Quick update: I have done a basic part of this, but Tarek explained to me the real usefulness of this command, i.e. provide build and installation options for third-party code (for the same purposes that get_config_var in Python?s sysconfig). I am currently working on #8252 but do not forget this one. ---------- assignee: tarek -> merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 23:09:24 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 21:09:24 +0000 Subject: [issue8254] write a configure command In-Reply-To: <1269787284.51.0.353047597946.issue8254@psf.upfronthosting.co.za> Message-ID: <1279400964.75.0.449167260263.issue8254@psf.upfronthosting.co.za> ?ric Araujo added the comment: Tarek also answered my questions. 1) 4) build and install options should be defined and checked only once, in configure. build and install would inherit from this class and get their option from it. 3) I switched to using distutils2.core.run_setup, which Tarek said is okayish. Understanding why the usual idiom of using the classes directly doesn?t work will be better. 5) Since the cache file (the file that contains options, written by configure) is tied to a precise build, it should be specific. I can put the platform and Python version in the filename, or maybe put the file in the platform-specific build directory. Not sure about the naming in dists. I still have to think about the overlap between setup.cfg and configure.cache. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 23:22:44 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 17 Jul 2010 21:22:44 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279401764.17.0.107249299914.issue9079@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Indeed. Replacing issue9079a.diff now. ---------- Added file: http://bugs.python.org/file18045/issue9079a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 23:22:51 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 17 Jul 2010 21:22:51 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279401771.26.0.645376520046.issue9079@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file18034/issue9079a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 23:28:31 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 17 Jul 2010 21:28:31 +0000 Subject: [issue1699259] replacing char* with const char* in sysmodule.c/.h Message-ID: <1279402111.24.0.926359212509.issue1699259@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: 2.7 is not gone. It has entered an extended maintenance period. During this period, 2.7.x releases will incorporate bug fixes but will not get any new features. This particular issue is arguably a bug. I think Christian should make a call on whether this is appropriate for 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 23:30:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 17 Jul 2010 21:30:23 +0000 Subject: [issue1706039] Added clearerr() to clear EOF state Message-ID: <1279402223.17.0.401858991531.issue1706039@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> belopolsky resolution: -> accepted stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 23:30:48 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 21:30:48 +0000 Subject: [issue8252] add a metadata section in setup.cfg In-Reply-To: <1269786516.47.0.241877166963.issue8252@psf.upfronthosting.co.za> Message-ID: <1279402248.35.0.87922553327.issue8252@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- dependencies: +update mkpkg to latest coding standards _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 17 23:37:28 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 21:37:28 +0000 Subject: [issue8591] update mkpkg to latest coding standards In-Reply-To: <1272727331.63.0.427295643421.issue8591@psf.upfronthosting.co.za> Message-ID: <1279402648.81.0.0231017706965.issue8591@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m assigning this bug to myself as part of my work on #8252. Dan, I?ll sort the various fixes in your patch and replay them incrementally. I?ll be pleased to work with you if you have time (find me in #distutils or through email), if you don?t thanks for the starting point, I?ll manage the rest :) I also had an epiphany: Why do we add a script when we have a nice command framework? So when the script is cleaned up, I?ll turn it into a distutils2.command.init command module. ---------- assignee: tarek -> merwok nosy: +titus resolution: -> accepted stage: -> needs patch versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 00:09:00 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 22:09:00 +0000 Subject: [issue9288] Disambiguate :option: and :cmdoption: In-Reply-To: <1279404540.57.0.963765007492.issue9288@psf.upfronthosting.co.za> Message-ID: <1279404540.57.0.963765007492.issue9288@psf.upfronthosting.co.za> New submission from ?ric Araujo : I made a doc patch in a followup to http://mail.python.org/pipermail/python-dev/2010-July/102011.html ---------- assignee: docs at python components: Documentation files: improve-check.diff keywords: needs review, patch messages: 110606 nosy: docs at python, merwok priority: normal severity: normal status: open title: Disambiguate :option: and :cmdoption: versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file18046/improve-check.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 00:09:13 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 22:09:13 +0000 Subject: [issue9288] Disambiguate :option: and :cmdoption: In-Reply-To: <1279404540.57.0.963765007492.issue9288@psf.upfronthosting.co.za> Message-ID: <1279404553.15.0.758292986685.issue9288@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file18046/improve-check.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 00:09:23 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 22:09:23 +0000 Subject: [issue9288] Disambiguate :option: and :cmdoption: In-Reply-To: <1279404540.57.0.963765007492.issue9288@psf.upfronthosting.co.za> Message-ID: <1279404563.25.0.466873711666.issue9288@psf.upfronthosting.co.za> Changes by ?ric Araujo : Added file: http://bugs.python.org/file18047/disambiguate-option-cmdoption.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 00:17:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 22:17:12 +0000 Subject: [issue8910] Write a text file explaining why Lib/test/data exists In-Reply-To: <1275793580.19.0.611567237471.issue8910@psf.upfronthosting.co.za> Message-ID: <1279405032.92.0.390594600858.issue8910@psf.upfronthosting.co.za> ?ric Araujo added the comment: Adding people listed for the testing interest area in the maintainers file. ---------- nosy: +giampaolo.rodola, michael.foord, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 00:18:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 22:18:16 +0000 Subject: [issue6722] collections.namedtuple: confusing example In-Reply-To: <1250591925.23.0.269848636465.issue6722@psf.upfronthosting.co.za> Message-ID: <1279405096.72.0.321964806336.issue6722@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 00:23:18 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 22:23:18 +0000 Subject: [issue2848] Remove mimetools usage from the stdlib In-Reply-To: <1210726775.09.0.0627957766628.issue2848@psf.upfronthosting.co.za> Message-ID: <1279405398.62.0.308409630477.issue2848@psf.upfronthosting.co.za> ?ric Araujo added the comment: Closing as outdated since 2.7 has been release with some mimetools usage left. ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed versions: +Python 2.7 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 00:32:54 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 22:32:54 +0000 Subject: [issue4819] Misc/cheatsheet needs updating In-Reply-To: <1230988594.32.0.497089911482.issue4819@psf.upfronthosting.co.za> Message-ID: <1279405974.93.0.541722367346.issue4819@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: georg.brandl -> docs at python nosy: +docs at python versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 00:36:48 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 22:36:48 +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: <1279406208.89.0.715942092173.issue8357@psf.upfronthosting.co.za> ?ric Araujo added the comment: Assigning to myself. Not sure if I?ll do the logging idea Tarek suggested or an option to the configure command (#8252). ---------- assignee: tarek -> merwok stage: -> needs patch type: behavior -> feature request versions: +Python 2.5, Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 00:41:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 22:41:12 +0000 Subject: [issue8538] Add ConfigureAction to argparse In-Reply-To: <1272303487.22.0.380388489779.issue8538@psf.upfronthosting.co.za> Message-ID: <1279406472.5.0.0949903868263.issue8538@psf.upfronthosting.co.za> ?ric Araujo added the comment: Some useful tips to make patches: http://www.python.org/dev/patches/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 00:44:46 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 17 Jul 2010 22:44:46 +0000 Subject: [issue9282] Bug in --listfuncs option of trace.py In-Reply-To: <1279355920.89.0.901837761289.issue9282@psf.upfronthosting.co.za> Message-ID: <1279406686.64.0.899987476778.issue9282@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Looking at the 2.x code, that is the obvious fix. I think this ready to commit. ---------- stage: -> commit review versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 00:47:09 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 22:47:09 +0000 Subject: [issue9286] email.utils.parseaddr returns garbage for invalid input In-Reply-To: <1279377359.55.0.199569408455.issue9286@psf.upfronthosting.co.za> Message-ID: <1279406829.03.0.830099552387.issue9286@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: -> r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 01:02:46 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 23:02:46 +0000 Subject: [issue7303] pkgutil lacks documentation for useful functions In-Reply-To: <1257891153.41.0.767469344024.issue7303@psf.upfronthosting.co.za> Message-ID: <1279407766.07.0.746790382881.issue7303@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for your help proposal Ulrik. If I understand the documentation correctly, docstrings should contain enough usage information but not too much. In pkgutil, some examples and long explanations could be removed after you move them to the reST doc. Make sure to work from a checkout of 3.2 (branch named py3k) to have the latest updates. This page contains some tips about patches: http://www.python.org/dev/patches/ You can ask any questions here or on the docs at python.org mailing list. Thanks again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 01:02:55 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 17 Jul 2010 23:02:55 +0000 Subject: [issue5180] 3.1 cannot unpickle 2.7-created pickle In-Reply-To: <1234045735.61.0.752787259691.issue5180@psf.upfronthosting.co.za> Message-ID: <1279407775.34.0.342088512015.issue5180@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed issue5180b.diff with minor additions in r82937 (r82938 for 3.1): 1. Added an assert that args is a tuple in instantiate() with an explanation why it is true. 2. Added a test for the other code branch instantiate. (Not all conditions are tested, but I think this is now good enough.) The explanation of INST and OBJ opcodes in pickletools is now out of date, so I am adding #9267 as a superseder. ---------- resolution: accepted -> fixed stage: commit review -> committed/rejected status: open -> closed superseder: -> Update pickle opcode documentation in pickletools for 3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 01:04:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 23:04:15 +0000 Subject: [issue7303] pkgutil lacks documentation for useful functions In-Reply-To: <1257891153.41.0.767469344024.issue7303@psf.upfronthosting.co.za> Message-ID: <1279407855.58.0.228593565534.issue7303@psf.upfronthosting.co.za> ?ric Araujo added the comment: Other useful advice: http://docs.pythonsprints.com/core_development/beginners#building-the-documentation http://docs.python.org/documenting/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 01:05:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 23:05:07 +0000 Subject: [issue7303] pkgutil lacks documentation for useful functions In-Reply-To: <1257891153.41.0.767469344024.issue7303@psf.upfronthosting.co.za> Message-ID: <1279407907.72.0.152619136763.issue7303@psf.upfronthosting.co.za> ?ric Araujo added the comment: Wrong link, sorry everyone for the noise: http://docs.pythonsprints.com/core_development/beginners.html#building-the-documentation ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 01:23:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 17 Jul 2010 23:23:07 +0000 Subject: [issue9026] argparse subcommands not printed in the same order they were added In-Reply-To: <1276856679.08.0.64136890627.issue9026@psf.upfronthosting.co.za> Message-ID: <1279408987.18.0.709158159905.issue9026@psf.upfronthosting.co.za> ?ric Araujo added the comment: In py3k.diff, the changes to argparse and new test cases look good to me. I don?t know why you?ve added hasattr tests in test_argparse.py. ---------- stage: unit test needed -> patch review title: [argparse] Subcommands not printed in the same order they were added -> argparse subcommands not printed in the same order they were added _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 01:43:17 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 17 Jul 2010 23:43:17 +0000 Subject: [issue9269] Cannot pickle self-referencing sets In-Reply-To: <1279234902.88.0.629141543515.issue9269@psf.upfronthosting.co.za> Message-ID: <1279410197.28.0.927282672898.issue9269@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Upon further investigation, I am no longer convinced that "reduce cycles" are necessarily fatal to pickling. I am attaching a script testcycle.py that allows creating cycles using various containers. It takes the name of container class as an argument and prints SUCCESS/FAILURE followed by annotated pickle disassembly. It turns out that self-referential tuples are pickled successfully even though being immutable, they must receive their state through arguments: $ ./python.exe testcycle.py tuple SUCCESS 0: \x80 PROTO 3 Protocol version indicator. 2: c GLOBAL '__main__ C' Push a global object (module.attr) on the stack. 14: ) EMPTY_TUPLE Push an empty tuple. 15: \x81 NEWOBJ Build an object instance. 16: q BINPUT 1 Store the stack top into the memo. The stack is not popped. 18: } EMPTY_DICT Push an empty dict. 19: X BINUNICODE 'foo' Push a Python Unicode string object. 27: h BINGET 1 Read an object from the memo and push it on the stack. 29: \x85 TUPLE1 Build a one-tuple out of the topmost item on the stack. 30: q BINPUT 4 Store the stack top into the memo. The stack is not popped. 32: s SETITEM Add a key+value pair to an existing dict. 33: b BUILD Finish building an object, via __setstate__ or dict update. 34: 0 POP Discard the top stack item, shrinking the stack by one item. 35: h BINGET 4 Read an object from the memo and push it on the stack. 37: . STOP Stop the unpickling machine. highest protocol among opcodes = 2 There is a comment in save_tuple() that explains how it works: # Subtle. d was not in memo when we entered save_tuple(), so # the process of saving the tuple's elements must have saved # the tuple itself: the tuple is recursive. The proper action # now is to throw away everything we put on the stack, and # simply GET the tuple (it's already constructed). This check # could have been done in the "for element" loop instead, but # recursive tuples are a rare thing. I wonder if the same trick could be used in save_reduce() to resolve #1062277 by pickling "reduce cycles" correctly instead of bailing out when they are encountered. ---------- priority: low -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 01:52:32 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 17 Jul 2010 23:52:32 +0000 Subject: [issue1699259] replacing char* with const char* in sysmodule.c/.h Message-ID: <1279410752.24.0.882581498383.issue1699259@psf.upfronthosting.co.za> Mark Lawrence added the comment: This is quite clearly marked as a feature request and hence is 3.2. If you wish to change it go ahead, but who's going to do the work? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 02:09:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 18 Jul 2010 00:09:52 +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: <1279411792.99.0.994432421338.issue8253@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m working on the files section alongside the metadata section (#8252. I will wait for resources, since it?s much more controversial. I?ll clean up mkpkg (see #8591) before updating it to support the new sections. ---------- dependencies: +update mkpkg to latest coding standards _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 02:48:54 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 18 Jul 2010 00:48:54 +0000 Subject: [issue9289] Skip test_long_key(test_winreg) on win2k + py2.x In-Reply-To: <1279414134.03.0.595847788627.issue9289@psf.upfronthosting.co.za> Message-ID: <1279414134.03.0.595847788627.issue9289@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : test_long_key fails on win2k + python2.x. ====================================================================== ERROR: test_long_key (__main__.LocalWinregTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_winreg.py", line 279, in test_long_key DeleteKey(HKEY_CURRENT_USER, '\\'.join((test_key_name, name))) WindowsError: [Error 234] ???????????? # Error says "More data is available" According to http://msdn.microsoft.com/en-us/library/ms724872(v=VS.85).aspx Value name: Windows 2000: 260 ANSI characters or 16,383 Unicode characters. Windows 2000 cannot handle long value name like *name* in the test, so I think we should skip the test on Windows 2000. I confirmed test runs fine on python3.x. Probably because it uses unicode Win32 API. ---------- components: Tests, Windows files: skip_test_long_key.patch keywords: patch messages: 110620 nosy: ocean-city priority: normal severity: normal stage: patch review status: open title: Skip test_long_key(test_winreg) on win2k + py2.x versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file18048/skip_test_long_key.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 03:12:40 2010 From: report at bugs.python.org (geremy condra) Date: Sun, 18 Jul 2010 01:12:40 +0000 Subject: [issue9285] A decorator for cProfile and profile modules In-Reply-To: <1279375274.49.0.102313390752.issue9285@psf.upfronthosting.co.za> Message-ID: <1279415560.39.0.89490056008.issue9285@psf.upfronthosting.co.za> Changes by geremy condra : ---------- nosy: +debatem1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 03:51:35 2010 From: report at bugs.python.org (Geraldo Xexeo) Date: Sun, 18 Jul 2010 01:51:35 +0000 Subject: [issue9290] IDLE and Command line present different behavior for sys.stdin In-Reply-To: <1279417895.54.0.811089047738.issue9290@psf.upfronthosting.co.za> Message-ID: <1279417895.54.0.811089047738.issue9290@psf.upfronthosting.co.za> New submission from Geraldo Xexeo : The fact that in IDLE sys.stdin is a idlelib.rpc.RPCProxy results in programs having different behavior in IDLE and in Command Line mode. I noticed that when grading many students exercises in IDLE. Things like: sys.stdin.readlines() just don?t exists in IDLE, but are fully operational in Command Line mode. In Command Line mode, sys.stdin is a file. This is expected, as the manual (27.1) says that sys.stdin (and stdout and stderrr) are "File objects corresponding to the interpreter?s standard input" There are also other "quirks". I fell that is really strange that stdin has different behavior for the same program. ---------- components: IDLE, IO messages: 110621 nosy: Geraldo.Xexeo priority: normal severity: normal status: open title: IDLE and Command line present different behavior for sys.stdin versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 03:58:40 2010 From: report at bugs.python.org (Jeremy Kloth) Date: Sun, 18 Jul 2010 01:58:40 +0000 Subject: [issue8254] write a configure command In-Reply-To: <1269787284.51.0.353047597946.issue8254@psf.upfronthosting.co.za> Message-ID: <1279418320.09.0.349912571115.issue8254@psf.upfronthosting.co.za> Jeremy Kloth added the comment: WRT #5, it would be possible to use section headers within the configure.cache file to indicate a particular "platform build". Very much like how 4Suite's `config` command stored the cache file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 04:29:12 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 18 Jul 2010 02:29:12 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1279420152.12.0.506336075348.issue1712522@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Incidentally, I was working on this yeserterday. Some minor changes were required in the patch as quote had undergone changes. Fixed and committed in revision 82940. Thanks to Matt Giuca for this. ---------- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 09:31:28 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Jul 2010 07:31:28 +0000 Subject: [issue9277] test_struct failure on ARM In-Reply-To: <1279311086.16.0.957118455274.issue9277@psf.upfronthosting.co.za> Message-ID: <1279438288.24.0.962101102484.issue9277@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks, Stefan! Fixed (I hope) in r82941 (py3k). Now I'm puzzled about why the test passes for ' mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 10:02:09 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Jul 2010 08:02:09 +0000 Subject: [issue9277] test_struct failure on ARM In-Reply-To: <1279311086.16.0.957118455274.issue9277@psf.upfronthosting.co.za> Message-ID: <1279440129.48.0.373209176384.issue9277@psf.upfronthosting.co.za> Mark Dickinson added the comment: Merged to release31-maint in r82942, release27-maint in r82945, release26-maint in r82946. (And added missing Misc/NEWS entries for this change in r82943, r82944.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 11:31:50 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Jul 2010 09:31:50 +0000 Subject: [issue9277] test_struct failure on ARM In-Reply-To: <1279311086.16.0.957118455274.issue9277@psf.upfronthosting.co.za> Message-ID: <1279445510.79.0.595765518336.issue9277@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> fixed status: open -> pending versions: +Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 12:03:50 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 18 Jul 2010 10:03:50 +0000 Subject: [issue9288] Disambiguate :option: and :cmdoption: In-Reply-To: <1279404540.57.0.963765007492.issue9288@psf.upfronthosting.co.za> Message-ID: <1279447430.95.0.915302124203.issue9288@psf.upfronthosting.co.za> Georg Brandl added the comment: This patch is not really accurate; cmdoption *is* the directive where the link goes to. option is the role to link to them (or not). ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 12:12:23 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 18 Jul 2010 10:12:23 +0000 Subject: [issue9279] get rid of pdb.doc In-Reply-To: <1279316487.65.0.399467366411.issue9279@psf.upfronthosting.co.za> Message-ID: <1279447943.16.0.446186948918.issue9279@psf.upfronthosting.co.za> Georg Brandl added the comment: Done in r82949. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 12:28:42 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 10:28:42 +0000 Subject: [issue2053] IDLE - standardize dialogs In-Reply-To: <1202515821.86.0.159216664847.issue2053@psf.upfronthosting.co.za> Message-ID: <1279448922.8.0.284573660811.issue2053@psf.upfronthosting.co.za> Mark Lawrence added the comment: For the record there has been a sizeable thread on python-dev in the last few days regarding IDLE. As a result it is extremely likely that IDLE outstanding issues will be picked up, so please leave this issue open. ---------- nosy: +BreamoreBoy, tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 12:30:21 2010 From: report at bugs.python.org (Martina Oefelein) Date: Sun, 18 Jul 2010 10:30:21 +0000 Subject: [issue4047] test_run_abort triggers CrashReporter on MacOS X In-Reply-To: <1223212546.3.0.400600313868.issue4047@psf.upfronthosting.co.za> Message-ID: <1279449021.04.0.600217998041.issue4047@psf.upfronthosting.co.za> Martina Oefelein added the comment: Yes, a warning at the start of the test would at least let the user know that the crash is expected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 12:37:11 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 18 Jul 2010 10:37:11 +0000 Subject: [issue9277] test_struct failure on ARM In-Reply-To: <1279311086.16.0.957118455274.issue9277@psf.upfronthosting.co.za> Message-ID: <1279449431.4.0.563863083356.issue9277@psf.upfronthosting.co.za> Stefan Krah added the comment: > Now I'm puzzled about why the test passes for ' open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 13:09:47 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 11:09:47 +0000 Subject: [issue2118] smtplib.SMTP() raises socket.error rather than SMTPConnectError In-Reply-To: <1203027793.14.0.279031432545.issue2118@psf.upfronthosting.co.za> Message-ID: <1279451387.85.0.691820350251.issue2118@psf.upfronthosting.co.za> Mark Lawrence added the comment: I applied the patch to test_smtplib.py only and all tests passed, surely that's not correct. Removing the explicit test for a non-numeric port in smtplib.py seems strange to me, could someone please explain the rationale behind this. I also noticed this line in the patch. if self.debuglevel > 0: print>>stderr, "connect:", msg And this comment in set_debuglevel in smtplib.py "A non-false value results in debug messages for connection and for all messages sent to and received from the server." IIRC if a string was passed into set_debuglevel the comparison would fail in py3k, am I correct? The print statement would not work in py3k. Given that the debuglevel code obviously doesn't get tested perhaps it should simply be stripped from the code? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 13:11:56 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 11:11:56 +0000 Subject: [issue2796] Build issues in DragonFly BSD In-Reply-To: <1210316878.4.0.717885872695.issue2796@psf.upfronthosting.co.za> Message-ID: <1279451516.74.0.509093534849.issue2796@psf.upfronthosting.co.za> Mark Lawrence added the comment: I suggest that this is closed if we do not get an answer to Brian's question. ---------- nosy: +BreamoreBoy status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 13:15:27 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 11:15:27 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1279451727.94.0.394587631402.issue2813@psf.upfronthosting.co.za> Mark Lawrence added the comment: Jean, do you intend taking this issue any further or can it be closed? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 13:17:30 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Jul 2010 11:17:30 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1279451850.37.0.881860193597.issue2813@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'll take a look at this. ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 13:38:08 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Jul 2010 11:38:08 +0000 Subject: [issue9277] test_struct failure on ARM In-Reply-To: <1279311086.16.0.957118455274.issue9277@psf.upfronthosting.co.za> Message-ID: <1279453088.15.0.855173595488.issue9277@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Somewhere along the way native_table is used instead of lilendian_table, > so np_bool is called. Hmm. This doesn't alleviate my confusion. :) The relevant part of test_struct looks like: for prefix in tuple("<>!=")+('',): # other tests try: struct.pack(prefix + '?', ExplodingBool()) except IOError: pass else: self.fail("Expected IOError: struct.pack(%r, " "ExplodingBool())" % (prefix + '?')) So the '?' test. But the '?' one was failing. I don't see how native_table is relevant here, but am probably missing something. On the other hand, with the pre-patch code, we end up with a method that sets a Python error but then returns a return value that indicates no error happened, and all sorts of unpredictable things can happen at that point... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 13:46:57 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 11:46:57 +0000 Subject: [issue2927] expose html.parser.unescape In-Reply-To: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> Message-ID: <1279453617.75.0.794308997554.issue2927@psf.upfronthosting.co.za> Mark Lawrence added the comment: Trying to run the test and I get:- c:\py3k\Lib>..\PCbuild\python_d.exe test\test_htmlparser.py File "test\test_htmlparser.py", line 326 escaped = u"

There’s the Côte

" ^ SyntaxError: invalid syntax ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 13:54:55 2010 From: report at bugs.python.org (Dmitry Jemerov) Date: Sun, 18 Jul 2010 11:54:55 +0000 Subject: [issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry In-Reply-To: <1279454095.41.0.733053669611.issue9291@psf.upfronthosting.co.za> Message-ID: <1279454095.41.0.733053669611.issue9291@psf.upfronthosting.co.za> New submission from Dmitry Jemerov : On Windows, mimetypes initialization reads the list of MIME types from the Windows registry. It assumes that all characters are Latin-1 encoded, and fails when it's not the case, with the following exception: Traceback (most recent call last): File "mttest.py", line 3, in mimetypes.init() File "c:\Python27\lib\mimetypes.py", line 355, in init db.read_windows_registry() File "c:\Python27\lib\mimetypes.py", line 260, in read_windows_registry for ctype in enum_types(mimedb): File "c:\Python27\lib\mimetypes.py", line 250, in enum_types ctype = ctype.encode(default_encoding) # omit in 3.x! UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128) This can be reproduced, for example, on a Russian Windows XP installation which has QuickTime installed (QuickTime creates the non-Latin entries in the registry). The following line causes the exception to happen: import mimetypes; mimetypes.init() ---------- components: Library (Lib), Windows messages: 110637 nosy: Dmitry.Jemerov priority: normal severity: normal status: open title: mimetypes initialization fails on Windows because of non-Latin characters in registry versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 13:55:06 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 11:55:06 +0000 Subject: [issue2931] optparse: various problems with unicode and gettext In-Reply-To: <1211297479.44.0.970954846769.issue2931@psf.upfronthosting.co.za> Message-ID: <1279454106.55.0.506471922821.issue2931@psf.upfronthosting.co.za> Mark Lawrence added the comment: Alexy, there would be a much better chance of getting this accepted if you could supply a patch file that also included unit tests. ---------- nosy: +BreamoreBoy, aronacher versions: +Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 13:57:20 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 11:57:20 +0000 Subject: [issue3022] mailbox module, two small fixes In-Reply-To: <1212355773.67.0.369854949727.issue3022@psf.upfronthosting.co.za> Message-ID: <1279454240.09.0.615179134336.issue3022@psf.upfronthosting.co.za> Mark Lawrence added the comment: Anyone interested in taking this forward? ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 13:58:12 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 11:58:12 +0000 Subject: [issue3068] IDLE - Add an extension configuration dialog In-Reply-To: <1213035033.21.0.781726477097.issue3068@psf.upfronthosting.co.za> Message-ID: <1279454292.47.0.735246264135.issue3068@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +tjreedy versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 14:06:10 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 12:06:10 +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: <1279454770.08.0.2586953235.issue3073@psf.upfronthosting.co.za> Mark Lawrence added the comment: Anyone with knowledge of cookies and/or regexes who could review this? The patch isn't that big and includes unit tests. Note also Trent's offer to check it in and patch py3k. ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 14:09:35 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 18 Jul 2010 12:09:35 +0000 Subject: [issue9277] test_struct failure on ARM In-Reply-To: <1279453088.15.0.855173595488.issue9277@psf.upfronthosting.co.za> Message-ID: <20100718120811.GA20660@yoda.bytereef.org> Stefan Krah added the comment: Mark Dickinson wrote: > > Somewhere along the way native_table is used instead of lilendian_table, > > so np_bool is called. > > Hmm. This doesn't alleviate my confusion. :) I suppose I sounded a bit like the Oracle of Delphi here. :) I compiled with OPT="-O0 -g -funsigned-char" and stepped through the code (pre-patch). With '<', np_bool is substituted for bp_bool (apparently in PyInit__struct). np_bool correctly returns -1, so the problem does not occur. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 14:14:37 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 12:14:37 +0000 Subject: [issue3119] pickle.py is limited by python's call stack In-Reply-To: <1213589185.62.0.660916672679.issue3119@psf.upfronthosting.co.za> Message-ID: <1279455277.92.0.243145098883.issue3119@psf.upfronthosting.co.za> Mark Lawrence added the comment: Sean has stated that the patch seems fine, what needs to be done to take this forward? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 15:06:04 2010 From: report at bugs.python.org (Michael Foord) Date: Sun, 18 Jul 2010 13:06:04 +0000 Subject: [issue9110] contextlib.ContextDecorator In-Reply-To: <1277765898.65.0.314299135702.issue9110@psf.upfronthosting.co.za> Message-ID: <1279458364.06.0.373610903818.issue9110@psf.upfronthosting.co.za> Michael Foord added the comment: I've uploaded a new patch with additions to the docs. Let me know if it is ok or if you have any suggested amendments. ---------- Added file: http://bugs.python.org/file18049/contextlib_docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 15:16:11 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Jul 2010 13:16:11 +0000 Subject: [issue9277] test_struct failure on ARM In-Reply-To: <1279311086.16.0.957118455274.issue9277@psf.upfronthosting.co.za> Message-ID: <1279458971.35.0.286296048377.issue9277@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ah yes; I missed that bit of PyInit__struct; thank you! Setting to pending; I'll close once the buildbots have reported back (it might take some days for the ARM buildbots to catch up). Many thanks for the diagnosis. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 15:43:38 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 18 Jul 2010 13:43:38 +0000 Subject: [issue9110] contextlib.ContextDecorator In-Reply-To: <1277765898.65.0.314299135702.issue9110@psf.upfronthosting.co.za> Message-ID: <1279460618.58.0.458448462032.issue9110@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied, with small changes, in r82951. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 15:44:26 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 18 Jul 2010 13:44:26 +0000 Subject: [issue9292] Dead code in Modules/pyexpat.c In-Reply-To: <1279460665.67.0.339124626695.issue9292@psf.upfronthosting.co.za> Message-ID: <1279460665.67.0.339124626695.issue9292@psf.upfronthosting.co.za> New submission from Antoine Pitrou : There's some dead code in xmlparse_ParseFile() in Modules/pyexpat.c: the file pointer "fp" is always NULL, and as such the following code can never get entered into: if (fp) { bytes_read = fread(buf, sizeof(char), BUF_SIZE, fp); if (bytes_read < 0) { PyErr_SetFromErrno(PyExc_IOError); return NULL; } } There might be similar situations in other methods. ---------- components: Extension Modules messages: 110646 nosy: akuchling, christian.heimes, pitrou priority: low severity: normal stage: needs patch status: open title: Dead code in Modules/pyexpat.c versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 16:06:11 2010 From: report at bugs.python.org (ipatrol) Date: Sun, 18 Jul 2010 14:06:11 +0000 Subject: [issue7511] msvc9compiler.py: ValueError: [u'path'] In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1279461971.59.0.897086707432.issue7511@psf.upfronthosting.co.za> ipatrol added the comment: I noticed that the directions from mathworks are no longer correct. The only optional feature is a 64 bit SQL server. Yet I still can't get it to work correctly. Does MS no longer provide the compiler in their free editions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 16:09:31 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 18 Jul 2010 14:09:31 +0000 Subject: [issue9293] Unsupported IO operations should raise UnsupportedOperation In-Reply-To: <1279462171.13.0.608517762148.issue9293@psf.upfronthosting.co.za> Message-ID: <1279462171.13.0.608517762148.issue9293@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Some of them currently raise IOError. Fortunately, UnsupportedOperation inherits from IOError, which means compatibility can be preserved. Contrast: >>> open("LICENSE").write("bar") Traceback (most recent call last): File "", line 1, in IOError: not writable With: >>> open("LICENSE", "rb").write(b"") Traceback (most recent call last): File "", line 1, in io.UnsupportedOperation: write Or: >>> io.StringIO().fileno() Traceback (most recent call last): File "", line 1, in io.UnsupportedOperation: fileno Or, unfortunately: >>> open("LICENSE", "rb", buffering=0).write(b"") Traceback (most recent call last): File "", line 1, in ValueError: File not open for writing ---------- components: IO, Library (Lib) keywords: easy messages: 110648 nosy: amaury.forgeotdarc, benjamin.peterson, haypo, pitrou priority: normal severity: normal status: open title: Unsupported IO operations should raise UnsupportedOperation type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 16:10:11 2010 From: report at bugs.python.org (ipatrol) Date: Sun, 18 Jul 2010 14:10:11 +0000 Subject: [issue7511] msvc9compiler.py: ValueError: [u'path'] In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1279462211.19.0.0505188977661.issue7511@psf.upfronthosting.co.za> ipatrol added the comment: HAHA DISREGARD THAT, WRONG DOWNLOAD. However, the C++ compiler `is` now installed by default. P.S: that second ValueError? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 16:38:19 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 18 Jul 2010 14:38:19 +0000 Subject: [issue9293] Unsupported IO operations should raise UnsupportedOperation In-Reply-To: <1279462171.13.0.608517762148.issue9293@psf.upfronthosting.co.za> Message-ID: <1279463899.51.0.534361741482.issue9293@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Another kind of unsupported operation is non-absolute seeking on a TextIOWrapper: >>> open("LICENSE").seek(1, 1) Traceback (most recent call last): File "", line 1, in IOError: can't do nonzero cur-relative seeks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 16:49:23 2010 From: report at bugs.python.org (Reid Kleckner) Date: Sun, 18 Jul 2010 14:49:23 +0000 Subject: [issue6643] Throw away more radioactive locks that could be held across a fork in threading.py In-Reply-To: <1249412209.9.0.200329347238.issue6643@psf.upfronthosting.co.za> Message-ID: <1279464563.26.0.0298538242379.issue6643@psf.upfronthosting.co.za> Changes by Reid Kleckner : ---------- assignee: -> rnk keywords: +needs review -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 16:50:49 2010 From: report at bugs.python.org (Reid Kleckner) Date: Sun, 18 Jul 2010 14:50:49 +0000 Subject: [issue6642] returning after forking a child thread doesn't call Py_Finalize In-Reply-To: <1249410110.52.0.861898541816.issue6642@psf.upfronthosting.co.za> Message-ID: <1279464649.33.0.444825484436.issue6642@psf.upfronthosting.co.za> Changes by Reid Kleckner : ---------- assignee: -> rnk dependencies: +Throw away more radioactive locks that could be held across a fork in threading.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 16:55:44 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 18 Jul 2010 14:55:44 +0000 Subject: [issue9294] Dead code in Objects/object.c In-Reply-To: <1279464944.67.0.616745975029.issue9294@psf.upfronthosting.co.za> Message-ID: <1279464944.67.0.616745975029.issue9294@psf.upfronthosting.co.za> New submission from Antoine Pitrou : internal_print() is called from only one place, with the `nesting` argument wired to 0, therefore the following chunk of code in internal_print() never gets a chance to be executed: if (nesting > 10) { PyErr_SetString(PyExc_RuntimeError, "print recursion"); return -1; } ---------- components: Interpreter Core messages: 110651 nosy: pitrou priority: low severity: normal stage: needs patch status: open title: Dead code in Objects/object.c versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 16:59:36 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 18 Jul 2010 14:59:36 +0000 Subject: [issue9295] test_close_open_print_buffered(test_file) sometimes crashes In-Reply-To: <1279465176.3.0.233257918018.issue9295@psf.upfronthosting.co.za> Message-ID: <1279465176.3.0.233257918018.issue9295@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : I noticed test_close_open_print_buffered(test_file) sometimes crashes on release26-maint branch. This is most problamatic part in my python2.6 test survey on VC6 + Win2K. Here is stacktrace. _write_lk(int 6, const void * 0x00b49240, unsigned int 11) line 155 + 3 bytes _write(int 6, const void * 0x00b49240, unsigned int 11) line 79 + 17 bytes _flush(_iobuf * 0x102618e8) line 162 + 23 bytes _fclose_lk(_iobuf * 0x102618e8) line 130 + 9 bytes fclose(_iobuf * 0x102618e8) line 67 + 9 bytes close_the_file(PyFileObject * 0x00a9e6b8) line 370 + 7 bytes file_close(PyFileObject * 0x00a9e6b8) line 570 + 9 bytes call_function(_object * * * 0x00fdf350, int 11134648) line 3734 + 204 bytes PyEval_EvalFrameEx(_frame * 0x00b33d50, int 131) line 2414 (snip) Python crashes when MSVCRT touches internal buffer of file object via flush() in close(). I think this is multi-threading bug related to internal buffer of file object. I'll post more. ---------- components: Interpreter Core messages: 110652 nosy: ocean-city priority: normal severity: normal stage: needs patch status: open title: test_close_open_print_buffered(test_file) sometimes crashes type: crash versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 17:04:13 2010 From: report at bugs.python.org (Reid Kleckner) Date: Sun, 18 Jul 2010 15:04:13 +0000 Subject: [issue8844] Condition.wait() doesn't raise KeyboardInterrupt In-Reply-To: <1275065292.27.0.238026363438.issue8844@psf.upfronthosting.co.za> Message-ID: <1279465453.84.0.995887590762.issue8844@psf.upfronthosting.co.za> Reid Kleckner added the comment: Waiting until the portability hacks for gettimeofday make it into core Python. ---------- dependencies: +Make gettimeofday available in time module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 17:06:52 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 18 Jul 2010 15:06:52 +0000 Subject: [issue9294] Dead code in Objects/object.c In-Reply-To: <1279464944.67.0.616745975029.issue9294@psf.upfronthosting.co.za> Message-ID: <1279465612.28.0.1443433182.issue9294@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 17:14:01 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 18 Jul 2010 15:14:01 +0000 Subject: [issue9295] test_close_open_print_buffered(test_file) sometimes crashes In-Reply-To: <1279465176.3.0.233257918018.issue9295@psf.upfronthosting.co.za> Message-ID: <1279466041.57.0.646628663384.issue9295@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I saw value of local variable *thread* was 5384 and internal buffer's address was 0x102618c8 (sorry, this is another stacktrace which differs from previous one) thread(5384) func(file_close): enter.... thread(5384) func(close_the_file): enter.... thread(5384) func(close_the_file): file(00A1FB18) address(00B18FD0): local_close enter... thread(5376) func(file_close): enter.... thread(5376) func(close_the_file): enter.... thread(5376) func(close_the_file): leave.... thread(5376) func(file_close): file(00A1FB18) address(00B18FD0): PyMem_Free thread(5376) func(file_close): leave.... Thread 5384 entered close_the_file() and ran local_close() and allowed another thread to run. Before this, fp->f_fp was set to NULL. Thread 5376 entered close_the_file() and see fp->f_fp is NULL, and returned immediately and freed fp->f_setbuf. Interesting point is, thread 5384 was still running close(2), so flush(2) called by this function touched this buffer and crashed. ---------- keywords: +patch Added file: http://bugs.python.org/file18050/py26_debug_threaded_close.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 17:16:20 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 18 Jul 2010 15:16:20 +0000 Subject: [issue9295] test_close_open_print_buffered(test_file) sometimes crashes In-Reply-To: <1279465176.3.0.233257918018.issue9295@psf.upfronthosting.co.za> Message-ID: <1279466180.41.0.0982148567089.issue9295@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 17:16:53 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 18 Jul 2010 15:16:53 +0000 Subject: [issue9295] test_close_open_print_buffered(test_file) sometimes crashes In-Reply-To: <1279465176.3.0.233257918018.issue9295@psf.upfronthosting.co.za> Message-ID: <1279466213.48.0.363175868363.issue9295@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I saw value of local variable *thread* was 5384 and internal buffer's address was 0x102618c8 (sorry, this is another stacktrace which differs from previous one) thread(5384) func(file_close): enter.... thread(5384) func(close_the_file): enter.... thread(5384) func(close_the_file): file(00A1FB18) address(00B18FD0): local_close enter... thread(5376) func(file_close): enter.... thread(5376) func(close_the_file): enter.... thread(5376) func(close_the_file): leave.... thread(5376) func(file_close): file(00A1FB18) address(00B18FD0): PyMem_Free thread(5376) func(file_close): leave.... Thread 5384 entered close_the_file() and ran local_close() and allowed another thread to run. Before this, fp->f_fp was set to NULL. Thread 5376 entered close_the_file() and see fp->f_fp is NULL, and returned immediately and freed fp->f_setbuf. Interesting point is, thread 5384 was still running close(2), so flush(2) called by this function touched this buffer and crashed. ---------- Added file: http://bugs.python.org/file18051/py26_debug_threaded_close.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 17:26:41 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 18 Jul 2010 15:26:41 +0000 Subject: [issue9295] test_close_open_print_buffered(test_file) sometimes crashes In-Reply-To: <1279465176.3.0.233257918018.issue9295@psf.upfronthosting.co.za> Message-ID: <1279466801.95.0.201695207361.issue9295@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file18051/py26_debug_threaded_close.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 17:31:33 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 18 Jul 2010 15:31:33 +0000 Subject: [issue9295] test_close_open_print_buffered(test_file) sometimes crashes In-Reply-To: <1279465176.3.0.233257918018.issue9295@psf.upfronthosting.co.za> Message-ID: <1279467093.07.0.373170925616.issue9295@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I created a patch to workaround this crash. But I saw another problamatic phenomenon "Error without exception set". I confirmed PyErr_Occurred() returns TRUE when leaving file_close() on error, but I gave up. test_close_open_print_buffered (__main__.FileThreadingTests) ... close failed in file object destructor: IOError: [Errno 0] Error Exception in thread Thread-1: Traceback (most recent call last): File "e:\python-dev\release26-maint\lib\threading.py", line 532, in __bootstra p_inner self.run() File "e:\python-dev\release26-maint\lib\threading.py", line 484, in run self.__target(*self.__args, **self.__kwargs) File "test_custom.py", line 94, in worker f() File "test_custom.py", line 88, in lambda: self._close_and_reopen_file(), File "test_custom.py", line 54, in _close_and_reopen_file self._close_file() File "test_custom.py", line 49, in _close_file self.f.close() SystemError: error return without exception set Qclose failed in file object destructor: IOError: [Errno 0] Error Exception in thread Thread-4: Traceback (most recent call last): File "e:\python-dev\release26-maint\lib\threading.py", line 532, in __bootstra p_inner self.run() File "e:\python-dev\release26-maint\lib\threading.py", line 484, in run self.__target(*self.__args, **self.__kwargs) File "test_custom.py", line 94, in worker f() File "test_custom.py", line 88, in lambda: self._close_and_reopen_file(), File "test_custom.py", line 54, in _close_and_reopen_file self._close_file() File "test_custom.py", line 49, in _close_file self.f.close() SystemError: error return without exception set 4271 88.3166 ok ---------------------------------------------------------------------- Ran 1 test in 6.579s OK ---------- Added file: http://bugs.python.org/file18052/py26_experimental_patch_on_fileobject.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 17:38:59 2010 From: report at bugs.python.org (Reid Kleckner) Date: Sun, 18 Jul 2010 15:38:59 +0000 Subject: [issue2927] expose html.parser.unescape In-Reply-To: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> Message-ID: <1279467539.82.0.140438919743.issue2927@psf.upfronthosting.co.za> Reid Kleckner added the comment: It's using the old Python 2 unicode string literal syntax. It also doesn't keep to 80 cols. I'd also rather continue using a lazily initialized dict instead of catching a KeyError for '. I also feel that with the changes to Unicode in py3k, the cp1252 stuff won't work as desired and should be cut. === Is anyone still interested in html.unescape or html.escape anyway? Every web framework seems to have their own support routines already. Otherwise I'd recommend close -> wontfix. ---------- nosy: +rnk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 17:39:52 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Jul 2010 15:39:52 +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: <1279467592.04.0.559019008075.issue8265@psf.upfronthosting.co.za> Mark Dickinson added the comment: The test_float failure is still extant. Here's the output of gcc -v on this buildbot, for use in any gcc bug report: Using built-in specs. Target: arm-linux-gnueabi Configured with: ../src/configure -v --with-pkgversion='Debian 4.4.4-6' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --enable-multiarch --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --program-suffix=-4.4 --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-sjlj-exceptions --enable-checking=release --build=arm-linux-gnueabi --host=arm-linux-gnueabi --target=arm-linux-gnueabi Thread model: posix gcc version 4.4.4 (Debian 4.4.4-6) and the relevant compilation line: gcc -pthread -c -g -O2 -g -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Objects/floatobject.o Objects/floatobject.c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 17:45:11 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 18 Jul 2010 15:45:11 +0000 Subject: [issue9295] test_close_open_print_buffered(test_file) sometimes crashes In-Reply-To: <1279465176.3.0.233257918018.issue9295@psf.upfronthosting.co.za> Message-ID: <1279467911.04.0.907775586219.issue9295@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The proposed resolution is wrong. As the comment says, there is a specific reason why f->fp is NULLed at this point. It appears that maybe MSVCRT is not entirely thread-safe with respect to buffered file I/O. Perhaps the test can simply be disabled under Windows. Is test_close_open_print_buffered the only test that fails? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 17:48:56 2010 From: report at bugs.python.org (Doug Hellmann) Date: Sun, 18 Jul 2010 15:48:56 +0000 Subject: [issue9296] json module skipkeys handling changed exception types in 2.7 In-Reply-To: <1279468136.69.0.813704540742.issue9296@psf.upfronthosting.co.za> Message-ID: <1279468136.69.0.813704540742.issue9296@psf.upfronthosting.co.za> New submission from Doug Hellmann : Under Python 2.6 the json encoder raised a TypeError when it encountered dictionary keys that were not strings. Under 2.7, that exception has changed to a ValueError, but the documentation still says it raises TypeError. I'm not sure which is right, but TypeError seems like the correct exception. ---------- components: Library (Lib) messages: 110660 nosy: doughellmann priority: normal severity: normal status: open title: json module skipkeys handling changed exception types in 2.7 type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 17:57:11 2010 From: report at bugs.python.org (Doug Hellmann) Date: Sun, 18 Jul 2010 15:57:11 +0000 Subject: [issue9296] json module skipkeys handling changed exception types in 2.7 In-Reply-To: <1279468136.69.0.813704540742.issue9296@psf.upfronthosting.co.za> Message-ID: <1279468631.06.0.491523369783.issue9296@psf.upfronthosting.co.za> Doug Hellmann added the comment: The attached file json_skipkeys.py illustrates the problem. ---------- Added file: http://bugs.python.org/file18053/json_skipkeys.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 18:03:38 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 18 Jul 2010 16:03:38 +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: <1279469018.36.0.0893812733569.issue8265@psf.upfronthosting.co.za> Mark Dickinson added the comment: Added some test code to the configure script in r82957; if the corresponding configure test fails, this snippet can be used in the gcc bug report. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 18:14:19 2010 From: report at bugs.python.org (Doug Hellmann) Date: Sun, 18 Jul 2010 16:14:19 +0000 Subject: [issue9296] json module skipkeys handling changed exception types in 2.7 In-Reply-To: <1279468136.69.0.813704540742.issue9296@psf.upfronthosting.co.za> Message-ID: <1279469659.39.0.958704210233.issue9296@psf.upfronthosting.co.za> Doug Hellmann added the comment: Looking into the code, I see in _json.c that a ValueError is raised by encoder_listencode_dict() on line 2150, but in the pure-Python implementation in json/encoder.py a TypeError is raised by _make_iterencode() on line 376. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 18:23:43 2010 From: report at bugs.python.org (Matt Joiner) Date: Sun, 18 Jul 2010 16:23:43 +0000 Subject: [issue6627] threading.local() does not work with C-created threads In-Reply-To: <1249243364.61.0.822632396677.issue6627@psf.upfronthosting.co.za> Message-ID: <1279470223.02.0.704699754072.issue6627@psf.upfronthosting.co.za> Changes by Matt Joiner : ---------- nosy: +anacrolix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 18:50:47 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 18 Jul 2010 16:50:47 +0000 Subject: [issue1902] Test In-Reply-To: <1200998820.47.0.13912653563.issue1902@psf.upfronthosting.co.za> Message-ID: <1279471847.09.0.199163658018.issue1902@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is a link: (http://www.python.org) ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 18:51:27 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 18 Jul 2010 16:51:27 +0000 Subject: [issue1902] Test In-Reply-To: <1200998820.47.0.13912653563.issue1902@psf.upfronthosting.co.za> Message-ID: <1279471887.95.0.221436753306.issue1902@psf.upfronthosting.co.za> Martin v. L?wis added the comment: And another think: http://www.microsoft.com/VS(1234.foo).aspx ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 19:10:25 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 18 Jul 2010 17:10:25 +0000 Subject: [issue9295] test_close_open_print_buffered(test_file) sometimes crashes In-Reply-To: <1279465176.3.0.233257918018.issue9295@psf.upfronthosting.co.za> Message-ID: <1279473025.76.0.969498097193.issue9295@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Maybe I am wrong, but when another thread calls File.close(), there is no system call on the code path, so I think still crash can happen nevertheless system call is thread safe. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 19:19:50 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 18 Jul 2010 17:19:50 +0000 Subject: [issue9295] test_close_open_print_buffered(test_file) sometimes crashes In-Reply-To: <1279473025.76.0.969498097193.issue9295@psf.upfronthosting.co.za> Message-ID: <1279473585.3213.3.camel@localhost.localdomain> Antoine Pitrou added the comment: > Maybe I am wrong, but when another thread calls File.close(), there is > no system call on the code path, There is, and that's precisely what's the various tests test for. (closing a file from a thread while it's being used from another thread) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 19:25:25 2010 From: report at bugs.python.org (Jean Brouwers) Date: Sun, 18 Jul 2010 17:25:25 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1279473925.69.0.42923730048.issue2813@psf.upfronthosting.co.za> Jean Brouwers added the comment: Mark L, No, I do not intend to take this issue further. Rather the opposite, it should probably be paired down based on the recent comments. Specifically, use PyOS_double_to_string, remove support for long double and perhaps more. Also, the patches I created are more than 2 years old and will need to be updated against the current stringobject.c code. There are quite a few changes in the 2.7 version of that file since early 2.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 19:35:39 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 18 Jul 2010 17:35:39 +0000 Subject: [issue9295] test_close_open_print_buffered(test_file) sometimes crashes In-Reply-To: <1279465176.3.0.233257918018.issue9295@psf.upfronthosting.co.za> Message-ID: <1279474539.68.0.852084808182.issue9295@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Hmm, correct me if following understanding is wrong somewhere... 1. File.close() is actually file_close(), and is calling close_the_file(). 2. Returns immediately because local_fp == f->f_fp is already NULL. The return value is None. 3. sts is non-NULL, so PyMem_Free(f->f_setbuf) happens. 4. There is no system call for FILE object, so thread won't wait for close(2) completion. Maybe can we fix this issue by the patch like this? I moved PyMem_Free into close_the_file(), and called it only when close operation succeeded. Index: Objects/fileobject.c =================================================================== --- Objects/fileobject.c (revision 82910) +++ Objects/fileobject.c (working copy) @@ -371,9 +371,14 @@ Py_END_ALLOW_THREADS if (sts == EOF) return PyErr_SetFromErrno(PyExc_IOError); - if (sts != 0) + if (sts != 0) { + PyMem_Free(f->f_setbuf); + f->f_setbuf = NULL; return PyInt_FromLong((long)sts); + } } + PyMem_Free(f->f_setbuf); + f->f_setbuf = NULL; } Py_RETURN_NONE; } @@ -567,12 +572,7 @@ static PyObject * file_close(PyFileObject *f) { - PyObject *sts = close_the_file(f); - if (sts) { - PyMem_Free(f->f_setbuf); - f->f_setbuf = NULL; - } - return sts; + return close_the_file(f); } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 19:39:56 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 18 Jul 2010 17:39:56 +0000 Subject: [issue9295] test_close_open_print_buffered(test_file) sometimes crashes In-Reply-To: <1279465176.3.0.233257918018.issue9295@psf.upfronthosting.co.za> Message-ID: <1279474796.26.0.948161495908.issue9295@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I forgot to mention that I didn't see any "Error without exception set" by my last patch. I agree f->f_fp = NULL; is needed there. ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 19:40:59 2010 From: report at bugs.python.org (Reid Kleckner) Date: Sun, 18 Jul 2010 17:40:59 +0000 Subject: [issue5872] New C API for declaring Python types In-Reply-To: <1240973984.42.0.154845882855.issue5872@psf.upfronthosting.co.za> Message-ID: <1279474859.9.0.116262933181.issue5872@psf.upfronthosting.co.za> Changes by Reid Kleckner : ---------- nosy: +rnk versions: +Python 3.2 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 19:51:02 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 18 Jul 2010 17:51:02 +0000 Subject: [issue2053] IDLE - standardize dialogs In-Reply-To: <1202515821.86.0.159216664847.issue2053@psf.upfronthosting.co.za> Message-ID: <1279475462.61.0.508568773456.issue2053@psf.upfronthosting.co.za> Changes by Terry J. Reedy : Removed file: http://bugs.python.org/file10140/IDLE_standardize_dialogs.080429.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 19:51:29 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 18 Jul 2010 17:51:29 +0000 Subject: [issue2053] IDLE - standardize dialogs In-Reply-To: <1202515821.86.0.159216664847.issue2053@psf.upfronthosting.co.za> Message-ID: <1279475489.08.0.405572696062.issue2053@psf.upfronthosting.co.za> Changes by Terry J. Reedy : Removed file: http://bugs.python.org/file10556/IDLE_standardize_dialogs.080609.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 20:02:43 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 18 Jul 2010 18:02:43 +0000 Subject: [issue4938] Pdb cannot access doctest source in postmortem In-Reply-To: <1231887344.64.0.130142534031.issue4938@psf.upfronthosting.co.za> Message-ID: <1279476163.21.0.726489419656.issue4938@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> belopolsky stage: -> needs patch type: -> behavior versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 20:33:18 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 18 Jul 2010 18:33:18 +0000 Subject: [issue9295] test_close_open_print_buffered(test_file) sometimes crashes In-Reply-To: <1279474539.68.0.852084808182.issue9295@psf.upfronthosting.co.za> Message-ID: <1279477992.3213.8.camel@localhost.localdomain> Antoine Pitrou added the comment: > Hmm, correct me if following understanding is wrong somewhere... > 1. File.close() is actually file_close(), and is calling close_the_file(). > 2. Returns immediately because local_fp == f->f_fp is already NULL. > The return value is None. I don't understand why you say that. Why is f->f_fp already NULL while close() still hasn't been called? By the way, is it 2.6-specific or does it also happen on 2.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 21:09:44 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 18 Jul 2010 19:09:44 +0000 Subject: [issue9295] test_close_open_print_buffered(test_file) sometimes crashes In-Reply-To: <1279465176.3.0.233257918018.issue9295@psf.upfronthosting.co.za> Message-ID: <1279480184.78.0.379356349531.issue9295@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Does the following patch solve your issue? Index: Python/ceval.c =================================================================== --- Python/ceval.c (r?vision 82959) +++ Python/ceval.c (copie de travail) @@ -1763,6 +1763,8 @@ If __getattr__ raises an exception, w will be freed, so we need to prevent that temporarily. */ Py_XINCREF(w); + if (PyFile_Check(w)) + PyFile_IncUseCount((PyFileObject *) w); if (w != NULL && PyFile_SoftSpace(w, 0)) err = PyFile_WriteString(" ", w); if (err == 0) @@ -1790,6 +1792,8 @@ else PyFile_SoftSpace(w, 1); } + if (PyFile_Check(w)) + PyFile_DecUseCount((PyFileObject *) w); Py_XDECREF(w); Py_DECREF(v); Py_XDECREF(stream); ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 21:24:31 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 19:24:31 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1279481071.84.0.997279417551.issue2813@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closing as Jean has no interest in keeping it open. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 21:27:23 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 19:27:23 +0000 Subject: [issue3130] In some UCS4 builds, sizeof(Py_UNICODE) could end up being more than 4. In-Reply-To: <1213695549.9.0.858416360908.issue3130@psf.upfronthosting.co.za> Message-ID: <1279481243.5.0.798464883005.issue3130@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Mark Dickinson you've shown some interest, could you run with this? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 21:32:11 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 19:32:11 +0000 Subject: [issue3243] Support iterable bodies in httplib In-Reply-To: <1214848938.76.0.928668674728.issue3243@psf.upfronthosting.co.za> Message-ID: <1279481531.37.0.173610968253.issue3243@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could someone with knowledge of httplib please move this forward, all the comments I see are positive. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 21:33:49 2010 From: report at bugs.python.org (Narnie Harshoe) Date: Sun, 18 Jul 2010 19:33:49 +0000 Subject: [issue9265] Incorrect name passed as arg[0] when shell=True and executable specified In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279481629.03.0.0364928898604.issue9265@psf.upfronthosting.co.za> Narnie Harshoe added the comment: Hello, I am impressed by the activity here. I am a new programmer and cutting my teeth with python. I wish I knew how to do a patch and write unit tests, but I'm just not there yet. I can show a test case in this fashion where it fails. First I prove that /bin/sh is /bin/sh (er, dash) and /bin/bash is /bin/bash. Then it can be seen that when executable is set as /bin/bash and there is a shell error, that it returns a shell error from /bin/sh, not from /bin/bash. I see there are patches here that should fix it, but for those wanting to see the buggy code in action, here it is using the fact that echo was mistyped as echos to raise a shell error (but shell=True so it doesn't raise an OSError exception). _____________________________ in shell terminal: $ file /bin/bash /bin/bash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped $ file /bin/sh /bin/sh: symbolic link to `dash' $ file /bin/dash /bin/dash: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, stripped in python interactive interpreter >>> shell = Popen('echos', shell=True, executable="/bin/bash", stdin=PIPE, stderr=PIPE, stdout=PIPE) >>> shell.communicate() ('', '/bin/sh: echos: command not found\n') >>> shell = Popen('echos', shell=True, executable="/bin/bash", stdin=PIPE, stderr=PIPE, stdout=PIPE) >>> shell.communicate() ('', '/bin/bash: echos: command not found\n') Thank you for working on this so quickly. This is truly an amazing community. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 21:35:53 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 19:35:53 +0000 Subject: [issue3299] Direct calls to PyObject_Del/PyObject_DEL are broken for --with-pydebug In-Reply-To: <1215354044.0.0.987178228996.issue3299@psf.upfronthosting.co.za> Message-ID: <1279481753.53.0.328999219662.issue3299@psf.upfronthosting.co.za> Mark Lawrence added the comment: Loads of comments about backports, can this be closed or are there still any outstanding issues? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 21:43:39 2010 From: report at bugs.python.org (Narnie Harshoe) Date: Sun, 18 Jul 2010 19:43:39 +0000 Subject: [issue9265] Incorrect name passed as arg[0] when shell=True and executable specified In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279482219.22.0.618183831025.issue9265@psf.upfronthosting.co.za> Narnie Harshoe added the comment: I'm sorry, but the last lines in the interpreter reflect my code changes which seemed to not be sufficient, but it shows that just for this case at least, it corrects it and allows it to be run in /bin/bash shells (much of my shell code is bash since I'm linux only and this is usually available and I make use of c-like math or incrementors like $(( x++ )) in the shell code (I know, I know, I should make my code more portable such that it can run on /bin/sh, but I'm lazy). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 21:47:04 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 19:47:04 +0000 Subject: [issue3445] Ignore missing attributes in functools.update_wrapper In-Reply-To: <1216999615.48.0.706294847693.issue3445@psf.upfronthosting.co.za> Message-ID: <1279482424.73.0.404305536567.issue3445@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is there anyone who can provide this issue with a bit of TLC as it's almost the 2nd birthday? ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.5, Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 22:13:07 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 20:13:07 +0000 Subject: [issue3488] Provide compress/uncompress functions on the gzip module In-Reply-To: <1217613416.28.0.352724086622.issue3488@psf.upfronthosting.co.za> Message-ID: <1279483987.94.0.616188839067.issue3488@psf.upfronthosting.co.za> Mark Lawrence added the comment: This appears to have slipped under the radar, msg94432 seems to sum it up. Could someone please take this forward. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 22:21:46 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 20:21:46 +0000 Subject: [issue3532] bytes.tohex method In-Reply-To: <1218299394.34.0.421334599583.issue3532@psf.upfronthosting.co.za> Message-ID: <1279484506.84.0.883507896918.issue3532@psf.upfronthosting.co.za> Mark Lawrence added the comment: This should be closed unless someone can provide a good reason for keeping it open. ---------- nosy: +BreamoreBoy status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 22:25:27 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 20:25:27 +0000 Subject: [issue3573] IDLE hangs when passing invalid command line args (directory(ies) instead of file(s)) In-Reply-To: <1218929546.33.0.178143371283.issue3573@psf.upfronthosting.co.za> Message-ID: <1279484727.58.0.287510947937.issue3573@psf.upfronthosting.co.za> Mark Lawrence added the comment: Please refer to msg89022. ---------- nosy: +BreamoreBoy, tjreedy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 22:27:52 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 20:27:52 +0000 Subject: [issue3615] Expect methods for testing. In-Reply-To: <1219222153.94.0.41823703199.issue3615@psf.upfronthosting.co.za> Message-ID: <1279484872.52.0.409458024679.issue3615@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can't see this going anywhere, might as well close unless someone is really interested. ---------- nosy: +BreamoreBoy status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 22:31:42 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 20:31:42 +0000 Subject: [issue3704] cookielib doesn't handle URLs with / in parameters In-Reply-To: <1219856501.23.0.0473308500082.issue3704@psf.upfronthosting.co.za> Message-ID: <1279485102.78.0.826426007114.issue3704@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could we please have an update from people who have been involved on this issue as to whether it can be taken forward, closed as to no longer relevant, or whatever. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 22:35:57 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 20:35:57 +0000 Subject: [issue3754] cross-compilation support for python build In-Reply-To: <1220305759.82.0.468834426074.issue3754@psf.upfronthosting.co.za> Message-ID: <1279485357.15.0.41694472071.issue3754@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could someone with knowledge of the Python build systems please comment on this, thanks. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 22:37:47 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 20:37:47 +0000 Subject: [issue3754] cross-compilation support for python build In-Reply-To: <1220305759.82.0.468834426074.issue3754@psf.upfronthosting.co.za> Message-ID: <1279485467.8.0.950319856598.issue3754@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 22:39:05 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 20:39:05 +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: <1279485545.85.0.417242063598.issue3871@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could someone with knowledge of the Python build systems please comment on this, thanks. ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 23:12:12 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 18 Jul 2010 21:12:12 +0000 Subject: [issue9110] contextlib.ContextDecorator In-Reply-To: <1277765898.65.0.314299135702.issue9110@psf.upfronthosting.co.za> Message-ID: <1279487532.08.0.36750339889.issue9110@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 23:27:31 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 21:27:31 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1279488451.22.0.742506790288.issue3873@psf.upfronthosting.co.za> Mark Lawrence added the comment: Has this slipped under the radar? I believe that one way or the other any performance issue should be resolved if at all possible. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 23:29:36 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 18 Jul 2010 21:29:36 +0000 Subject: [issue3299] Direct calls to PyObject_Del/PyObject_DEL are broken for --with-pydebug In-Reply-To: <1215354044.0.0.987178228996.issue3299@psf.upfronthosting.co.za> Message-ID: <1279488576.98.0.134295503575.issue3299@psf.upfronthosting.co.za> Nick Coghlan added the comment: I believe the two attached patches still need to be checked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 23:30:25 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 21:30:25 +0000 Subject: [issue3985] removed string module from distutils [patch] In-Reply-To: <1222597888.29.0.260615260643.issue3985@psf.upfronthosting.co.za> Message-ID: <1279488625.71.0.883996758436.issue3985@psf.upfronthosting.co.za> Mark Lawrence added the comment: Tarek, has this move to distutils2 taken place so we can close this, or do you wish to leave this issue open? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 23:36:26 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 21:36:26 +0000 Subject: [issue4037] doctest.py should include method descriptors when looking inside a class __dict__ In-Reply-To: <1223079206.04.0.17382541424.issue4037@psf.upfronthosting.co.za> Message-ID: <1279488986.79.0.562984455987.issue4037@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could someone please respond to Georg's comment msg104300, thanks. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 23:39:11 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 18 Jul 2010 21:39:11 +0000 Subject: [issue3445] Ignore missing attributes in functools.update_wrapper In-Reply-To: <1216999615.48.0.706294847693.issue3445@psf.upfronthosting.co.za> Message-ID: <1279489151.86.0.326503824154.issue3445@psf.upfronthosting.co.za> Nick Coghlan added the comment: That would be me :) In line with the 'consenting adults' philosophy and with the current behaviour causing real world problems, I'll accept this RFE and check it in soon. ---------- assignee: -> ncoghlan resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 23:46:29 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 21:46:29 +0000 Subject: [issue4080] pyunit - display time of each test case - patch In-Reply-To: <1223497696.14.0.913391715353.issue4080@psf.upfronthosting.co.za> Message-ID: <1279489589.49.0.536175555358.issue4080@psf.upfronthosting.co.za> Mark Lawrence added the comment: Pawel, could you please provide an update wrt Ezio's comment on msg109448, thanks. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 23:50:40 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 21:50:40 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1279489840.4.0.302083344815.issue4111@psf.upfronthosting.co.za> Mark Lawrence added the comment: Comments suggest this is wanted, can our build experts get this into 3.2? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 23:56:14 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 21:56:14 +0000 Subject: [issue4199] add shorthand global and nonlocal statements In-Reply-To: <1224887535.03.0.272495603252.issue4199@psf.upfronthosting.co.za> Message-ID: <1279490174.0.0.425471634861.issue4199@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'm not sure as to the status of this. Could it go back to (say) 3.3, is it still a candidate for 3.2(.x), or what? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 18 23:59:55 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 21:59:55 +0000 Subject: [issue4254] _cursesmodule.c callable update_lines_cols() In-Reply-To: <1225724529.97.0.843166149521.issue4254@psf.upfronthosting.co.za> Message-ID: <1279490395.95.0.325779972792.issue4254@psf.upfronthosting.co.za> Mark Lawrence added the comment: msg82783 states code portion of patch looks ok, what do we need to take this forward? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 00:05:02 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 18 Jul 2010 22:05:02 +0000 Subject: [issue4335] inspect.getsourcelines ignores last line in module In-Reply-To: <1226909351.26.0.938399226191.issue4335@psf.upfronthosting.co.za> Message-ID: <1279490702.45.0.2903325623.issue4335@psf.upfronthosting.co.za> Mark Lawrence added the comment: Ok so we missed the opportunity to backport this to 2.5.3, could we please get it into modern versions of Python, or what? ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 00:29:44 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 18 Jul 2010 22:29:44 +0000 Subject: [issue4335] inspect.getsourcelines ignores last line in module In-Reply-To: <1226909351.26.0.938399226191.issue4335@psf.upfronthosting.co.za> Message-ID: <1279492184.22.0.804615230277.issue4335@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Martin, Was there a reason for not accepting this patch for the trunk? ---------- assignee: -> belopolsky keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 00:48:54 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 18 Jul 2010 22:48:54 +0000 Subject: [issue4199] add shorthand global and nonlocal statements In-Reply-To: <1279490174.0.0.425471634861.issue4199@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: 2010/7/18 Mark Lawrence : > > Mark Lawrence added the comment: > > I'm not sure as to the status of this. ?Could it go back to (say) 3.3, is it still a candidate for 3.2(.x), or what? It can't do anything until 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 01:41:19 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sun, 18 Jul 2010 23:41:19 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1279496479.79.0.25290021642.issue4111@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: +1! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 02:07:33 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 00:07:33 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1279498053.63.0.0384215255542.issue4111@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: If any RedHat/Fedora people are tuned in, can you give us an update on Systemtap/DTrace support in RedHat/Fedora python? I understand that one of the main problems with bringing this upstream was the lack of uniformity between Apple and Sun approaches. These days Apple and Sun(Oracle) are increasingly unfriendly to open source, so with a third solution available from RedHat, the choice seems obvious. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 02:15:38 2010 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 19 Jul 2010 00:15:38 +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: <1279498538.54.0.391580282806.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-20100719.zip is a new version of the regex module. Just a few more tweaks for speed. ---------- Added file: http://bugs.python.org/file18054/issue2636-20100719.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 03:21:03 2010 From: report at bugs.python.org (Matt Giuca) Date: Mon, 19 Jul 2010 01:21:03 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1279502463.15.0.935830367593.issue1712522@psf.upfronthosting.co.za> Matt Giuca added the comment: Thanks for doing that, Senthil. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 03:32:16 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 01:32:16 +0000 Subject: [issue7962] Demo and Tools need to be tested and pruned In-Reply-To: <1266531589.82.0.915519058153.issue7962@psf.upfronthosting.co.za> Message-ID: <1279503136.96.0.0772383233888.issue7962@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- dependencies: +Single-line option to pygettext.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 03:33:51 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 01:33:51 +0000 Subject: [issue1098749] Single-line option to pygettext.py Message-ID: <1279503231.84.0.814925521086.issue1098749@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: A rare example of a 5-year old patch that still applies with only a minor tweak. This is probably a sign that pygettext itself has not been kept up to date. In any case, I am attaching an updated patch which I did not test beyond running pygettext.py -h. There was no response from OP to the patch review and from a brief look at the patch, it is not commit ready. I am adding this as a dependency to meta-issue #7962 so that the fate of this patch and pygettext itself can be decided. ---------- nosy: +belopolsky stage: -> patch review type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 03:34:11 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 01:34:11 +0000 Subject: [issue1098749] Single-line option to pygettext.py Message-ID: <1279503251.56.0.468785715531.issue1098749@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file18055/issue1098749.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 03:37:22 2010 From: report at bugs.python.org (Vlastimil Brom) Date: Mon, 19 Jul 2010 01:37:22 +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: <1279503442.5.0.702153192921.issue2636@psf.upfronthosting.co.za> Vlastimil Brom added the comment: Thanks for the update; Just a small observation regarding some character ranges and ignorecase, probably irrelevant, but a difference to the current re anyway: >>> zero2z = u"0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz" >>> re.findall("(?i)[X-d]", zero2z) [] >>> regex.findall("(?i)[X-d]", zero2z) [u'A', u'B', u'C', u'D', u'X', u'Y', u'Z', u'[', u'\\', u']', u'^', u'_', u'`', u'a', u'b', u'c', u'd', u'x', u'y', u'z'] >>> re.findall("(?i)[B-d]", zero2z) [u'B', u'C', u'D', u'b', u'c', u'd'] regex.findall("(?i)[B-d]", zero2z) [u'A', u'B', u'C', u'D', u'E', u'F', u'G', u'H', u'I', u'J', u'K', u'L', u'M', u'N', u'O', u'P', u'Q', u'R', u'S', u'T', u'U', u'V', u'W', u'X', u'Y', u'Z', u'[', u'\\', u']', u'^', u'_', u'`', u'a', u'b', u'c', u'd', u'e', u'f', u'g', u'h', u'i', u'j', u'k', u'l', u'm', u'n', u'o', u'p', u'q', u'r', u's', u't', u'u', u'v', u'w', u'x', u'y', u'z'] It seems, that the re module is building the character set using a case insensitive "alphabet" in some way. I guess, the behaviour of re is buggy here, while regex is ok (tested on py 2.7, Win XPp). vbr ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 03:50:44 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 19 Jul 2010 01:50:44 +0000 Subject: [issue9295] test_close_open_print_buffered(test_file) sometimes crashes In-Reply-To: <1279465176.3.0.233257918018.issue9295@psf.upfronthosting.co.za> Message-ID: <1279504244.95.0.248409231195.issue9295@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: > Does the following patch solve your issue? I tried, but it still crashed. I could reproduce the crash by following script. It crashed also on Python2.7, but it doesn't crash on Python3. And when I used io.open() instead of builtin open(), it doesn't crash even on Python2.x. (Probably because io.open implements buffer protocol by itself) ////////////////////////////////////////////////////// import threading import sys if sys.version_info.major == 3: xrange = range def main(): size = 1024 * 1024 # large enough f = open("__temp__.tmp", "w", size) for _ in xrange(size): f.write("c") t1 = threading.Thread(target=f.close) t2 = threading.Thread(target=f.close) t1.start() t2.start() t1.join() t2.join() if __name__ == '__main__': main() ////////////////////////////////////////////////////// I lied a bit on msg110655. close(2) is not used, that is actually fclose(). I didn't notice the variable *close* was declared as the parameter of fill_file_fields(). ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 03:53:51 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 01:53:51 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279504431.89.0.525009503758.issue1812@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Mark L, This could use some shaking. Please take a look. ---------- nosy: +BreamoreBoy, belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 03:55:16 2010 From: report at bugs.python.org (Murilo da Silva) Date: Mon, 19 Jul 2010 01:55:16 +0000 Subject: [issue9297] SMTP with Sqlite3 file attachment In-Reply-To: <1279504516.14.0.42498978414.issue9297@psf.upfronthosting.co.za> Message-ID: <1279504516.14.0.42498978414.issue9297@psf.upfronthosting.co.za> New submission from Murilo da Silva : I'm sending e-mail using SMTP. This e-mail is sent with an Sqlite3 database attached. When I send the e-mail in the same domain the attachment arrives OK, but if I send it to a different domain it comes crashed!! The file is added with some base64 code...I don't have any ideia why! The code mail.py: import smtplib import os import mimetypes import base64 from email import encoders from email.message import Message from email.mime.base import MIMEBase from email.mime.nonmultipart import MIMENonMultipart from email.mime.multipart import MIMEMultipart from email.mime.application import MIMEApplication from email.mime.audio import MIMEAudio from email.mime.image import MIMEImage from email.mime.message import MIMEMessage from email.mime.text import MIMEText class SendMail: def __init__(self): self.body = [] self.attachments = [] def add_body(self, _text, _subtype='plain', _charset='us-ascii'): part = MIMEText(_text+"\n", _subtype, _charset) self.body.append(part) def add_attach(self, _file_path, _subtype='octet-stream', _encoder=encoders.encode_base64, **_params): path = _file_path ctype, encoding = mimetypes.guess_type(path) if ctype is None or encoding is not None: ctype = 'application/octet-stream' maintype, subtype = ctype.split('/', 1) if maintype == 'text': fp = open(path) part = MIMEText(fp.read(), _subtype=subtype) fp.close() elif maintype == 'image': fp = open(path, 'rb') part = MIMEImage(fp.read(), _subtype=subtype) fp.close() elif maintype == 'audio': fp = open(path, 'rb') part = MIMEAudio(fp.read(), _subtype=subtype) fp.close() else: fp = open(path, 'rb') part = MIMEBase(maintype, subtype) part.set_payload(fp.read()) fp.close() # Encode the payload using Base64 encoders.encode_base64(part) part.set_payload(part.get_payload().decode()) part.add_header('Content-Disposition', 'attachment', filename = path.split(os.sep)[-1]) self.attachments.append(part) def send_now(self, mail_from, mail_to, subject, multipart_subtype='mixed', host=None, port=25, auth=False, user="", passw=""): msg = MIMEMultipart(multipart_subtype) msg['Subject'] = subject msg['From'] = mail_from if type(mail_to) is list: msg['To'] = ", ".join(mail_to) else: msg['To'] = mail_to for b in self.body: msg.attach(b) for att in self.attachments: msg.attach(att) try: mailserver = smtplib.SMTP(host, port) #mailserver.set_debuglevel(1) mailserver.ehlo() mailserver.starttls() mailserver.ehlo() if auth: mailserver.login(user, passw) mailserver.sendmail(mail_from, mail_to, msg.as_string()) mailserver.close() return True except Exception as e: print(e) return False The database to attach is in the final. The example: s = SendMail() s.add_body("test") s.add_attach(os.path.abspath("test.db")) s.send_now("test at domain1.com", "test at domain2.com", "test", host="smtp.domain1.com", port=25, auth=True, user="user", passw="pass") ---------- components: Library (Lib) files: test.db messages: 110707 nosy: murilobr priority: normal severity: normal status: open title: SMTP with Sqlite3 file attachment type: behavior versions: Python 3.1 Added file: http://bugs.python.org/file18056/test.db _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 04:01:37 2010 From: report at bugs.python.org (Murilo da Silva) Date: Mon, 19 Jul 2010 02:01:37 +0000 Subject: [issue9297] SMTP with Sqlite3 file attachment cross-domain problem In-Reply-To: <1279504516.14.0.42498978414.issue9297@psf.upfronthosting.co.za> Message-ID: <1279504897.66.0.504547795157.issue9297@psf.upfronthosting.co.za> Changes by Murilo da Silva : ---------- title: SMTP with Sqlite3 file attachment -> SMTP with Sqlite3 file attachment cross-domain problem _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 04:02:29 2010 From: report at bugs.python.org (Murilo da Silva) Date: Mon, 19 Jul 2010 02:02:29 +0000 Subject: [issue9297] SMTP cross-domain with Sqlite3 file attached problem In-Reply-To: <1279504516.14.0.42498978414.issue9297@psf.upfronthosting.co.za> Message-ID: <1279504949.77.0.981098191427.issue9297@psf.upfronthosting.co.za> Changes by Murilo da Silva : ---------- title: SMTP with Sqlite3 file attachment cross-domain problem -> SMTP cross-domain with Sqlite3 file attached problem _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 04:02:31 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 02:02:31 +0000 Subject: [issue1764286] inspect.getsource does not work with decorated functions Message-ID: <1279504951.02.0.574379377926.issue1764286@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I did not test the patch, but if it really addresses the issue, I don't see why such a simple fix would not be applied. Guilherme, Can you add unit tests? Also, the second chunk in your patch is just a style fix which is a distraction for reviewers. ---------- assignee: -> belopolsky nosy: +belopolsky stage: -> unit test needed type: -> behavior versions: +Python 2.7, Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 04:02:48 2010 From: report at bugs.python.org (Murilo da Silva) Date: Mon, 19 Jul 2010 02:02:48 +0000 Subject: [issue9297] SMTP with Sqlite3 file attached problem In-Reply-To: <1279504516.14.0.42498978414.issue9297@psf.upfronthosting.co.za> Message-ID: <1279504968.84.0.990086283866.issue9297@psf.upfronthosting.co.za> Changes by Murilo da Silva : ---------- title: SMTP cross-domain with Sqlite3 file attached problem -> SMTP with Sqlite3 file attached problem _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 04:30:37 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 02:30:37 +0000 Subject: [issue7229] Manual entry for time.daylight can be misleading In-Reply-To: <1256723052.19.0.148648938954.issue7229@psf.upfronthosting.co.za> Message-ID: <1279506637.6.0.295744599663.issue7229@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Georg, Do you mind if I take this over? While I have issues with east/west of UTC terminology, it is the accepted terminology throughout the manual and Brian's rewording is an improvement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 04:40:03 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 02:40:03 +0000 Subject: [issue665761] reduce() masks exception Message-ID: <1279507203.8.0.966834569903.issue665761@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> belopolsky nosy: +belopolsky -Alexander.Belopolsky versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 04:44:39 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 02:44:39 +0000 Subject: [issue7829] dis module documentation gives no indication of the dangers of bytecode inspection In-Reply-To: <1265030716.3.0.107246651396.issue7829@psf.upfronthosting.co.za> Message-ID: <1279507479.04.0.0512999913503.issue7829@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- keywords: -needs review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 05:05:01 2010 From: report at bugs.python.org (Vance Unruh) Date: Mon, 19 Jul 2010 03:05:01 +0000 Subject: [issue9298] binary email attachment issue with base64 encoding In-Reply-To: <1279508696.99.0.665109757672.issue9298@psf.upfronthosting.co.za> Message-ID: <1279508696.99.0.665109757672.issue9298@psf.upfronthosting.co.za> New submission from Vance Unruh : I'm using Python to email a text version and a PDF version of a report. The standard way of doing things does not work with Vista's Mail program, but works fine with Mail on OSX. So, I don't know if this is a Python or a Vista Mail bug. By standard way, I mean: # Add the attached PDF: part = MIMEApplication(pdf,"pdf") part.add_header('Content-Disposition', 'attachment', filename=pdfFile) msg.attach(part) To fix the problem, I changed C:\Python31\Lib\email\encoders.py to use encodebytes instead of b64encode in order to get mail on Windows Vista to correctly interpret the attachment. This splits the base64 encoding into many lines of some fixed lenth. I can achieve the same thing adding the attachment by hand with the following code: from email.mime.base import MIMEBase part = MIMEBase("application","pdf") part.add_header('Content-Transfer-Encoding', 'base64') part.set_payload(str(base64.encodebytes(pdf),'ascii')) msg.attach(part) Seems like I shouldn't need to know this much. I'm new to Python and this is the first bug I have submitted, so if you need additional information, please let me know. ---------- components: Library (Lib) messages: 110710 nosy: vunruh priority: normal severity: normal status: open title: binary email attachment issue with base64 encoding versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 05:51:27 2010 From: report at bugs.python.org (Scott Lawrence) Date: Mon, 19 Jul 2010 03:51:27 +0000 Subject: [issue9105] pickle security note should be more prominent In-Reply-To: <1277745956.4.0.951690442784.issue9105@psf.upfronthosting.co.za> Message-ID: <1279511487.14.0.617790305373.issue9105@psf.upfronthosting.co.za> Scott Lawrence added the comment: Patch warning in relevant places of pickle's vulnerability to insecure data, including the place referenced by issue8855. ---------- keywords: +patch nosy: +bytbox Added file: http://bugs.python.org/file18057/picklesec.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 05:58:05 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 03:58:05 +0000 Subject: [issue9105] pickle security note should be more prominent In-Reply-To: <1277745956.4.0.951690442784.issue9105@psf.upfronthosting.co.za> Message-ID: <1279511885.82.0.233130473645.issue9105@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: LGTM Unless someone objects, I will check that the patch generates reasonable HTML and apply. ---------- assignee: docs at python -> belopolsky resolution: -> accepted stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 06:03:47 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 19 Jul 2010 04:03:47 +0000 Subject: [issue9282] Bug in --listfuncs option of trace.py In-Reply-To: <1279355920.89.0.901837761289.issue9282@psf.upfronthosting.co.za> Message-ID: <1279512227.04.0.573341942069.issue9282@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Trace.py does not appear to have a test module to add a test case to. test_trace.py currently tests the line trace facility turned on with sys.settrace. I will inquire on pydev about this. "Does trace ..." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 08:40:24 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 19 Jul 2010 06:40:24 +0000 Subject: [issue7229] Manual entry for time.daylight can be misleading In-Reply-To: <1256723052.19.0.148648938954.issue7229@psf.upfronthosting.co.za> Message-ID: <1279521624.23.0.361443303413.issue7229@psf.upfronthosting.co.za> Georg Brandl added the comment: Please do! ---------- assignee: georg.brandl -> belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 08:56:48 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 19 Jul 2010 06:56:48 +0000 Subject: [issue2813] No float formatting in PyString_FromFormat In-Reply-To: <1210453747.33.0.971608840544.issue2813@psf.upfronthosting.co.za> Message-ID: <1279522608.8.0.487120011821.issue2813@psf.upfronthosting.co.za> Mark Dickinson added the comment: Jean may have no interest in moving this forward, but I do. (Which is why I assigned the issue to me.) ---------- resolution: out of date -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 09:03:51 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 19 Jul 2010 07:03:51 +0000 Subject: [issue9288] Disambiguate :option: and :cmdoption: In-Reply-To: <1279404540.57.0.963765007492.issue9288@psf.upfronthosting.co.za> Message-ID: <1279523031.0.0.577485751593.issue9288@psf.upfronthosting.co.za> Georg Brandl added the comment: The docs on :option: should now be clear in r82961. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 09:29:54 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 19 Jul 2010 07:29:54 +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: <1279524594.69.0.926931150238.issue8265@psf.upfronthosting.co.za> Mark Dickinson added the comment: I notice (again) that these failures occur on the 2.6 and 3.1 buildslaves (where the debug build includes the -O2 compilation flag), but not the 2.7 or py3k buildslaves. So again this looks like a compiler optimization bug. This should really be reported upstream, but without direct access to the machine to produce a small failing example I don't think I can compose a decent bug report. Closing this as 'won't fix'. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 09:45:05 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 19 Jul 2010 07:45:05 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1279498053.63.0.0384215255542.issue4111@psf.upfronthosting.co.za> Message-ID: Ronald Oussoren added the comment: On 19 Jul, 2010, at 1:07, Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > If any RedHat/Fedora people are tuned in, can you give us an update on Systemtap/DTrace support in RedHat/Fedora python? I understand that one of the main problems with bringing this upstream was the lack of uniformity between Apple and Sun approaches. These days Apple and Sun(Oracle) are increasingly unfriendly to open source, so with a third solution available from RedHat, the choice seems obvious. What do you mean by increasing unfriendly in Apple's case? I haven't noted any change from them in the last few years. Not that their (perceived) unfriendlyness is relevant. I'm +1 on merging this feature having dtrace support is pretty convenient. Ronald ---------- Added file: http://bugs.python.org/file18058/smime.p7s _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From report at bugs.python.org Mon Jul 19 10:47:35 2010 From: report at bugs.python.org (Ray.Allen) Date: Mon, 19 Jul 2010 08:47:35 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> New submission from Ray.Allen : As discussed in python-dev mailing list, something should be add to os.mkdir() and os.makedirs() to simulate the shell's "mkdir -p" function, that is, suppress the OSError exception if the target directory exists. Here is a patch against py3k, with code, test and doc. I add an "ensure_exist" keyword argument for both os.mkdir() and os.makedirs(), indicates weather an OSError is raised if the target directory already exists. Since I've no windows environment, I only tested the patch on Unix. Hope someone could help test it on windows. ---------- components: Library (Lib) files: mkdir_py3k.diff keywords: patch messages: 110719 nosy: ysj.ray priority: normal severity: normal status: open title: os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. versions: Python 2.7, Python 3.3 Added file: http://bugs.python.org/file18059/mkdir_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 10:49:25 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 19 Jul 2010 08:49:25 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279529365.43.0.484828325844.issue9299@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 10:50:27 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 19 Jul 2010 08:50:27 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279529427.3.0.412394524342.issue9299@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I don't think this can go into 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 10:55:58 2010 From: report at bugs.python.org (Ray.Allen) Date: Mon, 19 Jul 2010 08:55:58 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279529758.46.0.977389039545.issue9299@psf.upfronthosting.co.za> Changes by Ray.Allen : Removed file: http://bugs.python.org/file18059/mkdir_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 10:57:46 2010 From: report at bugs.python.org (Ray.Allen) Date: Mon, 19 Jul 2010 08:57:46 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279529866.37.0.843751676624.issue9299@psf.upfronthosting.co.za> Ray.Allen added the comment: I update the patch since an problem is found in doc/library/os.rst. ---------- Added file: http://bugs.python.org/file18060/mkdir_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 10:59:59 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 19 Jul 2010 08:59:59 +0000 Subject: [issue9300] c/profile Profile class is not documented In-Reply-To: <1279529999.64.0.448186271222.issue9300@psf.upfronthosting.co.za> Message-ID: <1279529999.64.0.448186271222.issue9300@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : http://docs.python.org/library/profile.html ...while it is, for example, for hotshot module: http://docs.python.org/library/hotshot.html#hotshot.Profile Profile class contains some useful methods which are surely worth mentioning, like print_stat() and runcall() above all. ---------- assignee: docs at python components: Documentation messages: 110722 nosy: docs at python, giampaolo.rodola priority: normal severity: normal stage: needs patch status: open title: c/profile Profile class is not documented versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 11:09:48 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Mon, 19 Jul 2010 09:09:48 +0000 Subject: [issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before) In-Reply-To: <1279530588.62.0.226192140376.issue9301@psf.upfronthosting.co.za> Message-ID: <1279530588.62.0.226192140376.issue9301@psf.upfronthosting.co.za> New submission from Dirkjan Ochtman : Rejecting invalid input seems better in this case. This was changed in issue1285086. Can we preface the normal fast path with something like: if s is None: raise TypeError('can only quote strings') It used to raise: Traceback (most recent call last): File "/usr/lib64/python2.6/urllib.py", line 1222, in quote res = map(safe_map.__getitem__, s) TypeError: argument 2 to map() must support iteration ---------- components: Library (Lib) messages: 110723 nosy: djc, flox, orsenthil priority: normal severity: normal status: open title: urllib.quote(None) returns None in 2.7 (raised TypeError before) versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 11:10:50 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Mon, 19 Jul 2010 09:10:50 +0000 Subject: [issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before) In-Reply-To: <1279530588.62.0.226192140376.issue9301@psf.upfronthosting.co.za> Message-ID: <1279530650.41.0.181877814188.issue9301@psf.upfronthosting.co.za> Changes by Dirkjan Ochtman : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 11:43:25 2010 From: report at bugs.python.org (Ray.Allen) Date: Mon, 19 Jul 2010 09:43:25 +0000 Subject: [issue9302] Distutils document problem? In-Reply-To: <1279532605.75.0.42010773345.issue9302@psf.upfronthosting.co.za> Message-ID: <1279532605.75.0.42010773345.issue9302@psf.upfronthosting.co.za> New submission from Ray.Allen : The distutils api document for class Extension: http://docs.python.org/dev/py3k/distutils/apiref.html#distutils.core.Extension Among the argument, in fact, the type of the arguments "sources", "include_dirs", "library_dirs", "libraries", "runtime_library_dirs" must be list, but all of them are marked as "string". I think this is a problem. Here is a patch for this, against py3k. ---------- assignee: docs at python components: Documentation files: distutils_apiref.diff keywords: patch messages: 110724 nosy: docs at python, ysj.ray priority: normal severity: normal status: open title: Distutils document problem? versions: Python 3.2 Added file: http://bugs.python.org/file18061/distutils_apiref.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 11:47:38 2010 From: report at bugs.python.org (Ray.Allen) Date: Mon, 19 Jul 2010 09:47:38 +0000 Subject: [issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before) In-Reply-To: <1279530588.62.0.226192140376.issue9301@psf.upfronthosting.co.za> Message-ID: <1279532858.02.0.0202497017029.issue9301@psf.upfronthosting.co.za> Changes by Ray.Allen : ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 12:03:48 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 19 Jul 2010 10:03:48 +0000 Subject: [issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before) In-Reply-To: <1279530588.62.0.226192140376.issue9301@psf.upfronthosting.co.za> Message-ID: <1279533828.14.0.198000463251.issue9301@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The fast path was intended to return the empty string. When s is None, it should return a TypeError. ---------- assignee: -> orsenthil resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 12:11:00 2010 From: report at bugs.python.org (Ray.Allen) Date: Mon, 19 Jul 2010 10:11:00 +0000 Subject: [issue9300] c/profile Profile class is not documented In-Reply-To: <1279529999.64.0.448186271222.issue9300@psf.upfronthosting.co.za> Message-ID: <1279534260.26.0.265615231699.issue9300@psf.upfronthosting.co.za> Ray.Allen added the comment: I guess this is intended not documented: http://docs.python.org/dev/py3k/library/profile.html#extensions-deriving-better-profilers Here it said: "The Profile class of both modules, profile and cProfile, were written so that derived classes could be developed to extend the profiler. The details are not described here, as doing this successfully requires an expert understanding of how the Profile class works internally. Study the source code of the module carefully if you want to pursue this." These sentences guide reader to read the source code. ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 12:28:25 2010 From: report at bugs.python.org (Zsolt Cserna) Date: Mon, 19 Jul 2010 10:28:25 +0000 Subject: [issue9185] os.getcwd causes infinite loop on solaris In-Reply-To: <1278492997.35.0.523630408468.issue9185@psf.upfronthosting.co.za> Message-ID: <1279535305.01.0.870503431965.issue9185@psf.upfronthosting.co.za> Zsolt Cserna added the comment: I confirm that test_posix passes after applying the patch issue9185-2.patch on solaris 8. Thank you. Now solaris and openbsd have a clean os.getcwd() implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 12:37:23 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Jul 2010 10:37:23 +0000 Subject: [issue9036] Simplify Py_CHARMASK In-Reply-To: <1277039528.15.0.539020018856.issue9036@psf.upfronthosting.co.za> Message-ID: <1279535843.73.0.90037576501.issue9036@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Antoine, I understood that you would prefer to leave the mask. Could I > apply the second version of the patch? It looks ok to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 12:41:45 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 19 Jul 2010 10:41:45 +0000 Subject: [issue8917] Segmentation error happens in Embedding Python. In-Reply-To: <1275835663.33.0.520214000656.issue8917@psf.upfronthosting.co.za> Message-ID: <1279536105.7.0.217217853537.issue8917@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I think this issue is duplicates of Issue6869. So I'm closing... ---------- nosy: +ocean-city resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 12:42:11 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 19 Jul 2010 10:42:11 +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: <1279536131.88.0.146069007838.issue6869@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- nosy: +tanaga _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 12:53:52 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Jul 2010 10:53:52 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1279536832.15.0.0164445090097.issue1712522@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Senthil, have you read my comment on python-checkins? Couldn't this have been fixed without introducing a new API in a bugfix branch? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 13:06:24 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 19 Jul 2010 11:06:24 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1279537584.29.0.00249125672972.issue1712522@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I just checked your comment in the checkins list. I saw this is as bug-fix, which was leading to change in the signature of the quote function, still in backward compatible way. Should we still not do it? I understood only feature requests and behavior changes are disallowed in bug-fix branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 13:14:49 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Jul 2010 11:14:49 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL In-Reply-To: <1279537584.29.0.00249125672972.issue1712522@psf.upfronthosting.co.za> Message-ID: <1279538080.3146.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > I understood only feature requests and behavior changes are disallowed > in bug-fix branch. Well, isn't it a new feature you're adding? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 13:18:05 2010 From: report at bugs.python.org (Matt Giuca) Date: Mon, 19 Jul 2010 11:18:05 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1279538285.6.0.867756534429.issue1712522@psf.upfronthosting.co.za> Matt Giuca added the comment: >From http://mail.python.org/pipermail/python-checkins/2010-July/095350.html: > Looking at the issue (which in itself was quite old), you could as well > have fixed the robotparser module instead. It isn't an issue with robotparser. The original reporter found it via robotparser, but it's nothing to do with that module. I found it independently and I would have reported it separately if it hadn't already been here. It's definitely a bug in urllib (as shown by my extensive new test cases). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 13:21:35 2010 From: report at bugs.python.org (Matt Giuca) Date: Mon, 19 Jul 2010 11:21:35 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1279538495.68.0.715840945766.issue1712522@psf.upfronthosting.co.za> Matt Giuca added the comment: > Well, isn't it a new feature you're adding? You had a function which raised a confusing and unintentional KeyError when given non-ASCII Unicode input. Now it doesn't. That's the bug fix part. What I assume you're referring to as a "new feature" is the new arguments. I'd say they're unfortunately necessary in fixing this bug, as the fix requires encoding the non-ASCII unicode characters with some encoding, and it's (arguably) necessary to give the programmer the choice of encoding, with sensible defaults. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 13:25:30 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Jul 2010 11:25:30 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1279538730.58.0.545269064043.issue1712522@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > It's definitely a bug in urllib A bug in what way? Up to 2.6 (*), the docs state nothing about the type of the "string" parameter. (*) http://docs.python.org/release/2.6.5/library/urllib.html#urllib.quote I think everyone assumed that the parameter should be a "str" object and nothing else. Apparently some people used it accidentally with some unicode strings and it "worked" until these strings contained non-ASCII characters. But it's a side-effect of how 2.x unicode strings work, and it doesn't seem to me quote() was ever intended to accept unicode strings. If we were following you, we would add "encoding" and "errors" arguments to any str-accepting 2.x function, so that it can also accept unicode strings. That's certainly not a reasonable solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 13:32:17 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 19 Jul 2010 11:32:17 +0000 Subject: [issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before) In-Reply-To: <1279530588.62.0.226192140376.issue9301@psf.upfronthosting.co.za> Message-ID: <1279539137.64.0.40939468394.issue9301@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 13:37:04 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 19 Jul 2010 11:37:04 +0000 Subject: [issue9300] c/profile Profile class is not documented In-Reply-To: <1279529999.64.0.448186271222.issue9300@psf.upfronthosting.co.za> Message-ID: <1279539424.83.0.827988713774.issue9300@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Oh right, I didn't notice that. Closing this out as invalid. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 13:45:08 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 19 Jul 2010 11:45:08 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1279539908.44.0.557598375398.issue1712522@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Well, my understanding was Type:behavior was a bug fix and Type: feature request was a new feature request, which may change some underlying behavior. I thought this issue was on the border. The robotparser using this might be just one usage indicator, but having this capability in the quote definitely helps. And this could not have been done without changing the signature. Ideally, this could have gone in 2.7, but I missed it. Personally, I am still +1 in having this in 2.7.1. Is it undesirable? Does it need wider discussion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 14:01:02 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Jul 2010 12:01:02 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL In-Reply-To: <1279539908.44.0.557598375398.issue1712522@psf.upfronthosting.co.za> Message-ID: <1279540857.3146.11.camel@localhost.localdomain> Antoine Pitrou added the comment: > Well, my understanding was Type:behavior was a bug fix and Type: > feature request was a new feature request, which may change some > underlying behavior. I thought this issue was on the border. The original issue is against robotparser, and clearly states a bug (robotparser doesn't work in some cases). But solving a bug by adding a feature isn't appropriate for a bugfix release. You shouldn't look at how the issue is classified. What's important is what the actual *patch* does. A patch doesn't have to change existing behaviour to be considered a feature. That's a misconception. Feature releases try to be forward-compatible as well (if I use urllib.quote() in 2.Y, it will still work in 2.Y+1). Adding API parameters, or accepting additional types in an existing API, is clearly a new feature. > Ideally, this could have gone in 2.7, but I missed it. Personally, I > am still +1 in having this in 2.7.1. Is it undesirable? Does it need > wider discussion? We can certainly make exceptions from time to time but only when there's a strong argument for it (e.g. a security issue). There doesn't seem to be an urgency to make urllib.quote() work with non-ASCII unicode strings in 2.7.1, while it didn't before anyway. Furthermore, the core issue is the automatic coercion between unicode and 8-bit strings in 2.x. Many APIs are affected by this, urllib.quote() shouldn't be considered a special case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 14:08:06 2010 From: report at bugs.python.org (Michael Schwarz) Date: Mon, 19 Jul 2010 12:08:06 +0000 Subject: [issue9303] Migrate sqlite3 module to _v2 API to enhance performance In-Reply-To: <1279541286.68.0.824716490463.issue9303@psf.upfronthosting.co.za> Message-ID: <1279541286.68.0.824716490463.issue9303@psf.upfronthosting.co.za> New submission from Michael Schwarz : The Python sqlite module currently uses some deprecated API [0] of SQLite. These are functions that have a counterpart with _v2 appended to their name. The SQLite query planner will not use certain optimizations when using the old API. For example, as documented in [1], using a statement with a GLOB or LIKE operator where the pattern is parametrized will only use an appropriate index if sqlite3_prepare_v2() is used instead of sqlite3_prepare(). Following is an example of such a query. When executed, table 'test' is scanned row by row, which requires all data in the table to be loaded from disk. cursor.execute('create table test(a text)') cursor.execute('create index test_index on test(a)') # insert some data here cursor.execute('select * from test where a glob ?', ['prefix*']) When the same query is executed in the sqlite3 command line utility, the index 'test_index' is used instead. sqlite> create table test(a text); sqlite> create index test_index on test(a); sqlite> explain query plan select * from test where a glob 'prefix*'; order from detail 0 0 TABLE test WITH INDEX test_index The query in this example is not parametrized as parameters can't be filled in when using the sqlite3 command line utility. This is just to show that the schema and the query allow the index to be used with certain pattern strings. [0]: http://www.sqlite.org/c3ref/funclist.html [1]: http://www.sqlite.org/optoverview.html#like_opt Michael ---------- components: Extension Modules messages: 110739 nosy: feuermurmel priority: normal severity: normal status: open title: Migrate sqlite3 module to _v2 API to enhance performance type: performance versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 14:13:27 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 19 Jul 2010 12:13:27 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL In-Reply-To: <1279538730.58.0.545269064043.issue1712522@psf.upfronthosting.co.za> Message-ID: <20100719121317.GA12695@remy> Senthil Kumaran added the comment: On Mon, Jul 19, 2010 at 11:25:30AM +0000, Antoine Pitrou wrote: > If we were following you, we would add "encoding" and "errors" > arguments to any str-accepting 2.x function, so that it can also > accept unicode strings. That's certainly not a reasonable solution. I don't think Matt is indicating that. Just the quote function can be used with unicode string as perfectly valid string input. In the original py3k bug too, there was a big discussion on this very same topic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 14:13:58 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Jul 2010 12:13:58 +0000 Subject: [issue9303] Migrate sqlite3 module to _v2 API to enhance performance In-Reply-To: <1279541286.68.0.824716490463.issue9303@psf.upfronthosting.co.za> Message-ID: <1279541638.74.0.0785562004077.issue9303@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> ghaering nosy: +ghaering stage: -> needs patch versions: +Python 3.2 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 14:24:16 2010 From: report at bugs.python.org (=?utf-8?q?Gerhard_H=C3=A4ring?=) Date: Mon, 19 Jul 2010 12:24:16 +0000 Subject: [issue9303] Migrate sqlite3 module to _v2 API to enhance performance In-Reply-To: <1279541286.68.0.824716490463.issue9303@psf.upfronthosting.co.za> Message-ID: <1279542256.27.0.787821132128.issue9303@psf.upfronthosting.co.za> Gerhard H?ring added the comment: Yes, the sqlite module uses the old API, and is written to work with older SQLite releases and their respective bugs as well. Using the new API will mean requiring newer SQLite releases. If we do this, then this is the chance to remove all the obscure backwards compatibility code with older SQLite releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 14:41:35 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 19 Jul 2010 12:41:35 +0000 Subject: [issue9302] Distutils document problem? In-Reply-To: <1279532605.75.0.42010773345.issue9302@psf.upfronthosting.co.za> Message-ID: <1279543295.24.0.95743718227.issue9302@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 14:46:51 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 19 Jul 2010 12:46:51 +0000 Subject: [issue9189] Improve CFLAGS handling In-Reply-To: <1278705334.26.0.402725340659.issue9189@psf.upfronthosting.co.za> Message-ID: <78AD7639-9B76-4D97-98CA-A0A322E73FDF@mac.com> Ronald Oussoren added the comment: On 9 Jul, 2010, at 20:55, Jeffrey Yasskin wrote: > > Jeffrey Yasskin added the comment: > > Oops. Thanks for telling me. Fixed in r82753. I'm pretty sure this patch broke universal builds on OSX. Not the python build itself, but building 3th-party extensions. I'll commit a fix later on. In the Makefile: LDSHARED= $(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup 'gcc' >>> sysconfig.get_config_var('LDFLAGS') '-arch i386 -arch ppc -arch x86_64 -isysroot /' >>> sysconfig.get_config_var('LDSHARED') 'gcc -bundle -undefined dynamic_lookup' That is, the LDFLAGS aren't patched into the value of LDSHARED. This is because LDFLAGS is actually PY_LDFLAGS in the makefile and the rename from PY_LDFLAGS to LDFLAGS happens *after* variable expansion in sysconfig. This doesn't affect the build of python itself because the Makefile explictly sets LDFLAGS in the environment when running setup.py. Ronald ---------- Added file: http://bugs.python.org/file18062/smime.p7s _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From report at bugs.python.org Mon Jul 19 14:50:03 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 19 Jul 2010 12:50:03 +0000 Subject: [issue9298] binary email attachment issue with base64 encoding In-Reply-To: <1279508696.99.0.665109757672.issue9298@psf.upfronthosting.co.za> Message-ID: <1279543803.41.0.72329436499.issue9298@psf.upfronthosting.co.za> R. David Murray added the comment: Can you try this against 3.1 from svn (or py3k from svn)? A bug was fixed that might be relevant. Alternatively a unit test that demonstrates the problem would be most helpful. ---------- assignee: -> r.david.murray nosy: +r.david.murray stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 14:50:17 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 19 Jul 2010 12:50:17 +0000 Subject: [issue9298] binary email attachment issue with base64 encoding In-Reply-To: <1279508696.99.0.665109757672.issue9298@psf.upfronthosting.co.za> Message-ID: <1279543817.93.0.733711537977.issue9298@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 14:53:27 2010 From: report at bugs.python.org (Matt Giuca) Date: Mon, 19 Jul 2010 12:53:27 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1279544007.96.0.781099148111.issue1712522@psf.upfronthosting.co.za> Matt Giuca added the comment: > I think everyone assumed that the parameter should be a "str" object > and nothing else. Apparently some people used it accidentally with > some unicode strings and it "worked" until these strings contained > non-ASCII characters. I don't consider use of Unicode strings in Python 2.7 to be "accidental". In my experience with Python 2, pretty much everything already works with Unicode strings, and it's best practice to use them. Now one of the major goals of Python 2.6/2.7 is to allow the writing of code which ports smoothly to Python 3. Unicode support is a major issue here. To quote "What's new in Python 3" (http://docs.python.org/py3k/whatsnew/3.0.html): "To be prepared in Python 2.x, start using unicode for all unencoded text, and str for binary or encoded data only. Then the 2to3 tool will do most of the work for you." Having functions in Python 2.7 which don't accept Unicode (or worse, raise random exceptions) runs against best practices for moving to Python 3. > If we were following you, we would add "encoding" and "errors" arguments > to any str-accepting 2.x function, so that it can also accept unicode > strings. That's certainly not a reasonable solution. No, that's certainly not necessary. You don't need an "encoding" or "errors" argument on any given function in order to support unicode. In fact, most code written to work with strings naturally works with Unicode because unicode strings support the same basic operations. The need for an "encoding" and "errors", and in fact the need to deal with string encoding at all with urllib.quote is due to the special nature of URLs. If URLs had a syntax like %uXXXX then there would be no need for encoding Unicode strings (as in UTF-8) at all. However, because the RFC specifies that Unicode strings are to be encoded into a byte sequence *using an unspecified encoding*, it is therefore necessary, for this specific function, to ask the programmer which encoding to use. Thus I assure you, this is not just one random function I have picked to add these arguments to. This is the only one (that I know of) that requires them to support Unicode. > The original issue is against robotparser, and clearly states a bug > (robotparser doesn't work in some cases). I don't know why this keeps coming back to robotparser. The original bug was not against robotparser; it is called "quote throws exception on Unicode URL" and that is the bug. Robotparser was just one demonstrative piece of code which failed because of it. Having said that, I don't expect to continue this argument. If you (the Python developers) decide that it's too late to accept this, then I won't object to reverting it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 14:54:41 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 19 Jul 2010 12:54:41 +0000 Subject: [issue9297] SMTP with Sqlite3 file attached problem In-Reply-To: <1279504516.14.0.42498978414.issue9297@psf.upfronthosting.co.za> Message-ID: <1279544081.13.0.149797863399.issue9297@psf.upfronthosting.co.za> R. David Murray added the comment: "It crashed" is not enough information to diagnose your problem or whether or not there is a Python bug here. Can you provide additional information please? A minimal test case that reproduces the problem would be best. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 15:10:00 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 19 Jul 2010 13:10:00 +0000 Subject: [issue9265] Incorrect name passed as arg[0] when shell=True and executable specified In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279545000.14.0.863354845904.issue9265@psf.upfronthosting.co.za> Changes by R. David Murray : Removed file: http://bugs.python.org/file18016/issue9265.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 15:22:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Jul 2010 13:22:01 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL In-Reply-To: <1279544007.96.0.781099148111.issue1712522@psf.upfronthosting.co.za> Message-ID: <1279545714.3146.36.camel@localhost.localdomain> Antoine Pitrou added the comment: > Now one of the major goals of Python 2.6/2.7 is to allow the writing > of code which ports smoothly to Python 3. Unicode support is a major > issue here. I understand the argument. But 2.7 is a bugfix branch and shouldn't receive new features, even backports. If we wanted 2.x to converge further into 3.x, we would do a 2.8, which we have decided not to do. > I don't consider use of Unicode strings in Python 2.7 to be > "accidental". In my experience with Python 2, pretty much everything > already works with Unicode strings, and it's best practice to use > them. Not true. From the urllib module itself: $ touch /tmp/h? $ python -c 'import urllib; urllib.urlretrieve("file:///tmp/h?")' $ python -c 'import urllib; urllib.urlretrieve(u"file:///tmp/h?")' Traceback (most recent call last): File "", line 1, in File "/usr/lib64/python2.6/urllib.py", line 93, in urlretrieve return _urlopener.retrieve(url, filename, reporthook, data) File "/usr/lib64/python2.6/urllib.py", line 225, in retrieve url = unwrap(toBytes(url)) File "/usr/lib64/python2.6/urllib.py", line 1027, in toBytes " contains non-ASCII characters") UnicodeError: URL u'file:///tmp/h\xc3\xa9' contains non-ASCII characters > Having functions in Python 2.7 which don't accept Unicode (or worse, > raise random exceptions) runs against best practices for moving to > Python 3. There are lots of them, and urllib.quote() isn't an exception: 'x\x9c\xcbH\x04\x00\x013\x00\xca' >>> zlib.compress(u"h?") Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 1: ordinal not in range(128) pwd.struct_passwd(pw_name='root', pw_passwd='x', pw_uid=0, pw_gid=0, pw_gecos='root', pw_dir='/root', pw_shell='/bin/bash') >>> pwd.getpwnam(u"root?") Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 4: ordinal not in range(128) > In fact, most code written to work with strings naturally works with > Unicode because unicode strings support the same basic operations. What should zlib compression of an unicode string result in? > > The original issue is against robotparser, and clearly states a bug > > (robotparser doesn't work in some cases). > > I don't know why this keeps coming back to robotparser. The original > bug was not against robotparser; it is called "quote throws exception > on Unicode URL" and that is the bug. Robotparser was just one > demonstrative piece of code which failed because of it. Well, there are two different concerns: - robotparser fails on certain Web pages, which is a bug (unless the Web pages are clearly malformed) - urllib.quote() should accept any kind of unicode strings, and perform appropriate encoding, with an ability to override default encoding parameters: this is a feature request The OP himself (John Nagle) said: ?The problem is down inside a library module. "robotparser" is calling "urllib.quote". One of those two library modules needs to be fixed.? It seems to imply that the primary concern was robotparser not working. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 15:27:06 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 19 Jul 2010 13:27:06 +0000 Subject: [issue9265] Incorrect name passed as arg[0] when shell=True and executable specified In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279546026.4.0.695865436054.issue9265@psf.upfronthosting.co.za> R. David Murray added the comment: Stefan: patch looks good to me in principle, but it looks like you made it against 2.7, and we commit to py3k first now. The test does not work correctly on py3k because of a bytes/string issue, but I'm not clear on why the problem happens (I haven't looked in to it, I just observe that the test fails). And yes I think this should go into 2.6 and 3.1 as well. Narnie: if only we had enough manpower to handle all bugs as rapidly. Please keep learning and help us where you can :) As for your test...I'm not clear if you are saying Stefan's patch fixes or problem or not, but please observe this: >>> os.execv('/bin/bash', ['/bin/sh', 'echos', 'foo']) /bin/sh: echos: No such file or directory That is, it is /bin/bash that is running, but it thinks its name is '/bin/sh' because that is what we passed in arg0 in the execv call. Similarly you could do: >>> os.execv('/bin/bash', ['my_funny_walk', 'echos', 'foo']) my_funny_walk: echos: No such file or directory So, popen is *calling* the correct shell, it's just that it is giving it the wrong arg[0] name, which Stefan's patch fixes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 15:34:11 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Jul 2010 13:34:11 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1279546451.3.0.235941156733.issue1712522@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Sorry, the email gateway of Roundup ate half of my snippets. Here they are again: >>> zlib.compress(u"ha") 'x\x9c\xcbH\x04\x00\x013\x00\xca' >>> zlib.compress(u"h?") Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\xe0' in position 1: ordinal not in range(128) >>> pwd.getpwnam(u"root") pwd.struct_passwd(pw_name='root', pw_passwd='x', pw_uid=0, pw_gid=0, pw_gecos='root', pw_dir='/root', pw_shell='/bin/bash') >>> pwd.getpwnam(u"root?") Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 4: ordinal not in range(128) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 15:38:36 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 19 Jul 2010 13:38:36 +0000 Subject: [issue9296] json module skipkeys handling changed exception types in 2.7 In-Reply-To: <1279468136.69.0.813704540742.issue9296@psf.upfronthosting.co.za> Message-ID: <1279546716.47.0.428152139529.issue9296@psf.upfronthosting.co.za> R. David Murray added the comment: Adding some people to nosy: Bob, who wrote the code, and Antoine and Benjamin who were involved in the update and probably have an opinion on the correct fix. (c.f.: Issue4136) ---------- nosy: +benjamin.peterson, bob.ippolito, pitrou, r.david.murray stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 15:39:50 2010 From: report at bugs.python.org (Isaac Morland) Date: Mon, 19 Jul 2010 13:39:50 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279546790.75.0.361083693673.issue9299@psf.upfronthosting.co.za> Isaac Morland added the comment: This exact issue has already been discussed in Issue 1675. ---------- nosy: +ijmorlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 15:40:17 2010 From: report at bugs.python.org (Isaac Morland) Date: Mon, 19 Jul 2010 13:40:17 +0000 Subject: [issue1675] Race condition in os.makedirs In-Reply-To: <1198180171.38.0.482360233935.issue1675@psf.upfronthosting.co.za> Message-ID: <1279546817.22.0.850057681347.issue1675@psf.upfronthosting.co.za> Isaac Morland added the comment: This is again being discussed in Issue 9299. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 15:40:59 2010 From: report at bugs.python.org (Ray.Allen) Date: Mon, 19 Jul 2010 13:40:59 +0000 Subject: [issue1764286] inspect.getsource does not work with decorated functions Message-ID: <1279546859.32.0.459185883392.issue1764286@psf.upfronthosting.co.za> Ray.Allen added the comment: I don't think this patch is correct, because we don't know if the closure[0] is the wrapped function, consider the following case: def fun(): abc = 1 def fun2(): print(abc) print(inspect.getsource(fun2)) In this case, the __closure__ of fun2 is [cell(1), ], the patch doesn't work. I think the behavior of inspect.getsource(arg) is no problem because it indeed gives the right source code of arg, no matter arg is a wrapper function or an original function. michele argues that the result is not meaningful, through in most case it seems reasonably because wrapper functions usually do litter valuable work, but it is not correct for all cases. What if a wrapper function does more valuable work than the wrapped function? In this case should getsouce() give the source code of wrapper function because it's more meaningful? The concept "wrapper" and "wrapped" should have no relation with its source code. I suggest you assign a special named attribute of all wrapper functions to its wrapped function yourself, something like "wrapped_function", and then you can walk through the wrapper chain to find the real source you want for each wrapper function. Then the stdard library's update_wrapper() and getsource() can remain unchanged. ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 15:43:32 2010 From: report at bugs.python.org (Isaac Morland) Date: Mon, 19 Jul 2010 13:43:32 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279547012.06.0.303325644512.issue9299@psf.upfronthosting.co.za> Isaac Morland added the comment: How different is this issue from Issue 1608579, Issue 1239890, Issue 1223238, and Issue 1314067? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 15:50:32 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Jul 2010 13:50:32 +0000 Subject: [issue9296] json module skipkeys handling changed exception types in 2.7 In-Reply-To: <1279468136.69.0.813704540742.issue9296@psf.upfronthosting.co.za> Message-ID: <1279547432.47.0.467036346877.issue9296@psf.upfronthosting.co.za> Antoine Pitrou added the comment: TypeError sounds right indeed. Patches welcome (even better with tests). ---------- stage: unit test needed -> needs patch versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 15:51:12 2010 From: report at bugs.python.org (Peter Donis) Date: Mon, 19 Jul 2010 13:51:12 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279547472.81.0.342341266577.issue1812@psf.upfronthosting.co.za> Peter Donis added the comment: I saw that this issue was bumped and re-tested against the current trunk (r82970). A further change in doctest_testfile.py was needed to make the test pass when called from regrtest.py: the test importer for the loader.get_data test case now stores the absolute path where doctest_testfile.txt is located, so that it can always find it. I've uploaded a 2nd revised diff with this change. ---------- keywords: +patch Added file: http://bugs.python.org/file18063/doctest-fixes2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 15:55:42 2010 From: report at bugs.python.org (Doug Hellmann) Date: Mon, 19 Jul 2010 13:55:42 +0000 Subject: [issue9296] json module skipkeys handling changed exception types in 2.7 In-Reply-To: <1279468136.69.0.813704540742.issue9296@psf.upfronthosting.co.za> Message-ID: <1279547742.84.0.451390228754.issue9296@psf.upfronthosting.co.za> Doug Hellmann added the comment: Bob fixed this in simplejson under ticket 82 (http://code.google.com/p/simplejson/issues/detail?id=82). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 15:58:52 2010 From: report at bugs.python.org (Ray.Allen) Date: Mon, 19 Jul 2010 13:58:52 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279547932.15.0.210529252233.issue9299@psf.upfronthosting.co.za> Ray.Allen added the comment: If I understander correctly, Issue 1608579, Issue 1239890, Issue 1223238, and Issue 1314067 all deal with the case that the intermediate directories already exists during creating them caused by race condition, but if the target directory(the leaf directory) already exist due to some reason, the OSError is still raised. This patch is mainly addressed on simulate the "mkdir -p" option, that is, when the target directory exists, no OSError is raised. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 16:12:27 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 19 Jul 2010 14:12:27 +0000 Subject: [issue9265] Incorrect name passed as arg[0] when shell=True and executable specified In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279548747.48.0.981180282848.issue9265@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. I didn't intentionally remove the older patch, but it's probably not worth the effort to restore it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 16:26:33 2010 From: report at bugs.python.org (Matt Giuca) Date: Mon, 19 Jul 2010 14:26:33 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1279549593.49.0.862204399415.issue1712522@psf.upfronthosting.co.za> Matt Giuca added the comment: OK sure, there are some other things broken, but they are mostly not dealing with string data, but binary data (for example, zlib expects a sequence of bytes, not characters). Just one quick point: > urllib.urlretrieve("file:///tmp/h?") > UnicodeError: URL u'file:///tmp/h\xc3\xa9' contains non-ASCII characters That's precisely correct behaviour. URLs are not allowed to contain non-ASCII characters (that's the whole point of urllib.quote). urllib.quote should accept non-ASCII characters (for conversion into ASCII strings). Other URL processing functions should not accept non-ASCII characters, since they aren't valid URIs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 16:30:27 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 19 Jul 2010 14:30:27 +0000 Subject: [issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry In-Reply-To: <1279454095.41.0.733053669611.issue9291@psf.upfronthosting.co.za> Message-ID: <1279549827.32.0.864915169803.issue9291@psf.upfronthosting.co.za> R. David Murray added the comment: I'm guessing this problem doesn't occur in 3.x? If so, the quick fix would be to have the registry code catch UnicodeError instead of UnicodeEncodeError. That may be the correct fix anyway. The "fun" part of this bug is going to be creating a unit test for it. ---------- keywords: +easy nosy: +r.david.murray stage: -> unit test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 16:43:20 2010 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 19 Jul 2010 14:43:20 +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: <1279550600.8.0.368673697244.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: This has already been reported in issue #3511. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 16:57:04 2010 From: report at bugs.python.org (Vance Unruh) Date: Mon, 19 Jul 2010 14:57:04 +0000 Subject: [issue9298] binary email attachment issue with base64 encoding In-Reply-To: <1279508696.99.0.665109757672.issue9298@psf.upfronthosting.co.za> Message-ID: <1279551424.02.0.281648352362.issue9298@psf.upfronthosting.co.za> Vance Unruh added the comment: Here's code that attaches the pdf file the two different ways. Both attachments are OK when I read the mail on OSX, but one is corrupt when read with Windows Mail on Vista. I wasn't sure what to do with the actual sending of the mail to the server. You'll have to change the code to use your account or something. def emailReport(pdf): """Email the report as multi-part MIME""" from email.mime.multipart import MIMEMultipart msg = MIMEMultipart() msg['Subject'] = 'Corrupt PDF' msg['From'] = 'Me ' msg['To'] = 'You ' # Add the PDF the easy way that fails: from email.mime.application import MIMEApplication fp = open(pdf, 'rb') part = MIMEApplication(fp.read(),"pdf") fp.close() part.add_header('Content-Disposition', 'attachment',filename='This one fails.pdf') msg.attach(part) # Add the PDF the hard way using the legacy base64 encoder from email.mime.base import MIMEBase part = MIMEBase("application","pdf") part.add_header('Content-Transfer-Encoding', 'base64') part.add_header('Content-Disposition', 'attachment',filename='This one works.pdf') import base64 fp = open(pdf, 'rb') part.set_payload(str(base64.encodebytes(fp.read()),'ascii')) fp.close() msg.attach(part) # Send the email from smtplib import SMTP server = SMTP('smtpauth.provider.net') server.login(user,password) server.sendmail(msg['From'], recipient, msg.as_string()) server.quit() emailReport('bugs.python.org_issue9298.pdf') ---------- Added file: http://bugs.python.org/file18064/bugs.python.org_issue9298.pdf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 16:57:25 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 19 Jul 2010 14:57:25 +0000 Subject: [issue9265] Incorrect name passed as arg[0] when shell=True and executable specified In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279551445.56.0.9929878098.issue9265@psf.upfronthosting.co.za> Stefan Krah added the comment: David, thanks for all the comments! - The string/bytes issue was caused by the fact that p.stdout is only opened in text mode when universal_newlines=True. Committed fix in r82971, r82972, r82973 and r82974. I'll close this issue if all buildbots are ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 17:10:54 2010 From: report at bugs.python.org (Jeffrey Yasskin) Date: Mon, 19 Jul 2010 15:10:54 +0000 Subject: [issue9189] Improve CFLAGS handling In-Reply-To: <1278517873.84.0.191654592449.issue9189@psf.upfronthosting.co.za> Message-ID: <1279552254.45.0.402676324552.issue9189@psf.upfronthosting.co.za> Jeffrey Yasskin added the comment: Oops, sorry about that. Is the fix to change LDSHARED to LDSHARED= $(CC) $(PY_LDFLAGS) -bundle -undefined dynamic_lookup ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 17:23:42 2010 From: report at bugs.python.org (Zsolt Cserna) Date: Mon, 19 Jul 2010 15:23:42 +0000 Subject: [issue9185] os.getcwd causes infinite loop on solaris In-Reply-To: <1278492997.35.0.523630408468.issue9185@psf.upfronthosting.co.za> Message-ID: <1279553022.53.0.187828133039.issue9185@psf.upfronthosting.co.za> Zsolt Cserna added the comment: I confirm that test_posix passes after applying the patch issue9185-2.patch on solaris 8. Thank you. Now solaris and openbsd have a clean os.getcwd() implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 17:25:53 2010 From: report at bugs.python.org (Carl Chenet) Date: Mon, 19 Jul 2010 15:25:53 +0000 Subject: [issue9304] unreproducible example in the memoryview documentation In-Reply-To: <1279553153.05.0.828630884678.issue9304@psf.upfronthosting.co.za> Message-ID: <1279553153.05.0.828630884678.issue9304@psf.upfronthosting.co.za> New submission from Carl Chenet : Hi, In the current documentation at http://docs.python.org/library/stdtypes.html#memoryview, the first example announces : >>> v = memoryview('abcefg') >>> v[1] 'b' >>> v[-1] 'g' >>> v[1:4] >>> str(v[1:4]) 'bce' Trying to reproduce this example I got : $ python Python 2.7 (r27:82500, Jul 13 2010, 17:48:51) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> v = memoryview('abcefg') >>> v[1] 'b' >>> v[-1] 'g' >>> v[1:4] >>> str(v[1:4]) '' The last line of the example in the documentation is not reproducible. Hope it's only a documentation issue. Bye, Carl Chenet ---------- assignee: docs at python components: Documentation messages: 110766 nosy: chaica_, docs at python priority: normal severity: normal status: open title: unreproducible example in the memoryview documentation versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 17:29:22 2010 From: report at bugs.python.org (Jerry Seutter) Date: Mon, 19 Jul 2010 15:29:22 +0000 Subject: [issue8911] regrtest.main should have a test skipping argument In-Reply-To: <1275794606.83.0.993053669818.issue8911@psf.upfronthosting.co.za> Message-ID: <1279553362.28.0.274438957385.issue8911@psf.upfronthosting.co.za> Changes by Jerry Seutter : ---------- assignee: -> jerry.seutter nosy: +jerry.seutter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 17:34:41 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 15:34:41 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279553681.72.0.707372871796.issue1812@psf.upfronthosting.co.za> Mark Lawrence added the comment: Patched files work fine on Windows against the 2.7 maintainance branch. doctest (doctest) ... 66 tests with zero failures doctest (test.test_doctest) ... 440 tests with zero failures They fail on py3k, it's a unicode problem that's nothing to do with this patch. Could someone try this on a Linux box to confirm my findings? ---------- keywords: -patch versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 17:47:07 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 19 Jul 2010 15:47:07 +0000 Subject: [issue9185] os.getcwd causes infinite loop on solaris In-Reply-To: <1278492997.35.0.523630408468.issue9185@psf.upfronthosting.co.za> Message-ID: <1279554427.58.0.340207931396.issue9185@psf.upfronthosting.co.za> Stefan Krah added the comment: Thanks for testing! - Fix also backported to release26-maint in r82975. Closing this one. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 17:57:25 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 15:57:25 +0000 Subject: [issue9105] pickle security note should be more prominent In-Reply-To: <1277745956.4.0.951690442784.issue9105@psf.upfronthosting.co.za> Message-ID: <1279555045.67.0.320446433176.issue9105@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The patch does not apply to py3k. Also, when you generate patches please do so from the root directory of the branch. For example, tutorial/inputoutput.rst should be patched as Doc/tutorial/inputoutput.rst. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 18:03:14 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 19 Jul 2010 16:03:14 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279555394.45.0.545906477739.issue9299@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Since this is a library issue, it can go into 3.2. It is definitely a feature request, hence not in 2.7. Code that depends on the exception suppression would crash on an earlier release. http://mail.python.org/pipermail/python-dev/2010-July/102027.html Guido said "Well, it really should have behaved like mkdir -p in the first place.", so this is accepted pending patch approval. The patch includes doc, test, and code patches. The name 'ensure_exist' for the new parameter strikes me as wrong, as well as too long for something that will nearly always be set to True. The function always ensures that the directory exists. The question is whether it is ok that it exist previously. I strongly suggest something shorter like 'exist_ok' as an alternative. The name 'excl' used in # The code looks OK as far as I can read it, but someone else should look at the C code for posimodule-mkdir. Does the use of 'base = support.TESTFN' ensure that the test junk gets cleaned up? This versus #1675: the presenting issues are different -- parent race condition leading to error versus leaf existence leading to error. However, the patches are nearly the same and would have much the same effect. The differences: * Test: 1675 lacks a new test; there should be one. * New parameter name: they use different names, I do not like either. They use opposite senses -- exist_ok versus exist_bad for the new parameter. I think a good name is more important. * Location of error suppression: this patches posixfile.mkdir; 1675 wraps it with a new os.mkdir function that does the suppression. I can see an argument for each approach. * Propagation to parent directories: this passes exist_ok to parent mkdir(); 1675 passes exist_ok=True, so that it is never an error for parent directories to exist. This is a change in behavior and might be bad for the same reason we do not make exist_ok=True the default. In any case, I believe either patch could be changed to mimic the other. Thus there are three choices to make before committing. ---------- nosy: +tjreedy resolution: -> accepted stage: -> patch review type: -> feature request versions: +Python 3.2 -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 18:10:21 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 19 Jul 2010 16:10:21 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279555821.79.0.670036157434.issue9299@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +draghuram, gagenellina, gvanrossum, zooko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 18:10:37 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Mon, 19 Jul 2010 16:10:37 +0000 Subject: [issue4499] redefinition of TILDE macro on AIX platform In-Reply-To: <1228258808.76.0.068417078821.issue4499@psf.upfronthosting.co.za> Message-ID: <1279555837.28.0.330894394153.issue4499@psf.upfronthosting.co.za> Sridhar Ratnakumar added the comment: I've located the following patch in our ActivePython source tree. $ cat src/patches/3.1/general/aix_tilde.patch --- Include/token.h.orig 2008-10-08 11:51:52.000000000 -0700 +++ python/Include/token.h 2008-10-08 11:52:53.000000000 -0700 @@ -7,6 +7,8 @@ extern "C" { #endif +#undef TILDE /* Prevent clash of our definition with system macro. Ex AIX, ioctl.h */ + #define ENDMARKER 0 #define NAME 1 #define NUMBER 2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 18:11:57 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 19 Jul 2010 16:11:57 +0000 Subject: [issue1675] Race condition in os.makedirs In-Reply-To: <1198180171.38.0.482360233935.issue1675@psf.upfronthosting.co.za> Message-ID: <1279555917.13.0.549833139023.issue1675@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The precipitating issue for this and #9299 are different: parent race leading to error versus tail existence leading to error. However, both patches address both issues. See #9299 for my comparison of this patch and that. I am consolidating nosy lists there. Perhaps most/all further discussion should be directed there. ---------- nosy: +tjreedy stage: -> patch review type: behavior -> feature request versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 18:16:17 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Mon, 19 Jul 2010 16:16:17 +0000 Subject: [issue9278] rename 2to3 & pydoc to 2to3.py & pydoc.py In-Reply-To: <1279316069.22.0.0186321125783.issue9278@psf.upfronthosting.co.za> Message-ID: <1279556177.94.0.388005628537.issue9278@psf.upfronthosting.co.za> Sridhar Ratnakumar added the comment: What do you mean by 'commands'? Being able to type '2to3' instead of '2to3.py' on *nix? Want me to open a new feature request for Windows support - perhaps by including a 2to3.bat/pydoc.bat (similar to idle.bat) in C:\PythonXY\Scripts? The idea is to let Windows users run 2to3 and pydoc; that's all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 18:21:45 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 16:21:45 +0000 Subject: [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: <1279556505.28.0.814004588201.issue9305@psf.upfronthosting.co.za> Message-ID: <1279556505.28.0.814004588201.issue9305@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : I am opening this to supersede issue7229. See discussion following msg107148. In many places offsets representing the difference between local time and UTC are described as minutes or seconds east or west of UTC. This is not correct because UTC is not a place and minutes and seconds don't measure distance in this context. Replacing UTC with the Prime Meridian will not fix that because some regions in the western hemisphere use positive offsets from UTC. or example, Madrid is at 3? 42' West, but uses Central European Time which is UTC+1. I believe geographical references in the python documentation are irrelevant. What users are interested in is how to convert local time to UTC and UTC to local time rather than what is the sign of time.timezone in Madrid. I suggest the following wording for time.timezone description: time.timezone: The number of seconds one must add to the local time to arrive at UTC. Similarly, tzinfo.utcoffset() can be defined as "Returns timedelta one must add to UTC to arrive at local time." ---------- assignee: docs at python components: Documentation keywords: easy messages: 110774 nosy: belopolsky, docs at python priority: normal severity: normal stage: needs patch status: open title: Don't use east/west of UTC in date/time documentation type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 18:28:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 19 Jul 2010 16:28:16 +0000 Subject: [issue9304] unreproducible example in the memoryview documentation In-Reply-To: <1279553153.05.0.828630884678.issue9304@psf.upfronthosting.co.za> Message-ID: <1279556896.88.0.737456106072.issue9304@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 18:28:29 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 19 Jul 2010 16:28:29 +0000 Subject: [issue9304] unreproducible example in the memoryview documentation In-Reply-To: <1279553153.05.0.828630884678.issue9304@psf.upfronthosting.co.za> Message-ID: <1279556909.08.0.913528552954.issue9304@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 18:34:33 2010 From: report at bugs.python.org (tanaga) Date: Mon, 19 Jul 2010 16:34:33 +0000 Subject: [issue8917] Segmentation error happens in Embedding Python. In-Reply-To: <1275835663.33.0.520214000656.issue8917@psf.upfronthosting.co.za> Message-ID: <1279557273.68.0.779108823552.issue8917@psf.upfronthosting.co.za> tanaga added the comment: Thanx Hirokazu Yamamoto!! (arigato gozaimasu) I was insufficient when search. I searched keywords "segment ctype" that didn't match :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 18:35:21 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Mon, 19 Jul 2010 16:35:21 +0000 Subject: [issue9306] distutils: raise informative error message when cmd_class is None In-Reply-To: <1279557321.49.0.203770679838.issue9306@psf.upfronthosting.co.za> Message-ID: <1279557321.49.0.203770679838.issue9306@psf.upfronthosting.co.za> New submission from Sridhar Ratnakumar : Current I see this: File "/opt/ActivePython-2.7/lib/python2.7/distutils/dist.py", line 806, in get_command_class klass = self.cmdclass.get(command) AttributeError: 'NoneType' object has no attribute 'get' more context: https://bugs.launchpad.net/pyreadline/+bug/607329 ---------- assignee: tarek components: Distutils messages: 110776 nosy: srid, tarek priority: normal severity: normal status: open title: distutils: raise informative error message when cmd_class is None type: feature request versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 18:42:05 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 16:42:05 +0000 Subject: [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: <1279556505.28.0.814004588201.issue9305@psf.upfronthosting.co.za> Message-ID: <1279557725.21.0.880960672606.issue9305@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- dependencies: +Manual entry for time.daylight can be misleading _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 18:42:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 16:42:18 +0000 Subject: [issue7229] Manual entry for time.daylight can be misleading In-Reply-To: <1256723052.19.0.148648938954.issue7229@psf.upfronthosting.co.za> Message-ID: <1279557738.7.0.451210364964.issue7229@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: After reading the new wording on a formatted page, I don't like the proposed changes: """ time.altzone When daylight is nonzero, altzone specifies the offset of the local DST timezone, in seconds west of UTC. This is negative if the local DST timezone is east of UTC ... """ In the second sentence, it is not clear whether "this" refers to altzone or daylight. """ time.daylight Whether or not DST is in effect, daylight specifies the DST offset. """ This is simply wrong. time.daylight does not necessarily specify the DST offset (and I think it does not on most systems.) POSIX requires that "The tzset() function also shall set the external variable daylight to 0 if Daylight Savings Time conversions should never be applied for the timezone in use; otherwise, non-zero." [1] This means that a compliant system may store just 0 or 1 in daylight rather than the DST offset. For example, on my OSX system: $ TZ=America/New_York python -c "import time; print(time.daylight)" 1 $ TZ=UTC python -c "import time; print(time.daylight)" 0 $ TZ=EDT python -c "import time; print(time.daylight)" 0 I will think some more on how to improve the current documentation, but at least with respect to time.daylight, current language is better than the proposed change. [1] http://www.opengroup.org/onlinepubs/009695399/functions/tzset.html ---------- superseder: -> Don't use east/west of UTC in date/time documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 18:43:06 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 16:43:06 +0000 Subject: [issue2142] difflib.unified_diff(...) produces invalid patches In-Reply-To: <1203365817.7.0.0998491412302.issue2142@psf.upfronthosting.co.za> Message-ID: <1279557786.37.0.745519864002.issue2142@psf.upfronthosting.co.za> Mark Lawrence added the comment: The two latest patch files were missing TestDifflib from run_unittest. Having shown that the tests failed if test_difflib only was patched, then patch difflib against the 3.1 maintainance and py3k branches, the former passed ok and the latter failed. Could someone please take a look, at the same time considering Mark D's suggestion about using a keyword argument to the unified_diff and context_diff functions. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 18:49:10 2010 From: report at bugs.python.org (Peter Donis) Date: Mon, 19 Jul 2010 16:49:10 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279558150.12.0.345182295591.issue1812@psf.upfronthosting.co.za> Peter Donis added the comment: You'll probably want someone else to confirm, but for the record, my testing was on a Linux box (SuSE 11.2) using Python 2.7 built from the SVN trunk: peter at Powerspec:~/.local/lib/python2.7/test> uname -a Linux Powerspec 2.6.31.12-0.2-desktop #1 SMP PREEMPT 2010-03-16 21:25:39 +0100 i686 i686 i386 GNU/Linux peter at Powerspec:~/.local/lib/python2.7/test> python2.7 Python 2.7 (trunk:82970M, Jul 19 2010, 12:44:35) [GCC 4.4.1 [gcc-4_4-branch revision 150839]] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> peter at Powerspec:~/.local/lib/python2.7/test> python2.7 test_doctest.py doctest (doctest) ... 66 tests with zero failures doctest (test.test_doctest) ... 443 tests with zero failures ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 18:53:54 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 19 Jul 2010 16:53:54 +0000 Subject: [issue9036] Simplify Py_CHARMASK In-Reply-To: <1277039528.15.0.539020018856.issue9036@psf.upfronthosting.co.za> Message-ID: <1279558434.79.0.453056730871.issue9036@psf.upfronthosting.co.za> Stefan Krah added the comment: Antoine, thanks! Committed in r82966, r82968, r82969 and r82970. Could we fix the unicodeobject.c bug on the fly? I think the patch should do, unless non-ascii digits are supported. But in that case several other changes would be needed. ---------- Added file: http://bugs.python.org/file18065/unicodeobject_py_charmask.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 18:58:31 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 19 Jul 2010 16:58:31 +0000 Subject: [issue9278] rename 2to3 & pydoc to 2to3.py & pydoc.py In-Reply-To: <1279316069.22.0.0186321125783.issue9278@psf.upfronthosting.co.za> Message-ID: <1279558711.23.0.584966035781.issue9278@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: .py extension is intended for pure-Python modules, not for Python scripts. ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 18:59:24 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 19 Jul 2010 16:59:24 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1279558764.36.0.695692084053.issue1712522@psf.upfronthosting.co.za> Senthil Kumaran added the comment: There are two points here: First, is it a desired behavior of quote function in 2.7? IMO, it is. In the discussions of issue3300, I think, it was decided that quote handling of unicode strings may be backported. Behaviour wise the modified version still returns a string which is correct for py2. The forward compatibility on 2.7.1 version here is on the basis that someone in 2.7 might be relying on Exception raised for Unicode string "for the quote function". But my guess is, when they are trying to quote non-ascii characters using quote function which is path component, they might be expecting that it gives them a correct output and this (now) modified function would be of help. Of the many cases we have on Unicode being auto-coerced to 8-bit string, this particular case of using UTF-8 as default encoding for Unicode and returning a string seems to be fine (again discussed in the earlier issue). We might not have good answers for many other cases. The Second point, as this is leading to an API change we should not have it 2.7.1 It would be unfortunate, if we revert the patch on this account only. This can be classified a bug-fix producing the desirable behavior, just that it needs the API to change too. I don't know if we have never adopted this approach (of changing API in backward compatible manner) for anything other than the security bug fixes alone. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 19:11:17 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Jul 2010 17:11:17 +0000 Subject: [issue9036] Simplify Py_CHARMASK In-Reply-To: <1277039528.15.0.539020018856.issue9036@psf.upfronthosting.co.za> Message-ID: <1279559477.19.0.998152585112.issue9036@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Eric, is the unicode patch ok for you? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 19:13:20 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Jul 2010 17:13:20 +0000 Subject: [issue9304] unreproducible example in the memoryview documentation In-Reply-To: <1279553153.05.0.828630884678.issue9304@psf.upfronthosting.co.za> Message-ID: <1279559600.24.0.779740837217.issue9304@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Right, it should be `v[1:4].tobytes()` instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 19:20:55 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 19 Jul 2010 17:20:55 +0000 Subject: [issue9036] Simplify Py_CHARMASK In-Reply-To: <1277039528.15.0.539020018856.issue9036@psf.upfronthosting.co.za> Message-ID: <1279560055.86.0.520806078314.issue9036@psf.upfronthosting.co.za> Eric Smith added the comment: Yes, the unicode patch looks okay to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 19:28:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Jul 2010 17:28:01 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL In-Reply-To: <1279558764.36.0.695692084053.issue1712522@psf.upfronthosting.co.za> Message-ID: <1279560472.3197.10.camel@localhost.localdomain> Antoine Pitrou added the comment: > The forward compatibility on 2.7.1 version here is on the basis that > someone in 2.7 might be relying on Exception raised for Unicode string > "for the quote function". Again, the problem isn't compatibility. It is, simply, that we shouldn't add new features in a bugfix branch. > The Second point, as this is leading to an API change we should not > have it 2.7.1 > > It would be unfortunate, if we revert the patch on this account only. Let me put it differently: if this rule didn't exist, there would be no point in having bugfix branches, since everyone would commit their favourite new features to bugfix branches. There are many things which were too late for 2.7, and nobody is trying to make a case of adding them to 2.7.1. > I don't know if we have never adopted this approach (of changing API > in backward compatible manner) for anything other than the security > bug fixes alone. We have done it a couple of times in early 3.0 and even 3.1 versions, but that was really exceptional, and 3.x allowed us to relax some of the rules since it was so little used at the time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 19:50:25 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 17:50:25 +0000 Subject: [issue9307] Py_TPFLAGS_LONG_SUBCLASS is not documented In-Reply-To: <1279561825.23.0.120090245801.issue9307@psf.upfronthosting.co.za> Message-ID: <1279561825.23.0.120090245801.issue9307@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Is there a reason for not documenting Py_TPFLAGS_LONG_SUBCLASS (Py_TPFLAGS_INT_SUBCLASS in 2.x)? This flag is used in PyLong_Check, but neither this flag or its inheritance properties are explained anywhere in the docs. See also issue5476. ---------- assignee: docs at python components: Documentation messages: 110787 nosy: belopolsky, docs at python priority: normal severity: normal stage: needs patch status: open title: Py_TPFLAGS_LONG_SUBCLASS is not documented type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 19:51:29 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 19 Jul 2010 17:51:29 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279561889.5.0.145127739744.issue9299@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 19:55:31 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 17:55:31 +0000 Subject: [issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input In-Reply-To: <1236786647.39.0.745171492116.issue5476@psf.upfronthosting.co.za> Message-ID: <1279562131.25.0.81656737063.issue5476@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: As I suspected, datetime not recognizing numpy.int_ as a valid input is a numpy issue. Unlike regular int subclasses, numpy.int_ does not have Py_TPFLAGS_INT_SUBCLASS flag set: >>> numpy.int_.__flags__ & (1<<23) 0 >>> class foo(int): pass ... >>> foo.__flags__ & (1<<23) 8388608 What python can improve in this area is documentation. See issue9307. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> pending superseder: -> Py_TPFLAGS_LONG_SUBCLASS is not documented type: -> behavior versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 20:02:58 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 19 Jul 2010 18:02:58 +0000 Subject: [issue9306] distutils: raise informative error message when cmd_class is None In-Reply-To: <1279557321.49.0.203770679838.issue9306@psf.upfronthosting.co.za> Message-ID: <1279562578.76.0.95837490911.issue9306@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok versions: -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 20:06:30 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Mon, 19 Jul 2010 18:06:30 +0000 Subject: [issue7231] Windows installer does not add \Scripts folder to the path In-Reply-To: <1256749152.57.0.801313448944.issue7231@psf.upfronthosting.co.za> Message-ID: <1279562790.27.0.812901822043.issue7231@psf.upfronthosting.co.za> Changes by Sridhar Ratnakumar : ---------- components: +Windows nosy: +srid type: behavior -> feature request versions: +Python 3.3 -Python 2.4, Python 2.5, Python 2.6, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 20:07:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 18:07:59 +0000 Subject: [issue9307] Py_TPFLAGS_LONG_SUBCLASS is not documented In-Reply-To: <1279561825.23.0.120090245801.issue9307@psf.upfronthosting.co.za> Message-ID: <1279562879.19.0.765360966702.issue9307@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Here are other similar flags that are not documented: /* These flags are used to determine if a type is a subclass. */ #define Py_TPFLAGS_INT_SUBCLASS (1L<<23) #define Py_TPFLAGS_LONG_SUBCLASS (1L<<24) #define Py_TPFLAGS_LIST_SUBCLASS (1L<<25) #define Py_TPFLAGS_TUPLE_SUBCLASS (1L<<26) #define Py_TPFLAGS_BYTES_SUBCLASS (1L<<27) #define Py_TPFLAGS_UNICODE_SUBCLASS (1L<<28) #define Py_TPFLAGS_DICT_SUBCLASS (1L<<29) #define Py_TPFLAGS_BASE_EXC_SUBCLASS (1L<<30) #define Py_TPFLAGS_TYPE_SUBCLASS (1L<<31) On a similar note, TPFLAGS_IS_ABSTRACT is exposed in the inspect module, but is not documented in either inspect module documentation or C API documentation. I believe that as long as these flags are available from the type objects as __flags__, all valid bits should be exposed in inspect module and properly documented. ---------- components: +Library (Lib) versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 20:11:05 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Jul 2010 18:11:05 +0000 Subject: [issue9304] unreproducible example in the memoryview documentation In-Reply-To: <1279553153.05.0.828630884678.issue9304@psf.upfronthosting.co.za> Message-ID: <1279563065.22.0.973150655577.issue9304@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Fixed in r82981. Thank you for the report! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 20:17:25 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Jul 2010 18:17:25 +0000 Subject: [issue9307] Py_TPFLAGS_LONG_SUBCLASS is not documented In-Reply-To: <1279561825.23.0.120090245801.issue9307@psf.upfronthosting.co.za> Message-ID: <1279563445.49.0.71847332292.issue9307@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It would probably be more useful to document them in the C API and put a reference to that in the inspect module docs. These flags are primarily useful for C extension developers, there's little point checking them from Python code. ---------- nosy: +pitrou versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 20:19:01 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 18:19:01 +0000 Subject: [issue1777412] Python's strftime dislikes years before 1900 Message-ID: <1279563541.71.0.879229282508.issue1777412@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Adding issue7989 as a dependency because one of the stated reasons for not calling system strftime from datetime directly is because pure python implementations cannot do the same. This of course can be resolved by exposing raw strftime in separate module (for example _time), but simply applying this patch before #7989 would mean that year < 1900 would have to be disabled for pure python implementation tests. ---------- stage: -> patch review superseder: -> Add pure Python implementation of datetime module to CPython _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 20:19:13 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 18:19:13 +0000 Subject: [issue1777412] Python's strftime dislikes years before 1900 Message-ID: <1279563553.36.0.637209358291.issue1777412@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- dependencies: +Add pure Python implementation of datetime module to CPython superseder: Add pure Python implementation of datetime module to CPython -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 20:19:14 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 19 Jul 2010 18:19:14 +0000 Subject: [issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before) In-Reply-To: <1279530588.62.0.226192140376.issue9301@psf.upfronthosting.co.za> Message-ID: <1279563554.89.0.983977373595.issue9301@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed and committed in revision 82977. And similar changes for py3k in revision 82983. ---------- resolution: accepted -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 20:32:21 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 18:32:21 +0000 Subject: [issue9307] Py_TPFLAGS_LONG_SUBCLASS is not documented In-Reply-To: <1279563445.49.0.71847332292.issue9307@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Mon, Jul 19, 2010 at 2:17 PM, Antoine Pitrou wrote: > .. These flags are primarily useful for C extension developers, there's little point checking them from Python code. Of course there is: it helps debugging problems in types implemented in C. For example, someone working on the numpy issue described in msg110788, would probably appreciate having inspect.TPFLAGS_INT_SUBCLASS and would probaly use it in his or hers unit tests. My point is: we have __flags__ attribute on type objects exposed in python there should be a way to interpret what it means without looking up object.h or C API documentation. BTW, __flags__ itself could grow a docstring and deserves to be mentioned in the docs. Note that copyreg.py uses it to determine wither a class is dynamically allocated. Maybe this should also go to inspect as inspect.isheaptype(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 20:37:32 2010 From: report at bugs.python.org (Peter Donis) Date: Mon, 19 Jul 2010 18:37:32 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279564652.83.0.47276247253.issue1812@psf.upfronthosting.co.za> Peter Donis added the comment: I realized on comparing doctest-fixes2.diff with doctest-fixes1.diff that doctest-fixes2.diff doesn't capture the different newlines correctly, so patch on my machine wouldn't apply the diff (I had done testing from the modified svn checkout without reverting and then re-applying the patch). Uploaded doctest-fixes3.diff which is generated using the external diff command (svn diff --diff-cmd diff) so that patch will apply it cleanly. Not sure if this is something specific to my machine. ---------- keywords: +patch Added file: http://bugs.python.org/file18066/doctest-fixes3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 20:45:48 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 18:45:48 +0000 Subject: [issue2454] sha and md5 fixer In-Reply-To: <1206147643.89.0.60936055638.issue2454@psf.upfronthosting.co.za> Message-ID: <1279565148.52.0.446291741524.issue2454@psf.upfronthosting.co.za> Mark Lawrence added the comment: The patch looks clean to me although I don't feel qualified to comment on the technical aspects. I've tested it on Windows Vista 32 bit against the 2.7 and 3.1 maintainance releases and py3k. The 2.7 run was fine, both 3.x runs failed. File "c:\release31-maint\lib\lib2to3\fixes\fix_hash.py", line 27 "md5": u"md5", ^ SyntaxError: invalid syntax I've stared at the code until I'm blue in the face and can't see what's wrong, I'm sure someone else will spot the problem in seconds. I also noticed a small typo in the rst file "modules where deprecated" should read "modules were deprecated". ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 20:47:38 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 19 Jul 2010 18:47:38 +0000 Subject: [issue459007] Document sys.path on Windows Message-ID: <1279565258.35.0.0541032190325.issue459007@psf.upfronthosting.co.za> ?ric Araujo added the comment: using/windows.rst seems the best place to add comments from PC/getpathp.c, under the ?Finding modules? section. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 20:57:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 18:57:09 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : On Mon, Jul 19, 2010 at 2:45 AM, Guido van Rossum wrote: > Sounds like a good idea to try to remove redundant cookies *and* to > remove most occasional use of non-ASCII characters outside comments > (except for unittests specifically trying to test Unicode features). > Personally I would use \xXX escapes instead of spelling out the > characters in shlex.py, for example. > > Both with or without the coding cookies, many ways of displaying text > files garble characters outside the ASCII range, so it's better to > stick to ASCII as much as possible. > > --Guido > > On Mon, Jul 19, 2010 at 1:21 AM, Alexander Belopolsky > wrote: >> I was looking at the inspect module and noticed that it's source >> starts with "# -*- coding: iso-8859-1 -*-". ? I have checked and there >> are no non-ascii characters in the file. ? There are several other >> modules that still use the cookie: >> >> Lib/ast.py:# -*- coding: utf-8 -*- >> Lib/getopt.py:# -*- coding: utf-8 -*- >> Lib/inspect.py:# -*- coding: iso-8859-1 -*- >> Lib/pydoc.py:# -*- coding: latin-1 -*- >> Lib/shlex.py:# -*- coding: iso-8859-1 -*- >> Lib/encodings/punycode.py:# -*- coding: utf-8 -*- >> Lib/msilib/__init__.py:# -*- coding: utf-8 -*- >> Lib/sqlite3/__init__.py:#-*- coding: ISO-8859-1 -*- >> Lib/sqlite3/dbapi2.py:#-*- coding: ISO-8859-1 -*- >> Lib/test/bad_coding.py:# -*- coding: uft-8 -*- >> Lib/test/badsyntax_3131.py:# -*- coding: utf-8 -*- >> >> I understand that coding: utf-8 is strictly redundant in 3.x. ?There >> are cases such as Lib/shlex.py where using encoding other than utf-8 >> is justified. ?(See >> http://svn.python.org/view?view=rev&revision=82560). ?What are the >> guidelines for other cases? ?Should redundant cookies be removed? >> Since not all editors respect the ?-*- cookie, I think the answer >> should be "yes" particularly when the cookie is setting encoding other >> than utf-8. >> _______________________________________________ >> Python-Dev mailing list >> Python-Dev at python.org >> http://mail.python.org/mailman/listinfo/python-dev >> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org >> > > > > -- > --Guido van Rossum (python.org/~guido) > ---------- assignee: belopolsky components: Library (Lib) messages: 110798 nosy: belopolsky priority: normal severity: normal status: open title: Remove redundant coding cookies from 3.x stdlib _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 21:06:54 2010 From: report at bugs.python.org (John J Lee) Date: Mon, 19 Jul 2010 19:06:54 +0000 Subject: [issue3704] cookielib doesn't handle URLs with / in parameters In-Reply-To: <1219856501.23.0.0473308500082.issue3704@psf.upfronthosting.co.za> Message-ID: <1279566414.75.0.591675509457.issue3704@psf.upfronthosting.co.za> John J Lee added the comment: My patch should be applied. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 21:13:08 2010 From: report at bugs.python.org (Pawel Prokop) Date: Mon, 19 Jul 2010 19:13:08 +0000 Subject: [issue4080] pyunit - display time of each test case - patch In-Reply-To: <1223497696.14.0.913391715353.issue4080@psf.upfronthosting.co.za> Message-ID: <1279566788.81.0.901348427757.issue4080@psf.upfronthosting.co.za> Pawel Prokop added the comment: I think that a delay time of calling a decorator is not important, because this should be constant in each test execution, so no matter. I shall be able to provide a patch in few days. Thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 21:22:02 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 19:22:02 +0000 Subject: [issue2521] ABC caches should use weak refs In-Reply-To: <1206976350.45.0.982533625998.issue2521@psf.upfronthosting.co.za> Message-ID: <1279567322.93.0.0401786300673.issue2521@psf.upfronthosting.co.za> Mark Lawrence added the comment: Patched the unit test, then ran the test before applying the fix which failed, after applying the fix the test ran successfully. Tested on Windows Vista 32 bit against 2.7 maintainance release. The patches are short and sweet, I see no reason why they can't go forward. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 21:27:33 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 19 Jul 2010 19:27:33 +0000 Subject: [issue2454] sha and md5 fixer In-Reply-To: <1206147643.89.0.60936055638.issue2454@psf.upfronthosting.co.za> Message-ID: <1279567653.93.0.620034985184.issue2454@psf.upfronthosting.co.za> Dave Malcolm added the comment: The 'u' prefix went away in Python 3, use an unadorned '' or "" for a unicode value. $ python3 Python 3.1.2 (r312:79147, May 25 2010, 12:21:57) [GCC 4.4.3 20100422 (Red Hat 4.4.3-18)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> u"foo" File "", line 1 u"foo" ^ SyntaxError: invalid syntax ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 21:51:56 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 19:51:56 +0000 Subject: [issue2454] sha and md5 fixer In-Reply-To: <1206147643.89.0.60936055638.issue2454@psf.upfronthosting.co.za> Message-ID: <1279569116.02.0.327370718677.issue2454@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've successfully rerun the tests for 3.x having stripped the 'u' prefix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 21:52:08 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 19 Jul 2010 19:52:08 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1279569128.59.0.984058845618.issue9308@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +easy nosy: +merwok resolution: -> accepted stage: -> needs patch versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 22:12:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 20:12:20 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1279570340.38.0.20014036708.issue9308@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: In the attached patch, I've removed encoding cookies in all files listed in the message above except >> Lib/test/bad_coding.py:# -*- coding: uft-8 -*- >> Lib/test/badsyntax_3131.py:# -*- coding: utf-8 -*- >> Lib/shlex.py:# -*- coding: iso-8859-1 -*- The bad_coding contains bad encoding cookie which is being tested, in badsyntax_3131, the cookie could be removed, but I think it clarifies the meaning of the file. It can probably be replaced with a comment explaining what is being tested. The shlex.py was reverted in r82560, so I am not touching it, but I suspect that the logic used to build wordchars is not correct on systems supporting unicode. I am adding Peter ?strand to "nosy" because his name was miscoded in Lib/getopt.py and I fixed it by copying from Misc/ACKS. ---------- keywords: +patch nosy: +astrand stage: needs patch -> commit review Added file: http://bugs.python.org/file18067/issue9308.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 22:20:41 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 20:20:41 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1279570841.99.0.187215406757.issue9308@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It turns out that test_imp tests that pydoc.py is in iso-8859-1. This is not right. The test should use a dedicated file under Lib/test for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 22:25:58 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 20:25:58 +0000 Subject: [issue3704] cookielib doesn't handle URLs with / in parameters In-Reply-To: <1219856501.23.0.0473308500082.issue3704@psf.upfronthosting.co.za> Message-ID: <1279571158.04.0.011835684159.issue3704@psf.upfronthosting.co.za> Mark Lawrence added the comment: Patched the unit test, then ran the test before applying the fix which failed, after applying the fix the test ran successfully. Tested on Windows Vista 32 bit against 2.7 maintainance release. The patches are short and sweet, I see no reason why they can't go forward. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 22:27:08 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 19 Jul 2010 20:27:08 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279571228.83.0.719302660463.issue9299@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 22:33:28 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 19 Jul 2010 20:33:28 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1279571608.05.0.578313269856.issue9308@psf.upfronthosting.co.za> ?ric Araujo added the comment: This is not easy after all, kudos for taking care of that. The shlex fix was reverted IIRC because Mark was unsure of the fix, since our diff tools try to be too clever and decode files, not showing us the bytes differences. I don?t trust my editor either, nor the file command (which says very funny things about Python files). I only trust Python?s open function to give me the exact bytes, which I can compare with '?'.encode('utf-8') and '?'.encode('latin1') to make up my mind. In this case, I would trust the left-hand side of the diff seen in r82560 as a definition of what those characters are supposed to be, since I don?t have POSIX handy , and add the \x escapes for those characters (per Guido?s recommendation?I regret we?ve switched to UTF-8 but can?t use it). ---------- keywords: -easy nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 22:50:21 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 20:50:21 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279572621.85.0.305617326468.issue1812@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've again tried running the test against the 2.7 maintainance release and got:- ValueError: line 12 of the docstring for doctest_testfile.txt has inconsistent leading whitespace: 'This doctest verifies universal newline support; each command' Could another patch please be provided that corrects this? I suspect that I tried to edit the previous version to overcome this, screwed up the line endings and forgot to mention it, sorry about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 23:00:57 2010 From: report at bugs.python.org (Tim Lesher) Date: Mon, 19 Jul 2010 21:00:57 +0000 Subject: [issue9204] The documentation of PyType_Type in py3k mentions types.TypeType In-Reply-To: <1278612596.78.0.246474788536.issue9204@psf.upfronthosting.co.za> Message-ID: <1279573257.26.0.433653734928.issue9204@psf.upfronthosting.co.za> Tim Lesher added the comment: There are a number of similar mentions in the C API docs and index; attached is a patch that removes each. ---------- keywords: +patch nosy: +tlesher Added file: http://bugs.python.org/file18068/remove-extraneous-types.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 23:06:26 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 21:06:26 +0000 Subject: [issue2528] Change os.access to check ACLs under Windows In-Reply-To: <1207059558.9.0.891835325783.issue2528@psf.upfronthosting.co.za> Message-ID: <1279573586.43.0.1247878362.issue2528@psf.upfronthosting.co.za> Mark Lawrence added the comment: Tim, do you want more time to think about this, could we close as "won't fix" or what? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 23:14:41 2010 From: report at bugs.python.org (Alexander Dreyer) Date: Mon, 19 Jul 2010 21:14:41 +0000 Subject: [issue9309] Add environment variable complementing command line option -no-user-cfg In-Reply-To: <1279574081.87.0.528312419657.issue9309@psf.upfronthosting.co.za> Message-ID: <1279574081.87.0.528312419657.issue9309@psf.upfronthosting.co.za> New submission from Alexander Dreyer : At the Sage Days 24 coding sprint the issue came up, that the setup.py install programs of several python-based tools pick the prefix-setting from ~/.pydistutils.cfg. http://trac.sagemath.org/sage_trac/ticket/9536 In order to get this right, we suggest to introduce the environment variable DISTUTILS_NO_USER_CFG. It can be used like the --no-user-cfg commandline option supported by distutils. Best regards ---------- assignee: tarek components: Distutils files: dist.py.patch keywords: patch messages: 110811 nosy: AlexanderDreyer, tarek priority: normal severity: normal status: open title: Add environment variable complementing command line option -no-user-cfg type: feature request versions: Python 2.5 Added file: http://bugs.python.org/file18069/dist.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 23:21:03 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 21:21:03 +0000 Subject: [issue2690] Precompute range length In-Reply-To: <1209137521.96.0.492875701205.issue2690@psf.upfronthosting.co.za> Message-ID: <1279574463.76.0.196984184551.issue2690@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Nick, would you have time to work on this for 3.2, or should we target 3.3, or could somebody else take this over? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 19 23:23:36 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 21:23:36 +0000 Subject: [issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface In-Reply-To: <1209319360.66.0.583090952017.issue2704@psf.upfronthosting.co.za> Message-ID: <1279574616.51.0.651539119497.issue2704@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 2.7, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:23:57 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 22:23:57 +0000 Subject: [issue1149798] hotshot.runctx: builtins missing Message-ID: <1279578237.71.0.207675093607.issue1149798@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closing as noone has responded. ---------- resolution: -> wont fix status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:24:15 2010 From: report at bugs.python.org (Peter Donis) Date: Mon, 19 Jul 2010 22:24:15 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279578255.33.0.332852926276.issue1812@psf.upfronthosting.co.za> Peter Donis added the comment: Uploaded a diff implementing the fix for the head of the py3k branch. Test passes on my Linux box: peter at Powerspec:~/.local/lib/python3.2/test> python3.2 Python 3.2a0 (py3k:82984, Jul 19 2010, 16:03:06) [GCC 4.4.1 [gcc-4_4-branch revision 150839]] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> peter at Powerspec:~/.local/lib/python3.2/test> python3.2 test_doctest.py doctest (doctest) ... 66 tests with zero failures doctest (test.test_doctest) ... 415 tests with zero failures ---------- Added file: http://bugs.python.org/file18070/doctest-fixes-py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:24:57 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 22:24:57 +0000 Subject: [issue1214879] Support non-file source/dest in marshal Message-ID: <1279578297.94.0.390525290876.issue1214879@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closing as noone has responded. ---------- resolution: -> wont fix status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:25:45 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 22:25:45 +0000 Subject: [issue1501979] syntax errors on continuation lines Message-ID: <1279578345.94.0.319066579459.issue1501979@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closing as noone has responded. ---------- resolution: -> wont fix status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:26:30 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 22:26:30 +0000 Subject: [issue1515142] sgmllib should recover from unmatched quotes Message-ID: <1279578390.52.0.765946128337.issue1515142@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closing as noone has responded. ---------- resolution: -> wont fix status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:27:09 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 22:27:09 +0000 Subject: [issue1428655] Use PyOS_snprintf for static buffers Message-ID: <1279578429.3.0.666605080363.issue1428655@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closing as noone has responded. ---------- resolution: -> wont fix status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:27:49 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 22:27:49 +0000 Subject: [issue1528167] Tweak to make string.Templates more customizable Message-ID: <1279578469.25.0.87114559182.issue1528167@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closing as noone has responded. ---------- resolution: -> wont fix status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:29:14 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 22:29:14 +0000 Subject: [issue1441984] Multiple simultaneous sendtos on AF_UNIX socket broken. Message-ID: <1279578554.1.0.152869248752.issue1441984@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closing as noone has responded. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:37:59 2010 From: report at bugs.python.org (Peter Donis) Date: Mon, 19 Jul 2010 22:37:59 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279579079.75.0.109644791727.issue1812@psf.upfronthosting.co.za> Peter Donis added the comment: Re msg110808, on thinking it over I realized it may not be so simple to get diff and patch to behave properly with a file like doctest_testfile.txt, where we want to intentionally mismatch newlines. We basically need to treat the file as binary rather than text (which also means that, since the file as I've uploaded it contains all Unix newlines except for the Windows and Mac specific lines, on a Windows or Mac system most of the file, including all the comment lines, ends up being part of the test). Maybe there's a way to set the svn:mime-type property to do that. In the meantime, I've uploaded the raw doctest_testfile.txt file, so if necessary it can just be copied into the appropriate directory for testing. ---------- Added file: http://bugs.python.org/file18071/doctest_testfile.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:38:06 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 22:38:06 +0000 Subject: [issue900092] hotshot.stats.load fails with AssertionError Message-ID: <1279579086.26.0.222036233676.issue900092@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closing as hotshot is not maintained and is not documented in py3k. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:38:31 2010 From: report at bugs.python.org (Peter Donis) Date: Mon, 19 Jul 2010 22:38:31 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279579111.3.0.879109320309.issue1812@psf.upfronthosting.co.za> Peter Donis added the comment: Uploading py3k version of doctest_testfile.txt as well, in case it's needed for testing. ---------- Added file: http://bugs.python.org/file18072/doctest_testfile.txt.py3k _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:42:00 2010 From: report at bugs.python.org (Peter Donis) Date: Mon, 19 Jul 2010 22:42:00 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279579320.41.0.266349677573.issue1812@psf.upfronthosting.co.za> Peter Donis added the comment: Also, can someone please clear the spam flag on my msg110813? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:42:17 2010 From: report at bugs.python.org (Greg Hazel) Date: Mon, 19 Jul 2010 22:42:17 +0000 Subject: [issue6792] Distutils-based installer does not detect 64bit versions of Python In-Reply-To: <1251449540.11.0.0670330819334.issue6792@psf.upfronthosting.co.za> Message-ID: <1279579337.61.0.745304678071.issue6792@psf.upfronthosting.co.za> Changes by Greg Hazel : ---------- nosy: +ghazel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:44:42 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 19 Jul 2010 22:44:42 +0000 Subject: [issue900092] hotshot.stats.load fails with AssertionError Message-ID: <1279579482.45.0.80995988208.issue900092@psf.upfronthosting.co.za> Brian Curtin added the comment: I don't think this should have been closed just yet. If the issue still exists in 2.x, it could still be fixed in the remaining 2.6 release, or any of the future 2.7 releases. You are right that it won't apply to 3.x since hotshot is gone there. ---------- nosy: +brian.curtin resolution: wont fix -> status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:50:20 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 22:50:20 +0000 Subject: [issue900092] hotshot.stats.load fails with AssertionError Message-ID: <1279579820.92.0.667657257157.issue900092@psf.upfronthosting.co.za> Mark Lawrence added the comment: Who of our overworked volunteers is going to do the work, given that hotshot doesn't even feature on the maintainers list? ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:50:45 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 22:50:45 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279571608.05.0.578313269856.issue9308@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Mon, Jul 19, 2010 at 4:33 PM, ?ric Araujo wrote: .. > The shlex fix was reverted IIRC because Mark was unsure of the fix, since our diff tools > try to be too clever and decode files, not showing us the bytes differences. Well, it is not clear what wordchars should be in shlex. I would think (c in wordchar) should be the same as (c.isalnum() or c == '_'), but there are only 62 characters added added in in posix mode: 62 while according to str.isalnum(), three are 71 alphanumeric characters at code points between 128 and 255: 71 I don't know what POSIX definition of word character is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:54:43 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 19 Jul 2010 22:54:43 +0000 Subject: [issue9310] Intermittent failures in test_logging In-Reply-To: <1279580083.41.0.887395400152.issue9310@psf.upfronthosting.co.za> Message-ID: <1279580083.41.0.887395400152.issue9310@psf.upfronthosting.co.za> New submission from Stefan Krah : Seemingly random failures in test_logging on 2.6/ubuntu-wide. See: http://www.python.org/dev/buildbot/builders/AMD64 Ubuntu wide 2.6/builds/777 [fail] http://www.python.org/dev/buildbot/builders/AMD64 Ubuntu wide 2.6/builds/778 [ok] ====================================================================== ERROR: test_config0_ok (test.test_logging.ConfigFileTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/cpython-ucs4-nonascii-???/2.6.pitrou-ubuntu-wide/build/Lib/test/test_logging.py", line 646, in test_config0_ok self.apply_config(self.config0) File "/home/buildbot/cpython-ucs4-nonascii-???/2.6.pitrou-ubuntu-wide/build/Lib/test/test_logging.py", line 639, in apply_config logging.config.fileConfig(fn) File "/home/buildbot/cpython-ucs4-nonascii-???/2.6.pitrou-ubuntu-wide/build/Lib/logging/config.py", line 85, in fileConfig _install_loggers(cp, handlers, disable_existing_loggers) File "/home/buildbot/cpython-ucs4-nonascii-???/2.6.pitrou-ubuntu-wide/build/Lib/logging/config.py", line 217, in _install_loggers existing.sort() UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 37: ordinal not in range(128) ---------- components: Tests keywords: buildbot messages: 110829 nosy: skrah priority: normal severity: normal status: open title: Intermittent failures in test_logging type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:55:38 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 22:55:38 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1279580138.06.0.676716095737.issue9308@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Tracker eating python prompt prefixed lines is truly annoying. Here are the missing lines: >>> len(shlex(posix=True).wordchars) - len(shlex().wordchars) 62 >>> len([chr(i) for i in range(128, 256) if chr(i).isalnum()]) 71 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 00:59:38 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 22:59:38 +0000 Subject: [issue1491804] Simple slice support for list.sort() and .reverse() Message-ID: <1279580378.37.0.120909619002.issue1491804@psf.upfronthosting.co.za> Mark Lawrence added the comment: I can't see any sense in doing a patch review on this until there is agreement that the patch is actually needed. Having read the initially referenced thread on groups.google.de I'm not convinced that this is going to happen. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 01:04:28 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Jul 2010 23:04:28 +0000 Subject: [issue9310] Intermittent failures in test_logging In-Reply-To: <1279580083.41.0.887395400152.issue9310@psf.upfronthosting.co.za> Message-ID: <1279580668.48.0.680046043177.issue9310@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> vinay.sajip nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 01:07:08 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 23:07:08 +0000 Subject: [issue4733] Add a "decode to declared encoding" version of urlopen to urllib In-Reply-To: <1230068654.82.0.881542673607.issue4733@psf.upfronthosting.co.za> Message-ID: <1279580828.89.0.384273334427.issue4733@psf.upfronthosting.co.za> Mark Lawrence added the comment: Christian, Daniel, I take it that you're both still interested in this? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 01:08:13 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 19 Jul 2010 23:08:13 +0000 Subject: [issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input In-Reply-To: <1236786647.39.0.745171492116.issue5476@psf.upfronthosting.co.za> Message-ID: <1279580893.94.0.00411536257749.issue5476@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Py_TPFLAGS_INT_SUBCLASS is an implementation detail, and extension modules should not have to be aware of it. Does Numpy correctly call PyType_Ready()? ---------- nosy: +amaury.forgeotdarc status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 01:12:45 2010 From: report at bugs.python.org (Aaron Gallagher) Date: Mon, 19 Jul 2010 23:12:45 +0000 Subject: [issue3119] pickle.py is limited by python's call stack In-Reply-To: <1213589185.62.0.660916672679.issue3119@psf.upfronthosting.co.za> Message-ID: <1279581165.77.0.603665566554.issue3119@psf.upfronthosting.co.za> Aaron Gallagher added the comment: Here's a patch that fixes the unit tests. A new test was added that tried to test the C implementation of this though none exists. ---------- keywords: +patch Added file: http://bugs.python.org/file18073/pickle4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 01:16:29 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 23:16:29 +0000 Subject: [issue4770] binascii module, inconsistent behavior: some functions accept unicode string input In-Reply-To: <1230573653.7.0.91596129114.issue4770@psf.upfronthosting.co.za> Message-ID: <1279581389.55.0.282695225774.issue4770@psf.upfronthosting.co.za> Mark Lawrence added the comment: Florent, could you add a NEWS entry as requested in msg98381, then we should be able to get this committed. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 01:16:46 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 19 Jul 2010 23:16:46 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1279581406.07.0.0612030000064.issue9308@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +esr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 01:19:56 2010 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 19 Jul 2010 23:19:56 +0000 Subject: [issue3704] cookielib doesn't handle URLs with / in parameters In-Reply-To: <1219856501.23.0.0473308500082.issue3704@psf.upfronthosting.co.za> Message-ID: <1279581596.92.0.0965609001691.issue3704@psf.upfronthosting.co.za> Gregory P. Smith added the comment: jjlee's issue3704.patch has been committed to py3k (3.2) in r82985. It could still use backporting to 2.6, 2.7 and 3.1. ---------- resolution: -> accepted versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 01:20:41 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 19 Jul 2010 23:20:41 +0000 Subject: [issue4804] Python on Windows disables all C runtime library assertions In-Reply-To: <1230869380.06.0.720418986656.issue4804@psf.upfronthosting.co.za> Message-ID: <1279581641.83.0.580935246305.issue4804@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closed as stated committed r69495. ---------- nosy: +BreamoreBoy resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 01:21:08 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 19 Jul 2010 23:21:08 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279581406.14.0.765998583853.issue9308@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: > > Changes by ?ric Araujo : > ---------- > nosy: +esr I don't think posix mode was added by ESR, but I cannot check ATM. ---------- nosy: +Alexander.Belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 01:30:13 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 19 Jul 2010 23:30:13 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1279582213.7.0.919681038065.issue9308@psf.upfronthosting.co.za> ?ric Araujo added the comment: I shouldn?t edit bugs when tired, sorry for the noise. hg log tells me that those extra characters have been added in r32284 (2003) following bug #722686 by Gustavo Niemeyer following a discussion on ?the mailing list?. Adjusting nosy. ---------- nosy: +niemeyer -esr _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 01:34:12 2010 From: report at bugs.python.org (Murilo da Silva) Date: Mon, 19 Jul 2010 23:34:12 +0000 Subject: [issue9297] SMTP with Sqlite3 file attached problem In-Reply-To: <1279504516.14.0.42498978414.issue9297@psf.upfronthosting.co.za> Message-ID: <1279582452.25.0.715137378271.issue9297@psf.upfronthosting.co.za> Murilo da Silva added the comment: SOLVED!! MAIL SERVER BAD CONFIGURED. Thanks and sorry. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 01:55:23 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 19 Jul 2010 23:55:23 +0000 Subject: [issue4753] Faster opcode dispatch on gcc In-Reply-To: <1230325778.98.0.752974375077.issue4753@psf.upfronthosting.co.za> Message-ID: <1279583723.6.0.4017077421.issue4753@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This is too late for 2.x now, closing. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 02:23:11 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 20 Jul 2010 00:23:11 +0000 Subject: [issue9297] SMTP with Sqlite3 file attached problem In-Reply-To: <1279504516.14.0.42498978414.issue9297@psf.upfronthosting.co.za> Message-ID: <1279585391.44.0.950223765643.issue9297@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> invalid stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 02:27:37 2010 From: report at bugs.python.org (Murilo da Silva) Date: Tue, 20 Jul 2010 00:27:37 +0000 Subject: [issue9297] SMTP with Sqlite3 file attached problem In-Reply-To: <1279504516.14.0.42498978414.issue9297@psf.upfronthosting.co.za> Message-ID: <1279585657.64.0.196609880168.issue9297@psf.upfronthosting.co.za> Murilo da Silva added the comment: It's not just a bad configured server. If I send the file with a mail client the file is sent ok. But Im having a problem just with my server. For example: 1 - If i send the file attached here test.db (SQLite3) from a gmail server to a yahoo server, the e-mail arrives ok. 2 - If i send the file test.db from my mail server to my mail server, the e-mail arrives ok too (independent of the account name). 3 - If i send the file test.db from gmail to my mail server the file arrives with bigger size (4kb original - 5.1kb with problem) The log to the first (1) situation: send: 'ehlo mmac.local\r\n' reply: b'250-mx.google.com at your service, [189.5.249.91]\r\n' reply: b'250-SIZE 35651584\r\n' reply: b'250-8BITMIME\r\n' reply: b'250-STARTTLS\r\n' reply: b'250 ENHANCEDSTATUSCODES\r\n' reply: retcode (250); Msg: b'mx.google.com at your service, [189.5.249.91]\nSIZE 35651584\n8BITMIME\nSTARTTLS\nENHANCEDSTATUSCODES' send: 'STARTTLS\r\n' reply: b'220 2.0.0 Ready to start TLS\r\n' reply: retcode (220); Msg: b'2.0.0 Ready to start TLS' send: 'ehlo mmac.local\r\n' reply: b'250-mx.google.com at your service, [189.5.249.91]\r\n' reply: b'250-SIZE 35651584\r\n' reply: b'250-8BITMIME\r\n' reply: b'250-AUTH LOGIN PLAIN XOAUTH\r\n' reply: b'250 ENHANCEDSTATUSCODES\r\n' reply: retcode (250); Msg: b'mx.google.com at your service, [189.5.249.91]\nSIZE 35651584\n8BITMIME\nAUTH LOGIN PLAIN XOAUTH\nENHANCEDSTATUSCODES' send: 'AUTH PLAIN AG11cmlsb2JyQGdtYWlsLmNvbQA2NHglOCp3Vnc4OQ==\r\n' reply: b'235 2.7.0 Accepted\r\n' reply: retcode (235); Msg: b'2.7.0 Accepted' send: 'mail FROM: size=5963\r\n' reply: b'250 2.1.0 OK h41sm27362860qcz.25\r\n' reply: retcode (250); Msg: b'2.1.0 OK h41sm27362860qcz.25' send: 'rcpt TO:\r\n' reply: b'250 2.1.5 OK h41sm27362860qcz.25\r\n' reply: retcode (250); Msg: b'2.1.5 OK h41sm27362860qcz.25' send: 'data\r\n' reply: b'354 Go ahead h41sm27362860qcz.25\r\n' reply: retcode (354); Msg: b'Go ahead h41sm27362860qcz.25' data: (354, b'Go ahead h41sm27362860qcz.25') send: 'Content-Type: multipart/mixed; boundary="===============0772040488=="\r\nMIME-Version: 1.0\r\nSubject: teste\r\nFrom: murilobr at gmail.com\r\nTo: murilosilvabr at yahoo.com.br\r\n\r\n--===============0772040488==\r\nContent-Type: text/plain; charset="us-ascii"\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: 7bit\r\n\r\nteste\r\n\r\n--===============0772040488==\r\nContent-Type: application/octet-stream\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: base64\r\nContent-Disposition: attachment; filename="test.db"\r\n\r\nU1FMaXRlIGZvcm1hdCAzAAQAAQEAQCAgAAAACAAAAAAAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAADAloAA3gDJgJaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBSQMHFx8fAYJhdGFibGVtYWlsX3NlbnRtYWlsX3NlbnQEQ1JFQVRFIFRBQkxFIG1haWxfc2VudChpZCBJTlRFR0VSIFBSSU1BUlkgS0VZIEFVVE9JTkNSRU1FTlQsIGJrcF9kb25lX2lkIElOVEVHRVIsIHRvX21haWwgVkFSQ0hBUig1MCksIHNlbnRfYXQgREFURVRJTUUsIEZPUkVJR04gS0VZKGJrcF9kb25lX2lkKSBSRUZFUkVOQ0VTIGJrcF9kb25lKGlkKSlQAgYXKysBWXRhYmxlc3FsaXRlX3NlcXVlbmNlc3FsaXRlX3NlcXVlbmNlA0NSRUFURSBUQUJMRSBzcWxpdGVfc2VxdWVuY2UobmFtZSxzZXEpgQUBBxcdHQGBXXRhYmxlYmtwX2RvbmVia3BfZG9uZQJDUkVBVEUgVEFCTEUgYmtwX2RvbmUoaWQgSU5URUdFUiBQUklNQVJZIEtFWSBBVVRPSU5DUkVNRU5ULCBmaWxlX25hbWUgVkFSQ0hBUig1MCksIGRvd25sb2FkX2F0IERBVEVUSU1FKQ0AAAADA5EAA9sDtgORAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjAwQAF0F0ZXN0ZTIwMTAtMDctMTcgMTQ6NTE6MjcuMDU2NzU4IwIEABdBdGVzdGUyMDEwLTA3LTE3IDE0OjUxOjI2LjA5MjM4MSMBBAAXQXRlc3RlMjAxMC0wNy0xNyAxNDo0NDoyNC45NzE3MzANAAAAAgPjAAPyA+MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0CAx8BbWFpbF9zZW50AwwBAx0BYmtwX2RvbmUDDQAAAAMDdgAD0gOkA3YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwDBQABJUEDZGFzQGRhZGEuY29tMjAxMC0wNy0xNyAxNDo1MToyNy4wNTk2NzEsAgUAASVBAmRhc0BkYWRhLmNvbTIwMTAtMDctMTcgMTQ6NTE6MjYuMDk0NzU4LAEFAAElQQFkYXNAZGFkYS5jb20yMDEwLTA3LTE3IDE0OjQ0OjI0Ljk3MzUxMg==\r\n--===============0772040488==--\r\n.\r\n' reply: b'250 2.0.0 OK 1279585260 h41sm27362860qcz.25\r\n' reply: retcode (250); Msg: b'2.0.0 OK 1279585260 h41sm27362860qcz.25' data: (250, b'2.0.0 OK 1279585260 h41sm27362860qcz.25') The log to the second (2) situation: send: 'ehlo mmac.local\r\n' reply: b'250-pleskwin41.hospedagemdesites.ws Hello mmac.local [189.5.249.91], pleased to meet you.\r\n' reply: b'250-ENHANCEDSTATUSCODES\r\n' reply: b'250-SIZE 31457280\r\n' reply: b'250-EXPN\r\n' reply: b'250-ETRN\r\n' reply: b'250-ATRN\r\n' reply: b'250-DSN\r\n' reply: b'250-CHECKPOINT\r\n' reply: b'250-8BITMIME\r\n' reply: b'250-AUTH CRAM-MD5 PLAIN LOGIN DIGEST-MD5\r\n' reply: b'250-STARTTLS\r\n' reply: b'250 HELP\r\n' reply: retcode (250); Msg: b'pleskwin41.hospedagemdesites.ws Hello mmac.local [189.5.249.91], pleased to meet you.\nENHANCEDSTATUSCODES\nSIZE 31457280\nEXPN\nETRN\nATRN\nDSN\nCHECKPOINT\n8BITMIME\nAUTH CRAM-MD5 PLAIN LOGIN DIGEST-MD5\nSTARTTLS\nHELP' send: 'STARTTLS\r\n' reply: b'220 2.0.0 Ready to start TLS\r\n' reply: retcode (220); Msg: b'2.0.0 Ready to start TLS' send: 'ehlo mmac.local\r\n' reply: b'250-pleskwin41.hospedagemdesites.ws Hello mmac.local [189.5.249.91], pleased to meet you.\r\n' reply: b'250-ENHANCEDSTATUSCODES\r\n' reply: b'250-SIZE 31457280\r\n' reply: b'250-EXPN\r\n' reply: b'250-ETRN\r\n' reply: b'250-ATRN\r\n' reply: b'250-DSN\r\n' reply: b'250-CHECKPOINT\r\n' reply: b'250-8BITMIME\r\n' reply: b'250-AUTH CRAM-MD5 PLAIN LOGIN DIGEST-MD5\r\n' reply: b'250 HELP\r\n' reply: retcode (250); Msg: b'pleskwin41.hospedagemdesites.ws Hello mmac.local [189.5.249.91], pleased to meet you.\nENHANCEDSTATUSCODES\nSIZE 31457280\nEXPN\nETRN\nATRN\nDSN\nCHECKPOINT\n8BITMIME\nAUTH CRAM-MD5 PLAIN LOGIN DIGEST-MD5\nHELP' send: 'AUTH CRAM-MD5\r\n' reply: b'334 PDIwMTAwNzE5MjEyMjI4QHBsZXNrd2luNDEuaG9zcGVkYWdlbWRlc2l0ZXMud3M+\r\n' reply: retcode (334); Msg: b'PDIwMTAwNzE5MjEyMjI4QHBsZXNrd2luNDEuaG9zcGVkYWdlbWRlc2l0ZXMud3M+' send: 'cm9ib3RAamttZWRpY2FtZW50b3MuY29tLmJyIGQwZmQwNjhiZGYxMGYwNGUxZDgyNmY5ZDE0ODJlNDk1\r\n' reply: b'235 2.0.0 Authentication successful\r\n' reply: retcode (235); Msg: b'2.0.0 Authentication successful' send: 'mail FROM: size=5974\r\n' reply: b'250 2.1.0 ... Sender ok\r\n' reply: retcode (250); Msg: b'2.1.0 ... Sender ok' send: 'rcpt TO:\r\n' reply: b'250 2.1.5 ... Recipient ok\r\n' reply: retcode (250); Msg: b'2.1.5 ... Recipient ok' send: 'data\r\n' reply: b'354 Enter mail, end with "." on a line by itself\r\n' reply: retcode (354); Msg: b'Enter mail, end with "." on a line by itself' data: (354, b'Enter mail, end with "." on a line by itself') send: 'Content-Type: multipart/mixed; boundary="===============1936084591=="\r\nMIME-Version: 1.0\r\nSubject: teste\r\nFrom: robot at jkmedicamentos.com.br\r\nTo: murilo at jkmedicamentos.com.br\r\n\r\n--===============1936084591==\r\nContent-Type: text/plain; charset="us-ascii"\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: 7bit\r\n\r\nteste\r\n\r\n--===============1936084591==\r\nContent-Type: application/octet-stream\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: base64\r\nContent-Disposition: attachment; filename="test.db"\r\n\r\nU1FMaXRlIGZvcm1hdCAzAAQAAQEAQCAgAAAACAAAAAAAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAADAloAA3gDJgJaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBSQMHFx8fAYJhdGFibGVtYWlsX3NlbnRtYWlsX3NlbnQEQ1JFQVRFIFRBQkxFIG1haWxfc2VudChpZCBJTlRFR0VSIFBSSU1BUlkgS0VZIEFVVE9JTkNSRU1FTlQsIGJrcF9kb25lX2lkIElOVEVHRVIsIHRvX21haWwgVkFSQ0hBUig1MCksIHNlbnRfYXQgREFURVRJTUUsIEZPUkVJR04gS0VZKGJrcF9kb25lX2lkKSBSRUZFUkVOQ0VTIGJrcF9kb25lKGlkKSlQAgYXKysBWXRhYmxlc3FsaXRlX3NlcXVlbmNlc3FsaXRlX3NlcXVlbmNlA0NSRUFURSBUQUJMRSBzcWxpdGVfc2VxdWVuY2UobmFtZSxzZXEpgQUBBxcdHQGBXXRhYmxlYmtwX2RvbmVia3BfZG9uZQJDUkVBVEUgVEFCTEUgYmtwX2RvbmUoaWQgSU5URUdFUiBQUklNQVJZIEtFWSBBVVRPSU5DUkVNRU5ULCBmaWxlX25hbWUgVkFSQ0hBUig1MCksIGRvd25sb2FkX2F0IERBVEVUSU1FKQ0AAAADA5EAA9sDtgORAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjAwQAF0F0ZXN0ZTIwMTAtMDctMTcgMTQ6NTE6MjcuMDU2NzU4IwIEABdBdGVzdGUyMDEwLTA3LTE3IDE0OjUxOjI2LjA5MjM4MSMBBAAXQXRlc3RlMjAxMC0wNy0xNyAxNDo0NDoyNC45NzE3MzANAAAAAgPjAAPyA+MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0CAx8BbWFpbF9zZW50AwwBAx0BYmtwX2RvbmUDDQAAAAMDdgAD0gOkA3YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwDBQABJUEDZGFzQGRhZGEuY29tMjAxMC0wNy0xNyAxNDo1MToyNy4wNTk2NzEsAgUAASVBAmRhc0BkYWRhLmNvbTIwMTAtMDctMTcgMTQ6NTE6MjYuMDk0NzU4LAEFAAElQQFkYXNAZGFkYS5jb20yMDEwLTA3LTE3IDE0OjQ0OjI0Ljk3MzUxMg==\r\n--===============1936084591==--\r\n.\r\n' reply: b'250 2.6.0 5994 bytes received in 00:00:00; Message id CHQ92029 accepted for delivery\r\n' reply: retcode (250); Msg: b'2.6.0 5994 bytes received in 00:00:00; Message id CHQ92029 accepted for delivery' data: (250, b'2.6.0 5994 bytes received in 00:00:00; Message id CHQ92029 accepted for delivery') The log to the third (3) situation: send: 'ehlo mmac.local\r\n' reply: b'250-mx.google.com at your service, [189.5.249.91]\r\n' reply: b'250-SIZE 35651584\r\n' reply: b'250-8BITMIME\r\n' reply: b'250-STARTTLS\r\n' reply: b'250 ENHANCEDSTATUSCODES\r\n' reply: retcode (250); Msg: b'mx.google.com at your service, [189.5.249.91]\nSIZE 35651584\n8BITMIME\nSTARTTLS\nENHANCEDSTATUSCODES' send: 'STARTTLS\r\n' reply: b'220 2.0.0 Ready to start TLS\r\n' reply: retcode (220); Msg: b'2.0.0 Ready to start TLS' send: 'ehlo mmac.local\r\n' reply: b'250-mx.google.com at your service, [189.5.249.91]\r\n' reply: b'250-SIZE 35651584\r\n' reply: b'250-8BITMIME\r\n' reply: b'250-AUTH LOGIN PLAIN XOAUTH\r\n' reply: b'250 ENHANCEDSTATUSCODES\r\n' reply: retcode (250); Msg: b'mx.google.com at your service, [189.5.249.91]\nSIZE 35651584\n8BITMIME\nAUTH LOGIN PLAIN XOAUTH\nENHANCEDSTATUSCODES' send: 'AUTH PLAIN AG11cmlsb2JyQGdtYWlsLmNvbQA2NHglOCp3Vnc4OQ==\r\n' reply: b'235 2.7.0 Accepted\r\n' reply: retcode (235); Msg: b'2.7.0 Accepted' send: 'mail FROM: size=5965\r\n' reply: b'250 2.1.0 OK h20sm27329252qcm.45\r\n' reply: retcode (250); Msg: b'2.1.0 OK h20sm27329252qcm.45' send: 'rcpt TO:\r\n' reply: b'250 2.1.5 OK h20sm27329252qcm.45\r\n' reply: retcode (250); Msg: b'2.1.5 OK h20sm27329252qcm.45' send: 'data\r\n' reply: b'354 Go ahead h20sm27329252qcm.45\r\n' reply: retcode (354); Msg: b'Go ahead h20sm27329252qcm.45' data: (354, b'Go ahead h20sm27329252qcm.45') send: 'Content-Type: multipart/mixed; boundary="===============0728502331=="\r\nMIME-Version: 1.0\r\nSubject: teste\r\nFrom: murilobr at gmail.com\r\nTo: murilo at jkmedicamentos.com.br\r\n\r\n--===============0728502331==\r\nContent-Type: text/plain; charset="us-ascii"\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: 7bit\r\n\r\nteste\r\n\r\n--===============0728502331==\r\nContent-Type: application/octet-stream\r\nMIME-Version: 1.0\r\nContent-Transfer-Encoding: base64\r\nContent-Disposition: attachment; filename="test.db"\r\n\r\nU1FMaXRlIGZvcm1hdCAzAAQAAQEAQCAgAAAACAAAAAAAAAAAAAAAAAAAAAIAAAABAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAADAloAA3gDJgJaAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACBSQMHFx8fAYJhdGFibGVtYWlsX3NlbnRtYWlsX3NlbnQEQ1JFQVRFIFRBQkxFIG1haWxfc2VudChpZCBJTlRFR0VSIFBSSU1BUlkgS0VZIEFVVE9JTkNSRU1FTlQsIGJrcF9kb25lX2lkIElOVEVHRVIsIHRvX21haWwgVkFSQ0hBUig1MCksIHNlbnRfYXQgREFURVRJTUUsIEZPUkVJR04gS0VZKGJrcF9kb25lX2lkKSBSRUZFUkVOQ0VTIGJrcF9kb25lKGlkKSlQAgYXKysBWXRhYmxlc3FsaXRlX3NlcXVlbmNlc3FsaXRlX3NlcXVlbmNlA0NSRUFURSBUQUJMRSBzcWxpdGVfc2VxdWVuY2UobmFtZSxzZXEpgQUBBxcdHQGBXXRhYmxlYmtwX2RvbmVia3BfZG9uZQJDUkVBVEUgVEFCTEUgYmtwX2RvbmUoaWQgSU5URUdFUiBQUklNQVJZIEtFWSBBVVRPSU5DUkVNRU5ULCBmaWxlX25hbWUgVkFSQ0hBUig1MCksIGRvd25sb2FkX2F0IERBVEVUSU1FKQ0AAAADA5EAA9sDtgORAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAjAwQAF0F0ZXN0ZTIwMTAtMDctMTcgMTQ6NTE6MjcuMDU2NzU4IwIEABdBdGVzdGUyMDEwLTA3LTE3IDE0OjUxOjI2LjA5MjM4MSMBBAAXQXRlc3RlMjAxMC0wNy0xNyAxNDo0NDoyNC45NzE3MzANAAAAAgPjAAPyA+MAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA0CAx8BbWFpbF9zZW50AwwBAx0BYmtwX2RvbmUDDQAAAAMDdgAD0gOkA3YAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACwDBQABJUEDZGFzQGRhZGEuY29tMjAxMC0wNy0xNyAxNDo1MToyNy4wNTk2NzEsAgUAASVBAmRhc0BkYWRhLmNvbTIwMTAtMDctMTcgMTQ6NTE6MjYuMDk0NzU4LAEFAAElQQFkYXNAZGFkYS5jb20yMDEwLTA3LTE3IDE0OjQ0OjI0Ljk3MzUxMg==\r\n--===============0728502331==--\r\n.\r\n' reply: b'250 2.0.0 OK 1279585489 h20sm27329252qcm.45\r\n' reply: retcode (250); Msg: b'2.0.0 OK 1279585489 h20sm27329252qcm.45' data: (250, b'2.0.0 OK 1279585489 h20sm27329252qcm.45') Attached here the file with the problem. test.db received in third situation. ---------- status: closed -> open Added file: http://bugs.python.org/file18074/test_problem.db _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 02:32:54 2010 From: report at bugs.python.org (Murilo da Silva) Date: Tue, 20 Jul 2010 00:32:54 +0000 Subject: [issue9297] SMTP with Sqlite3 file attached problem In-Reply-To: <1279504516.14.0.42498978414.issue9297@psf.upfronthosting.co.za> Message-ID: <1279585974.43.0.227745057935.issue9297@psf.upfronthosting.co.za> Murilo da Silva added the comment: r.david.murray, if more info is needed, please send me what kind. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 02:37:38 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 20 Jul 2010 00:37:38 +0000 Subject: [issue9297] SMTP with Sqlite3 file attached problem In-Reply-To: <1279504516.14.0.42498978414.issue9297@psf.upfronthosting.co.za> Message-ID: <1279586258.82.0.243823407539.issue9297@psf.upfronthosting.co.za> R. David Murray added the comment: Well, in the information you just gave you don't explain how Python is involved, so that would be a good place to start. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 02:51:28 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 20 Jul 2010 00:51:28 +0000 Subject: [issue9278] rename 2to3 & pydoc to 2to3.py & pydoc.py In-Reply-To: <1279316069.22.0.0186321125783.issue9278@psf.upfronthosting.co.za> Message-ID: <1279587088.31.0.311146087563.issue9278@psf.upfronthosting.co.za> R. David Murray added the comment: On a windows install you will find Tools/scripts/2to3.py and Tools/scripts/pydocgui.pyw. Do you think there is something more needed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 02:52:55 2010 From: report at bugs.python.org (Murilo da Silva) Date: Tue, 20 Jul 2010 00:52:55 +0000 Subject: [issue9297] SMTP with Sqlite3 file attached problem In-Reply-To: <1279504516.14.0.42498978414.issue9297@psf.upfronthosting.co.za> Message-ID: <1279587175.82.0.146041749324.issue9297@psf.upfronthosting.co.za> Murilo da Silva added the comment: Ok, let me try. I'm sending a mail using Python, as you can see the code in the first message. I'm sending a file which is a SQLite database. When I send the file from my SMTP server to any other or from any server to mine the file doesn't arrive as test.db attached here, but it arrives like test_problem.db. But it arrives ok if I send from gmail to yahoo for example. I want some help to discover what kind of problem is happening. If Python is the problem or the server! But how can I say that my server has a problem if when I send this same file from my server no any other the file arrives ok. The question is have something to do with Python to solve? Is it a bug? Do you understand my point? Thanks you very much for your time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 02:57:47 2010 From: report at bugs.python.org (Murilo da Silva) Date: Tue, 20 Jul 2010 00:57:47 +0000 Subject: [issue9297] SMTP with Sqlite3 file attached problem In-Reply-To: <1279504516.14.0.42498978414.issue9297@psf.upfronthosting.co.za> Message-ID: <1279587467.59.0.91934238249.issue9297@psf.upfronthosting.co.za> Murilo da Silva added the comment: "If Python is the problem or the server! But how can I say that my server has a problem if when I send this same file from my server no any other the file arrives ok." The phrase above I want to say that when I send the same file using a mail client as Mail from Mac OSX, the file arrives ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 03:50:08 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 20 Jul 2010 01:50:08 +0000 Subject: [issue9297] SMTP with Sqlite3 file attached problem In-Reply-To: <1279504516.14.0.42498978414.issue9297@psf.upfronthosting.co.za> Message-ID: <1279590608.8.0.876357379275.issue9297@psf.upfronthosting.co.za> R. David Murray added the comment: OK. In your previous message you said the problem came when you sent "from gmail" to your server. I guess that was a typo. If you write the file generated by your python program to a file instead of sending it through your SMTP server, is it already incorrect? If so, can you give me a little more information on *how* it is incorrect? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 04:02:37 2010 From: report at bugs.python.org (Garrett Cooper) Date: Tue, 20 Jul 2010 02:02:37 +0000 Subject: [issue9311] os.access can return bogus values when run as superuser In-Reply-To: <1279591357.64.0.139129514793.issue9311@psf.upfronthosting.co.za> Message-ID: <1279591357.64.0.139129514793.issue9311@psf.upfronthosting.co.za> New submission from Garrett Cooper : As seen in the nose bug [1], I stumbled upon an OS quirk with FreeBSD, where apparently (as superuser) due to the wording of the POSIX spec for access(2), it's considered free game to return 0 for the system call (True) for os.[RWX]_OK. Only python was affected by this on the system I was using (both perl and sh did the right thing in detecting the executable bit(s) on the file). An example should be provided to do the right thing with the stat module, and developers should be warned against using os.access because (as the patch and test log demonstrate), stat(2) does the right thing when access(2) does not as superuser... Here's an example of the code I used to detect the executable bit: import os import stat s = os.stat(afile) executable = (s.st_mode & stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH) == 0 [1] http://code.google.com/p/python-nose/issues/detail?id=351 [2] http://www.opengroup.org/onlinepubs/000095399/functions/access.html ---------- components: Library (Lib) messages: 110850 nosy: yaneurabeya priority: normal severity: normal status: open title: os.access can return bogus values when run as superuser type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 04:08:48 2010 From: report at bugs.python.org (Murilo da Silva) Date: Tue, 20 Jul 2010 02:08:48 +0000 Subject: [issue9297] SMTP with Sqlite3 file attached problem In-Reply-To: <1279504516.14.0.42498978414.issue9297@psf.upfronthosting.co.za> Message-ID: <1279591728.84.0.975207063937.issue9297@psf.upfronthosting.co.za> Murilo da Silva added the comment: I upload two files (test.db and test_problem.db). The test.db is an SQLite which works ok (application/octet-stream), if I send it from: - gmail to my server - my server to gmail - yahoo to my server - my server to yahoo using my python program to send mail with the file test.db attached, it arrives as the example test_problem.db uploaded. But if I send test.db using a Mail Client by the 4 ways above, instead of my python program it arrives as test.db. Do you understand?? Thank you for your time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 04:28:07 2010 From: report at bugs.python.org (Narnie Harshoe) Date: Tue, 20 Jul 2010 02:28:07 +0000 Subject: [issue9265] Incorrect name passed as arg[0] when shell=True and executable specified In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279592887.74.0.812626154098.issue9265@psf.upfronthosting.co.za> Narnie Harshoe added the comment: David, working as fast at learning Python as I can and loving it! Stefan, thanks for the patches. Thanks guys, Narnie ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 04:55:48 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 02:55:48 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1279594548.48.0.933881341619.issue9308@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I wonder whether 3.x shlex working with unicode files is just incidental to 3.x string model and is not really correct. I think issue1170 is a better place to have this discussion. I'll add a comment there. ---------- nosy: -Alexander.Belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 05:00:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 03:00:18 +0000 Subject: [issue1170] shlex have problems with parsing unicode In-Reply-To: <1190045833.27.0.172281845017.issue1170@psf.upfronthosting.co.za> Message-ID: <1279594818.07.0.441554937339.issue1170@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: As discussed in msg110828 under issue9308, it is not clear whether logic identifying word characters in shlex is correct in presence of unicode. ---------- assignee: -> belopolsky keywords: +patch nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 05:00:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 03:00:40 +0000 Subject: [issue1170] shlex have problems with parsing unicode In-Reply-To: <1190045833.27.0.172281845017.issue1170@psf.upfronthosting.co.za> Message-ID: <1279594840.19.0.918027624227.issue1170@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 05:14:20 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 20 Jul 2010 03:14:20 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279595660.58.0.562483774006.issue9299@psf.upfronthosting.co.za> Ray.Allen added the comment: Thanks for reviewing! > The name 'ensure_exist' for the new parameter strikes me as wrong, as well as too long for something that will nearly always be set to True. The function always ensures that the directory exists. The question is whether it is ok that it exist previously. I strongly suggest something shorter like 'exist_ok' as an alternative. Yes, I guess you'are right, this parameter needs to be shorter. > Does the use of 'base = support.TESTFN' ensure that the test junk gets cleaned up? Yes, the MakedirTests.tearDown() method will try to look for the outermost directory of "@base/dir1/dir2/dir3/dir4/dir5/dir6", so it can ensure the test directory is cleaned up. > * Location of error suppression: this patches posixfile.mkdir; 1675 wraps it with a new os.mkdir function that does the suppression. I can see an argument for each approach. The purpose of posix_mkdir() is to simulate a shell mkdir command, so I think the function of "-p" option should goes in to this code. A wrapper makes code more complicated. > * Propagation to parent directories: this passes exist_ok to parent mkdir(); 1675 passes exist_ok=True, so that it is never an error for parent directories to exist. This is a change in behavior and might be bad for the same reason we do not make exist_ok=True the default. In any case, I believe either patch could be changed to mimic the other. It seems these two ways has the same effect, I have no opinion on which to prefer. By adopting your parameter naming suggestion and a little coding style change, I update the patch. ---------- Added file: http://bugs.python.org/file18075/mkdir_py3k_updated.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 05:16:43 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 03:16:43 +0000 Subject: [issue1208304] urllib2's urlopen() method causes a memory leak Message-ID: <1279595803.57.0.785330716741.issue1208304@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 05:18:04 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 03:18:04 +0000 Subject: [issue1243730] Big speedup in email message parsing Message-ID: <1279595884.6.0.0799905982094.issue1243730@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 05:19:35 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 03:19:35 +0000 Subject: [issue1170] shlex have problems with parsing unicode In-Reply-To: <1190045833.27.0.172281845017.issue1170@psf.upfronthosting.co.za> Message-ID: <1279595975.86.0.259203176955.issue1170@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I believe the e-mail thread that culminated in r32284, "Implemented posix-mode parsing support in shlex.py", was "shellwords" from April 2003: http://mail.python.org/pipermail/python-dev/2003-April/034670.html I scanned through the messages, but could not find a reference to the standard that was implemented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 05:34:49 2010 From: report at bugs.python.org (Matt Bone) Date: Tue, 20 Jul 2010 03:34:49 +0000 Subject: [issue2864] etree: Add XPath documentation In-Reply-To: <1210863012.97.0.696135529968.issue2864@psf.upfronthosting.co.za> Message-ID: <1279596889.75.0.62770666801.issue2864@psf.upfronthosting.co.za> Matt Bone added the comment: Here's a patch for 3.2 with some simple examples. They're under the ElementTree findall method. Maybe there should be similar examples for Element's find/findall methods? ---------- keywords: +patch nosy: +mbone Added file: http://bugs.python.org/file18076/xpath_examples.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 05:39:48 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 03:39:48 +0000 Subject: [issue2244] urllib and urllib2 decode userinfo multiple times In-Reply-To: <1204819810.33.0.413464262118.issue2244@psf.upfronthosting.co.za> Message-ID: <1279597188.7.0.387038313197.issue2244@psf.upfronthosting.co.za> Mark Lawrence added the comment: Re-assigned as per maintainers list. ---------- assignee: fdrake -> orsenthil nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 05:43:17 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 03:43:17 +0000 Subject: [issue5993] python produces zombie in webbrowser.open In-Reply-To: <1242014278.58.0.774883846907.issue5993@psf.upfronthosting.co.za> Message-ID: <1279597397.27.0.459758572947.issue5993@psf.upfronthosting.co.za> Mark Lawrence added the comment: Assigned as per maintainers list. ---------- assignee: -> georg.brandl nosy: +BreamoreBoy, georg.brandl versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 05:44:54 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 03:44:54 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1279597494.78.0.301204956511.issue9308@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a new patch, issue9308a.diff which fixes test_imp by introducing a new package, test.encoded_modules which currently contains a module encoded with iso-8859-1 and another with a somewhat more interesting encoding, koi8-r. I think it would be interesting to add one or two multi-byte encodings to the mix. The test_import_encoded_module test case probably does not belong in test_imp and should be moved to test_import or test_importlib, but I would like to see the reaction to the idea of introducing test.encoded_modules before investing more time into polishing the tests. ---------- Added file: http://bugs.python.org/file18077/issue9308a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 05:46:27 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 03:46:27 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1279597587.62.0.212317486926.issue9308@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- keywords: +needs review stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 06:00:13 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 20 Jul 2010 04:00:13 +0000 Subject: [issue9296] json module skipkeys handling changed exception types in 2.7 In-Reply-To: <1279468136.69.0.813704540742.issue9296@psf.upfronthosting.co.za> Message-ID: <1279598413.15.0.952635545161.issue9296@psf.upfronthosting.co.za> Ray.Allen added the comment: I worked out two patches, one for trunk and one for py3k, both with tests, hope someone could do a reviewing. ---------- keywords: +patch nosy: +ysj.ray Added file: http://bugs.python.org/file18078/json_trunk.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 06:00:41 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 20 Jul 2010 04:00:41 +0000 Subject: [issue9296] json module skipkeys handling changed exception types in 2.7 In-Reply-To: <1279468136.69.0.813704540742.issue9296@psf.upfronthosting.co.za> Message-ID: <1279598441.22.0.99328155431.issue9296@psf.upfronthosting.co.za> Changes by Ray.Allen : Added file: http://bugs.python.org/file18079/json_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 06:19:47 2010 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 20 Jul 2010 04:19:47 +0000 Subject: [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> New submission from Eli Bendersky : Due to a discussion on python-dev (Subject: "Markup of command-line options in Python's .rst documentation"), Georg Brandl checked in revision r82961 with a clarification of :option: markup which should only be used for Python interpreter's own flags. However, several modules in stdlib use :option: for their own command-line options, which creates confusion (these options get linked by Sphinx to unrelated Python options). I'm attaching a patch that fixes this issue for these files. The affected files are: Doc/library/idle.rst Doc/library/timeit.rst Doc/library/test.rst Doc/library/doctest.rst Doc/library/unittest.rst Doc/library/pydoc.rst Doc/library/webbrowser.rst Doc/library/compileall.rst Note1: :option: was fixed to `` markup (code snippet) as per the recommendation in the updated documentation guide Note2: I didn't patch trace.rst because it's overgoing a major rehaul (http://bugs.python.org/issue9264) ---------- assignee: docs at python components: Documentation messages: 110862 nosy: docs at python, eli.bendersky priority: normal severity: normal status: open title: Fix usage of :option: markup in stdlib ReST docs type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 06:20:34 2010 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 20 Jul 2010 04:20:34 +0000 Subject: [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1279599634.81.0.701761740246.issue9312@psf.upfronthosting.co.za> Eli Bendersky added the comment: Patch ---------- keywords: +patch Added file: http://bugs.python.org/file18080/issue9312.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 06:22:02 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 20 Jul 2010 04:22:02 +0000 Subject: [issue2142] difflib.unified_diff(...) produces invalid patches In-Reply-To: <1203365817.7.0.0998491412302.issue2142@psf.upfronthosting.co.za> Message-ID: <1279599722.67.0.756007518941.issue2142@psf.upfronthosting.co.za> Ray.Allen added the comment: Firstly, since this is marked as feature request, I updated the patch against py3k, to fix the problems found by BreamoreBoy. ---------- Added file: http://bugs.python.org/file18081/issue_2142_py3k_updated.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 07:08:42 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 05:08:42 +0000 Subject: [issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input In-Reply-To: <1236786647.39.0.745171492116.issue5476@psf.upfronthosting.co.za> Message-ID: <1279602522.51.0.80758042755.issue5476@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > Does Numpy correctly call PyType_Ready()? As far as I can tell, it does: #define DUAL_INHERIT(child, parent1, parent2) \ Py##child##ArrType_Type.tp_base = &Py##parent2##ArrType_Type; \ Py##child##ArrType_Type.tp_bases = \ Py_BuildValue("(OO)", &Py##parent2##ArrType_Type, \ &Py##parent1##_Type); \ if (PyType_Ready(&Py##child##ArrType_Type) < 0) { \ PyErr_Print(); \ PyErr_Format(PyExc_SystemError, \ "could not initialize Py%sArrType_Type", \ #child); \ return -1; \ } \ Py##child##ArrType_Type.tp_hash = Py##parent1##_Type.tp_hash; ... DUAL_INHERIT(Int, Int, SignedInteger); Could it be the multiple inheritance that causes the problem here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 07:10:49 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 20 Jul 2010 05:10:49 +0000 Subject: [issue2142] difflib.unified_diff(...) produces invalid patches In-Reply-To: <1203365817.7.0.0998491412302.issue2142@psf.upfronthosting.co.za> Message-ID: <1279602649.7.0.849140845891.issue2142@psf.upfronthosting.co.za> Ray.Allen added the comment: I feel adding a keyword argument to deal with such a case is not quiet worthy. I'd prefer not fix it for 2.x, and make its behavior consist with svn diff and other similar tools, as trentm said, "tools like "patch" will know how to use." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 07:11:35 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 20 Jul 2010 05:11:35 +0000 Subject: [issue1062277] Pickle breakage with reduction of recursive structures Message-ID: <1279602695.23.0.266188859491.issue1062277@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- components: +Library (Lib) -Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 07:19:57 2010 From: report at bugs.python.org (Craig McQueen) Date: Tue, 20 Jul 2010 05:19:57 +0000 Subject: [issue7696] Improve Memoryview/Buffer documentation In-Reply-To: <1263418431.81.0.407262013758.issue7696@psf.upfronthosting.co.za> Message-ID: <1279603197.36.0.250027724958.issue7696@psf.upfronthosting.co.za> Craig McQueen added the comment: I've seen the changes Mr Pitrou made, both for the 2.x and 3.x docs. That's a good improvement--thanks very much. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 07:38:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 05:38:32 +0000 Subject: [issue1062277] Pickle breakage with reduction of recursive structures Message-ID: <1279604312.07.0.858297801566.issue1062277@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: As I explained in msg110617 under issue9269, it is possible that we can do better than simply detect reduce cycles and bail out. I am torn between two options: 1. Reject this patch and wait until a proper solution is found. 2. Admit that better is the enemy of good and start with proper error reporting on reduce cycles by accepting this patch. My only concern about this patch is that it is likely to affect performance because pickling will have to maintain the "reducing_now" dictionary that is parallel to the memo dictionary. ---------- superseder: -> Cannot pickle self-referencing sets _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 07:43:28 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 20 Jul 2010 05:43:28 +0000 Subject: [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1279604608.97.0.570824668349.issue9312@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The patch generally changes things like :option:`-e` to ``-e`` and -r N/:option:`--repeat=N` to ``-r N/--repeat=N`` which is what I understand GB to have said to do. :program:`python regrtest.py` :option:`test_spam.py` to :program:`python regrtest.py test_spam.py` For the last, I presume that :program:`...` takes the place of ``...`` in the previous examples. There are a few text changes in doctest.rst that I cannot comment on. I presume this could and should be backported from 3.2 to other versions. Eli said in email that he has run 'make html' and checked the output. ---------- nosy: +tjreedy stage: -> commit review versions: +Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 08:27:14 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 20 Jul 2010 06:27:14 +0000 Subject: [issue5476] datetime: timedelta(minutes = i) silently fails with numpy.int32 input In-Reply-To: <1236786647.39.0.745171492116.issue5476@psf.upfronthosting.co.za> Message-ID: <1279607234.18.0.257831499861.issue5476@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: multiple inheritance should not be a problem: there can be only one "dominant base", which is 'int' in this case. someone with a debugger should step into this call to PyType_Ready() and see why it does not set the flag correctly (at the end of inherit_special()) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 09:11:36 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 20 Jul 2010 07:11:36 +0000 Subject: [issue6686] xml.sax.xmlreader.XMLReader.getProperty (xml.sax.handler.property_xml_string) returns bytes In-Reply-To: <1250018393.94.0.435666063731.issue6686@psf.upfronthosting.co.za> Message-ID: <1279609896.18.0.355783144614.issue6686@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: A unit test (or even a sample script) showing the desired feature is needed. ---------- nosy: +amaury.forgeotdarc stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 09:36:49 2010 From: report at bugs.python.org (Greg Hazel) Date: Tue, 20 Jul 2010 07:36:49 +0000 Subject: [issue7171] Add inet_ntop and inet_pton support for Windows In-Reply-To: <1255994426.45.0.89635983538.issue7171@psf.upfronthosting.co.za> Message-ID: <1279611409.31.0.0301544029573.issue7171@psf.upfronthosting.co.za> Changes by Greg Hazel : ---------- nosy: +ghazel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 09:39:37 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 20 Jul 2010 07:39:37 +0000 Subject: [issue2244] urllib and urllib2 decode userinfo multiple times In-Reply-To: <1204819810.33.0.413464262118.issue2244@psf.upfronthosting.co.za> Message-ID: <1279611577.53.0.96353907837.issue2244@psf.upfronthosting.co.za> Ray.Allen added the comment: By confirming the "%2525" case, I guess this is really a bug. But the patch cause test_urllib2.py failed. I modified the patch to fix it. ---------- nosy: +ysj.ray Added file: http://bugs.python.org/file18082/urllib_issue_updated.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 09:41:30 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 20 Jul 2010 07:41:30 +0000 Subject: [issue8192] SQLite3 PRAGMA table_info doesn't respect database on Win32 In-Reply-To: <1269196118.36.0.673213819166.issue8192@psf.upfronthosting.co.za> Message-ID: <1279611690.02.0.376609330802.issue8192@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: python2.7 includes a newer version of sqlite. Does the problem still reproduces there? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 10:24:15 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 20 Jul 2010 08:24:15 +0000 Subject: [issue2244] urllib and urllib2 decode userinfo multiple times In-Reply-To: <1204819810.33.0.413464262118.issue2244@psf.upfronthosting.co.za> Message-ID: <1279614255.84.0.903674127927.issue2244@psf.upfronthosting.co.za> Changes by Ray.Allen : Added file: http://bugs.python.org/file18083/urllib_issue_updated.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 10:23:55 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 20 Jul 2010 08:23:55 +0000 Subject: [issue2244] urllib and urllib2 decode userinfo multiple times In-Reply-To: <1204819810.33.0.413464262118.issue2244@psf.upfronthosting.co.za> Message-ID: <1279614235.14.0.0613437283973.issue2244@psf.upfronthosting.co.za> Changes by Ray.Allen : Removed file: http://bugs.python.org/file18082/urllib_issue_updated.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 10:27:49 2010 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 20 Jul 2010 08:27:49 +0000 Subject: [issue9310] Intermittent failures in test_logging In-Reply-To: <1279580083.41.0.887395400152.issue9310@psf.upfronthosting.co.za> Message-ID: <1279614469.22.0.150000045825.issue9310@psf.upfronthosting.co.za> Vinay Sajip added the comment: I'm not convinced that this is an error in logging or test_logging. There are no special Unicode keys in the list being sorted AFAIK, and no reason why the sort() should fail. It's more likely to be some problem in the collation code relating to UCS-4 builds. ---------- resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 10:28:41 2010 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 20 Jul 2010 08:28:41 +0000 Subject: [issue9310] Intermittent failures in test_logging In-Reply-To: <1279580083.41.0.887395400152.issue9310@psf.upfronthosting.co.za> Message-ID: <1279614521.55.0.709253194771.issue9310@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- assignee: vinay.sajip -> status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 10:43:57 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 20 Jul 2010 08:43:57 +0000 Subject: [issue2244] urllib and urllib2 decode userinfo multiple times In-Reply-To: <1204819810.33.0.413464262118.issue2244@psf.upfronthosting.co.za> Message-ID: <1279615437.86.0.396483731858.issue2244@psf.upfronthosting.co.za> Ray.Allen added the comment: This bug exists on py3k also, so I worked out a patch for py3k, too. ---------- Added file: http://bugs.python.org/file18084/urllib_issue_updated.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 10:46:22 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 20 Jul 2010 08:46:22 +0000 Subject: [issue2244] urllib and urllib2 decode userinfo multiple times In-Reply-To: <1204819810.33.0.413464262118.issue2244@psf.upfronthosting.co.za> Message-ID: <1279615582.61.0.109305405556.issue2244@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Thanks Ray Allen. Usually the patch against the py3k branch is enough, it will be ported to other branches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 10:48:22 2010 From: report at bugs.python.org (Alexander Dreyer) Date: Tue, 20 Jul 2010 08:48:22 +0000 Subject: [issue9309] Add environment variable complementing command line option -no-user-cfg In-Reply-To: <1279574081.87.0.528312419657.issue9309@psf.upfronthosting.co.za> Message-ID: <1279615702.95.0.160680780805.issue9309@psf.upfronthosting.co.za> Changes by Alexander Dreyer : Added file: http://bugs.python.org/file18085/dist.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 10:49:09 2010 From: report at bugs.python.org (Alexander Dreyer) Date: Tue, 20 Jul 2010 08:49:09 +0000 Subject: [issue9309] Add environment variable complementing command line option -no-user-cfg In-Reply-To: <1279574081.87.0.528312419657.issue9309@psf.upfronthosting.co.za> Message-ID: <1279615749.8.0.956092163588.issue9309@psf.upfronthosting.co.za> Alexander Dreyer added the comment: Added better patch (checks environment first). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 10:53:09 2010 From: report at bugs.python.org (Alexander Dreyer) Date: Tue, 20 Jul 2010 08:53:09 +0000 Subject: [issue9309] Add environment variable complementing command line option -no-user-cfg In-Reply-To: <1279574081.87.0.528312419657.issue9309@psf.upfronthosting.co.za> Message-ID: <1279615989.61.0.188266831952.issue9309@psf.upfronthosting.co.za> Changes by Alexander Dreyer : Removed file: http://bugs.python.org/file18069/dist.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 10:58:02 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 20 Jul 2010 08:58:02 +0000 Subject: [issue9309] Add environment variable complementing command line option -no-user-cfg In-Reply-To: <1279574081.87.0.528312419657.issue9309@psf.upfronthosting.co.za> Message-ID: <1279616282.77.0.421504434706.issue9309@psf.upfronthosting.co.za> Ray.Allen added the comment: I don't think this can go into python2.x. Besides, is it really worthy to add such a new environment variable? ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 11:03:57 2010 From: report at bugs.python.org (Alexander Dreyer) Date: Tue, 20 Jul 2010 09:03:57 +0000 Subject: [issue9309] Add environment variable complementing command line option -no-user-cfg In-Reply-To: <1279574081.87.0.528312419657.issue9309@psf.upfronthosting.co.za> Message-ID: <1279616637.31.0.149056687081.issue9309@psf.upfronthosting.co.za> Alexander Dreyer added the comment: The patch is originating from Sage Days 24. Sage (http://www.sagemath.org) distributes a bunch of mathematical python-based software. The integration of the individual packages is done by individual people which might not use --no-user-cfg in their install scripts. So we needed a way to ensure this via the environment. Best regards, Alexander ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 11:07:02 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 20 Jul 2010 09:07:02 +0000 Subject: [issue9310] Intermittent failures in test_logging In-Reply-To: <1279580083.41.0.887395400152.issue9310@psf.upfronthosting.co.za> Message-ID: <1279616822.49.0.26663686059.issue9310@psf.upfronthosting.co.za> Stefan Krah added the comment: Actually it looks the same as issue 8201. If test_lib2to3 is run before test_logging, test_logging fails. Perhaps backporting the patch will help. ---------- keywords: +patch Added file: http://bugs.python.org/file18086/issue8201-release26-maint.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 11:08:49 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 20 Jul 2010 09:08:49 +0000 Subject: [issue9310] Intermittent failures in test_logging In-Reply-To: <1279580083.41.0.887395400152.issue9310@psf.upfronthosting.co.za> Message-ID: <1279616929.52.0.273382629516.issue9310@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- resolution: invalid -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 12:11:57 2010 From: report at bugs.python.org (Dmitry Jemerov) Date: Tue, 20 Jul 2010 10:11:57 +0000 Subject: [issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry In-Reply-To: <1279454095.41.0.733053669611.issue9291@psf.upfronthosting.co.za> Message-ID: <1279620717.77.0.364789941516.issue9291@psf.upfronthosting.co.za> Dmitry Jemerov added the comment: The problem doesn't happen on Python 3.1.2 because it doesn't have the code in mimetypes that accesses the Windows registry. Haven't tried the 3.2 alphas yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 12:59:31 2010 From: report at bugs.python.org (Michael Foord) Date: Tue, 20 Jul 2010 10:59:31 +0000 Subject: [issue3615] Expect methods for testing. In-Reply-To: <1219222153.94.0.41823703199.issue3615@psf.upfronthosting.co.za> Message-ID: <1279623571.96.0.194138557924.issue3615@psf.upfronthosting.co.za> Michael Foord added the comment: The API on TestCase is already too wide without adding more methods. This is easy enough to do in a TestCase subclass for those who want it. ---------- resolution: -> wont fix status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 13:01:24 2010 From: report at bugs.python.org (Michael Foord) Date: Tue, 20 Jul 2010 11:01:24 +0000 Subject: [issue4080] pyunit - display time of each test case - patch In-Reply-To: <1223497696.14.0.913391715353.issue4080@psf.upfronthosting.co.za> Message-ID: <1279623684.35.0.0754686706376.issue4080@psf.upfronthosting.co.za> Michael Foord added the comment: I am in the process of creating an extension mechanism for unittest which will make adding this sort of use case to unittest much easier. *Even* if it is added to the core it should be in the form of an extension (plugin) so please don't update the patch until this is in place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 13:04:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 20 Jul 2010 11:04:01 +0000 Subject: [issue9296] json module skipkeys handling changed exception types in 2.7 In-Reply-To: <1279468136.69.0.813704540742.issue9296@psf.upfronthosting.co.za> Message-ID: <1279623841.53.0.26684244016.issue9296@psf.upfronthosting.co.za> Antoine Pitrou added the comment: A quick look suggests that the patches are ok, thank you. ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 13:07:12 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 20 Jul 2010 11:07:12 +0000 Subject: [issue8433] buildbot: test_curses failure, getmouse() returned ERR In-Reply-To: <1271525184.22.0.100709248737.issue8433@psf.upfronthosting.co.za> Message-ID: <1279624032.1.0.648907467201.issue8433@psf.upfronthosting.co.za> Stefan Krah added the comment: How about skipping the tests until someone can figure out what's going on? The patch is tested on: http://www.python.org/dev/buildbot/builders/i386 Ubuntu 3.x/builds/1643 ---------- keywords: +patch nosy: +skrah Added file: http://bugs.python.org/file18087/issue8433.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 13:07:22 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 20 Jul 2010 11:07:22 +0000 Subject: [issue9313] distutils error on MSVC older than 8 In-Reply-To: <1279624042.03.0.724891043691.issue9313@psf.upfronthosting.co.za> Message-ID: <1279624042.03.0.724891043691.issue9313@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : I got an error while testing py3k on VC6. Here is a patch. ====================================================================== ERROR: test_remove_visual_c_ref (distutils.tests.test_msvc9compiler.msvc9compile rTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "e:\python-dev\py3k\lib\distutils\tests\test_msvc9compiler.py", line 112, in test_remove_visual_c_ref from distutils.msvc9compiler import MSVCCompiler File "e:\python-dev\py3k\lib\distutils\msvc9compiler.py", line 291, in raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VE RSION) distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module ---------------------------------------------------------------------- Ran 170 tests in 49.070s FAILED (errors=1, skipped=4) Traceback (most recent call last): File "test_distutils.py", line 18, in test_main() File "test_distutils.py", line 13, in test_main test.support.run_unittest(distutils.tests.test_suite()) File "e:\python-dev\py3k\lib\test\support.py", line 1054, in run_unittest _run_suite(suite) File "e:\python-dev\py3k\lib\test\support.py", line 1037, in _run_suite raise TestFailed(err) test.support.TestFailed: Traceback (most recent call last): File "e:\python-dev\py3k\lib\distutils\tests\test_msvc9compiler.py", line 112, in test_remove_visual_c_ref from distutils.msvc9compiler import MSVCCompiler File "e:\python-dev\py3k\lib\distutils\msvc9compiler.py", line 291, in raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VE RSION) distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module ---------- assignee: tarek components: Distutils, Tests files: py3k_distutils_on_old_msvc.patch keywords: patch messages: 110886 nosy: ocean-city, tarek priority: normal severity: normal status: open title: distutils error on MSVC older than 8 versions: Python 3.1, Python 3.2 Added file: http://bugs.python.org/file18088/py3k_distutils_on_old_msvc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 13:28:02 2010 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 20 Jul 2010 11:28:02 +0000 Subject: [issue2690] Precompute range length In-Reply-To: <1209137521.96.0.492875701205.issue2690@psf.upfronthosting.co.za> Message-ID: <1279625282.54.0.839350503405.issue2690@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 13:28:42 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Tue, 20 Jul 2010 11:28:42 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> New submission from Dirkjan Ochtman : This seems wrong: >>> a = [] >>> b = iter(['c', 'd']) >>> a += b >>> c = [] >>> c + iter(['d', 'e']) Traceback (most recent call last): File "", line 1, in TypeError: can only concatenate list (not "listiterator") to list In other words, if iadd can deal with it, why can't add? ---------- components: Interpreter Core messages: 110887 nosy: djc priority: normal severity: normal status: open title: inconsistent result when concatenating list with iterators versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 13:51:03 2010 From: report at bugs.python.org (Tal Einat) Date: Tue, 20 Jul 2010 11:51:03 +0000 Subject: [issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface In-Reply-To: <1209319360.66.0.583090952017.issue2704@psf.upfronthosting.co.za> Message-ID: <1279626663.79.0.0230509402192.issue2704@psf.upfronthosting.co.za> Tal Einat added the comment: IDLE should be accessible and easy to use for beginners who have never used a command line. Therefore I don't think up/down should scroll through the history by default. Since IDLE looks like a text editor (even the shell window) it is more intuitive that the arrows should move the cursor around the window. Note that a user can configure up/down to scroll through the history quite easily using the configuration dialog. I agree that as it stands it is hard to discover how to scroll through the history, and that Return can be used to bring previous code into the current command line. I think we can find a better way to make these features known to new users, without making the interface less intuitive. For example, we could have a "Welcome to IDLE!" screen that appears the first time IDLE is run by a user, which outlines a few basic features such as these. This should of course be complemented by better documentation, including a section on various commands (a separate issue). ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 13:57:06 2010 From: report at bugs.python.org (Tal Einat) Date: Tue, 20 Jul 2010 11:57:06 +0000 Subject: [issue2704] IDLE: Patch to make PyShell behave more like a Terminal interface In-Reply-To: <1209319360.66.0.583090952017.issue2704@psf.upfronthosting.co.za> Message-ID: <1279627026.21.0.390691235691.issue2704@psf.upfronthosting.co.za> Tal Einat added the comment: Regarding passing on letter/number key-presses to the command line, I'm -0 on this. Note that not only letter/number keys should be passed on. I've often found myself wanting to type in the command line after looking at previous code, to see that my key presses are being ignored, and having to Ctrl+End to return the cursor to the command line. However, if I was scrolling through the history and by accident hist a letter or number, having the cursor jump to the command line and the window scroll back to the end would be annoying. Personally, I would prefer avoiding this and having to use Ctrl+End to return to the command line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 13:57:21 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 20 Jul 2010 11:57:21 +0000 Subject: [issue9265] Incorrect name passed as arg[0] when shell=True and executable specified In-Reply-To: <1279171254.35.0.713274753233.issue9265@psf.upfronthosting.co.za> Message-ID: <1279627041.3.0.61311877745.issue9265@psf.upfronthosting.co.za> Stefan Krah added the comment: The trustworthy buildbots look good, so I'm closing this. ---------- keywords: -needs review, patch resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 14:13:37 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 20 Jul 2010 12:13:37 +0000 Subject: [issue9036] Simplify Py_CHARMASK In-Reply-To: <1277039528.15.0.539020018856.issue9036@psf.upfronthosting.co.za> Message-ID: <1279628017.78.0.0890754386729.issue9036@psf.upfronthosting.co.za> Stefan Krah added the comment: Antoine, Eric, thanks for looking at the patch. unicodeobject.c patch committed in r82978, r82979, r82980 and r82984. As Antoine pointed out, the _json.c issue is not a problem. Also, it is not present in py3k. The reliable buildbots look ok, so I think we can close this. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 14:17:27 2010 From: report at bugs.python.org (Tal Einat) Date: Tue, 20 Jul 2010 12:17:27 +0000 Subject: [issue1524639] Fix Tkinter Tcl-commands memory-leaks Message-ID: <1279628247.59.0.241929767621.issue1524639@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 14:20:12 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 12:20:12 +0000 Subject: [issue9309] Add environment variable complementing command line option -no-user-cfg In-Reply-To: <1279574081.87.0.528312419657.issue9309@psf.upfronthosting.co.za> Message-ID: <1279628412.11.0.130978275651.issue9309@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 14:32:08 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 20 Jul 2010 12:32:08 +0000 Subject: [issue9232] Allow trailing comma in any function argument list. In-Reply-To: <1278945017.29.0.842296068848.issue9232@psf.upfronthosting.co.za> Message-ID: <1279629128.22.0.806018407278.issue9232@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 15:28:47 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 13:28:47 +0000 Subject: [issue1747670] Limiting data copy in xmlrpclib Message-ID: <1279632527.34.0.179802993647.issue1747670@psf.upfronthosting.co.za> Mark Lawrence added the comment: The code in the patch has been removed from py3k. This can only go forward if a unit test is provided. Change assigned to as per maintainers list. ---------- assignee: -> loewis nosy: +BreamoreBoy, loewis versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 15:32:29 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 13:32:29 +0000 Subject: [issue3526] Customized malloc implementation on SunOS and AIX In-Reply-To: <1218190381.02.0.174331191244.issue3526@psf.upfronthosting.co.za> Message-ID: <1279632749.93.0.336055405283.issue3526@psf.upfronthosting.co.za> Mark Lawrence added the comment: Any SunOS/AIX people interested in keeping this open? ---------- nosy: +BreamoreBoy versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 15:38:21 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 13:38:21 +0000 Subject: [issue2124] xml.sax and xml.dom fetch DTDs by default In-Reply-To: <1203086575.38.0.209227458245.issue2124@psf.upfronthosting.co.za> Message-ID: <1279633101.84.0.530876735678.issue2124@psf.upfronthosting.co.za> Mark Lawrence added the comment: Does anybody know if users are still experiencing problems with this issue? ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 15:41:16 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 13:41:16 +0000 Subject: [issue1635741] Interpreter seems to leak references after finalization Message-ID: <1279633276.37.0.901881032637.issue1635741@psf.upfronthosting.co.za> Mark Lawrence added the comment: Does the title of this issue accurately reflect the current status of the Python interpreter? ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 15:43:55 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 13:43:55 +0000 Subject: [issue2181] optimize out local variables at end of function In-Reply-To: <1203904814.51.0.0269762586023.issue2181@psf.upfronthosting.co.za> Message-ID: <1279633435.32.0.615139031079.issue2181@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closing as nobody has commented. ---------- nosy: +BreamoreBoy resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 15:45:32 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 13:45:32 +0000 Subject: [issue5901] missing meta-info in documentation pdf In-Reply-To: <1241246578.79.0.771794251259.issue5901@psf.upfronthosting.co.za> Message-ID: <1279633532.83.0.141565073116.issue5901@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: georg.brandl -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 15:51:01 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 13:51:01 +0000 Subject: [issue6216] Raise Unicode KEEPALIVE_SIZE_LIMIT from 9 to 32? In-Reply-To: <1244246653.62.0.629764911773.issue6216@psf.upfronthosting.co.za> Message-ID: <1279633861.53.0.037580527616.issue6216@psf.upfronthosting.co.za> Mark Lawrence added the comment: Terry, are you still interested in this? ---------- nosy: +BreamoreBoy versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 15:55:27 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 20 Jul 2010 13:55:27 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1279634127.18.0.138175296218.issue1712522@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I agree to the points raised by Antoine. Also yesterday in IRC, Eric Smith mentioned that If someone uses these new parameters in 2.7.1 his code may not work with 2.7 (That would obviously be an undesirable behavior). So, it is better to leave at Exception raised and anyways py3k has correct behavior. I shall revert the patch from 2.7.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 15:59:46 2010 From: report at bugs.python.org (Jean-Paul Calderone) Date: Tue, 20 Jul 2010 13:59:46 +0000 Subject: [issue2124] xml.sax and xml.dom fetch DTDs by default In-Reply-To: <1203086575.38.0.209227458245.issue2124@psf.upfronthosting.co.za> Message-ID: <1279634386.45.0.887872098287.issue2124@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: Yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 16:09:16 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 20 Jul 2010 14:09:16 +0000 Subject: [issue1747670] Limiting data copy in xmlrpclib Message-ID: <1279634956.57.0.936011114744.issue1747670@psf.upfronthosting.co.za> Stefan Krah added the comment: Martin has recently removed his name from py3k/Misc/maintainers.rst. Also, he has stated that assigning bugs to him might mean that they get less attention (due to the large number of issues that he's involved in). ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 16:12:47 2010 From: report at bugs.python.org (Tal Einat) Date: Tue, 20 Jul 2010 14:12:47 +0000 Subject: [issue1207589] Right Click Context Menu Message-ID: <1279635167.27.0.55575837938.issue1207589@psf.upfronthosting.co.za> Tal Einat added the comment: I agree with Guilherme: shortcuts don't need to appear in the context menu. Guilherme's patch looks pretty good overall, but I have a few remarks: 1) Pasting should be disabled in the Shell window when the cursor is before the I/O mark. (the behavior for cutting is correct) 2) Code relevant to the Shell window should be in PyShell, not in EditorWindow with a getattr(self, 'interp', None) check. 3) Tk.Text.compare can receive names of tags to compare (don't have to do Tk.Text.index('')) So I made these changes. Attached are patches against current trunk (2.x) and py3k branch. My testing on Windows7 with both 2.7 and 3.1.2 showed this change works well. This should be tested on OSX and Linux since it interacts with the clipboard, which works differently on these platforms. ---------- nosy: +taleinat Added file: http://bugs.python.org/file18089/IDLE_rmenu_trunk.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 16:13:20 2010 From: report at bugs.python.org (Tal Einat) Date: Tue, 20 Jul 2010 14:13:20 +0000 Subject: [issue1207589] Right Click Context Menu Message-ID: <1279635200.68.0.241512869188.issue1207589@psf.upfronthosting.co.za> Changes by Tal Einat : Added file: http://bugs.python.org/file18090/IDLE_rmenu_py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 16:15:34 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 20 Jul 2010 14:15:34 +0000 Subject: [issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows In-Reply-To: <1277827107.42.0.0793977492373.issue9116@psf.upfronthosting.co.za> Message-ID: <1279635334.88.0.0156972061494.issue9116@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I experienced this crash on test_thread.py. I created a patch hopefully to fix this issue. My knowleage about threading is not so deep, so maybe this patch is not so good. ;-) # I'm worried about COND_RESET which is not used in my patch. But # pthread variant is doing nothing on this macro... Now, test_thread.py runs fine. Reference: http://www.cs.wustl.edu/~schmidt/win32-cv-1.html http://msdn.microsoft.com/en-us/library/ms686293(VS.85).aspx http://www.linux.or.jp/JM/html/glibc-linuxthreads/man3/pthread_cond_init.3.html ---------- keywords: +patch nosy: +ocean-city Added file: http://bugs.python.org/file18091/py3k_ceval_gil.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 16:16:49 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 20 Jul 2010 14:16:49 +0000 Subject: [issue9311] os.access can return bogus values when run as superuser In-Reply-To: <1279591357.64.0.139129514793.issue9311@psf.upfronthosting.co.za> Message-ID: <1279635409.99.0.359862053483.issue9311@psf.upfronthosting.co.za> R. David Murray added the comment: I'm curious, are the perl and sh functions you say do the right thing wrappers around 'access', or are they some other sort of function? The Python code is just a thin wrapper around the system function, and as such will follow the system function's semantics. I do agree that the FreeBSD interpretation of the semantics of access is...unexpected, as well as unfortunate :) So, a doc note about the superuser X_OK quirk is appropriate. Care to propose a doc patch? Personally I wouldn't include the stat example, but rather simply refer to stat as the portable way to check if the execute bit is set (and then you still have to call os.access to see if the real uid has permission to execute). On the other hand, proposing a portable version of 'access' for inclusion in shutils might be appropriate, if you want to open a new issue for that (preferably with a patch including docs and unit tests :) ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, r.david.murray stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 16:43:02 2010 From: report at bugs.python.org (Tal Einat) Date: Tue, 20 Jul 2010 14:43:02 +0000 Subject: [issue9290] IDLE and Command line present different behavior for sys.stdin In-Reply-To: <1279417895.54.0.811089047738.issue9290@psf.upfronthosting.co.za> Message-ID: <1279636982.55.0.845217603996.issue9290@psf.upfronthosting.co.za> Tal Einat added the comment: I agree that the wrapping of these in IDLE should be as transparent as possible. It would be helpful if you could specify what other "quirks" you have found regarding sys.stdin, sys.stdout and sys.stderr, preferably describing use cases where these are problematic. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 16:46:41 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 20 Jul 2010 14:46:41 +0000 Subject: [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: <1279556505.28.0.814004588201.issue9305@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: On Mon, Jul 19, 2010 at 7:21 PM, Alexander Belopolsky wrote: > > I suggest the following wording for time.timezone description: > > time.timezone: The number of seconds one must add to the local time to arrive at UTC. Makes sense. I can't see any other real explanation for -7200 value if I am in +2 UTC timezone. > Similarly, tzinfo.utcoffset() can be defined as "Returns timedelta one must add to UTC to arrive at local time." I believe the correct convention is "Return timedelta...". Another concern - if UTC is 0 reference point then there is no reason to add something to it - you just can say - "Return timedelta equal to local UTC offset." ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 16:56:09 2010 From: report at bugs.python.org (Tal Einat) Date: Tue, 20 Jul 2010 14:56:09 +0000 Subject: [issue9262] IDLE: Use tabbed shell and edit windows In-Reply-To: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> Message-ID: <1279637769.02.0.175934875356.issue9262@psf.upfronthosting.co.za> Tal Einat added the comment: (Note: there has recently been some discussion of this on idle-dev and python-dev.) This may be nice to have but has complications. I think there are currently more pressing issues regarding IDLE that require our attention. Also, just adding tabs isn't necessarily enough. Having several separate windows should still be an option. And if you can have several windows, each with several tabs, drag-n-drop moving of tabs between windows is really nice to have, not to mention drag-n-drop reordering of tabs. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 17:11:01 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 20 Jul 2010 15:11:01 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1279638661.53.0.772118943913.issue9308@psf.upfronthosting.co.za> ?ric Araujo added the comment: Could you add comments in encoded_modules/__init__.py? I don?t understand it, so I can?t make a useful comment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 17:17:01 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 20 Jul 2010 15:17:01 +0000 Subject: [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1279639021.8.0.0143330298265.issue9312@psf.upfronthosting.co.za> ?ric Araujo added the comment: In documenting/markup: program The name of an executable program. This may differ from the file name for the executable for some platforms. In particular, the .exe (or other) extension should be omitted for Windows programs. So I believe the correct form would be ``python regrtest.py``. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 17:20:30 2010 From: report at bugs.python.org (Tal Einat) Date: Tue, 20 Jul 2010 15:20:30 +0000 Subject: [issue9222] IDLE: Fix open/saveas 'Files of type' choices In-Reply-To: <1278809052.13.0.969100167059.issue9222@psf.upfronthosting.co.za> Message-ID: <1279639230.64.0.449817340325.issue9222@psf.upfronthosting.co.za> Tal Einat added the comment: On Windows, I can't think of any common reason to want to save a file edited in IDLE without the .py extension. On the other hand, accidentally forgetting the .py extension is annoying, and users have come to expect a default extension being added by applications (e.g. MS Office). Guilherme's patch (applied manually) works fine here on Windows7. I'm all for committing this if it has been tested to work as expected on Linux and OSX. (minor nit-pick: could use sys.platform.startswith('win') instead of slicing) ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 17:24:23 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 20 Jul 2010 15:24:23 +0000 Subject: [issue9262] IDLE: Use tabbed shell and edit windows In-Reply-To: <1279128709.53.0.879340925848.issue9262@psf.upfronthosting.co.za> Message-ID: <1279639463.4.0.702659078905.issue9262@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 17:26:57 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 20 Jul 2010 15:26:57 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279639617.92.0.745048288397.issue9314@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 17:29:07 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 15:29:07 +0000 Subject: [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: Message-ID: Alexander Belopolsky added the comment: On Tue, Jul 20, 2010 at 10:46 AM, anatoly techtonik wrote: > .. Another > concern - if UTC is 0 reference point then there is no reason to add > something to it - you just can say - "Return timedelta equal to local > UTC offset." No, UTC is not a 0 reference point, it is a time scale. UTC offset is the value that is used to translate between time expressed in UTC and local time. To make an analogy, expressing time in UTC is like expressing temperature in Kelvin scale. You need to subtract 273 from the value in ?K to arrive at the value in ?C. Documenting utcoffset() as "Return timedelta equal to local UTC offset." is almost circular. It does not explain whether it has to be added or subtracted from UTC to arrive at local time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 17:33:33 2010 From: report at bugs.python.org (Tal Einat) Date: Tue, 20 Jul 2010 15:33:33 +0000 Subject: [issue6378] Patch to make 'idle.bat' run idle.pyw using appropriate Python interpreter (so 3.1's idle.bat does not accidently use python26.exe) In-Reply-To: <1246308322.32.0.750084238969.issue6378@psf.upfronthosting.co.za> Message-ID: <1279640014.0.0.219796580131.issue6378@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 17:33:45 2010 From: report at bugs.python.org (Tal Einat) Date: Tue, 20 Jul 2010 15:33:45 +0000 Subject: [issue7676] IDLE shell shouldn't use TABs In-Reply-To: <1263213381.47.0.181451927584.issue7676@psf.upfronthosting.co.za> Message-ID: <1279640025.28.0.294649168544.issue7676@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 17:39:37 2010 From: report at bugs.python.org (Tim Peters) Date: Tue, 20 Jul 2010 15:39:37 +0000 Subject: [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: <1279556505.28.0.814004588201.issue9305@psf.upfronthosting.co.za> Message-ID: <1279640377.85.0.0254511721825.issue9305@psf.upfronthosting.co.za> Tim Peters added the comment: FYI, I like the change. As I recall it, the current wording was just to avoid saying "ahead of UTC" or "behind UTC" (which was the original wording). Technically pure or not, I never saw anyone get truly confused by "East of UTC" or "West of UTC", but I fully that what people really want to know is what to do with the thing (add or subtract it). ---------- nosy: +tim_one _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 17:47:16 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Tue, 20 Jul 2010 15:47:16 +0000 Subject: [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: Message-ID: Fred L. Drake, Jr. added the comment: On Tue, Jul 20, 2010 at 10:46 AM, anatoly techtonik wrote: > I believe the correct convention is "Return timedelta...". This is handled inconsistently in the documentation; I'm hoping the current maintainers reinforce the "Returns ..." structure. The documentation is descriptive, not an external specification. ? -Fred ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 17:50:12 2010 From: report at bugs.python.org (Tal Einat) Date: Tue, 20 Jul 2010 15:50:12 +0000 Subject: [issue5817] Right-click behavior from Windows Explorer In-Reply-To: <1240447084.05.0.414854633538.issue5817@psf.upfronthosting.co.za> Message-ID: <1279641012.1.0.696421699367.issue5817@psf.upfronthosting.co.za> Tal Einat added the comment: Just to get this on the table: What is the benefit of having it opened in the same instance of IDLE rather than a new instance? ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 17:59:56 2010 From: report at bugs.python.org (Tal Einat) Date: Tue, 20 Jul 2010 15:59:56 +0000 Subject: [issue7136] Idle File Menu Option Improvement In-Reply-To: <1255567244.32.0.288243785856.issue7136@psf.upfronthosting.co.za> Message-ID: <1279641596.4.0.34573324116.issue7136@psf.upfronthosting.co.za> Tal Einat added the comment: +1 on renaming it "New File". Patch attached for py3k. ---------- keywords: +patch nosy: +taleinat Added file: http://bugs.python.org/file18092/IDLE_new_file_py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 18:00:40 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Tue, 20 Jul 2010 16:00:40 +0000 Subject: [issue6378] Patch to make 'idle.bat' run idle.pyw using appropriate Python interpreter (so 3.1's idle.bat does not accidently use python26.exe) In-Reply-To: <1246308322.32.0.750084238969.issue6378@psf.upfronthosting.co.za> Message-ID: <1279641640.07.0.976941507962.issue6378@psf.upfronthosting.co.za> Sridhar Ratnakumar added the comment: BTW, ActivePython (2.6 and 2.7 at the moment) includes this patched idle.bat. The start menu shortcut launches it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 18:08:08 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 20 Jul 2010 16:08:08 +0000 Subject: [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: Message-ID: anatoly techtonik added the comment: > Documenting utcoffset() as "Return timedelta equal to local UTC > offset." is almost circular. ?It does not explain whether it has to be > added or subtracted from UTC to arrive at local time. Ok. Sold. >> I believe the correct convention is "Return timedelta...". > > This is handled inconsistently in the documentation; I'm hoping the > current maintainers reinforce the "Returns ..." structure. ?The > documentation is descriptive, not an external specification. http://www.python.org/dev/peps/pep-0257/#one-line-docstrings I've took the convention from here. I thought docs are generated from docstrings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 18:13:21 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Tue, 20 Jul 2010 16:13:21 +0000 Subject: [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: Message-ID: Fred L. Drake, Jr. added the comment: On Tue, Jul 20, 2010 at 12:08 PM, anatoly techtonik wrote: > I've took the convention from here. I thought docs are generated from > docstrings. They're not, but I don't think that really matters. Older documentation used the imperative form consistently, but that's shifted over time. (I, at least, think that's a good thing.) I don't think it really matters with regard to this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 18:14:39 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 16:14:39 +0000 Subject: [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: <1279640377.85.0.0254511721825.issue9305@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Tue, Jul 20, 2010 at 11:39 AM, Tim Peters wrote: >.. ?As I recall it, the current wording was just to avoid saying "ahead of UTC" or "behind UTC" (which was the original wording). Interesting. I actually like the original wording better. For me, "my watch is 6 hours behind UTC" makes it clear that when the Big Ben clock shows tea time (18:00), my watch displays noon (17:00 - 6:00 = 12:00.) I wonder if east/west is somehow more natural for native speakers of English. I would really like to hear more from the international audience. When it comes to measuring time there are many interesting traditions that don't translate well between nations. For example, I've heard that in the Far East, the future is considered to be behind because you can see the past but you cannot see the future. If this is the notion that you are used to, time being ahead or behind can be truly confusing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 18:18:37 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 16:18:37 +0000 Subject: [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: Message-ID: Alexander Belopolsky added the comment: On Tue, Jul 20, 2010 at 12:14 PM, Alexander Belopolsky wrote: .. > Interesting. ?I actually like the original wording better. ?For me, > "my watch is 6 hours behind UTC" makes it clear that when the Big Ben > clock shows tea time (18:00), my watch displays noon (17:00 - 6:00 = > 12:00.) I was too excited to add Alice in Wonderland humor to my post that did not get the math right. :-) The above should read 18:00 - 6:00 = 12:00, of course. Or was it five o'clock after all? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 18:39:17 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 20 Jul 2010 16:39:17 +0000 Subject: [issue1747670] Limiting data copy in xmlrpclib Message-ID: <1279643957.55.0.423821489874.issue1747670@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- assignee: loewis -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 18:52:17 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 16:52:17 +0000 Subject: [issue1747670] Limiting data copy in xmlrpclib Message-ID: <1279644737.35.0.114405869589.issue1747670@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could somebody update here please http://svn.python.org/view/*checkout*/python/branches/py3k/Misc/maintainers.rst ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 18:54:45 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 16:54:45 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1279644885.81.0.745805503286.issue9308@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > Could you add comments in encoded_modules/__init__.py? Please see updated issue9308a.diff. ---------- Added file: http://bugs.python.org/file18093/issue9308a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 18:54:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 16:54:59 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1279644899.42.0.545729216946.issue9308@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file18077/issue9308a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:04:00 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 20 Jul 2010 17:04:00 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1279645440.58.0.704089662974.issue9308@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think this new test is a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:04:51 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 17:04:51 +0000 Subject: [issue6791] httplib read status memory usage In-Reply-To: <1251448372.35.0.316865122555.issue6791@psf.upfronthosting.co.za> Message-ID: <1279645491.17.0.830136141345.issue6791@psf.upfronthosting.co.za> Mark Lawrence added the comment: Sumar, to get this moved forward could you please provide a unit test. ---------- nosy: +BreamoreBoy stage: -> unit test needed versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.4, Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:17:47 2010 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 20 Jul 2010 17:17:47 +0000 Subject: [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1279646267.57.0.104306248696.issue9312@psf.upfronthosting.co.za> Eli Bendersky added the comment: Terry, Re doctest.rst - appears to be a merging issue. I will see how to resolve it once we figure out what to do with :program: ?ric, Good point - I'll ask pydev and will update the patch accordingly ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:19:40 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 17:19:40 +0000 Subject: [issue6976] getcwd hangs and leaks mem on Solaris <= 9 in very long file name case In-Reply-To: <1253685337.93.0.462290997823.issue6976@psf.upfronthosting.co.za> Message-ID: <1279646380.47.0.0534272046893.issue6976@psf.upfronthosting.co.za> Mark Lawrence added the comment: Are there any Solaris people who could look at this? The patch file contains a very small change to posixmodule.c. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:19:52 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 17:19:52 +0000 Subject: [issue9305] Don't use east/west of UTC in date/time documentation In-Reply-To: Message-ID: Alexander Belopolsky added the comment: On Tue, Jul 20, 2010 at 12:08 PM, anatoly techtonik wrote: .. > Ok. Sold. Good. All we need now is just a patch. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:26:27 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 20 Jul 2010 17:26:27 +0000 Subject: [issue6216] Raise Unicode KEEPALIVE_SIZE_LIMIT from 9 to 32? In-Reply-To: <1244246653.62.0.629764911773.issue6216@psf.upfronthosting.co.za> Message-ID: <1279646787.82.0.556380376037.issue6216@psf.upfronthosting.co.za> Terry J. Reedy added the comment: That question should better be directed at Marc-Andre. I merely extracted this sub-issue from one of his posts in the very contentious discussion of #1943, lest it get lost. Antoine asked for a calculation. Marc-Andre gave one, but I do not know if that is what Antoine wanted. The referenced msg64215 gives 3 string length profiles that suggest that an increase to at least 16 might be useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:28:44 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 20 Jul 2010 17:28:44 +0000 Subject: [issue6791] httplib read status memory usage In-Reply-To: <1251448372.35.0.316865122555.issue6791@psf.upfronthosting.co.za> Message-ID: <1279646924.25.0.0777776758927.issue6791@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:28:49 2010 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 20 Jul 2010 17:28:49 +0000 Subject: [issue8254] write a configure command In-Reply-To: <1269787284.51.0.353047597946.issue8254@psf.upfronthosting.co.za> Message-ID: <1279646929.92.0.78191146944.issue8254@psf.upfronthosting.co.za> Jeremy Kloth added the comment: for #1 instead of importing `build`/`install` commands for their options, why not define the options only on the `configure` command? The B/I commands could just "lookup" their needed options from the configure command. On that note, how does the B/I commands get the options defined by `configure`? A quick look at the code doesn't show them using the "configured" options. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:30:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 20 Jul 2010 17:30:52 +0000 Subject: [issue8254] write a configure command In-Reply-To: <1269787284.51.0.353047597946.issue8254@psf.upfronthosting.co.za> Message-ID: <1279647052.29.0.350241374899.issue8254@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:31:58 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 20 Jul 2010 17:31:58 +0000 Subject: [issue8254] write a configure command In-Reply-To: <1269787284.51.0.353047597946.issue8254@psf.upfronthosting.co.za> Message-ID: <1279647118.22.0.701689345816.issue8254@psf.upfronthosting.co.za> ?ric Araujo added the comment: Adding message from jkloth removed by error (remove/reply confusion): for #1 instead of importing `build`/`install` commands for their options, why not define the options only on the `configure` command? The B/I commands could just "lookup" their needed options from the configure command. On that note, how does the B/I commands get the options defined by `configure`? A quick look at the code doesn't show them using the "configured" options. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:34:41 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 20 Jul 2010 17:34:41 +0000 Subject: [issue7464] circular reference in HTTPResponse by urllib2 In-Reply-To: <1260379633.84.0.693013946466.issue7464@psf.upfronthosting.co.za> Message-ID: <1279647281.52.0.578502338983.issue7464@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Lets just investigate the circular reference part here for this ticket. ---------- assignee: -> orsenthil versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:38:10 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 20 Jul 2010 17:38:10 +0000 Subject: [issue8254] write a configure command In-Reply-To: <1269787284.51.0.353047597946.issue8254@psf.upfronthosting.co.za> Message-ID: <1279647490.1.0.769207903581.issue8254@psf.upfronthosting.co.za> ?ric Araujo added the comment: > why not define the options only on the `configure` command? This is what Tarek told me and what I thought I said two messages earlier. > On that note, how does the B/I commands get the options defined by `configure`? See http://bitbucket.org/Merwok/distutils2-configure/src/tip/src/distutils2/dist.py#cl-363 and line 384. Nothing to change in the commands, just make Distribution pick values from the cache file at the right time (after regular config files and before command-line options). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:44:51 2010 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 20 Jul 2010 17:44:51 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> New submission from Eli Bendersky : Brought up in issue 9282: unit tests should be added for the trace module. Minor naming problem: Lib/test/test_trace.py is currently employed for testing the sys.settrace method. Suggestion: name the unit tests of the trace module test_trace_module.py ---------- components: Library (Lib) messages: 110932 nosy: eli.bendersky priority: normal severity: normal status: open title: The trace module lacks unit tests type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:46:55 2010 From: report at bugs.python.org (Eli Bendersky) Date: Tue, 20 Jul 2010 17:46:55 +0000 Subject: [issue9282] Bug in --listfuncs option of trace.py In-Reply-To: <1279355920.89.0.901837761289.issue9282@psf.upfronthosting.co.za> Message-ID: <1279648015.3.0.0518783324819.issue9282@psf.upfronthosting.co.za> Eli Bendersky added the comment: I've opened issue 9315 to address the lack of unit tests for trace.py I think that this should be committed regardless, since it fixes a serious bug in the module. Adding unit tests can take time, and is less critical. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:48:02 2010 From: report at bugs.python.org (Dave Malcolm) Date: Tue, 20 Jul 2010 17:48:02 +0000 Subject: [issue4555] Smelly exports In-Reply-To: <1228526950.62.0.716618083363.issue4555@psf.upfronthosting.co.za> Message-ID: <1279648082.86.0.713234561837.issue4555@psf.upfronthosting.co.za> Dave Malcolm added the comment: py3k is much cleaner than python 2, due to the change in the module API. Here's "make smelly"'s output on a recent py3k checkout: nm -p libpython3.2.a | \ sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \ _add_one_to_index_C _add_one_to_index_F asdl_int_seq_new asdl_seq_new ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:49:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 17:49:23 +0000 Subject: [issue4555] Smelly exports (global symbols in python not prefixed with Py or _Py) In-Reply-To: <1228526950.62.0.716618083363.issue4555@psf.upfronthosting.co.za> Message-ID: <1279648163.8.0.452150639786.issue4555@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- title: Smelly exports -> Smelly exports (global symbols in python not prefixed with Py or _Py) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:49:47 2010 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 20 Jul 2010 17:49:47 +0000 Subject: [issue8254] write a configure command In-Reply-To: <1269787284.51.0.353047597946.issue8254@psf.upfronthosting.co.za> Message-ID: <1279648187.61.0.347300963217.issue8254@psf.upfronthosting.co.za> Jeremy Kloth added the comment: How would the build or install command get the options in this case: python setup.py configure --prefix=$HOME build install Remember that commands can be chained (and that commands can run other commands). I would like to be able to do (and can do right now): python setup.py install and have both `configure` and `build` be run with their defaults. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 19:54:07 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 17:54:07 +0000 Subject: [issue7825] test_threadsignals leaks references In-Reply-To: <1264981703.5.0.296078231343.issue7825@psf.upfronthosting.co.za> Message-ID: <1279648447.71.0.272895193258.issue7825@psf.upfronthosting.co.za> Mark Lawrence added the comment: Has the underlying code been fixed or could we still use the patch to test_threadsignals? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 20:00:56 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 18:00:56 +0000 Subject: [issue8258] Multiple Python Interpreter Memory Leak In-Reply-To: <1269857293.22.0.576084159776.issue8258@psf.upfronthosting.co.za> Message-ID: <1279648856.66.0.14502079256.issue8258@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +brian.curtin, tim.golden stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 20:04:09 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 20 Jul 2010 18:04:09 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279649049.29.0.0687064926271.issue9314@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This actually works for any iterator: >>> l = [] >>> l += 'abc' >>> l ['a', 'b', 'c'] ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 20:04:23 2010 From: report at bugs.python.org (Dave Malcolm) Date: Tue, 20 Jul 2010 18:04:23 +0000 Subject: [issue4555] Smelly exports (global symbols in python not prefixed with Py or _Py) In-Reply-To: <1228526950.62.0.716618083363.issue4555@psf.upfronthosting.co.za> Message-ID: <1279649063.72.0.77544017555.issue4555@psf.upfronthosting.co.za> Dave Malcolm added the comment: Patch to py3k which adds the "_Py" prefix to the four listed symbols. With this, the output from "make smelly" is clean (odorless, perhaps?). However, adding _Py does seem to go against this comment in Include/asdl.h: /* It would be nice if the code generated by asdl_c.py was completely independent of Python, but it is a goal the requires too much work at this stage. So, for example, I'll represent identifiers as interned Python strings. */ ---------- Added file: http://bugs.python.org/file18094/py3k-add-_Py-prefix-to-avoid-smelliness.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 20:04:35 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 20 Jul 2010 18:04:35 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279649075.81.0.547367309446.issue9314@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: for any *iterable*! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 20:13:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 20 Jul 2010 18:13:31 +0000 Subject: [issue8254] write a configure command In-Reply-To: <1269787284.51.0.353047597946.issue8254@psf.upfronthosting.co.za> Message-ID: <1279649611.16.0.500989763256.issue8254@psf.upfronthosting.co.za> ?ric Araujo added the comment: configure is not config. As I understand it, the config command aimed to be something like ./configure in autotools, thus usable in combination with build and install. configure is different: it is meant to be run once to create a configure.cache file which saves possibly long and complicated options. IOW, its goal was to be typed only once, not in combination with build or install. This is why build does not call configure. I have written a short doc to explain that, see configure.rst in my repo or the built version at http://distutils2.notmyidea.org/configure.html This message and the linked doc explain the current behavior of configure as I understood its purpose a month ago, IMO respecting what Tarek wrote in the bug report. However, Tarek he did not explain all that he had in mind here, like I wrote here on 2010-07-17 (I don?t have notes on that :/ so I?ll have to ask him again and sort out the setup.cfg/configure.cache overlap). When I get back to configure, the command line ?configure --prefix ~ install? will work according to your expectations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 20:13:32 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 18:13:32 +0000 Subject: [issue6610] Subprocess descriptor debacle In-Reply-To: <1249000024.51.0.280381658662.issue6610@psf.upfronthosting.co.za> Message-ID: <1279649612.24.0.287231881417.issue6610@psf.upfronthosting.co.za> Mark Lawrence added the comment: The patch is small, is there any solid reason for not committing it? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 20:16:28 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 20 Jul 2010 18:16:28 +0000 Subject: [issue6251] c++ extension module implementation guide/example in extending/embedding documentation In-Reply-To: <1244621954.14.0.882115358869.issue6251@psf.upfronthosting.co.za> Message-ID: <1279649788.66.0.874172491904.issue6251@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: georg.brandl -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 20:21:30 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 20 Jul 2010 18:21:30 +0000 Subject: [issue9222] IDLE: Fix open/saveas 'Files of type' choices In-Reply-To: <1278809052.13.0.969100167059.issue9222@psf.upfronthosting.co.za> Message-ID: <1279650090.47.0.82151742021.issue9222@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Tal, I agree with your comment, but I believe it applies to #4832 and should be moved there. The patch here fixes (and only fixes) an obvious bug in the filetypes list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 20:26:08 2010 From: report at bugs.python.org (Garrett Cooper) Date: Tue, 20 Jul 2010 18:26:08 +0000 Subject: [issue9311] os.access can return bogus values when run as superuser In-Reply-To: <1279591357.64.0.139129514793.issue9311@psf.upfronthosting.co.za> Message-ID: <1279650368.65.0.870818991055.issue9311@psf.upfronthosting.co.za> Garrett Cooper added the comment: Well, bash screws up in this dept: $ ls -l typescript -rw-r--r-- 1 gcooper gcooper 37875 Jul 12 22:19 typescript $ sudo sh -c 'test -x typescript; echo $?' 1 $ sudo bash -c 'test -x typescript; echo $?' 0 $ csh %if (-x typescript) then if? echo "executable" if? endif % test(1) is a built-in in bash; on FreeBSD/NetBSD(/OpenBSD?) it's a standalone app (which uses eaccess(2)). csh does some tricky code for testing file access in sh.exp.c (see sh_access). perl does some tricky stuff in pp_sys.c (look for pp_ftrread), where it uses eaccess(2) if it's present, else falls back to access(2) to do its bidding. So maybe os.access should use eaccess(2) if it's present on the OS instead of access(2), and note that the item is OS implementation dependent (beware!)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 20:31:49 2010 From: report at bugs.python.org (John J Lee) Date: Tue, 20 Jul 2010 18:31:49 +0000 Subject: [issue3704] cookielib doesn't handle URLs with / in parameters In-Reply-To: <1219856501.23.0.0473308500082.issue3704@psf.upfronthosting.co.za> Message-ID: <1279650709.89.0.62444132216.issue3704@psf.upfronthosting.co.za> John J Lee added the comment: Hmm, I never tested with Python 3, though I assume the forward-port was straightforward. The patch was created against (2.x) trunk, so indeed it should be committed there also. Deselecting 2.6 since I assume no more maintenance backports will be made to 2.6 aside from security fixes -- right? ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 20:48:28 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 20 Jul 2010 18:48:28 +0000 Subject: [issue6976] getcwd hangs and leaks mem on Solaris <= 9 in very long file name case In-Reply-To: <1253685337.93.0.462290997823.issue6976@psf.upfronthosting.co.za> Message-ID: <1279651708.02.0.790586230786.issue6976@psf.upfronthosting.co.za> Stefan Krah added the comment: This has just been fixed in issue 9185. ---------- nosy: +skrah resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> os.getcwd causes infinite loop on solaris _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 20:51:01 2010 From: report at bugs.python.org (Doug Hellmann) Date: Tue, 20 Jul 2010 18:51:01 +0000 Subject: [issue9296] json module skipkeys handling changed exception types in 2.7 In-Reply-To: <1279468136.69.0.813704540742.issue9296@psf.upfronthosting.co.za> Message-ID: <1279651861.25.0.794461168617.issue9296@psf.upfronthosting.co.za> Doug Hellmann added the comment: Ray, thanks for the patches. Antoine, I appreciate the review. I'll try to get these checked in to svn in the next day or two. I see that this ticket is tagged as related to versions 2.7, 3.1, and 3.2. Should the changes be applied to any branches other than trunk and py3k? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 20:58:59 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 20 Jul 2010 18:58:59 +0000 Subject: [issue6817] char buffer in function posix_getcwdu should not be fix length In-Reply-To: <1251860266.99.0.218849353808.issue6817@psf.upfronthosting.co.za> Message-ID: <1279652339.1.0.939968452728.issue6817@psf.upfronthosting.co.za> Stefan Krah added the comment: I'm marking this as a duplicate of issue 9246. It's better to change py3k and 2.7 in sync. The patches here will not be lost. ---------- components: +Extension Modules nosy: +skrah resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> os.getcwd() hardcodes max path len type: -> behavior versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 21:00:22 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 19:00:22 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279652422.63.0.625588228431.issue9314@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > In other words, if iadd can deal with it, why can't add? Should ['a', 'b', 'c'] + 'def' return ['a, 'b', 'c', 'd' , 'e', 'f'] or 'abcdef'? "In the face of ambiguity, refuse the temptation to guess." ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 21:00:34 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 20 Jul 2010 19:00:34 +0000 Subject: [issue9246] os.getcwd() hardcodes max path len In-Reply-To: <1279023059.26.0.245683093399.issue9246@psf.upfronthosting.co.za> Message-ID: <1279652434.39.0.114340575396.issue9246@psf.upfronthosting.co.za> Stefan Krah added the comment: Closed issue 6817 as a duplicate of this one. There are some patches in that issue. ---------- nosy: +boya _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 21:04:15 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Tue, 20 Jul 2010 19:04:15 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279652655.69.0.117040084958.issue9314@psf.upfronthosting.co.za> Dirkjan Ochtman added the comment: Sure, but: >>> a = ['a', 'b', 'c'] >>> a += 'def' >>> a ['a', 'b', 'c', 'd', 'e', 'f'] I think either way is fine (I'm probably on the side of refusing to guess), but what I don't understand is why a += b is different from a + b in this respect. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 21:04:46 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 20 Jul 2010 19:04:46 +0000 Subject: [issue6216] Raise Unicode KEEPALIVE_SIZE_LIMIT from 9 to 32? In-Reply-To: <1244246653.62.0.629764911773.issue6216@psf.upfronthosting.co.za> Message-ID: <1279652686.14.0.557058306368.issue6216@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You forgot "2) show impact on a couple of benchmarks of his choice", which is arguably the most important. ---------- versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 21:05:41 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 20 Jul 2010 19:05:41 +0000 Subject: [issue9296] json module skipkeys handling changed exception types in 2.7 In-Reply-To: <1279468136.69.0.813704540742.issue9296@psf.upfronthosting.co.za> Message-ID: <1279652741.7.0.608193200045.issue9296@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Should the changes be applied to any branches other than trunk and py3k? release31-maint. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 21:07:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 19:07:32 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279652852.25.0.266454714867.issue9314@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > I don't understand is why a += b is different from a + b > in this respect. When a is mutable, a += b updates it in-place, so there is no ambiguity: the type of a cannot change. When you do a + b, there is no reason to treat a as more deserving than b when selecting the type of the result. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 21:08:39 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 19:08:39 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279652919.46.0.131912199472.issue9314@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- type: -> feature request versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 21:11:00 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 19:11:00 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279653060.96.0.841629452053.issue9314@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Note that immutable types are consistent: >>> x = tuple('abc') >>> x += 'def' Traceback (most recent call last): File "", line 1, in TypeError: can only concatenate tuple (not "str") to tuple >>> x + 'def' Traceback (most recent call last): File "", line 1, in TypeError: can only concatenate tuple (not "str") to tuple ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 21:14:20 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Tue, 20 Jul 2010 19:14:20 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279653260.5.0.397216451361.issue9314@psf.upfronthosting.co.za> Dirkjan Ochtman added the comment: Hmm, that's pretty subtle. I guess I understand, at least. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 21:15:43 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 19:15:43 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279653343.26.0.425109250503.issue9314@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> belopolsky resolution: -> rejected stage: -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 21:34:58 2010 From: report at bugs.python.org (Michael Kopinsky) Date: Tue, 20 Jul 2010 19:34:58 +0000 Subject: [issue5817] Right-click behavior from Windows Explorer In-Reply-To: <1240447084.05.0.414854633538.issue5817@psf.upfronthosting.co.za> Message-ID: <1279654498.81.0.824274146209.issue5817@psf.upfronthosting.co.za> Michael Kopinsky added the comment: The thing that bugged me when I created the ticket is that since IDLE uses two windows for every instance, that means that if you open three files, you'll have six windows open. I was bugged by constantly switching to the wrong window, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 21:38:06 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 19:38:06 +0000 Subject: [issue9282] Bug in --listfuncs option of trace.py In-Reply-To: <1279355920.89.0.901837761289.issue9282@psf.upfronthosting.co.za> Message-ID: <1279654686.27.0.430486051653.issue9282@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This is clearly an artifact of porting to 3.x. In 2.x the code was calls = self.calledfuncs.keys() calls.sort() for filename, modulename, funcname in calls: which was translated to for filename, modulename, funcname in sorted(calls.keys()): missing the calls assignment. I am going to commit this patch. ---------- assignee: -> belopolsky nosy: +belopolsky resolution: -> accepted superseder: -> The trace module lacks unit tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 21:39:36 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 20 Jul 2010 19:39:36 +0000 Subject: [issue8927] Cannot handle complex requirement resolution In-Reply-To: <1275853060.23.0.0333552205181.issue8927@psf.upfronthosting.co.za> Message-ID: <1279654776.11.0.570588399691.issue8927@psf.upfronthosting.co.za> ?ric Araujo added the comment: Josip has written a depgraph module at the beginning of this GSoC. It is now in the main distutils2 repository. The documentation Josip wrote can be seen at http://distutils2.notmyidea.org/depgraph.html I haven?t had time to see how the module handles the problem you?re raising. Can you maybe test it? Josip, can you comment? ---------- nosy: +josip, merwok versions: +Python 2.5, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 21:41:55 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 20 Jul 2010 19:41:55 +0000 Subject: [issue8927] Handle version conflicts in dependencies In-Reply-To: <1275853060.23.0.0333552205181.issue8927@psf.upfronthosting.co.za> Message-ID: <1279654915.48.0.22608753166.issue8927@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- title: Cannot handle complex requirement resolution -> Handle version conflicts in dependencies _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 21:53:55 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 20 Jul 2010 19:53:55 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279655635.56.0.293192674033.issue9314@psf.upfronthosting.co.za> ?ric Araujo added the comment: Alexander, why the pending status? Dirkjan, do you think this is a doc bug? ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 21:54:40 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 20 Jul 2010 19:54:40 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279655680.1.0.0280918814841.issue9314@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 22:10:03 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 20:10:03 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279656603.11.0.946369765072.issue9314@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > why the pending status? To me this is a way to say "I will close this next time I look unless someone will change my mind." "pending" has a nice property that it will change to "open" once someone adds a comment. This is exactly what I wanted in this case. > do you think this is a doc bug? Interestingly, I could not find any discussion of += for lists in the docs. This maybe because "+=" is not really search friendly. In any case, a doc bug (if any) should be reported under a separate issue. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 22:12:45 2010 From: report at bugs.python.org (Tal Einat) Date: Tue, 20 Jul 2010 20:12:45 +0000 Subject: [issue9222] IDLE: Fix open/saveas 'Files of type' choices In-Reply-To: <1278809052.13.0.969100167059.issue9222@psf.upfronthosting.co.za> Message-ID: <1279656765.54.0.583932766697.issue9222@psf.upfronthosting.co.za> Tal Einat added the comment: You're right Terry, my bad, I got the issues mixed up. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 22:13:31 2010 From: report at bugs.python.org (Tal Einat) Date: Tue, 20 Jul 2010 20:13:31 +0000 Subject: [issue4832] idle filename extension In-Reply-To: <1231082162.31.0.973834672616.issue4832@psf.upfronthosting.co.za> Message-ID: <1279656811.19.0.491724574409.issue4832@psf.upfronthosting.co.za> Tal Einat added the comment: On Windows, I can't think of any common reason to want to save a file edited in IDLE without the .py extension. On the other hand, accidentally forgetting the .py extension is annoying, and users have come to expect a default extension being added by applications (e.g. MS Office). Guilherme's patch (applied manually) works fine here on Windows7. I'm +1 for committing this if it has been tested to work as expected on Linux and OSX. (minor nit-pick: could use sys.platform.startswith('win') instead of slicing) ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 22:19:38 2010 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 20 Jul 2010 20:19:38 +0000 Subject: [issue9310] Intermittent failures in test_logging In-Reply-To: <1279580083.41.0.887395400152.issue9310@psf.upfronthosting.co.za> Message-ID: <1279657178.91.0.302974561769.issue9310@psf.upfronthosting.co.za> Vinay Sajip added the comment: Whoops, sorry I missed this. Backport checked into release26-maint (r83000). ---------- assignee: -> vinay.sajip resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 22:23:42 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 20 Jul 2010 20:23:42 +0000 Subject: [issue4832] idle filename extension In-Reply-To: <1231082162.31.0.973834672616.issue4832@psf.upfronthosting.co.za> Message-ID: <1279657422.14.0.514937624445.issue4832@psf.upfronthosting.co.za> Brian Curtin added the comment: I would forget about slicing or using startswith. "win32" is the platform name for Python on Windows whether or not it's 64-bit (see PC/pyconfig.h), so I'd just check """sys.platform == 'win32'""" ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 22:28:46 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Tue, 20 Jul 2010 20:28:46 +0000 Subject: [issue9278] rename 2to3 & pydoc to 2to3.py & pydoc.py In-Reply-To: <1279316069.22.0.0186321125783.issue9278@psf.upfronthosting.co.za> Message-ID: <1279657726.48.0.868928118433.issue9278@psf.upfronthosting.co.za> Sridhar Ratnakumar added the comment: Ah, so the python.org installers do have the .py extension for these scripts. Only ActivePython doesn't. Perhaps msilib (something that we don't use) does the rename. Sorry for the confusion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 22:31:44 2010 From: report at bugs.python.org (Guilherme Polo) Date: Tue, 20 Jul 2010 20:31:44 +0000 Subject: [issue4832] idle filename extension In-Reply-To: <1231082162.31.0.973834672616.issue4832@psf.upfronthosting.co.za> Message-ID: <1279657904.56.0.54019754522.issue4832@psf.upfronthosting.co.za> Guilherme Polo added the comment: Sorry but this is just bikeshedding, whoever commits can make this change or if it had been committed without this "improvement" then anyone could adjust without needing a new issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 22:33:02 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 20:33:02 +0000 Subject: [issue9282] Bug in --listfuncs option of trace.py In-Reply-To: <1279355920.89.0.901837761289.issue9282@psf.upfronthosting.co.za> Message-ID: <1279657982.51.0.971182395661.issue9282@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed with a minor change to meet 80-character line limit. See r82997 (r82999 for 3.1). ---------- resolution: accepted -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 22:34:00 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 20 Jul 2010 20:34:00 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279658040.7.0.710655338399.issue9314@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the explanation of pending, I thought the mysterious Roundup/browser bug had changed the status in my back. Searching for __iadd__ gave me only library/collections; library/stdtypes says very little. I thought it was common to requalify a bug report into a doc bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 22:34:52 2010 From: report at bugs.python.org (METAL XXX) Date: Tue, 20 Jul 2010 20:34:52 +0000 Subject: [issue1771] Remove cmp parameter to list.sort() and builtin.sorted() In-Reply-To: <1199836926.78.0.118789346384.issue1771@psf.upfronthosting.co.za> Message-ID: <1279658092.0.0.970647763016.issue1771@psf.upfronthosting.co.za> METAL XXX added the comment: Shame on me, after a long time I realized the problem referenced in my old post (http://bugs.python.org/msg102019) was actually topological sorting. It can't be done by Python's sort(), which doesn't support partial order. Trying to use cmp parameter is completely wrong. And cmp would mislead people like me to sort a partial order, evil! Now I'm absolutely agree with gone of cmp, viva Raymond Hettinger! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 22:37:52 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 20 Jul 2010 20:37:52 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279658272.89.0.186768808514.issue9314@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > I thought it was common to requalify a bug report into a doc bug. That's upto you and OP. My rule of thumb is if the title reads as either code or doc bug, it's ok to reclassify. If not, it is better to open a separate issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 22:49:34 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Tue, 20 Jul 2010 20:49:34 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279658974.18.0.906076926242.issue9314@psf.upfronthosting.co.za> Dirkjan Ochtman added the comment: Hmm, I'm still not entirely sure that += shouldn't disallow this as well, just because of the inconsistency. I understand the reasoning now, but it feels like maybe it should be an implementation detail, and it should just be disallowed (refuse to guess). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 22:54:04 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 20 Jul 2010 20:54:04 +0000 Subject: [issue9296] json module skipkeys handling changed exception types in 2.7 In-Reply-To: <1279468136.69.0.813704540742.issue9296@psf.upfronthosting.co.za> Message-ID: <1279659244.39.0.676846889181.issue9296@psf.upfronthosting.co.za> ?ric Araujo added the comment: I believe there are no commits on trunk. Affected branches are py3k and release{27,31}-maint IIUC. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 23:03:46 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 20 Jul 2010 21:03:46 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> Message-ID: <1279659826.87.0.0279199412004.issue9141@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: I agree that this is not the _optimal_ solution, and that when you are collecting stuff, say a list of many items, it will cause X indirect calls to all of the things in the list. My counterargument is, however, that all those items will, if collected, be handed off to the final Py_DECREF with all the baggage that that entails, ultimately resulting in PyObject_Free or PyMem_Free. An extra indirect call, (only for unreachable objects, btw, which is only a small objects of all objects visited during a GC pass) should not play a significatn part in the process. An alternative to this extra tp_traverse() pass, would be to flag objects that report that they are or are not collectable, with a special value in gc_refs, probably a bitmask. But this would be a much more intrusive change in an algorithm that is far from simple, and so need very rigorous review and testing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 23:08:48 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Tue, 20 Jul 2010 21:08:48 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> Message-ID: <1279660128.73.0.64086757461.issue9141@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : Removed file: http://bugs.python.org/file17925/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 23:14:41 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 20 Jul 2010 21:14:41 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1279660481.8.0.537329505027.issue5673@psf.upfronthosting.co.za> Brian Curtin added the comment: You forgot "self." on at least lines 1042 and 1044 in Lib/subprocess.py -- multiple test failures occur on Windows 7 due to a NameError for the global stdout_thread not being defined. It seems "self." would also be needed on 1049 and 1053, but beyond adding those, the test suite seems to hang indefinitely on test_subprocess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 23:20:00 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Tue, 20 Jul 2010 21:20:00 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> Message-ID: <1279660800.16.0.804723242136.issue9141@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: Yes, I see your point. Even if more expensive than strictly necessary, the cost should be swamped by other existing costs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 20 23:23:46 2010 From: report at bugs.python.org (Reid Kleckner) Date: Tue, 20 Jul 2010 21:23:46 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1279661026.72.0.0220721454232.issue5673@psf.upfronthosting.co.za> Reid Kleckner added the comment: Uh oh, that was one of the fixes I made when I tested it on Windows. I may have failed to pick up those changes when I ported to py3k. I'll check it out tonight. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 00:14:28 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 20 Jul 2010 22:14:28 +0000 Subject: [issue6216] Raise Unicode KEEPALIVE_SIZE_LIMIT from 9 to 32? In-Reply-To: <1244246653.62.0.629764911773.issue6216@psf.upfronthosting.co.za> Message-ID: <1279664068.33.0.847582806371.issue6216@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I did not forget. I omitted because there were no benchmarks to mention. I admit that silence is sometimes difficult to interpret and that I should have said so. Do you see that incrementing the limit could have negative effects that need to be justified? Just simply the extra space ? or something else? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 00:30:04 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 20 Jul 2010 22:30:04 +0000 Subject: [issue6216] Raise Unicode KEEPALIVE_SIZE_LIMIT from 9 to 32? In-Reply-To: <1279664068.33.0.847582806371.issue6216@psf.upfronthosting.co.za> Message-ID: <1279664998.3203.3.camel@localhost.localdomain> Antoine Pitrou added the comment: > I did not forget. I omitted because there were no benchmarks to > mention. I admit that silence is sometimes difficult to interpret and > that I should have said so. Do you see that incrementing the limit > could have negative effects that need to be justified? Just simply the > extra space ? or something else? It can always have negative effects in the form of decreased cache efficiency, or more fragmentation in the memory allocator. Otherwise we could similarly bump up the size of all freelists in the interpreter (there are several of them). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 00:31:34 2010 From: report at bugs.python.org (Greg Brockman) Date: Tue, 20 Jul 2010 22:31:34 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279665094.33.0.588784901531.issue9205@psf.upfronthosting.co.za> Greg Brockman added the comment: At first glance, looks like there are a number of sites where you don't change the blocking calls to non-blocking calls (e.g. get()). Almost all of the get()s have the potential to be called when there is no possibility for them to terminate. I might recommend referring to my original termination.patch... I believe I tracked down the majority of such blocking calls. In the interest of simplicity though, I'm beginning to think that the right answer might be to just do something like termination.patch but to conditionalize crashing the pool on a pool configuration option. That way the behavior would no worse for your use case. Does that sound reasonable? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 00:58:51 2010 From: report at bugs.python.org (Tal Einat) Date: Tue, 20 Jul 2010 22:58:51 +0000 Subject: [issue5817] Right-click behavior from Windows Explorer In-Reply-To: <1240447084.05.0.414854633538.issue5817@psf.upfronthosting.co.za> Message-ID: <1279666731.79.0.935604086811.issue5817@psf.upfronthosting.co.za> Tal Einat added the comment: I'm quite sure that issue has already been addressed. Specifically r71126 made it so that running IDLE with -e always opens just an editor window. "Edit with IDLE" runs IDLE with -e. With which version of Python do you see this happening, Michael? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 01:00:34 2010 From: report at bugs.python.org (Tal Einat) Date: Tue, 20 Jul 2010 23:00:34 +0000 Subject: [issue6698] IDLE no longer opens only an edit window when configured to do so In-Reply-To: <1250200991.43.0.141209205867.issue6698@psf.upfronthosting.co.za> Message-ID: <1279666834.2.0.175144612313.issue6698@psf.upfronthosting.co.za> Tal Einat added the comment: I agree on this. Unfortunately that change in r71126 wasn't commented on or documented in any way. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 02:13:26 2010 From: report at bugs.python.org (Greg Hazel) Date: Wed, 21 Jul 2010 00:13:26 +0000 Subject: [issue7171] Add inet_ntop and inet_pton support for Windows In-Reply-To: <1255994426.45.0.89635983538.issue7171@psf.upfronthosting.co.za> Message-ID: <1279671206.37.0.460693382697.issue7171@psf.upfronthosting.co.za> Greg Hazel added the comment: In addition, inet_ntop and inet_pton can be implemented on Windows platforms prior to Vista using WSAAddressToStringA and WSAStringToAddressA. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 02:21:43 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 21 Jul 2010 00:21:43 +0000 Subject: [issue9312] Fix usage of :option: markup in stdlib ReST docs In-Reply-To: <1279599587.56.0.337150515932.issue9312@psf.upfronthosting.co.za> Message-ID: <1279671703.76.0.384075526022.issue9312@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 02:42:47 2010 From: report at bugs.python.org (Ryan Kelly) Date: Wed, 21 Jul 2010 00:42:47 +0000 Subject: [issue9316] typos in zipimport docstrings In-Reply-To: <1279672967.55.0.52374479726.issue9316@psf.upfronthosting.co.za> Message-ID: <1279672967.55.0.52374479726.issue9316@psf.upfronthosting.co.za> New submission from Ryan Kelly : zipimporter methods is_package, get_code and get_source have in the their docstring "Raise ZipImportError is the module couldn't be found". The attached patch fixes the typo to "if the module couldn't be found". ---------- files: zipimport_docstring_typo.patch keywords: patch messages: 110983 nosy: rfk priority: normal severity: normal status: open title: typos in zipimport docstrings Added file: http://bugs.python.org/file18095/zipimport_docstring_typo.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 03:16:35 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 21 Jul 2010 01:16:35 +0000 Subject: [issue3704] cookielib doesn't handle URLs with / in parameters In-Reply-To: <1219856501.23.0.0473308500082.issue3704@psf.upfronthosting.co.za> Message-ID: <1279674995.0.0.26874795085.issue3704@psf.upfronthosting.co.za> R. David Murray added the comment: Until 2.6.6 is released bug fixes can still be backported to 2.6 but it is at the committer's option. Most likely this one won't be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 03:19:20 2010 From: report at bugs.python.org (Michael Kopinsky) Date: Wed, 21 Jul 2010 01:19:20 +0000 Subject: [issue5817] Right-click behavior from Windows Explorer In-Reply-To: <1240447084.05.0.414854633538.issue5817@psf.upfronthosting.co.za> Message-ID: <1279675160.04.0.138378009544.issue5817@psf.upfronthosting.co.za> Michael Kopinsky added the comment: I haven't really done any active Python development in a while. When I reported this back in April 2009 I was presumably using whatever was current then (2.6.x, I guess), but haven't tested it since. If you tell me that in newer versions it is corrected, I will be happy to have this marked as resolved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 03:27:15 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 21 Jul 2010 01:27:15 +0000 Subject: [issue9311] os.access can return bogus values when run as superuser In-Reply-To: <1279591357.64.0.139129514793.issue9311@psf.upfronthosting.co.za> Message-ID: <1279675635.54.0.862141964962.issue9311@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. The document you quoted said that eaccess doesn't necessarily get this right everywhere either, but it sounds like it would at least fix the problem on FreeBSD...but at the price of no longer being a simple wrapper around access. I'm not sure what I think about that. This may be a question for python-dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 03:32:30 2010 From: report at bugs.python.org (Garrett Cooper) Date: Wed, 21 Jul 2010 01:32:30 +0000 Subject: [issue9311] os.access can return bogus values when run as superuser In-Reply-To: <1279591357.64.0.139129514793.issue9311@psf.upfronthosting.co.za> Message-ID: <1279675950.72.0.313405662157.issue9311@psf.upfronthosting.co.za> Garrett Cooper added the comment: My initial analysis was incorrect after talking with the bash(1) folks. test(1) is doing things wrong too: case FILEX: /* XXX work around eaccess(2) false positives for superuser */ if (eaccess(nm, X_OK) != 0) return 0; if (S_ISDIR(s.st_mode) || geteuid() != 0) return 1; return (s.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) != 0; So it looks like test(1) is broken as well (doesn't check for ACLs, or MAC info). Interesting why it's only implemented for X_OK though... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 03:32:54 2010 From: report at bugs.python.org (Garrett Cooper) Date: Wed, 21 Jul 2010 01:32:54 +0000 Subject: [issue9311] os.access can return bogus values when run as superuser In-Reply-To: <1279591357.64.0.139129514793.issue9311@psf.upfronthosting.co.za> Message-ID: <1279675974.53.0.481257235019.issue9311@psf.upfronthosting.co.za> Garrett Cooper added the comment: My initial analysis was incorrect after talking with the bash(1) folks. test(1) is doing things wrong too: case FILEX: /* XXX work around eaccess(2) false positives for superuser */ if (eaccess(nm, X_OK) != 0) return 0; if (S_ISDIR(s.st_mode) || geteuid() != 0) return 1; return (s.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) != 0; So it looks like test(1) is broken as well (doesn't check for ACLs, or MAC info). Interesting why it's only implemented for X_OK though... Based on this analysis, I'd say that access(2) is broken on FreeBSD and needs to be fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 03:49:23 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 21 Jul 2010 01:49:23 +0000 Subject: [issue9316] typos in zipimport docstrings In-Reply-To: <1279672967.55.0.52374479726.issue9316@psf.upfronthosting.co.za> Message-ID: <1279676963.48.0.511231198014.issue9316@psf.upfronthosting.co.za> Brian Curtin added the comment: Thanks for the patch. Fixed in r83007 through r83010. ---------- assignee: -> brian.curtin components: +Documentation, Extension Modules nosy: +brian.curtin resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 03:54:25 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 01:54:25 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> Message-ID: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : I am running the following command $ python -m trace -C pickle-trace.d -c -m Lib/test/test_pickle.py and getting attached file, pickle.cover, in the pickle-trace.d directory. This does not look right. From the very beginning, module level statements are marked as not executed: >>>>>> __version__ = "$Revision: 82937 $" # Code version >>>>>> from types import FunctionType, BuiltinFunctionType >>>>>> from copyreg import dispatch_table >>>>>> from copyreg import _extension_registry, _inverted_registry, _extension_cache >>>>>> import marshal >>>>>> import sys The method I was interested in, _instantiate, shows as if it was never executed even though if I add a failing assert, I do see test failure. I suspect that this may have something to do with the import trickery that test_pickle does to test with and without _pickle. ---------- components: Library (Lib) files: pickle.cover messages: 110990 nosy: belopolsky priority: normal severity: normal stage: unit test needed status: open title: Incorrect coverage file from trace test_pickle.py type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file18096/pickle.cover _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 03:56:39 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 01:56:39 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> Message-ID: <1279677399.67.0.69079198781.issue9317@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +eli.bendersky, tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 04:13:26 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 21 Jul 2010 02:13:26 +0000 Subject: [issue1675] Race condition in os.makedirs In-Reply-To: <1198180171.38.0.482360233935.issue1675@psf.upfronthosting.co.za> Message-ID: <1279678406.68.0.320055511615.issue1675@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> duplicate status: open -> closed superseder: -> os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 04:32:13 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 21 Jul 2010 02:32:13 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279679533.33.0.762613693552.issue9299@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Discussion has continued on pydev thread "mkdir -p in python". Some suggested a new function. Others questioned the details of the new behavior. Guido prefers the flag approach and imitation of mkdir -p. "-1 on a new function (despite the constant-argument guideline) and +1 on a flag. If it weren't for backwards compatibility I'd just change os.makedirs() to act like mkdir -p period, but the last opportunity we had for that was Python 3.0." So, the patch should either leave behavior untouched or imitate -p behavior. That to me says that the parameter passed to mkdirs should be propagated to each mkdir call, as the 9299 patch does, and not set to a fixed value. OS imports mkdir for one of posix, nt, os2, or ce modules. Since these do not have private '_xx' names and might be imported directly, I think the C-coded mkdir should have the parameter too, as the 9299 patch already does. The patch changes posixmodule.c. Are all of posix, nt, os2, and ce created from the one file, or is does the patch need to change other C files? The patch simply augments the very skimpy docstring with "[, exist_ok=False]". Please add something after "Create a directory." like "If exist_ok is False, raise BlahError if the path already exists." Many doc strings are so terse as to be barely usable, but this is not a requirement. See help(compile) for one that is complete. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 04:37:06 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 21 Jul 2010 02:37:06 +0000 Subject: [issue1675] Race condition in os.makedirs In-Reply-To: <1198180171.38.0.482360233935.issue1675@psf.upfronthosting.co.za> Message-ID: <1279679826.52.0.272825512963.issue1675@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Isaac, thank you for the report and patch. With more attention, this might have been tweaked and applied a couple of years ago. We are trying to get better at timely responses. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 04:41:11 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 21 Jul 2010 02:41:11 +0000 Subject: [issue1253] IDLE - Percolator overhaul In-Reply-To: <1191982624.13.0.198270020748.issue1253@psf.upfronthosting.co.za> Message-ID: <1279680071.43.0.966130292266.issue1253@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- nosy: +tjreedy -gvanrossum versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 04:42:34 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 21 Jul 2010 02:42:34 +0000 Subject: [issue5572] distutils ignores the LIBS configure env var In-Reply-To: <1238095013.07.0.627782689433.issue5572@psf.upfronthosting.co.za> Message-ID: <1279680154.76.0.281203129007.issue5572@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 04:47:43 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 21 Jul 2010 02:47:43 +0000 Subject: [issue5804] Add an 'offset' argument to zlib.decompress In-Reply-To: <1240307503.01.0.128578916914.issue5804@psf.upfronthosting.co.za> Message-ID: <1279680463.79.0.118631454989.issue5804@psf.upfronthosting.co.za> Mark Lawrence added the comment: This has been reviewed see msg87550, can we get this into 3.2? ---------- nosy: +BreamoreBoy stage: patch review -> commit review versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 04:59:07 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 21 Jul 2010 02:59:07 +0000 Subject: [issue5117] os.path.relpath problem with root directory In-Reply-To: <1233386752.72.0.952122419494.issue5117@psf.upfronthosting.co.za> Message-ID: <1279681147.4.0.388059140756.issue5117@psf.upfronthosting.co.za> Mark Lawrence added the comment: msg90061 refers to #5799 which is closed, fixed. Will the attached patch need reworking as a result of the #5799 change? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 05:05:00 2010 From: report at bugs.python.org (Ray.Allen) Date: Wed, 21 Jul 2010 03:05:00 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279681500.1.0.576567273161.issue9299@psf.upfronthosting.co.za> Ray.Allen added the comment: Thanks for conclusion! I'll try to check and improve my patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 05:25:00 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 03:25:00 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> Message-ID: <1279682700.82.0.390126983452.issue9317@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Does the trace module even work in 3.x? I created attached trivial traceme.py file. With python 2.7, I get $ python2 -m trace -c -s traceme.py lines cov% module (path) 1 100% threading (Lib/threading.py) 6 100% traceme (traceme.py) The first entry is clearly spurious, but traceme looks right. With py3k, however, I get $ python3 -m trace -c -s traceme.py lines cov% module (path) 1 100% threading (Lib/threading.py) No traceme line at all. ---------- Added file: http://bugs.python.org/file18097/traceme.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 05:27:10 2010 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 21 Jul 2010 03:27:10 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> Message-ID: <1279682830.18.0.26027799009.issue9317@psf.upfronthosting.co.za> Eli Bendersky added the comment: Even the following simple test file: ---------------------- import pickle data = {'a' : [1, 2, 3], 'b': 5} ps = pickle.dumps(data) newdata = pickle.loads(ps) print(newdata) ---------------------- When traced generates an empty trace file for the pickle module, so it's not test_pickle trickery, but rather something to do with the pickle module itself. Will investigate this further. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 05:28:29 2010 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 21 Jul 2010 03:28:29 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> Message-ID: <1279682909.59.0.759844756236.issue9317@psf.upfronthosting.co.za> Eli Bendersky added the comment: I didn't hit refresh before posting so didn't see your message, Alexander. The problem indeed seems to be deeper. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 05:31:10 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 21 Jul 2010 03:31:10 +0000 Subject: [issue5752] xml.dom.minidom does not escape CR, LF and TAB characters within attribute values In-Reply-To: <1239707588.77.0.33795755364.issue5752@psf.upfronthosting.co.za> Message-ID: <1279683070.78.0.671997324942.issue5752@psf.upfronthosting.co.za> Mark Lawrence added the comment: Patched test_minidom and ran it test failed. Went to patch minidom.py and it appears up to date, so no idea why the test failed, can someone please take a look as it's 04:30 BST, thanks. ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 05:32:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 03:32:32 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279682909.59.0.759844756236.issue9317@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Tue, Jul 20, 2010 at 11:28 PM, Eli Bendersky wrote: > The problem indeed seems to be deeper. > .. or shallower. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 05:55:17 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 03:55:17 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> Message-ID: <1279684517.72.0.339180822414.issue9317@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Here is another problem: with no file x in cwd, $ ./python.exe -m trace -c -f x traceme.py Skipping counts file 'x': [Errno 2] No such file or directory: 'x' This one seems to exist in both 2.7 and 3.x. Creating empty counts file helps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 06:00:25 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 04:00:25 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> Message-ID: <1279684825.87.0.489861568548.issue9317@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Comparison of count files produced by 2.7 and 3.x suggests that the problem is in finding the source file for the module: >>> pickle.load(open('x', 'rb')) ({('', 2): 2, ('', 1): 4, ('', 8): 20, .. >>> pickle.load(open('y', 'rb')) ({('traceme.py', 1): 2, ('traceme.py', 2): 2, ('', 1): 2, ('traceme.py', 8): 20, .. In the above, x was produced by 3.x and y by 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 06:13:23 2010 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 21 Jul 2010 04:13:23 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> Message-ID: <1279685603.48.0.352825379998.issue9317@psf.upfronthosting.co.za> Eli Bendersky added the comment: trace.py uses settrace to do its heavy lifting. In the "local trace" function for counting, localtrace_count: def localtrace_count(self, frame, why, arg): if why == "line": filename = frame.f_code.co_filename lineno = frame.f_lineno key = filename, lineno self.counts[key] = self.counts.get(key, 0) + 1 return self.localtrace The line "filename = frame.f_code.co_filename" seems to work as expected in 2.x for the current file, returning its name. In 3.x it returns '' for the current file. This causes the trace module to filter out the results for the current file (traceme.py in Alexander's example). I'm investigating further, but this may very well be caused by different behavior of `f_code.co_filename` between Python 2 and 3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 06:22:46 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 04:22:46 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279685603.48.0.352825379998.issue9317@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Wed, Jul 21, 2010 at 12:13 AM, Eli Bendersky wrote: .. > I'm investigating further, but this may very well be caused by different behavior > of `f_code.co_filename` between Python 2 and 3. I am afraid I am a step ahead of you. The culprit is t.run('exec(%r)' % (script,)) line in 3.x instead of t.run('execfile(%r)' % (progname,)) in 2.x ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 06:23:50 2010 From: report at bugs.python.org (Ray.Allen) Date: Wed, 21 Jul 2010 04:23:50 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279686230.13.0.205475276872.issue9299@psf.upfronthosting.co.za> Ray.Allen added the comment: I update my patch with improved doc string of posix_mkdir. By the way, after I search in the source, I could not find the "nt", "os2", "ce" modules, I guess these modules only exist in python source at one time, maybe very earlier releases, but not now. ---------- Added file: http://bugs.python.org/file18098/mkdir_py3k_updated.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 06:44:01 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 04:44:01 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> Message-ID: <1279687441.73.0.546950933086.issue9317@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a proof-of-concept patch, issue9317.diff, which fixes the file name problem at the expense of more spurious modules: $ ./python.exe -m trace -c -s traceme.py lines cov% module (path) 7 100% codecs (Lib/codecs.py) 10 100% locale (Lib/locale.py) 4 100% pkgutil (Lib/pkgutil.py) 58 100% runpy (Lib/runpy.py) 6 100% traceme (traceme.py) ---------- keywords: +patch Added file: http://bugs.python.org/file18099/issue9317.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 07:49:07 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 21 Jul 2010 05:49:07 +0000 Subject: [issue9318] Py3k compilation on old MSVC In-Reply-To: <1279691347.62.0.710756316078.issue9318@psf.upfronthosting.co.za> Message-ID: <1279691347.62.0.710756316078.issue9318@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : Hello. Attached patch is needed to compile on MSVC6. I'm appriciated if this patch is accepted. ---------- components: Build files: py3k_compile_on_old_compiler.patch keywords: patch messages: 111007 nosy: ocean-city priority: normal severity: normal stage: patch review status: open title: Py3k compilation on old MSVC versions: Python 3.1, Python 3.2 Added file: http://bugs.python.org/file18100/py3k_compile_on_old_compiler.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 08:09:38 2010 From: report at bugs.python.org (Ray.Allen) Date: Wed, 21 Jul 2010 06:09:38 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279692578.11.0.528380218473.issue9314@psf.upfronthosting.co.za> Ray.Allen added the comment: Alexander: > When a is mutable, a += b updates it in-place, so there is no ambiguity: the type of a cannot change. When you do a + b, there is no reason to treat a as more deserving than b when selecting the type of the result Does this means "a += b" is not the same as "a = a + b"? I'd think this can be seen as a pitfall for python. ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 08:29:25 2010 From: report at bugs.python.org (Ron Adam) Date: Wed, 21 Jul 2010 06:29:25 +0000 Subject: [issue9319] segfault when searching modules with help() In-Reply-To: <1279693765.46.0.777254335316.issue9319@psf.upfronthosting.co.za> Message-ID: <1279693765.46.0.777254335316.issue9319@psf.upfronthosting.co.za> New submission from Ron Adam : help('modules spam') causes segfault. When pydoc tries goes though the files it does the following in the ModuleScanner class. (minimal example) >>> for importer, modname, ispkg in pkgutil.walk_packages(): ... if modname == 'test.badsyntax_pep3120': ... loader = importer.find_module(modname) ... Segmentation fault Adding: if modname=='test.badsyntax_pep3120': continue At the top of the for loop will suppress the segfault in pydoc by skipping that file. A bit further probing narrowed it down to this... >>> loader = pkgutil.get_loader('test.badsyntax_pep3120') Segmentation fault I'm not familiar with the pkgutil module so I didn't go further. ---------- components: Library (Lib) messages: 111009 nosy: ron_adam priority: normal severity: normal status: open title: segfault when searching modules with help() type: crash versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 08:30:14 2010 From: report at bugs.python.org (Tal Einat) Date: Wed, 21 Jul 2010 06:30:14 +0000 Subject: [issue5817] Right-click behavior from Windows Explorer In-Reply-To: <1240447084.05.0.414854633538.issue5817@psf.upfronthosting.co.za> Message-ID: <1279693814.36.0.709310371304.issue5817@psf.upfronthosting.co.za> Tal Einat added the comment: That makes sense. I think this issue can be closed. For future reference, the original feature request has a benefit beyond not having a shell window open for every editor window. Opening different files in the same instance of IDLE allows running them in the same shell easily via "Run Module". However, IMO this would be much too small a benefit compared to the effort required to achieve it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 08:38:35 2010 From: report at bugs.python.org (Michael Kopinsky) Date: Wed, 21 Jul 2010 06:38:35 +0000 Subject: [issue5817] Right-click behavior from Windows Explorer In-Reply-To: <1240447084.05.0.414854633538.issue5817@psf.upfronthosting.co.za> Message-ID: <1279694315.19.0.775296438174.issue5817@psf.upfronthosting.co.za> Changes by Michael Kopinsky : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 08:41:33 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 21 Jul 2010 06:41:33 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279694493.23.0.797465243922.issue9299@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On windows, I can only import nt, not posix, ce, os2. >>> import posix Traceback (most recent call last): File "", line 1, in import posix ImportError: No module named posix >>> import nt >>> dir(nt) ['F_OK', 'O_APPEND', 'O_BINARY', 'O_CREAT', 'O_EXCL', 'O_NOINHERIT', 'O_RANDOM', 'O_RDONLY', 'O_RDWR', 'O_SEQUENTIAL', 'O_SHORT_LIVED', 'O_TEMPORARY', 'O_TEXT', 'O_TRUNC', 'O_WRONLY', 'P_DETACH', 'P_NOWAIT', 'P_NOWAITO', 'P_OVERLAY', 'P_WAIT', 'R_OK', 'TMP_MAX', 'W_OK', 'X_OK', '__doc__', '__name__', '__package__', '_exit', '_getfullpathname', 'abort', 'access', 'chdir', 'chmod', 'close', 'closerange', 'device_encoding', 'dup', 'dup2', 'environ', 'error', 'execv', 'execve', 'fstat', 'fsync', 'getcwd', 'getcwdb', 'getpid', 'isatty', 'listdir', 'lseek', 'lstat', 'mkdir', 'open', 'pipe', 'putenv', 'read', 'remove', 'rename', 'rmdir', 'spawnv', 'spawnve', 'startfile', 'stat', 'stat_float_times', 'stat_result', 'statvfs_result', 'strerror', 'system', 'times', 'umask', 'unlink', 'urandom', 'utime', 'waitpid', 'write'] I guessed there might be some trickery because I say the ifdef Windows in posixmodule.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 08:51:07 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 21 Jul 2010 06:51:07 +0000 Subject: [issue9272] CGIHTTPServer poisons os.environ In-Reply-To: <1279270191.51.0.568678636745.issue9272@psf.upfronthosting.co.za> Message-ID: <1279695067.53.0.720462910858.issue9272@psf.upfronthosting.co.za> anatoly techtonik added the comment: The test is hard to write. The server is launched in a separate thread. Any ideas how to check os.environ there? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 09:07:26 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 21 Jul 2010 07:07:26 +0000 Subject: [issue9320] os.environ is global for threads In-Reply-To: <1279696046.14.0.777932115359.issue9320@psf.upfronthosting.co.za> Message-ID: <1279696046.14.0.777932115359.issue9320@psf.upfronthosting.co.za> New submission from anatoly techtonik : Seems like os.environ is shared between multiple threads. This should be documented at least in threading chapters. ---------- assignee: docs at python components: Documentation messages: 111013 nosy: docs at python, techtonik priority: normal severity: normal status: open title: os.environ is global for threads type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 09:08:52 2010 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 21 Jul 2010 07:08:52 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279679533.33.0.762613693552.issue9299@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: On Wed, Jul 21, 2010 at 3:32 AM, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > Discussion has continued on pydev thread "mkdir -p in python". Some suggested a new function. Others questioned the details of the new behavior. Guido prefers the flag approach and imitation of mkdir -p. > > "-1 on a new function (despite the constant-argument > guideline) and +1 on a flag. If it weren't for backwards compatibility > I'd just change os.makedirs() to act like mkdir -p period, but the > last opportunity we had for that was Python 3.0." > > So, the patch should either leave behavior untouched or imitate -p behavior. That to me says that the parameter passed to mkdirs should be propagated to each mkdir call, as the 9299 patch does, and not set to a fixed value. Hm. I wonder if os.mkdir() should not be left alone (so as to continue to match the system call most exactly, as is our convention) and the extra functionality added to os.makedirs() only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 09:13:47 2010 From: report at bugs.python.org (Reid Kleckner) Date: Wed, 21 Jul 2010 07:13:47 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1279696427.85.0.108265266014.issue5673@psf.upfronthosting.co.za> Reid Kleckner added the comment: When I ported the patch I tested on trunk + Windows to py3k, I messed that stuff up. I also had to fix a bunch of str vs. bytes issues this time around. On Windows, it uses TextIOWrapper to do the encoding, and on POSIX it uses os.write, so I have to do the encoding myself. :p This patch has been tested on Windows Vista and Mac OS X 10.5. ---------- Added file: http://bugs.python.org/file18101/subprocess-timeout-py3k-v7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 09:16:37 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 21 Jul 2010 07:16:37 +0000 Subject: [issue9272] CGIHTTPServer poisons os.environ In-Reply-To: <1279270191.51.0.568678636745.issue9272@psf.upfronthosting.co.za> Message-ID: <1279696597.45.0.460162498103.issue9272@psf.upfronthosting.co.za> anatoly techtonik added the comment: Ok. os.environ seems to be shared between threads. Here is updated patch. ---------- Added file: http://bugs.python.org/file18102/9272.CGIHTTPServer-poisons-os.environ.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 09:25:35 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 07:25:35 +0000 Subject: [issue5804] Add an 'offset' argument to zlib.decompress In-Reply-To: <1240307503.01.0.128578916914.issue5804@psf.upfronthosting.co.za> Message-ID: <1279697135.69.0.222062377044.issue5804@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The function returns different kind of data depending on the value of the last parameter. I don't like it at all. Why is decompressobj not enough? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 10:00:43 2010 From: report at bugs.python.org (Ray.Allen) Date: Wed, 21 Jul 2010 08:00:43 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279699243.25.0.904583321706.issue9299@psf.upfronthosting.co.za> Ray.Allen added the comment: I found in Modules/posixmodule.c that: #if (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__)) && !defined(__QNX__) #define INITFUNC PyInit_nt #define MODNAME "nt" #elif defined(PYOS_OS2) #define INITFUNC PyInit_os2 #define MODNAME "os2" #else #define INITFUNC PyInit_posix #define MODNAME "posix" #endif I also found the "ce" module in Python Windows CE (http://pythonce.sourceforge.net/) source: Modules/posixmodule.c, seeing http://docs.python.org/py3k/using/windows.html. This means the "nt", "os2", "ce", "posix" module are all implemented in Modules/posixmodule.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 10:23:28 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 21 Jul 2010 08:23:28 +0000 Subject: [issue9272] CGIHTTPServer poisons os.environ In-Reply-To: <1279270191.51.0.568678636745.issue9272@psf.upfronthosting.co.za> Message-ID: <1279700608.44.0.281219985612.issue9272@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The patch and the tests look good. I could verify it too. I shall commit it. ---------- assignee: -> orsenthil resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 10:38:02 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 21 Jul 2010 08:38:02 +0000 Subject: [issue9321] CGIHTTPServer cleanup htbin In-Reply-To: <1279701482.44.0.871660375803.issue9321@psf.upfronthosting.co.za> Message-ID: <1279701482.44.0.871660375803.issue9321@psf.upfronthosting.co.za> New submission from anatoly techtonik : CGIHTTPServer looks for CGI files in '/htbin' directory. This never was a standard (in comparison to `cgi-bin`) and can be safely removed at least in Py3k ---------- components: Library (Lib) messages: 111020 nosy: techtonik priority: normal severity: normal status: open title: CGIHTTPServer cleanup htbin versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 10:43:37 2010 From: report at bugs.python.org (Eric Smith) Date: Wed, 21 Jul 2010 08:43:37 +0000 Subject: [issue9320] os.environ is global for threads In-Reply-To: <1279696046.14.0.777932115359.issue9320@psf.upfronthosting.co.za> Message-ID: <1279701817.32.0.0355943401106.issue9320@psf.upfronthosting.co.za> Eric Smith added the comment: I'm not sure where you'd put this. The defining characteristic of threads is that _all_ objects are shared among them. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 10:50:22 2010 From: report at bugs.python.org (Konstantin Zemlyak) Date: Wed, 21 Jul 2010 08:50:22 +0000 Subject: [issue9320] os.environ is global for threads In-Reply-To: <1279696046.14.0.777932115359.issue9320@psf.upfronthosting.co.za> Message-ID: <1279702222.06.0.0278544492412.issue9320@psf.upfronthosting.co.za> Konstantin Zemlyak added the comment: Environment variables have always been process-wide. It doesn't deserve any special mention in threads documentation. ---------- nosy: +zart _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 11:13:04 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 21 Jul 2010 09:13:04 +0000 Subject: [issue9007] CGIHTTPServer supports only Python CGI scripts In-Reply-To: <1276683142.96.0.591092806304.issue9007@psf.upfronthosting.co.za> Message-ID: <1279703584.34.0.945743514528.issue9007@psf.upfronthosting.co.za> anatoly techtonik added the comment: It was actual only for old Mac versions without popen2/popen3 calls. popenX calls were replaced with subprocess which should be available on MacOS. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 11:20:23 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 09:20:23 +0000 Subject: [issue1635741] Interpreter seems to leak references after finalization In-Reply-To: <1279633276.37.0.901881032637.issue1635741@psf.upfronthosting.co.za> Message-ID: Amaury Forgeot d'Arc added the comment: Yes, some objects are not cleaned in finalization. This is not a problem in usual cases though, when the interpreter is started only once. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 11:26:16 2010 From: report at bugs.python.org (Ask Solem) Date: Wed, 21 Jul 2010 09:26:16 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279704376.7.0.165661291099.issue9205@psf.upfronthosting.co.za> Ask Solem added the comment: >At first glance, looks like there are a number of sites where you don't >change the blocking calls to non-blocking calls (e.g. get()). Almost >all of the get()s have the potential to be called when there is no >possibility for them to terminate. > >I might recommend referring to my original termination.patch... I >believe I tracked down the majority of such blocking calls. I thought the EOF errors would take care of that, at least this has been running in production on many platforms without that happening. >In the interest of simplicity though, I'm beginning to think that the >right answer might be to just do something like termination.patch but >to conditionalize crashing the pool on a pool configuration option. >That way the behavior would no worse for your use case. Does that >sound reasonable? How would you shut down the pool then? And why is that simpler? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 11:26:47 2010 From: report at bugs.python.org (Tal Einat) Date: Wed, 21 Jul 2010 09:26:47 +0000 Subject: [issue1253] IDLE - Percolator overhaul In-Reply-To: <1191982624.13.0.198270020748.issue1253@psf.upfronthosting.co.za> Message-ID: <1279704407.08.0.429960627253.issue1253@psf.upfronthosting.co.za> Tal Einat added the comment: Note that at one point discussion of this issue was continued on the tracker page for issue1252. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 11:26:48 2010 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 21 Jul 2010 09:26:48 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> Message-ID: <1279704408.74.0.388512527067.issue9317@psf.upfronthosting.co.za> Eli Bendersky added the comment: Alexander, I propose an alternative patch (attached issue9317.2.diff). It uses: with open(progname) as fp: code = compile(fp.read(), progname, 'exec') t.run(code) Since the `run` method of Trace already accepts a code object and passes it to `exec`, I see no reason to do another `exec`. This also fixes your 'traceme' problem, without introducing new module imports: $ py3d -m trace -c -s traceme.py lines cov% module (path) 1 100% threading (/home/eliben/python_src/eliben-py3k/Lib/threading.py) 6 100% traceme (traceme.py) [47526 refs] ---------- Added file: http://bugs.python.org/file18103/issue9317.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 11:29:54 2010 From: report at bugs.python.org (Ask Solem) Date: Wed, 21 Jul 2010 09:29:54 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279704594.33.0.127150670565.issue9205@psf.upfronthosting.co.za> Ask Solem added the comment: Btw, the current problem with termination3.patch seems to be that the MainProcess somehow appears in self._pool. I have no idea how it gets there. Maybe some unrelated issue that appears when forking that late in the tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 11:32:47 2010 From: report at bugs.python.org (Tal Einat) Date: Wed, 21 Jul 2010 09:32:47 +0000 Subject: [issue1252] IDLE - patch Delegator to support callables In-Reply-To: <1191982010.97.0.724994014869.issue1252@psf.upfronthosting.co.za> Message-ID: <1279704767.55.0.749209250099.issue1252@psf.upfronthosting.co.za> Tal Einat added the comment: I'm sorry I let this die out. This should stay closed. For the time being I have given up on developing the ShellLogger extension (for the time being) so this change is not needed as far as I am concerned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 11:52:31 2010 From: report at bugs.python.org (Brett Cannon) Date: Wed, 21 Jul 2010 09:52:31 +0000 Subject: [issue7829] dis module documentation gives no indication of the dangers of bytecode inspection In-Reply-To: <1265030716.3.0.107246651396.issue7829@psf.upfronthosting.co.za> Message-ID: <1279705951.2.0.850669579991.issue7829@psf.upfronthosting.co.za> Brett Cannon added the comment: r83012 for 3.1 r83013 for 2.7 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 12:01:35 2010 From: report at bugs.python.org (Tal Einat) Date: Wed, 21 Jul 2010 10:01:35 +0000 Subject: [issue6698] IDLE no longer opens only an edit window when configured to do so In-Reply-To: <1250200991.43.0.141209205867.issue6698@psf.upfronthosting.co.za> Message-ID: <1279706495.3.0.0161092719617.issue6698@psf.upfronthosting.co.za> Tal Einat added the comment: After looking through the code and experimenting a bit, I propose the following: The "editor-on-startup" config option should be removed. Running IDLE without arguments should open a shell. If IDLE is asked to open any files for editing, it should open just editor windows. IDLE should open both a shell window and one or more editor windows only when explicitly asked to do so on the command line. If this is done, the -e option ("open an editor") would tell IDLE to open an empty editor window if no files are asked to be opened for editing. If no other arguments are given, IDLE will open just an editor window (no shell window). The -i option ("open a shell") would tell IDLE to open a shell window even if asked to open files for editing. I think this is more obvious and easier to work with. It will also make the command line argument processing code simpler. And as a bonus we remove a config option :) Thoughts? Comments? If there is agreements I will work up a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 12:08:21 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 21 Jul 2010 10:08:21 +0000 Subject: [issue9319] segfault when searching modules with help() In-Reply-To: <1279693765.46.0.777254335316.issue9319@psf.upfronthosting.co.za> Message-ID: <1279706901.69.0.594600032733.issue9319@psf.upfronthosting.co.za> Stefan Krah added the comment: Looks like tok->filename isn't set in PyTokenizer_FromFile: Index: Parser/tokenizer.c =================================================================== --- Parser/tokenizer.c (revision 82984) +++ Parser/tokenizer.c (working copy) @@ -818,6 +818,7 @@ tok->cur = tok->inp = tok->buf; tok->end = tok->buf + BUFSIZ; tok->fp = fp; + tok->filename = "XXX"; tok->prompt = ps1; tok->nextprompt = ps2; if (enc != NULL) { ---------- nosy: +pitrou, skrah priority: normal -> high resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 12:09:12 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 21 Jul 2010 10:09:12 +0000 Subject: [issue9320] os.environ is global for threads In-Reply-To: <1279701817.32.0.0355943401106.issue9320@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: On Wed, Jul 21, 2010 at 11:43 AM, Eric Smith wrote: > > I'm not sure where you'd put this. The defining characteristic of threads is that _all_ objects are shared among them. Where is this defining characteristic of threads is described? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 12:21:15 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 10:21:15 +0000 Subject: [issue8258] Multiple Python Interpreter Memory Leak In-Reply-To: <1269857293.22.0.576084159776.issue8258@psf.upfronthosting.co.za> Message-ID: <1279707675.51.0.585201481749.issue8258@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It's actually the same issue as issue1635741 ---------- nosy: +amaury.forgeotdarc resolution: -> duplicate status: open -> closed superseder: -> Interpreter seems to leak references after finalization _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 12:31:12 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 10:31:12 +0000 Subject: [issue9320] os.environ is global for threads In-Reply-To: Message-ID: Amaury Forgeot d'Arc added the comment: >> I'm not sure where you'd put this. The defining characteristic of threads is that _all_ objects are shared among them. > Where is this defining characteristic of threads is described? in http://docs.python.org/library/thread.html """...multiple threads of control sharing their global data space...""" That's how threads are understood in all programming languages. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 12:52:03 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 10:52:03 +0000 Subject: [issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked In-Reply-To: <1231803037.62.0.52390349364.issue4926@psf.upfronthosting.co.za> Message-ID: <1279709523.73.0.612859891384.issue4926@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The patch actually does 2 things: - it prevents the usage of '=' in putenv, which is is good because the putenv() system call handles this badly. - it will raise an error when unsetting a nonexistent variable. This is a change in behaviour which is not needed. (in a shell, the "unset" command will silently ignore missing variables) Also, some unit tests would be appreciated ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 13:05:20 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 21 Jul 2010 11:05:20 +0000 Subject: [issue9320] os.environ is global for threads In-Reply-To: <1279696046.14.0.777932115359.issue9320@psf.upfronthosting.co.za> Message-ID: <1279710320.97.0.38891855481.issue9320@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing in agreement with Eric/Amaury. ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 14:05:47 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 21 Jul 2010 12:05:47 +0000 Subject: [issue5689] please support lzma compression as an extension and in the tarfile module In-Reply-To: <1238861315.81.0.348941469726.issue5689@psf.upfronthosting.co.za> Message-ID: <1279713947.46.0.963890339734.issue5689@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: -> needs patch versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 14:06:36 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 21 Jul 2010 12:06:36 +0000 Subject: [issue5411] add xz compression support to distutils In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1279713996.54.0.291328937272.issue5411@psf.upfronthosting.co.za> ?ric Araujo added the comment: distutils2 uses tarfile now instead of external programs. Adding dependency on another bug. ---------- dependencies: +please support lzma compression as an extension and in the tarfile module stage: unit test needed -> needs patch versions: +Python 2.5, Python 2.6, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 14:09:37 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 21 Jul 2010 12:09:37 +0000 Subject: [issue4714] print opcode stats at the end of pybench runs In-Reply-To: <1229895457.43.0.758313096043.issue4714@psf.upfronthosting.co.za> Message-ID: <1279714177.38.0.110746336397.issue4714@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- status: open -> languishing versions: +Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 14:11:37 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 21 Jul 2010 12:11:37 +0000 Subject: [issue1492240] Socket-object convenience function: getpeercred(). Message-ID: <1279714297.76.0.66776635322.issue1492240@psf.upfronthosting.co.za> Mark Lawrence added the comment: Heiko, are you still interested given msg50314? ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 14:19:06 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 21 Jul 2010 12:19:06 +0000 Subject: [issue6331] Add unicode script info to the unicode database In-Reply-To: <1245790259.44.0.08771310344.issue6331@psf.upfronthosting.co.za> Message-ID: <1279714746.81.0.95343285957.issue6331@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could someone with unicode knowledge take this review on, given that comments have already been made and responded to? ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 14:24:39 2010 From: report at bugs.python.org (Mark Russell) Date: Wed, 21 Jul 2010 12:24:39 +0000 Subject: [issue1677872] Efficient reverse line iterator Message-ID: <1279715079.02.0.188207203834.issue1677872@psf.upfronthosting.co.za> Mark Russell added the comment: I'll do a C version of the patch (hopefully in the next week or so). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 14:36:56 2010 From: report at bugs.python.org (Doug Hellmann) Date: Wed, 21 Jul 2010 12:36:56 +0000 Subject: [issue9296] json module skipkeys handling changed exception types in 2.7 In-Reply-To: <1279468136.69.0.813704540742.issue9296@psf.upfronthosting.co.za> Message-ID: <1279715816.18.0.541507272604.issue9296@psf.upfronthosting.co.za> Doug Hellmann added the comment: Committed to py3k as r83016, release31-maint as r83017, and release27-maint as r83018. Thanks for your help, everyone. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 15:00:27 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 21 Jul 2010 13:00:27 +0000 Subject: [issue809163] Can't add files with spaces Message-ID: <1279717227.37.0.5970155169.issue809163@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report Antonio. I?m sorry noone replied before; bugs are triaged by volunteers and distutils had no dedicated maintainer in the previous years. This needs a test to make sure the bug still exists, and if confirmed a patch to fix it. I don?t have time right now but it will be done. Thanks again. ---------- assignee: -> tarek components: +Distutils2 nosy: +merwok, tarek stage: -> unit test needed versions: -Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 15:00:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 13:00:32 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279704408.74.0.388512527067.issue9317@psf.upfronthosting.co.za> Message-ID: <80B3A594-5C0A-41FF-B8D9-A644EDB327AF@gmail.com> Alexander Belopolsky added the comment: Eli, Your new patch makes perfect sense, but can you check of regular python invocation uses runpy these days. If it does, it may make sense to include it in trace at least optionally. Also, does this fix the original problem? ---------- nosy: +Alexander.Belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 15:00:37 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 21 Jul 2010 13:00:37 +0000 Subject: [issue9318] Py3k compilation on old MSVC In-Reply-To: <1279691347.62.0.710756316078.issue9318@psf.upfronthosting.co.za> Message-ID: <1279717237.3.0.221603521391.issue9318@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +brian.curtin, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 15:03:07 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 21 Jul 2010 13:03:07 +0000 Subject: [issue9319] segfault when searching modules with help() In-Reply-To: <1279693765.46.0.777254335316.issue9319@psf.upfronthosting.co.za> Message-ID: <1279717387.7.0.559329090483.issue9319@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 15:03:30 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 21 Jul 2010 13:03:30 +0000 Subject: [issue828450] sdist generates bad MANIFEST on Windows Message-ID: <1279717410.79.0.324456359266.issue828450@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report, and sorry noone replied earlier. Could you perhaps make a diff against test_sdist.py to confirm this bug? ---------- components: +Distutils2 nosy: +merwok stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 15:05:45 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 21 Jul 2010 13:05:45 +0000 Subject: [issue1052827] filelist.findall should not fail on dangling symlinks Message-ID: <1279717545.0.0.000598976371079.issue1052827@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. The steps you described need to be turned into a unit test. Can someone provide a patch against py3k?s test_sdist.py? ---------- assignee: -> tarek components: +Distutils2 nosy: +merwok stage: -> unit test needed title: filelist.findall should use os.lstat -> filelist.findall should not fail on dangling symlinks versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 15:09:41 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 21 Jul 2010 13:09:41 +0000 Subject: [issue8286] distutils: path '[...]' cannot end with '/' In-Reply-To: <1270180979.93.0.404335172952.issue8286@psf.upfronthosting.co.za> Message-ID: <1279717781.45.0.4955941488.issue8286@psf.upfronthosting.co.za> ?ric Araujo added the comment: Could you describe the steps leading to this message, preferably in the form of a unit test? It looks like a bug in your MANIFEST.in to me, but we need a test to be sure. At worst it?s a bug in distutils, at best it needs a better error message. ---------- nosy: +merwok stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 15:14:04 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 21 Jul 2010 13:14:04 +0000 Subject: [issue9321] CGIHTTPServer cleanup htbin In-Reply-To: <1279701482.44.0.871660375803.issue9321@psf.upfronthosting.co.za> Message-ID: <1279718044.67.0.699952383654.issue9321@psf.upfronthosting.co.za> R. David Murray added the comment: If it were to be removed it would have to go through the deprecation process. Does it cause any problems? If not I'd say we should just leave it. ---------- nosy: +r.david.murray type: -> feature request versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 15:15:55 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 21 Jul 2010 13:15:55 +0000 Subject: [issue6884] Impossible to include file in sdist that starts with 'build' on Win32 In-Reply-To: <1252679308.98.0.343140927716.issue6884@psf.upfronthosting.co.za> Message-ID: <1279718155.67.0.272736107232.issue6884@psf.upfronthosting.co.za> ?ric Araujo added the comment: Sorry for the lag. There are a lot of bugs and Tarek is very busy. The steps you describe need to be turned in a new test in py3k?s test_sdist. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 15:22:37 2010 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 21 Jul 2010 13:22:37 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> Message-ID: <1279718557.99.0.743035951432.issue9317@psf.upfronthosting.co.za> Eli Bendersky added the comment: <<<< Your new patch makes perfect sense, but can you check of regular python invocation uses runpy these days. If it does, it may make sense to include it in trace at least optionally. >>>> I'm not sure I understand what you mean by this. Could you please clarify? <<<< Also, does this fix the original problem? >>>> Alas, no. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 15:27:20 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 21 Jul 2010 13:27:20 +0000 Subject: [issue9319] segfault when searching modules with help() In-Reply-To: <1279693765.46.0.777254335316.issue9319@psf.upfronthosting.co.za> Message-ID: <1279718840.83.0.757792181892.issue9319@psf.upfronthosting.co.za> Stefan Krah added the comment: To be a little clearer: Since tok->filename is used as a flag in other places, I'm not sure where to set it without breaking other things. This is the location of the segfault and the following would "fix" it (using a placeholder for the name): Index: Parser/tokenizer.c =================================================================== --- Parser/tokenizer.c (revision 83019) +++ Parser/tokenizer.c (working copy) @@ -582,6 +582,8 @@ if (badchar) { /* Need to add 1 to the line number, since this line has not been counted, yet. */ + if (tok->filename == NULL) + tok->filename = ""; PyErr_Format(PyExc_SyntaxError, "Non-UTF-8 code starting with '\\x%.2x' " "in file %.200s on line %i, " ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 15:27:54 2010 From: report at bugs.python.org (Neil Muller) Date: Wed, 21 Jul 2010 13:27:54 +0000 Subject: [issue6231] ElementInclude may drop text In-Reply-To: <1244384504.27.0.561199535147.issue6231@psf.upfronthosting.co.za> Message-ID: <1279718874.11.0.635564157175.issue6231@psf.upfronthosting.co.za> Neil Muller added the comment: The bug is still present in py3k trunk, the py3k patch still applies, and, as the bug has celebrated it's first birthday, all evidence suggests no-one else cares. ---------- status: open -> languishing versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 15:36:30 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 13:36:30 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279718557.99.0.743035951432.issue9317@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Jul 21, 2010, at 9:22 AM, Eli Bendersky wrote: > > Eli Bendersky added the comment: > > <<<< > Your new patch makes perfect sense, but can you check of regular > python invocation uses runpy these days. If it does, it may make sense > to include it in trace at least optionally. >>>>> > > I'm not sure I understand what you mean by this. Could you please > clarify? > Sorry, typing on the phone. s/of/if/ in my message above. What I mean is that as far as I know, when you run a script from command line, python loads it using functions in runpy. Arguably this means that these functions should show up in coverage. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 15:45:46 2010 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 21 Jul 2010 13:45:46 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: Message-ID: Eli Bendersky added the comment: > > Sorry, typing on the phone. ?s/of/if/ in my message above. What I mean > is that as far as I know, when you run a script from command line, > python loads it using functions in runpy. ?Arguably this means that > these functions should show up in coverage. > As far as I understand, when you run: py3d -m trace -C pickle-trace.d -c -m test_pickle.py The first -m flag applies to the trace module. Python uses runpy.run_module to load it, and then passes it its arguments (-C and onwards). Since runpy.run_module actually runs /before/ trace.py, trace.py has no chance of setting its settrace hooks and trace runpy itself. Moreover, since runpy is only the machinery to execute trace.py, does it even make sense to include it in coverage? What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 15:51:34 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 21 Jul 2010 13:51:34 +0000 Subject: [issue9057] Distutils2 needs a home page In-Reply-To: <1277218686.54.0.776970165473.issue9057@psf.upfronthosting.co.za> Message-ID: <1279720294.59.0.740475591857.issue9057@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: tarek -> merwok resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 15:53:18 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 21 Jul 2010 13:53:18 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1279720398.15.0.56536659632.issue5135@psf.upfronthosting.co.za> Mark Lawrence added the comment: Changes as Guido has stated that he wants a PEP. ---------- nosy: +BreamoreBoy stage: patch review -> versions: +Python 3.3 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 16:05:08 2010 From: report at bugs.python.org (Neil Muller) Date: Wed, 21 Jul 2010 14:05:08 +0000 Subject: [issue1343] XMLGenerator: nice elements In-Reply-To: <1193492035.12.0.0580891111126.issue1343@psf.upfronthosting.co.za> Message-ID: <1279721108.53.0.950228859676.issue1343@psf.upfronthosting.co.za> Neil Muller added the comment: Updated version of the patch against current py3k svn (r83022) attached. This is a combined patch, including the previous xml.sax.saxutil changes (including the 'short_empty_elements' keyword) and the new tests. ---------- nosy: +Neil Muller Added file: http://bugs.python.org/file18104/xml_short_empty_elements_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 16:05:30 2010 From: report at bugs.python.org (Dan OD) Date: Wed, 21 Jul 2010 14:05:30 +0000 Subject: [issue9322] bdist_rpm ext_modules absolute source path fail In-Reply-To: <1279721130.09.0.919872519995.issue9322@psf.upfronthosting.co.za> Message-ID: <1279721130.09.0.919872519995.issue9322@psf.upfronthosting.co.za> New submission from Dan OD : Setting absolute paths for C source code files in setup.py breaks bdist_rpm ext_modules=[Extension('foo', [os.path.abspath('src/foo.c')])], results in bdist_rpm not including src/foo.c in the RPM, however ext_modules=[Extension('foo', ['src/foo.c'])], works just fine. ---------- assignee: tarek components: Distutils messages: 111058 nosy: indiedan, tarek priority: normal severity: normal status: open title: bdist_rpm ext_modules absolute source path fail type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 16:06:37 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 14:06:37 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: Message-ID: Alexander Belopolsky added the comment: On Wed, Jul 21, 2010 at 9:45 AM, Eli Bendersky wrote: .. > As far as I understand, when you run: > > ? ?py3d -m trace -C pickle-trace.d -c -m test_pickle.py > > The first -m flag applies to the trace module. Python uses > runpy.run_module to load it, and then passes it its arguments (-C and > onwards). > When I said "run from command line", I meant something like $ python Lib/test/test_pickle.py I am not sure if this uses runpy machinery, but I suspect it does. The trace output should not include runpy calls that load the trace module itself, but $ python -m trace Lib/test/test_pickle.py might show the runpy calls that occur when you run $ python Lib/test/test_pickle.py without tracing. BTW, too bad that '-m' is taken, but I think trace.py should grow a --run-module option so that you can trace equivalents of python -m executions: $ python -m trace --run-module test.test_pickle > Moreover, since runpy is only the machinery to execute trace.py, does > it even make sense to include it in coverage? > > What do you think? I think you should ask python-dev. :-) Note that most C/C++ coverage tools do include pre-main calls in coverage. In case of C++, a lot of things may happen before main(). Whatever the solution is, it should be unified between trace, profile, and pdb modules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 16:12:34 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 14:12:34 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> Message-ID: <1279721554.88.0.677521358232.issue9317@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Eli, At this point, I think it will be best to focus on unittests. I am adding #9315 as a dependency here and will add a comment there. I think once we have good unittest coverage the bug will become obvious. ---------- dependencies: +The trace module lacks unit tests nosy: -Alexander.Belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 16:17:00 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 14:17:00 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> Message-ID: <1279721820.14.0.272815630077.issue9317@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Also, when you get a chance, please separate the __main__ coverage bug into a separate issue and bring it up on python-dev. We should get profile guys involved and I don't want them to be distracted by trace specific issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 16:23:56 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 21 Jul 2010 14:23:56 +0000 Subject: [issue9322] bdist_rpm ext_modules absolute source path fail In-Reply-To: <1279721130.09.0.919872519995.issue9322@psf.upfronthosting.co.za> Message-ID: <1279722236.78.0.271928448582.issue9322@psf.upfronthosting.co.za> ?ric Araujo added the comment: Examples in the documentation only use relative paths, so in my opinion the bug here is the silent failure. Do absolute paths work for sdist or other bdists? ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 16:23:58 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 14:23:58 +0000 Subject: [issue5758] fileinput.hook_compressed returning bytes from gz file In-Reply-To: <1239752882.45.0.853698903963.issue5758@psf.upfronthosting.co.za> Message-ID: <1279722238.95.0.079450992712.issue5758@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: gzip.open() only implements the "rb" mode, and returns bytes. fileinput could certainly wrap it with a io.TextIOWrapper. Then the encoding issue arises. fileinput.FileInput should grow an "encoding" parameter instead of always relying on the default encoding. ---------- keywords: +easy nosy: +amaury.forgeotdarc versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 16:25:43 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 14:25:43 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1279722343.33.0.390893108889.issue9315@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am adding 2.7. It is ok to add tests to the stable series release AFAIK. Moreover, I believe the unittests should be written for 2.7 first. Since 3.x port of trace was done without the benefit of a test suite, it is likely that there are many differences in behavior that should be eliminated. (See issue9317.) Please start with fine-graned "white-box" API tests. These are easier because you don't need to set up external scripts, capture output, etc. Just create a Trace object in setUp and call its various methods in test cases. ---------- assignee: -> belopolsky components: +Tests -Library (Lib) nosy: +belopolsky stage: -> needs patch type: behavior -> feature request versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 16:28:12 2010 From: report at bugs.python.org (Dan OD) Date: Wed, 21 Jul 2010 14:28:12 +0000 Subject: [issue9322] bdist_rpm ext_modules absolute source path fail In-Reply-To: <1279721130.09.0.919872519995.issue9322@psf.upfronthosting.co.za> Message-ID: <1279722492.79.0.607318424326.issue9322@psf.upfronthosting.co.za> Dan OD added the comment: I'm still ironing out the crinkles, but this has been working for sdist build (/install) bdist_dumb unfortunately I don't have access to a Windows machine to test the other two. A non-silent warning/error would keep me happy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 16:30:33 2010 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 21 Jul 2010 14:30:33 +0000 Subject: [issue9323] trace.py bug with the main file being traced In-Reply-To: <1279722632.82.0.584454979643.issue9323@psf.upfronthosting.co.za> Message-ID: <1279722632.82.0.584454979643.issue9323@psf.upfronthosting.co.za> New submission from Eli Bendersky : [This bug was discovered by Alexander Belopolsky, during the work on Issue 9317] Bug report ********** The attached traceme.py file demonstrates the following problem: With python 2.7: $ python2 -m trace -c -s traceme.py lines cov% module (path) 1 100% threading (Lib/threading.py) 6 100% traceme (traceme.py) The first entry is clearly spurious, but traceme looks right. With py3k, however, I get $ python3 -m trace -c -s traceme.py lines cov% module (path) 1 100% threading (Lib/threading.py) No traceme line at all. Analysis ******** When trace.py actually runs the script, it uses this code in 3.x: t.run('exec(%r)' % (script,)) instead of this code in 2.x: t.run('execfile(%r)' % (progname,)) `exec` doesn't have the program name to attach to the code object created, and calls it '' by default. However, this file name is ignored by the trace module. `execfile` doesn't exist in 3.x, so an alternative approach is needed. Proposed solution ***************** Instead of t.run as displayed above, use this code: with open(progname) as fp: code = compile(fp.read(), progname, 'exec') t.run(code) The code object created by `compile` attaches the program name and is executable by t.run (because t.run actually calls `exec` which can run the result of `compile`). This solution fixes the problem: $ py3d -m trace -c -s traceme.py lines cov% module (path) 1 100% threading (/home/eliben/python_src/eliben-py3k/Lib/threading.py) 6 100% traceme (traceme.py) I'll attach a patch file that was creates vs. the latest trunk, with this fix. ---------- files: traceme.py messages: 111066 nosy: eli.bendersky priority: normal severity: normal status: open title: trace.py bug with the main file being traced type: behavior versions: Python 3.1, Python 3.2 Added file: http://bugs.python.org/file18105/traceme.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 16:32:25 2010 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 21 Jul 2010 14:32:25 +0000 Subject: [issue9323] trace.py bug with the main file being traced In-Reply-To: <1279722632.82.0.584454979643.issue9323@psf.upfronthosting.co.za> Message-ID: <1279722745.01.0.393165212373.issue9323@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- components: +Library (Lib) keywords: +patch Added file: http://bugs.python.org/file18106/issue9323.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 16:32:33 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 14:32:33 +0000 Subject: [issue6751] Default return value in ConfigParser In-Reply-To: <1250845077.86.0.224640008074.issue6751@psf.upfronthosting.co.za> Message-ID: <1279722753.82.0.0853295383259.issue6751@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The idea is fine (dict.get also has a 'default' parameter) but this patch is very incomplete: - the enhancement should be applied to the three Parsers - it needs unit tests. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 16:34:41 2010 From: report at bugs.python.org (Eli Bendersky) Date: Wed, 21 Jul 2010 14:34:41 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> Message-ID: <1279722881.68.0.106121269441.issue9317@psf.upfronthosting.co.za> Eli Bendersky added the comment: 1. I've created Issue 9323 to address the bug with __main__, with the proposed patch. 2. Agreed about the unit tests (Issue 9315). I'll try to get the basic testing framework for trace.py created over the weekend. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 16:35:21 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 14:35:21 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279692578.11.0.528380218473.issue9314@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Wed, Jul 21, 2010 at 2:09 AM, Ray.Allen wrote: .. > Does this means "a += b" is not the same as "a = a + b"? For immutable a, the two are practically the same, for mutable, they are necessarily different. This is explained in __iadd__ documentation: """ These methods are called to implement the augmented arithmetic assignments (+=, -=, *=, /=, //=, %=, **=, <<=, >>=, &=, ^=, |=). These methods should attempt to do the operation in-place (modifying self) and return the result (which could be, but does not have to be, self). If a specific method is not defined, the augmented assignment falls back to the normal methods. For instance, to execute the statement x += y, where x is an instance of a class that has an __iadd__() method, x.__iadd__(y) is called. If x is an instance of a class that does not define a __iadd__() method, x.__add__(y) and y.__radd__(x) are considered, as with the evaluation of x + y. """ http://docs.python.org/reference/datamodel.html?#object.__iadd__ > I'd think this can be seen as a pitfall for python. No. Please see PEP 203 for the rationale. http://www.python.org/dev/peps/pep-0203/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 16:35:40 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 21 Jul 2010 14:35:40 +0000 Subject: [issue1343] XMLGenerator: nice elements In-Reply-To: <1193492035.12.0.0580891111126.issue1343@psf.upfronthosting.co.za> Message-ID: <1279722940.03.0.472681538105.issue1343@psf.upfronthosting.co.za> Mark Lawrence added the comment: The patch looks clean to me, applied small edits to change it from git to svn. Changed test_sax got 7 errors on run. Changed saxutils 53 tests all passed. Can this please be committed. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 16:43:15 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 21 Jul 2010 14:43:15 +0000 Subject: [issue5120] Disabling test_ttk_guionly on mac In-Reply-To: <1233437150.39.0.445953575427.issue5120@psf.upfronthosting.co.za> Message-ID: <1279723395.6.0.0240881300312.issue5120@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is this still a problem on OS X? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 16:49:42 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 21 Jul 2010 14:49:42 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1279723782.96.0.904071352304.issue5673@psf.upfronthosting.co.za> Brian Curtin added the comment: Looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From amauryfa at gmail.com Wed Jul 21 11:20:19 2010 From: amauryfa at gmail.com (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 11:20:19 +0200 Subject: [issue1635741] Interpreter seems to leak references after finalization In-Reply-To: <1279633276.37.0.901881032637.issue1635741@psf.upfronthosting.co.za> References: <1279633276.37.0.901881032637.issue1635741@psf.upfronthosting.co.za> Message-ID: > Does the title of this issue accurately reflect the current status of the Python interpreter? Yes, some objects are not cleaned in finalization. This is not a problem in usual cases though, when the interpreter is started only once. From amauryfa at gmail.com Wed Jul 21 12:31:10 2010 From: amauryfa at gmail.com (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 12:31:10 +0200 Subject: [issue9320] os.environ is global for threads In-Reply-To: References: <1279701817.32.0.0355943401106.issue9320@psf.upfronthosting.co.za> Message-ID: >> I'm not sure where you'd put this. The defining characteristic of threads is that _all_ objects are shared among them. > Where is this defining characteristic of threads is described? in http://docs.python.org/library/thread.html """...multiple threads of control sharing their global data space...""" That's how threads are understood in all programming languages. From report at bugs.python.org Wed Jul 21 17:11:40 2010 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 21 Jul 2010 15:11:40 +0000 Subject: [issue8912] `make patchcheck` should check the whitespace of .c/.h files In-Reply-To: <1275794679.2.0.211731721822.issue8912@psf.upfronthosting.co.za> Message-ID: <1279725100.58.0.0972225985828.issue8912@psf.upfronthosting.co.za> Changes by Dave Malcolm : ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 17:12:06 2010 From: report at bugs.python.org (Ned Deily) Date: Wed, 21 Jul 2010 15:12:06 +0000 Subject: [issue6698] IDLE no longer opens only an edit window when configured to do so In-Reply-To: <1250200991.43.0.141209205867.issue6698@psf.upfronthosting.co.za> Message-ID: <1279725126.7.0.341588950221.issue6698@psf.upfronthosting.co.za> Ned Deily added the comment: Keep in mind that, on OS X, there are two ways to invoke IDLE: one, by command line in a terminal window, and, two, by launching IDLE.app (explicitly, say by double-clicking on the app icon, or implictily, say by double-clicking on a .py file where IDLE.app is the default application for that file type). With IDLE.app there is no opportunity for the user to specify command line options. I suspect that on OS X IDLE.app is used far more frequently than the command line. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 17:22:07 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 15:22:07 +0000 Subject: [issue9323] trace.py bug with the main file being traced In-Reply-To: <1279722632.82.0.584454979643.issue9323@psf.upfronthosting.co.za> Message-ID: <1279725727.83.0.635337003777.issue9323@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: [Copying msg111059 from issue9317] On Wed, Jul 21, 2010 at 9:45 AM, Eli Bendersky wrote: .. > As far as I understand, when you run: > > py3d -m trace -C pickle-trace.d -c -m test_pickle.py > > The first -m flag applies to the trace module. Python uses > runpy.run_module to load it, and then passes it its arguments (-C and > onwards). > When I said "run from command line", I meant something like $ python Lib/test/test_pickle.py I am not sure if this uses runpy machinery, but I suspect it does. The trace output should not include runpy calls that load the trace module itself, but $ python -m trace Lib/test/test_pickle.py might show the runpy calls that occur when you run $ python Lib/test/test_pickle.py without tracing. BTW, too bad that '-m' is taken, but I think trace.py should grow a --run-module option so that you can trace equivalents of python -m executions: $ python -m trace --run-module test.test_pickle > Moreover, since runpy is only the machinery to execute trace.py, does > it even make sense to include it in coverage? > > What do you think? I think you should ask python-dev. :-) Note that most C/C++ coverage tools do include pre-main calls in coverage. In case of C++, a lot of things may happen before main(). Whatever the solution is, it should be unified between trace, profile, and pdb modules. ---------- assignee: -> belopolsky nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 17:24:04 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 21 Jul 2010 15:24:04 +0000 Subject: [issue6216] Raise Unicode KEEPALIVE_SIZE_LIMIT from 9 to 32? In-Reply-To: <1279664998.3203.3.camel@localhost.localdomain> Message-ID: <4C471111.5050108@egenix.com> Marc-Andre Lemburg added the comment: I'm interested in getting this into 3.2. Thanks for bringing the issue back on my radar. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 17:27:13 2010 From: report at bugs.python.org (Tim Lesher) Date: Wed, 21 Jul 2010 15:27:13 +0000 Subject: [issue4510] ValueError for list.remove() not very helpful In-Reply-To: <1228347518.63.0.0108612017272.issue4510@psf.upfronthosting.co.za> Message-ID: <1279726033.86.0.21837802689.issue4510@psf.upfronthosting.co.za> Tim Lesher added the comment: It looks as if this has been addressed for list.index (aka issue #7252), in r76058. The same fix could be applied for list.remove. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 17:34:38 2010 From: report at bugs.python.org (Reid Kleckner) Date: Wed, 21 Jul 2010 15:34:38 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279726478.73.0.820236928907.issue9079@psf.upfronthosting.co.za> Reid Kleckner added the comment: pytime.h looks like it got pasted into the file twice. Other than that, it looks good to me and the tests pass on OS X here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 17:52:55 2010 From: report at bugs.python.org (Tim Lesher) Date: Wed, 21 Jul 2010 15:52:55 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1279727575.1.0.550143330588.issue9012@psf.upfronthosting.co.za> Tim Lesher added the comment: Added patch that replicates the change in r82035 for Visual Studio 2005 (VC8) builds. ---------- nosy: +tlesher Added file: http://bugs.python.org/file18107/add_time_to_vc8_build.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 17:58:53 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 15:58:53 +0000 Subject: [issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character In-Reply-To: <1278777009.98.0.858683944154.issue1104@psf.upfronthosting.co.za> Message-ID: Amaury Forgeot d'Arc added the comment: The patch looks correct, it's now a matter of unit tests. for example, I'd test the case where the length is around 1000.. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 18:00:57 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 21 Jul 2010 16:00:57 +0000 Subject: [issue5395] array.fromfile not checking I/O errors In-Reply-To: <1235845824.28.0.0746931050705.issue5395@psf.upfronthosting.co.za> Message-ID: <1279728057.94.0.817285616846.issue5395@psf.upfronthosting.co.za> Mark Lawrence added the comment: With the latest patch on Windows Vista against 2.7 I got 12 EOFError errors instead of IOError. ---------- nosy: +BreamoreBoy versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 18:05:29 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Wed, 21 Jul 2010 16:05:29 +0000 Subject: [issue8286] distutils: path '[...]' cannot end with '/' -- need better error message In-Reply-To: <1270180979.93.0.404335172952.issue8286@psf.upfronthosting.co.za> Message-ID: <1279728329.13.0.0346105077604.issue8286@psf.upfronthosting.co.za> Sridhar Ratnakumar added the comment: Repro steps on a Windows machine: 1. pip install --no-install django-navbar==0.2 Yes, it seems like a bug in the MANIFEST file of the django-navbar project (which is not mine) that seems to have been fixed in the subsequent 0.3 release. > at best it needs a better error message. +1 ---------- title: distutils: path '[...]' cannot end with '/' -> distutils: path '[...]' cannot end with '/' -- need better error message type: behavior -> feature request versions: +Python 3.2, Python 3.3 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 18:10:37 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 21 Jul 2010 16:10:37 +0000 Subject: [issue6975] symlinks incorrectly resolved on Linux In-Reply-To: <1253685313.69.0.648289112505.issue6975@psf.upfronthosting.co.za> Message-ID: <1279728637.44.0.658073292908.issue6975@psf.upfronthosting.co.za> Mark Lawrence added the comment: swarecki or markon, are either of you interested in following up this issue? ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 18:13:52 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 21 Jul 2010 16:13:52 +0000 Subject: [issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True In-Reply-To: <1250066038.48.0.373766477997.issue6689@psf.upfronthosting.co.za> Message-ID: <1279728832.96.0.0160410401565.issue6689@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> patch review versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 18:19:30 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 16:19:30 +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: <1279729170.95.0.776963675116.issue8293@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: issue8524 fixed a similar issue (the timeout of the initial socket was not passed to the ssl socket). Can someone test again with a recent py3k build? ---------- nosy: +amaury.forgeotdarc resolution: -> out of date superseder: -> SSL sockets do not retain the parent socket's attributes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 18:30:10 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 21 Jul 2010 16:30:10 +0000 Subject: [issue5395] array.fromfile not checking I/O errors In-Reply-To: <1235845824.28.0.0746931050705.issue5395@psf.upfronthosting.co.za> Message-ID: <1279729810.8.0.766611077469.issue5395@psf.upfronthosting.co.za> Mark Lawrence added the comment: Sorry for the noise, forgot to rebuild the code. The tests run fine 543 tests ok, except I note that all the output is repeated 6 times, I don't understand this at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 18:33:54 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 21 Jul 2010 16:33:54 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279730034.75.0.44604733643.issue9079@psf.upfronthosting.co.za> Brian Curtin added the comment: issue9079a.diff doesn't compile on Windows - timeval isn't defined. You'd have to include Winsock2.h [0]. Adding something like the following within the HAVE_FTIME block would work... #ifdef MS_WINDOWS #include #endif I don't currently have time to dig deeper into this stuff, but test_queue hangs. Running the suite without test_queue leaves 31 other failures and something hangs in the background so the test never completes. That was all done with issue9079a.diff applied, plus my winsock include. [0] http://msdn.microsoft.com/en-us/library/ms740560(VS.85).aspx ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 18:39:38 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 21 Jul 2010 16:39:38 +0000 Subject: [issue5395] array.fromfile not checking I/O errors In-Reply-To: <1235845824.28.0.0746931050705.issue5395@psf.upfronthosting.co.za> Message-ID: <1279730378.35.0.108857198046.issue5395@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Will polish the patch and commit. ---------- assignee: -> pitrou resolution: -> accepted stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 18:49:07 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 16:49:07 +0000 Subject: [issue1441530] socket read() can cause MemoryError in Windows Message-ID: <1279730947.66.0.97927311478.issue1441530@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I fail to see *why* the patch fixes the issue. You still have to allocate the big string when joining the parts. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 18:54:17 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 21 Jul 2010 16:54:17 +0000 Subject: [issue5395] array.fromfile not checking I/O errors In-Reply-To: <1235845824.28.0.0746931050705.issue5395@psf.upfronthosting.co.za> Message-ID: <1279731257.28.0.192852046707.issue5395@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've committed the new test in py3k (r83030) and 3.1 (r83033), and the full patch in 2.7 (r83031) and 2.6 (r83032). Thank you! ---------- resolution: accepted -> fixed stage: commit review -> committed/rejected status: open -> closed versions: +Python 2.6 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 18:54:45 2010 From: report at bugs.python.org (=?utf-8?q?M=C3=A1rcio_Faustino?=) Date: Wed, 21 Jul 2010 16:54:45 +0000 Subject: [issue1441530] socket read() can cause MemoryError in Windows Message-ID: <1279731285.47.0.953695617022.issue1441530@psf.upfronthosting.co.za> M?rcio Faustino added the comment: Speaking for myself, I'm not using the attached patch, I'm using the simple fix I included in my previous reply which works perfectly to avoid getting a MemoryError exception thrown. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 18:55:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 21 Jul 2010 16:55:01 +0000 Subject: [issue5395] array.fromfile not checking I/O errors In-Reply-To: <1235845824.28.0.0746931050705.issue5395@psf.upfronthosting.co.za> Message-ID: <1279731301.75.0.425531559431.issue5395@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Regarding: > The tests run fine 543 tests ok, except I note that all the output is > repeated 6 times, I don't understand this at all. This is normal, all array tests are run once per array type, and 6 different array types are being tested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 18:59:18 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 16:59:18 +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: <1279731558.11.0.324049670698.issue8343@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: A small but useful addition, patch looks OK to me ---------- nosy: +amaury.forgeotdarc resolution: -> accepted versions: +Python 3.2 -Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 19:23:50 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 21 Jul 2010 17:23:50 +0000 Subject: [issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True In-Reply-To: <1250066038.48.0.373766477997.issue6689@psf.upfronthosting.co.za> Message-ID: <1279733030.49.0.0874523159364.issue6689@psf.upfronthosting.co.za> Stefan Krah added the comment: This is a request for changing the current behavior on Unix, and I doubt this is going to happen, since it could break existing code. On a side note, there are already two ways get the desired output: >>> Popen("gcc --version", shell=True) gcc (GCC) 4.1.3 20080623 (prerelease) (Ubuntu 4.1.2-23ubuntu3) ... >>> p = Popen(["gcc", "--version"], stdout=PIPE) >>> p.stdout.read() b'gcc (GCC) 4.1.3 20080623 (prerelease) ... ---------- nosy: +skrah resolution: -> rejected stage: patch review -> committed/rejected status: open -> pending type: behavior -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 19:24:19 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 17:24:19 +0000 Subject: [issue8035] urllib.request.urlretrieve hangs In-Reply-To: <1267470113.93.0.44679631442.issue8035@psf.upfronthosting.co.za> Message-ID: <1279733059.81.0.726183027724.issue8035@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This URL does not seem to return a 302 code. Is there another example? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 19:52:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 17:52:32 +0000 Subject: [issue9323] trace.py bug with the main file being traced In-Reply-To: <1279722632.82.0.584454979643.issue9323@psf.upfronthosting.co.za> Message-ID: <1279734752.53.0.666755910884.issue9323@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed with a minor change. (There is no need to keep the source file open during the trace run.) See r83035 (r83037 in release31-maint.) I will open a separate issue to discuss a possible RFE related to msg111074. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 19:55:35 2010 From: report at bugs.python.org (David Fraser) Date: Wed, 21 Jul 2010 17:55:35 +0000 Subject: [issue7980] time.strptime not thread safe In-Reply-To: <1266835598.13.0.361031999331.issue7980@psf.upfronthosting.co.za> Message-ID: <1279734935.74.0.236242112195.issue7980@psf.upfronthosting.co.za> Changes by David Fraser : ---------- nosy: +davidfraser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 20:09:35 2010 From: report at bugs.python.org (David Fraser) Date: Wed, 21 Jul 2010 18:09:35 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1279735775.21.0.14314379858.issue7989@psf.upfronthosting.co.za> Changes by David Fraser : ---------- nosy: +davidfraser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 20:10:47 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 18:10:47 +0000 Subject: [issue9314] inconsistent result when concatenating list with iterators In-Reply-To: <1279625321.9.0.516167517772.issue9314@psf.upfronthosting.co.za> Message-ID: <1279735847.96.0.0715540916414.issue9314@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 20:21:37 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 18:21:37 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279736497.52.0.897056483231.issue9079@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Interesting. As far as I can tell, struct timeval should not be used unless HAVE_GETTIMEOFDAY is defined: +#ifdef HAVE_GETTIMEOFDAY +typedef struct timeval _PyTime_timeval; +#else +typedef struct { + time_t tv_sec; /* seconds since Jan. 1, 1970 */ + long tv_usec; /* and microseconds */ +} _PyTime_timeval; +#endif Brian, where do you get undefined symbol error? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 20:25:33 2010 From: report at bugs.python.org (Reid Kleckner) Date: Wed, 21 Jul 2010 18:25:33 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279736733.76.0.569237117541.issue9079@psf.upfronthosting.co.za> Reid Kleckner added the comment: I think you used 'struct timeval *' in the function definition instead of '_PyTimeVal *'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 20:26:38 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 18:26:38 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1279736798.66.0.762278745141.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Is anyone interested in giving this a final review? I would like to check this in unless someone objects or needs time to review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 20:28:57 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 21 Jul 2010 18:28:57 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279736937.28.0.753716382813.issue9079@psf.upfronthosting.co.za> Brian Curtin added the comment: Here are the errors I get: Error 104 error C2037: left of 'tv_sec' specifies undefined struct/union 'timeval' c:\python-dev\py3k\Python\pytime.c 46 pythoncore Error 105 error C2037: left of 'tv_usec' specifies undefined struct/union 'timeval' c:\python-dev\py3k\Python\pytime.c 47 pythoncore ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 20:34:33 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 18:34:33 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279737273.98.0.142164835115.issue9079@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I think Reid nailed the issue. Fix is coming. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 20:35:36 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 21 Jul 2010 18:35:36 +0000 Subject: [issue9320] os.environ is global for threads In-Reply-To: <1279696046.14.0.777932115359.issue9320@psf.upfronthosting.co.za> Message-ID: <1279737336.45.0.0312948171373.issue9320@psf.upfronthosting.co.za> anatoly techtonik added the comment: > in http://docs.python.org/library/thread.html > """...multiple threads of control sharing their global data space...""" > > That's how threads are understood in all programming languages. Do you mean this one? """This module provides low-level primitives for working with multiple threads (also called light-weight processes or tasks) ? multiple threads of control sharing their global data space.""" It is surely confusing and doesn't explain anything to people who never worked with threads (like me). It should either be split in two sentences or simplified. http://en.wikipedia.org/wiki/Thread_(computer_science) says that threads can share resources, but not necessarily do so. ---------- status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 20:38:20 2010 From: report at bugs.python.org (Tal Einat) Date: Wed, 21 Jul 2010 18:38:20 +0000 Subject: [issue6698] IDLE no longer opens only an edit window when configured to do so In-Reply-To: <1250200991.43.0.141209205867.issue6698@psf.upfronthosting.co.za> Message-ID: <1279737500.51.0.794378195646.issue6698@psf.upfronthosting.co.za> Tal Einat added the comment: My question is, when IDLE is run without arguments (as is the case for IDLE.app), what is the benefit opening an empty editor window as opposed to a shell window? In both cases if you just want to edit a file you must open it via the menus (e.g. File->Open or File->Recent Files), and an unused window is left open. On the other hand, if you do want a shell, having an empty editor window is useless. Therefore I think in this case it is always better to open a shell window. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 20:38:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 18:38:32 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279737512.75.0.323093819207.issue9079@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: issue9079b.diff should fix the Windows issue. ---------- Added file: http://bugs.python.org/file18108/issue9079b.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 20:47:16 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 18:47:16 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1279738036.7.0.832378979861.issue9012@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: What about PC/VS7.1/pythoncore.vcproj? Is there some automation in place to keep the project files in sync? ISTM, all the info to generate these should be in setup.py. The patch looks good, but I am hesitant to commit changes that I cannot test. ---------- components: +Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 20:50:57 2010 From: report at bugs.python.org (Dave Fugate) Date: Wed, 21 Jul 2010 18:50:57 +0000 Subject: [issue9324] signal.signal(bogus_signal, handler) segfaults on Windows In-Reply-To: <1279738256.92.0.653078709511.issue9324@psf.upfronthosting.co.za> Message-ID: <1279738256.92.0.653078709511.issue9324@psf.upfronthosting.co.za> New submission from Dave Fugate : Using Python 2.7 (r27:82525, Jul 4 2010, 09:01:59; 32-bit Intel) on 64-bit Windows Server 2008 R2, python.exe (interactive sessions and files) crashes when it encounters the following snippet: >>> import signal >>> signal.signal(7, lambda a, b: None) Note that Python doesn't crash if I substitute '7' with a valid Windows signal (e.g., '2'). Also, it seems that at least some invalid signal inputs (e.g., '0') generate the appropriate Python exception. ---------- files: cpy_crash.jpg messages: 111104 nosy: midnightdf priority: normal severity: normal status: open title: signal.signal(bogus_signal, handler) segfaults on Windows type: crash versions: Python 2.7 Added file: http://bugs.python.org/file18109/cpy_crash.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 20:51:20 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 21 Jul 2010 18:51:20 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1279738280.18.0.196874024187.issue9079@psf.upfronthosting.co.za> Brian Curtin added the comment: I won't have time to review this, but I can say issue9079b.diff works fine on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 20:57:51 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 21 Jul 2010 18:57:51 +0000 Subject: [issue9324] signal.signal(bogus_signal, handler) segfaults on Windows In-Reply-To: <1279738256.92.0.653078709511.issue9324@psf.upfronthosting.co.za> Message-ID: <1279738671.52.0.508974974704.issue9324@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- components: +Extension Modules, Windows nosy: +brian.curtin stage: -> unit test needed versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 21:08:54 2010 From: report at bugs.python.org (Tim Lesher) Date: Wed, 21 Jul 2010 19:08:54 +0000 Subject: [issue4510] ValueError for list.remove() not very helpful In-Reply-To: <1228347518.63.0.0108612017272.issue4510@psf.upfronthosting.co.za> Message-ID: <1279739334.09.0.211268647202.issue4510@psf.upfronthosting.co.za> Tim Lesher added the comment: This patch combines the fix from Georg Brandl's original patch with the fix made to listindex. The r76058 fix fails the test in Georg's original test where the repr of the item to be removed itself raises; this patch handles that case for both list.remove and list.index. ---------- Added file: http://bugs.python.org/file18110/improve_list_remove_error.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 21:39:25 2010 From: report at bugs.python.org (Tim Lesher) Date: Wed, 21 Jul 2010 19:39:25 +0000 Subject: [issue9324] signal.signal(bogus_signal, handler) segfaults on Windows In-Reply-To: <1279738256.92.0.653078709511.issue9324@psf.upfronthosting.co.za> Message-ID: <1279741165.39.0.598281687896.issue9324@psf.upfronthosting.co.za> Tim Lesher added the comment: This appears to run afoul of Microsoft's "security-enhanced CRT", which aborts a program that calls certain API functions (including signal) with invalid parameters. PyOS_getsig() has conditionally-compiled code added to deal with this (and handle invalid signal values before passing them to the CRT); PyOS_setsig() should get the same treatment. ---------- nosy: +tlesher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 21:55:55 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Wed, 21 Jul 2010 19:55:55 +0000 Subject: [issue8035] urllib.request.urlretrieve hangs In-Reply-To: <1279733059.81.0.726183027724.issue8035@psf.upfronthosting.co.za> Message-ID: Charles-Francois Natali added the comment: 2010/7/21 Amaury Forgeot d'Arc > > Amaury Forgeot d'Arc added the comment: > > This URL does not seem to return a 302 code. Is there another example? There are probably many of them, but a simple way to reproduce it could be to use netcat on your machine and have it send back: HTTP/1.1 302 Found Location: http://www.wikipedia.org/index.php This should do the trick. > > ---------- > nosy: +amaury.forgeotdarc > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 21:58:24 2010 From: report at bugs.python.org (Tim Lesher) Date: Wed, 21 Jul 2010 19:58:24 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1279742304.81.0.564712761354.issue9012@psf.upfronthosting.co.za> Tim Lesher added the comment: No, there's no automated way to keep "legacy" Windows toolchains in sync; short of adopting something like Scons or CMAKE (which I'm *not* suggesting) I don't think I've seen a trustworthy way of doing so. The PCBuild's "readme.txt" states: "You can find build directories for older versions of Visual Studio and Visual C++ in the PC directory. The legacy build directories are no longer actively maintained and may not work out of the box." To date, I believe that the attitude toward these older build files has been "unsupported; use at own risk; patches welcome". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 22:06:34 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 20:06:34 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1279742304.81.0.564712761354.issue9012@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Wed, Jul 21, 2010 at 3:58 PM, Tim Lesher wrote: .. > To date, I believe that the attitude toward these older build files has been > "unsupported; use at own risk; patches welcome". > OK, I guess there is little risk in committing this patch. I'll do it later this week unless someone who actually knows anything about VC8 beats me to it. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 22:25:03 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 20:25:03 +0000 Subject: [issue9325] Add an option to pdb/trace/profile to run library module as a script In-Reply-To: <1279743902.96.0.66207849175.issue9325@psf.upfronthosting.co.za> Message-ID: <1279743902.96.0.66207849175.issue9325@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : The -m interpreter option allows one to run library module as a script, but if you want to debug, profile or trace the execution of the same, you must supply the path to the module source file on the command line. The resulting execution may also be different from python -m run especially when the module is located within a package. I would like to be able to do $ python -m trace --run-module and the same with pdb and profile in place of trace. ---------- assignee: belopolsky components: Library (Lib) messages: 111111 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: Add an option to pdb/trace/profile to run library module as a script type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 22:25:21 2010 From: report at bugs.python.org (Daniel Urban) Date: Wed, 21 Jul 2010 20:25:21 +0000 Subject: [issue9213] range purports to implement the Sequence ABC, but is missing index and count methods In-Reply-To: <1278702375.23.0.863463663463.issue9213@psf.upfronthosting.co.za> Message-ID: <1279743921.92.0.0185074026278.issue9213@psf.upfronthosting.co.za> Daniel Urban added the comment: The attached patch adds the range.count and range.index methods. Pseudocode for the two method: def count(self, ob): if ob in self: return 1 else: return 0 def index(self, ob, start=0, stop=len(self)): if ob in self: idx = (ob - self.start) // self.step if start < 0: start = start + len(self) if stop < 0: stop = stop + len(self) if start <= idx < stop: return idx raise ValueError("{!r} is not in range".format(ob)) ---------- keywords: +patch nosy: +durban Added file: http://bugs.python.org/file18111/issue9213.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 22:25:50 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 21 Jul 2010 20:25:50 +0000 Subject: [issue9325] Add an option to pdb/trace/profile to run library module as a script In-Reply-To: <1279743902.96.0.66207849175.issue9325@psf.upfronthosting.co.za> Message-ID: <1279743950.95.0.0545682875913.issue9325@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 22:30:25 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 21 Jul 2010 20:30:25 +0000 Subject: [issue9324] signal.signal(bogus_signal, handler) segfaults on Windows In-Reply-To: <1279738256.92.0.653078709511.issue9324@psf.upfronthosting.co.za> Message-ID: <1279744225.18.0.384989283608.issue9324@psf.upfronthosting.co.za> Brian Curtin added the comment: issue9324.diff checks the signal value after argument parsing and before sending it onward towards the system call. It only lets you use the following signals, per http://msdn.microsoft.com/en-us/library/xdkz3x12.aspx SIGABRT SIGFPE SIGILL SIGINT SIGSEGV SIGTERM ---------- assignee: -> brian.curtin keywords: +patch stage: unit test needed -> patch review Added file: http://bugs.python.org/file18112/issue9324.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 22:33:51 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 21 Jul 2010 20:33:51 +0000 Subject: [issue9324] signal.signal(bogus_signal, handler) segfaults on Windows In-Reply-To: <1279738256.92.0.653078709511.issue9324@psf.upfronthosting.co.za> Message-ID: <1279744431.63.0.246654591498.issue9324@psf.upfronthosting.co.za> Brian Curtin added the comment: Oops, note to myself that there's a long line in signalmodule.c. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 22:39:15 2010 From: report at bugs.python.org (Berwyn) Date: Wed, 21 Jul 2010 20:39:15 +0000 Subject: [issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True In-Reply-To: <1250066038.48.0.373766477997.issue6689@psf.upfronthosting.co.za> Message-ID: <1279744755.69.0.984053881999.issue6689@psf.upfronthosting.co.za> Berwyn added the comment: I think this should be documented more clearly rather than just rejected. It keeps causing various people grief. David Fraser's post would be good documentation. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 22:41:30 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 21 Jul 2010 20:41:30 +0000 Subject: [issue9213] range purports to implement the Sequence ABC, but is missing index and count methods In-Reply-To: <1278702375.23.0.863463663463.issue9213@psf.upfronthosting.co.za> Message-ID: <1279744890.4.0.594011328206.issue9213@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +gvanrossum, mark.dickinson, rhettinger stage: unit test needed -> patch review versions: -Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 22:44:07 2010 From: report at bugs.python.org (Dave Fugate) Date: Wed, 21 Jul 2010 20:44:07 +0000 Subject: [issue9326] Error message for incorrect number of (function) args is incorrect In-Reply-To: <1279745047.45.0.24813200138.issue9326@psf.upfronthosting.co.za> Message-ID: <1279745047.45.0.24813200138.issue9326@psf.upfronthosting.co.za> New submission from Dave Fugate : The error message below should state something along the lines of "f() takes at least 1 non-keyword argument (0 given)". Regardless, this is a regression from 2.6 which would have emitted "f() takes at least 1 argument (0 given)" which while not perfect, is a more accurate description of the problem: D:\rft\vsl\dlr\Languages\IronPython\Tests>27 Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def f(a, b=2): pass ... >>> f(b=2) Traceback (most recent call last): File "", line 1, in TypeError: f() takes at least 1 argument (1 given) >>> ---------- messages: 111116 nosy: midnightdf priority: normal severity: normal status: open title: Error message for incorrect number of (function) args is incorrect type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 22:46:11 2010 From: report at bugs.python.org (Dave Fugate) Date: Wed, 21 Jul 2010 20:46:11 +0000 Subject: [issue9326] Error message for incorrect number of (function) args is incorrect In-Reply-To: <1279745047.45.0.24813200138.issue9326@psf.upfronthosting.co.za> Message-ID: <1279745171.35.0.366863908327.issue9326@psf.upfronthosting.co.za> Dave Fugate added the comment: Actually CPython 2.6 emits precisely what I'd expect: D:\rft\vsl\dlr\Languages\IronPython\Tests>26 Python 2.6.2 (r262:71605, Apr 14 2009, 22:40:02) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> def f(a, b=2): pass ... >>> f(b=2) Traceback (most recent call last): File "", line 1, in TypeError: f() takes at least 1 non-keyword argument (0 given) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 22:47:43 2010 From: report at bugs.python.org (Tim Lesher) Date: Wed, 21 Jul 2010 20:47:43 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1279745263.77.0.264360062186.issue9012@psf.upfronthosting.co.za> Changes by Tim Lesher : Removed file: http://bugs.python.org/file18107/add_time_to_vc8_build.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 22:49:01 2010 From: report at bugs.python.org (Tim Lesher) Date: Wed, 21 Jul 2010 20:49:01 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1279745341.16.0.737799157348.issue9012@psf.upfronthosting.co.za> Changes by Tim Lesher : Added file: http://bugs.python.org/file18113/add_time_to_vc8_build.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 22:53:10 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 21 Jul 2010 20:53:10 +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: <1279745590.28.0.93108240538.issue8293@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Works fine here under Linux, with 3.2, 2.6 and 2.7. HTTPS connections actually get recycled quicker than plain HTTP ones. Please note that your results could also depend on the behaviour of the target server. I tested against http://linuxfr.org. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 22:57:30 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 21 Jul 2010 20:57:30 +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: <1279745850.72.0.284498292402.issue8293@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Works fine under a Windows XP VM too. ---------- resolution: out of date -> works for me status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 23:04:40 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 21 Jul 2010 21:04:40 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279746280.48.0.285615934804.issue9299@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Guido: "Hm. I wonder if os.mkdir() should not be left alone (so as to continue to match the system call most exactly, as is our convention) and the extra functionality added to os.makedirs() only." Sticking with that convention seems like a good idea. That would imply wrapping the mkdir call within makedirs as something like try: mkdir(...) except (: if not exist_ok: raise mkdir could be changed in the future but not unchanged once changed. Ray, can you make a simplified patch that leaves posixmodule.c alone, and make sure it passes the old and new tests? I am 99% sure some version will be applied for 3.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 23:07:02 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 21 Jul 2010 21:07:02 +0000 Subject: [issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True In-Reply-To: <1250066038.48.0.373766477997.issue6689@psf.upfronthosting.co.za> Message-ID: <1279746422.01.0.771233712411.issue6689@psf.upfronthosting.co.za> Stefan Krah added the comment: I find this particular section one of the most clear sections in the whole Python documentation: "On Unix, with shell=True: If args is a string, it specifies the command string to execute through the shell. This means that the string must be formatted exactly as it would be when typed at the shell prompt. This includes, for example, quoting or backslash escaping filenames with spaces in them. If args is a sequence, the first item specifies the command string, and any additional items will be treated as additional arguments to the shell itself. That is to say, Popen does the equivalent of: Popen(['/bin/sh', '-c', args[0], args[1], ...])" ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 23:23:54 2010 From: report at bugs.python.org (Berwyn) Date: Wed, 21 Jul 2010 21:23:54 +0000 Subject: [issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True In-Reply-To: <1250066038.48.0.373766477997.issue6689@psf.upfronthosting.co.za> Message-ID: <1279747434.61.0.333525650877.issue6689@psf.upfronthosting.co.za> Berwyn added the comment: Good point, Stefan. In hindsight my issue was probably more with understanding how the sh command line works rather than how python works. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 23:29:30 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 21 Jul 2010 21:29:30 +0000 Subject: [issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True In-Reply-To: <1250066038.48.0.373766477997.issue6689@psf.upfronthosting.co.za> Message-ID: <1279747770.34.0.942720696542.issue6689@psf.upfronthosting.co.za> Stefan Krah added the comment: I'm glad you agree. Closing this now. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 23:36:52 2010 From: report at bugs.python.org (Greg Brockman) Date: Wed, 21 Jul 2010 21:36:52 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1279748212.17.0.628476102769.issue9205@psf.upfronthosting.co.za> Greg Brockman added the comment: > I thought the EOF errors would take care of that, at least this has > been running in production on many platforms without that happening. There are a lot of corner cases here, some more pedantic than others. For example, suppose a child dies while holding the queue read lock... that wouldn't trigger an EOF error anywhere. Would a child being OOM-killed raise an EOF error? (It very well could, but I seem to recall that it does not.) I've said most of this before, but I still believe it's relevant, so here goes. In the context where I'm using this library, I'll often run jobs that should complete in O(10 minutes). I'll often start a job, realize I did something wrong and hit C-c (which could catch the workers anywhere). I've seen workers be OOM killed, silently dropping the tasks they had. As we've established, at the moment any of these failures results in a hang; I'd be very happy to see any sort of patch that improves my chances of seeing the program terminate in a finite amount of time. (And I'd be happiest if this is guaranteed.) It's possible that my use case isn't supported... but I just want to make sure I've made clear how I'm using the library. Does that make sense? > How would you shut down the pool then? A potential implementation is in termination.patch. Basically, try to shut down gracefully, but if you timeout, just give up and kill everything. > And why is that simpler? It's a lot less code (one could write an even shorter patch that doesn't try to do any additional graceful error handling), doesn't add a new monitor thread, doesn't add any more IPC mechanism, etc.. FWIW, I don't see any of these changes as bad, but I don't feel like I have a sense of how generally useful they would be. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 21 23:50:56 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 21:50:56 +0000 Subject: [issue4510] ValueError for list.remove() not very helpful In-Reply-To: <1228347518.63.0.0108612017272.issue4510@psf.upfronthosting.co.za> Message-ID: <1279749056.23.0.518295966883.issue4510@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The patch is good, except for two things: when PyObject_Repr() fails, the word 'item' is put instead. This is a good idea, but PyErr_Clear() should be called as soon as possible, before calling another API function. Also, the error message can grow without bounds. It would be better to limit the size of the string. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From amauryfa at gmail.com Wed Jul 21 17:58:37 2010 From: amauryfa at gmail.com (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 17:58:37 +0200 Subject: [issue1104] msilib.SummaryInfo.GetProperty() truncates the string by one character In-Reply-To: <1278777009.98.0.858683944154.issue1104@psf.upfronthosting.co.za> References: <1188943421.22.0.776458935296.issue1104@psf.upfronthosting.co.za> <1278777009.98.0.858683944154.issue1104@psf.upfronthosting.co.za> Message-ID: The patch looks correct, it's now a matter of unit tests. for example, I'd test the case where the length is around 1000.. From report at bugs.python.org Thu Jul 22 00:03:07 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 22:03:07 +0000 Subject: [issue1441530] socket read() can cause MemoryError in Windows Message-ID: <1279749787.08.0.363200847566.issue1441530@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Which module did you change, and which precise version of python are you using? I wonder if this was fixed with issue2632. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 00:08:36 2010 From: report at bugs.python.org (Patrick Strawderman) Date: Wed, 21 Jul 2010 22:08:36 +0000 Subject: [issue9327] doctest DocFileCase setUp/tearDown asymmetry In-Reply-To: <1279750116.68.0.946227736764.issue9327@psf.upfronthosting.co.za> Message-ID: <1279750116.68.0.946227736764.issue9327@psf.upfronthosting.co.za> New submission from Patrick Strawderman : doctest.DocFileTest inserts the test's path into the globs as "__file__", but doctest.DocTestCase's tearDown method simply calls globs.clear(), so that subsequent runs of the test case will not receive the same initial globals. This means that doctests referencing __file__ cannot be run repeatedly without using a custom setUp that restores __file__. I think most would expect symmetry between setUp and tearDown, and in fact zope.testrunner operates with this false assumption when run with the "-N" option to repeat a test N times. ---------- components: Library (Lib) messages: 111127 nosy: boogenhagn, fdrake priority: normal severity: normal status: open title: doctest DocFileCase setUp/tearDown asymmetry type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 00:09:43 2010 From: report at bugs.python.org (Patrick Strawderman) Date: Wed, 21 Jul 2010 22:09:43 +0000 Subject: [issue9327] doctest DocFileCase setUp/tearDown asymmetry In-Reply-To: <1279750116.68.0.946227736764.issue9327@psf.upfronthosting.co.za> Message-ID: <1279750183.72.0.798846547616.issue9327@psf.upfronthosting.co.za> Changes by Patrick Strawderman : Added file: http://bugs.python.org/file18114/doctestbug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 00:10:59 2010 From: report at bugs.python.org (Patrick Strawderman) Date: Wed, 21 Jul 2010 22:10:59 +0000 Subject: [issue9327] doctest DocFileCase setUp/tearDown asymmetry In-Reply-To: <1279750116.68.0.946227736764.issue9327@psf.upfronthosting.co.za> Message-ID: <1279750259.02.0.966161439825.issue9327@psf.upfronthosting.co.za> Changes by Patrick Strawderman : Added file: http://bugs.python.org/file18115/doctestbugpy3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 00:12:00 2010 From: report at bugs.python.org (Patrick Strawderman) Date: Wed, 21 Jul 2010 22:12:00 +0000 Subject: [issue9327] doctest DocFileCase setUp/tearDown asymmetry In-Reply-To: <1279750116.68.0.946227736764.issue9327@psf.upfronthosting.co.za> Message-ID: <1279750320.01.0.55886789361.issue9327@psf.upfronthosting.co.za> Changes by Patrick Strawderman : ---------- versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 00:19:29 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 22:19:29 +0000 Subject: [issue9320] os.environ is global for threads In-Reply-To: <1279696046.14.0.777932115359.issue9320@psf.upfronthosting.co.za> Message-ID: <1279750769.81.0.0931413977287.issue9320@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Quoting the wikipedia page: """multiple threads within a process share state as well as memory and other resources""" If you never worked with threads, then you really need a tutorial about threads, or even a general explanation about threads; the reference manual is not such a place. Programming with threads has really complex aspects that are not inherent to Python. [Some people will also say: if you never worked with threads, don't start] ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 00:23:43 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 22:23:43 +0000 Subject: [issue8035] urllib.request.urlretrieve hangs In-Reply-To: <1267470113.93.0.44679631442.issue8035@psf.upfronthosting.co.za> Message-ID: <1279751023.11.0.000811781717708.issue8035@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I would have hoped a Windows way... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 00:30:34 2010 From: report at bugs.python.org (Patrick Strawderman) Date: Wed, 21 Jul 2010 22:30:34 +0000 Subject: [issue9327] doctest DocFileCase setUp/tearDown asymmetry In-Reply-To: <1279750116.68.0.946227736764.issue9327@psf.upfronthosting.co.za> Message-ID: <1279751434.59.0.976777724261.issue9327@psf.upfronthosting.co.za> Changes by Patrick Strawderman : Removed file: http://bugs.python.org/file18114/doctestbug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 00:30:37 2010 From: report at bugs.python.org (Patrick Strawderman) Date: Wed, 21 Jul 2010 22:30:37 +0000 Subject: [issue9327] doctest DocFileCase setUp/tearDown asymmetry In-Reply-To: <1279750116.68.0.946227736764.issue9327@psf.upfronthosting.co.za> Message-ID: <1279751437.28.0.0323824090036.issue9327@psf.upfronthosting.co.za> Changes by Patrick Strawderman : Removed file: http://bugs.python.org/file18115/doctestbugpy3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 00:30:59 2010 From: report at bugs.python.org (Patrick Strawderman) Date: Wed, 21 Jul 2010 22:30:59 +0000 Subject: [issue9327] doctest DocFileCase setUp/tearDown asymmetry In-Reply-To: <1279750116.68.0.946227736764.issue9327@psf.upfronthosting.co.za> Message-ID: <1279751459.28.0.597834301442.issue9327@psf.upfronthosting.co.za> Changes by Patrick Strawderman : Added file: http://bugs.python.org/file18116/doctestbug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 00:49:16 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 21 Jul 2010 22:49:16 +0000 Subject: [issue9328] str.__format__.__doc__ backport glitch In-Reply-To: <1279752555.95.0.938195163481.issue9328@psf.upfronthosting.co.za> Message-ID: <1279752555.95.0.938195163481.issue9328@psf.upfronthosting.co.za> New submission from Terry J. Reedy : On Python list, 'jmfauth' reports >>> >>> sys.version 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] >>> >>> ''.format.__doc__ S.format(*args, **kwargs) -> unicode I do not have 2.7 loaded to verify this, but assuming this is accurate, 'unicode' should be 'string'. I presume this is from mistaken conversion of 3.1 'string' to 2.7 'unicode' when backporting the new string format system. ---------- assignee: docs at python components: Documentation keywords: easy messages: 111130 nosy: docs at python, tjreedy priority: normal severity: normal stage: needs patch status: open title: str.__format__.__doc__ backport glitch versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 00:54:08 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 21 Jul 2010 22:54:08 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1279752848.28.0.960616264977.issue7989@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Technically, since the C module is now named _datetime, it needs to be renamed in Modules/Setup.dist, and most importantly in PC/config.c (because on Windows datetime is built in the main interpreter) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 01:34:19 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 21 Jul 2010 23:34:19 +0000 Subject: [issue7836] Add /usr/sfw/lib to OpenSSL search path for Solaris. In-Reply-To: <1265104504.64.0.0631825253097.issue7836@psf.upfronthosting.co.za> Message-ID: <1279755259.55.0.781140273434.issue7836@psf.upfronthosting.co.za> Stefan Krah added the comment: Looks like a minor change. Do the ssl unit tests pass? ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 01:53:11 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 21 Jul 2010 23:53:11 +0000 Subject: [issue7836] Add /usr/sfw/lib to OpenSSL search path for Solaris. In-Reply-To: <1265104504.64.0.0631825253097.issue7836@psf.upfronthosting.co.za> Message-ID: <1279756391.39.0.340796215309.issue7836@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Could you provide a proper patch? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 02:15:17 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 22 Jul 2010 00:15:17 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1279757717.99.0.997266851992.issue9315@psf.upfronthosting.co.za> Terry J. Reedy added the comment: [from pydev discussion] I agree with renaming current test_trace to test_sys_settrace. If sys.settrace does more than line tracing, and the additional actions are not currently tested in the general sys test, then they should be, eventually, by someone, in a different issue. I see two reasons to start with 2.7. First, the 2.7 code should be better since it will not have errors introduced by the 3.x port. Second, if one file does not work for both 2.7 and 3.1/2, 2to3 is more tested than 3to2. If 2.6 is not to be targeted, you can use any of the new 3.x features backported to 2.7. The main problem for 3.1+ should be any new bugs uncovered, other than the one fixed in #9282. If features are added for 3.2, more tests will be needed for that. ---------- nosy: +tjreedy versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 02:26:08 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 22 Jul 2010 00:26:08 +0000 Subject: [issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True In-Reply-To: <1266401759.12.0.600282213979.issue7950@psf.upfronthosting.co.za> Message-ID: <1279758368.5.0.770601165122.issue7950@psf.upfronthosting.co.za> R. David Murray added the comment: Since the other bug was about a different topic and was closed as fixed, I'd rather have this issue open. What I've done instead is merge the nosy list from the other bug...anyone who is not interested can of course opt out of this one. Christoph, would you care to suggest a patch? ---------- nosy: +benjamin.peterson, brian.curtin, cvrebert, ncoghlan, pitrou, r.david.murray, tjreedy resolution: duplicate -> accepted stage: committed/rejected -> needs patch status: closed -> open superseder: patch to subprocess docs to better explain Popen's 'args' argument -> versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 02:29:43 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 22 Jul 2010 00:29:43 +0000 Subject: [issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True In-Reply-To: <1250066038.48.0.373766477997.issue6689@psf.upfronthosting.co.za> Message-ID: <1279758583.94.0.412729163776.issue6689@psf.upfronthosting.co.za> R. David Murray added the comment: Note that the "clear wording" was only introduced on 2/4 of this year (issue 6770). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 02:30:44 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 22 Jul 2010 00:30:44 +0000 Subject: [issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True In-Reply-To: <1250066038.48.0.373766477997.issue6689@psf.upfronthosting.co.za> Message-ID: <1279758644.59.0.158606820686.issue6689@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 02:30:57 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 22 Jul 2010 00:30:57 +0000 Subject: [issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True In-Reply-To: <1250066038.48.0.373766477997.issue6689@psf.upfronthosting.co.za> Message-ID: <1279758657.93.0.601516280018.issue6689@psf.upfronthosting.co.za> R. David Murray added the comment: Note that the "clear wording" was only introduced on 2/4 of this year (issue 6760). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 02:34:43 2010 From: report at bugs.python.org (Eric Smith) Date: Thu, 22 Jul 2010 00:34:43 +0000 Subject: [issue9328] str.__format__.__doc__ backport glitch In-Reply-To: <1279752555.95.0.938195163481.issue9328@psf.upfronthosting.co.za> Message-ID: <1279758883.66.0.239378110662.issue9328@psf.upfronthosting.co.za> Eric Smith added the comment: Yes, that is what it says; and yes, it should be "string". Although why all of the methods say "string" and not "str" isn't clear to me. Probably historical. The doc string for str.__format__ contains the same error. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 02:40:49 2010 From: report at bugs.python.org (Eric Smith) Date: Thu, 22 Jul 2010 00:40:49 +0000 Subject: [issue9328] str.__format__.__doc__ backport glitch In-Reply-To: <1279752555.95.0.938195163481.issue9328@psf.upfronthosting.co.za> Message-ID: <1279759249.65.0.0509772453409.issue9328@psf.upfronthosting.co.za> Eric Smith added the comment: And now that I look at it, the subject contains "__format__" but the original message says "format". Both cases are already covered! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 02:41:06 2010 From: report at bugs.python.org (Chris Rebert) Date: Thu, 22 Jul 2010 00:41:06 +0000 Subject: [issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True In-Reply-To: <1266401759.12.0.600282213979.issue7950@psf.upfronthosting.co.za> Message-ID: <1279759266.7.0.831127404043.issue7950@psf.upfronthosting.co.za> Chris Rebert added the comment: I'm busy with finding an apartment and taking exams for the next week-or-so, but after that I'll try and suggest a patch. If anyone wants to have a crack at it between now and then, don't let me stop you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 02:43:51 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 22 Jul 2010 00:43:51 +0000 Subject: [issue9326] Error message for incorrect number of (function) args is incorrect In-Reply-To: <1279745047.45.0.24813200138.issue9326@psf.upfronthosting.co.za> Message-ID: <1279759431.81.0.502217618458.issue9326@psf.upfronthosting.co.za> R. David Murray added the comment: Benjamin was the last one who worked on this code (in issue 6474), adding him to nosy. ---------- nosy: +benjamin.peterson, r.david.murray stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 02:46:08 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 22 Jul 2010 00:46:08 +0000 Subject: [issue9328] str.__format__.__doc__ backport glitch In-Reply-To: <1279758883.66.0.239378110662.issue9328@psf.upfronthosting.co.za> Message-ID: Fred L. Drake, Jr. added the comment: On Wed, Jul 21, 2010 at 8:34 PM, Eric Smith wrote: > Although why all of the methods say "string" and not "str" isn't clear to me. Probably historical. Indeed; we used "string" in the docs as an informal way to say what eventually became known as basestring. ? -Fred ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 02:48:10 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 22 Jul 2010 00:48:10 +0000 Subject: [issue9328] str.__format__.__doc__ backport glitch In-Reply-To: <1279752555.95.0.938195163481.issue9328@psf.upfronthosting.co.za> Message-ID: <1279759690.41.0.873994079501.issue9328@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- nosy: -fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 03:44:37 2010 From: report at bugs.python.org (Peter Donis) Date: Thu, 22 Jul 2010 01:44:37 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279763077.81.0.922878770846.issue1812@psf.upfronthosting.co.za> Peter Donis added the comment: Re my msg110822, I think I have a better solution: have the test create a temporary txt file with intentionally mismatched newlines, and use that as the doctest. That means we can control the exact byte by byte content of the txt file, without worrying about how it is stored/transferred, etc. I've attached a Python 2.7 patch, doctest-fixes4.diff, which implements this test method (same actual tests as before, just the setup/cleanup is changed); the test passes on my machine. The test code in this patch also includes comments explaining why this approach is taken. ---------- Added file: http://bugs.python.org/file18117/doctest-fixes4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 04:07:42 2010 From: report at bugs.python.org (Peter Donis) Date: Thu, 22 Jul 2010 02:07:42 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279764462.21.0.11445707487.issue1812@psf.upfronthosting.co.za> Peter Donis added the comment: Uploaded doctest-fixes5.diff with one minor correction: removed some comments that were reminders for the py3k version (which I'll upload shortly). ---------- Added file: http://bugs.python.org/file18118/doctest-fixes5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 04:08:31 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 22 Jul 2010 02:08:31 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1279764511.63.0.42732882836.issue1712522@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Reverted the checkin in revision 83045. For the robotparser issue, one of the these two can be adopted. 1. Fix it by decoding the unicode url using utf-8, strict. 2. Catch the KeyError exception and raise a TypeError exception from the robotparser module informing the user that Unicode URLs are not allowed. So that users can handle at application end and send 8bit strings. I prefer 2. ---------- resolution: fixed -> accepted status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 04:16:04 2010 From: report at bugs.python.org (Daniele Tricoli) Date: Thu, 22 Jul 2010 02:16:04 +0000 Subject: [issue1565071] update Lib/plat-linux2/IN.py Message-ID: <1279764964.73.0.239268306854.issue1565071@psf.upfronthosting.co.za> Daniele Tricoli added the comment: I would like to take care of this bug if it is worthwhile. I tried to use h2py as suggested by Martin v. L?wis adding /usr/include/linux/sockios.h in the regen shell script and it obviously work. I used a fresh clone of the py3k branch. P.S. Is not a problem that the resulting module name SOCKIOS does't follow PEP8? ---------- nosy: +eriol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 04:18:55 2010 From: report at bugs.python.org (Matt Giuca) Date: Thu, 22 Jul 2010 02:18:55 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1279765135.91.0.81278225784.issue1712522@psf.upfronthosting.co.za> Matt Giuca added the comment: If you're going the way of option 2, I would strongly advise against relying on the KeyError. The fact that a KeyError is raised by urllib.quote is not part of it's specification, it's a bug/quirk in the implementation (which is now unlikely to be change, but it's unsafe to rely on it). Robotparser should encode the string, if and only if it is a unicode string, with ('ascii', 'strict'), catch the UnicodeEncodeError, and raise the TypeError you suggested. This will have precisely the same behaviour as your proposed option 2 (will work fine for byte strings and Unicode strings with ASCII-only characters, but raise a TypeError on Unicode strings with non-ASCII characters) without relying on the KeyError from urllib.quote. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 04:37:57 2010 From: report at bugs.python.org (Peter Donis) Date: Thu, 22 Jul 2010 02:37:57 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279766277.89.0.00264278688468.issue1812@psf.upfronthosting.co.za> Peter Donis added the comment: Uploaded doctest-fixes5-py3k.diff, diff against py3k branch implementing same improved test method as doctest-fixes5.diff. ---------- Added file: http://bugs.python.org/file18119/doctest-fixes5-py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 05:51:13 2010 From: report at bugs.python.org (Berwyn) Date: Thu, 22 Jul 2010 03:51:13 +0000 Subject: [issue6689] subprocess doesn't pass arguments correctly on Linux when shell=True In-Reply-To: <1279758657.93.0.601516280018.issue6689@psf.upfronthosting.co.za> Message-ID: <4C47C054.5000106@brush.co.nz> Berwyn added the comment: Ah. I don't need to feel so forgetful, then. ---------- title: subprocess doesn't pass arguments correctly on Linux when shell=True -> subprocess doesn't pass arguments correctly on Linux when shell=True _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 07:34:39 2010 From: report at bugs.python.org (Ray.Allen) Date: Thu, 22 Jul 2010 05:34:39 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1279776879.72.0.629789930614.issue9299@psf.upfronthosting.co.za> Ray.Allen added the comment: Agree! Sure, the functions in os are mainly to simulate the system call but not the system command. This seems like a good suggestion. So here is the new patch which leave posixmodule.c alone and just wrappers os.mkdir() with try...except... in os.makedirs(). ---------- Added file: http://bugs.python.org/file18120/mkdir_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 08:22:26 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 22 Jul 2010 06:22:26 +0000 Subject: [issue7977] I found Python 3.1 xmlrpc lib use "" not properly. and i have fixed it. In-Reply-To: <1266774979.92.0.0106793526152.issue7977@psf.upfronthosting.co.za> Message-ID: <1279779746.68.0.429055690251.issue7977@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: But what if I want to pass a tuple through xmlrpc? The function in the test case: + def execute(server, methodname, *args): + r = getattr(server, methodname)(args) # params become a tuple + return r looks wrong to me. It has the effect to modify the nature of the arguments. If I write instead: + def execute(server, methodname, *args): + r = getattr(server, methodname)(*args) + return r (note the additional '*') the function may receive several arguments, and will call the server method with several arguments as well. Tuple unpacking occurs where tuple packing was made. The library does not need to be changed. ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 08:44:26 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 22 Jul 2010 06:44:26 +0000 Subject: [issue1152248] Enhance file.readlines by making line separator selectable Message-ID: <1279781066.45.0.89983409776.issue1152248@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This fileLineIter function looks like a good recipe to me. Can we close the issue then? ---------- nosy: +amaury.forgeotdarc resolution: -> works for me status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 09:01:27 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 22 Jul 2010 07:01:27 +0000 Subject: [issue8297] AttributeError message text should include module name In-Reply-To: <1270272607.93.0.943961280816.issue8297@psf.upfronthosting.co.za> Message-ID: <1279782087.6.0.682739591098.issue8297@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I also like the idea; 3 remarks though: - the patch introduces a new function that returns a PyObject*, but returns NULL when """the attribute is not found, and the caller should raise AttributeError""". This convention is not standard among the Python API and dangerous IMO. This part of the patch is not necessary. PyModule_GetAttr could just call PyObject_GenericGetAttr and override the current exception with a new message. - it's not necessary to expose the function PyModule_GetAttr. It could be renamed to something like module_getattr, and be a static function. Module writers are already used to PyObject_GetAttr to access the module items, this new function brings nothing new. - a minor nit: instead of module object 'mod_name' has no attribute 'xxx' I'd prefer module 'mod_name' has no attribute 'xxx' ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 09:47:11 2010 From: report at bugs.python.org (Brett Cannon) Date: Thu, 22 Jul 2010 07:47:11 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1279784831.72.0.0864645342658.issue9012@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 09:47:24 2010 From: report at bugs.python.org (Brett Cannon) Date: Thu, 22 Jul 2010 07:47:24 +0000 Subject: [issue6975] symlinks incorrectly resolved on Linux In-Reply-To: <1253685313.69.0.648289112505.issue6975@psf.upfronthosting.co.za> Message-ID: <1279784844.81.0.617160897306.issue6975@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 10:00:14 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 22 Jul 2010 08:00:14 +0000 Subject: [issue6698] IDLE no longer opens only an edit window when configured to do so In-Reply-To: <1250200991.43.0.141209205867.issue6698@psf.upfronthosting.co.za> Message-ID: <1279785614.19.0.926616599399.issue6698@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The current behaviour on OSX for IDLE.app is to always open a shell window, and open edit windows for any files that should be opened during launch. IDLE.app does not open an empty edit window, and I agree that this is sane behaviour. One other thing that might be interesting to know: IDLE.app is already set up to open just a single instance of IDLE when users open python files from the Finder. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 10:16:50 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 22 Jul 2010 08:16:50 +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: <1279786610.01.0.430957446817.issue8376@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The two example classes are used exactly the same way, and don't show the differences between them. How about a simple change like: Replace: """If the class defines :meth:`next`, then :meth:`__iter__` can just return ``self``""" with """It may be convenient to define :meth:`next` in the class, and have :meth:`__iter__` just return ``self``; In this case though, the object can be iterated only once.""" ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 10:58:27 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 22 Jul 2010 08:58:27 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1279789107.84.0.623197842382.issue1578269@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: All patches seems already applied. Should we close this issue? ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 11:11:25 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 22 Jul 2010 09:11:25 +0000 Subject: [issue5131] pprint doesn't know how to print a defaultdict In-Reply-To: <1233592442.21.0.0563262599933.issue5131@psf.upfronthosting.co.za> Message-ID: <1279789885.67.0.556339976971.issue5131@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Patch looks good to me. (Some day the pprint module should grow some way to register repr for user types, so we can stop adding special cases; but defaultdict() is a builtin) ---------- nosy: +amaury.forgeotdarc resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 11:34:57 2010 From: report at bugs.python.org (=?utf-8?q?Matthieu_Labb=C3=A9?=) Date: Thu, 22 Jul 2010 09:34:57 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1279791297.26.0.936145125675.issue5673@psf.upfronthosting.co.za> Changes by Matthieu Labb? : ---------- nosy: +matthieu.labbe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 11:55:21 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 22 Jul 2010 09:55:21 +0000 Subject: [issue1723038] Curses Menu Message-ID: <1279792521.31.0.632000401168.issue1723038@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The patch should be amended for python3, then: - PyType_Ready() should be used instead of "ob_type = &PyType_Type;" - The demo contains "Option choisie :" which should be translated :-) - the call:: PyErr_SetString(PyExc_RuntimeError, "remove_lom: can't find Menu Object"); is wrong: the calling function does not check the error condition, it will be ignored in any case because the only called is the tp_dealloc - find_po() is defined but never called - the free() method does not do anything, it contains commented out code. In short, this patch needs work. ---------- nosy: +amaury.forgeotdarc stage: unit test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 11:58:32 2010 From: report at bugs.python.org (zenyatta) Date: Thu, 22 Jul 2010 09:58:32 +0000 Subject: [issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp In-Reply-To: <1274665334.09.0.561782804312.issue8797@psf.upfronthosting.co.za> Message-ID: <1279792712.25.0.486743725318.issue8797@psf.upfronthosting.co.za> zenyatta added the comment: I work in sidux and my Mercurial currently doesn't work. The python version already contains the fix for this issue (revision 81637) and it crashes Mercurial ("authorization failed") whenever a command involves more than 5 requests to the repository. I fixed it by resetting the retry counter upon successful authorization (see patch). Maybe this helps someone in a similar situation. The patch was made against trunk using "diff -u". ---------- keywords: +patch nosy: +zenyatta Added file: http://bugs.python.org/file18121/urllib2-8797-fix-workaround.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 12:03:58 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 22 Jul 2010 10:03:58 +0000 Subject: [issue3591] elementtree tests do not include bytes handling In-Reply-To: <1219078669.04.0.473516144349.issue3591@psf.upfronthosting.co.za> Message-ID: <1279793038.88.0.794304499041.issue3591@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: test_xml_etree.py has some tests about bytes input (check_issue6233) but these are only working cases. Tests with wrong encodings should be added. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 12:09:32 2010 From: report at bugs.python.org (Mads Kiilerich) Date: Thu, 22 Jul 2010 10:09:32 +0000 Subject: [issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp In-Reply-To: <1274665334.09.0.561782804312.issue8797@psf.upfronthosting.co.za> Message-ID: <1279793372.86.0.843775665332.issue8797@psf.upfronthosting.co.za> Mads Kiilerich added the comment: zenyatta: Which Mercurial version? We thought we had implemented a sufficiently ugly workaround in Mercurial. Please file an issue in http://mercurial.selenic.com/bts/ . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 12:15:23 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 22 Jul 2010 10:15:23 +0000 Subject: [issue9320] os.environ is global for threads In-Reply-To: <1279696046.14.0.777932115359.issue9320@psf.upfronthosting.co.za> Message-ID: <1279793723.72.0.280610343406.issue9320@psf.upfronthosting.co.za> anatoly techtonik added the comment: I have to debug CGIHTTPServer test case that apparently uses threads, and I expected to find at least some pointer about "what exactly a thread in Python is". I hope Python Manual is not only for system programmers. They do not need the manual anyway - they already know everything and there are plenty tutorials for them elsewhere. -- "please remove http://docs.python.org/ and put in a better documentation, I wasted so much time reading that bad documentation that now I hate it and I will never write code in python" (c) Mario Santamaria ---------- status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 12:23:30 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 22 Jul 2010 10:23:30 +0000 Subject: [issue9320] os.environ is global for threads In-Reply-To: <1279696046.14.0.777932115359.issue9320@psf.upfronthosting.co.za> Message-ID: <1279794210.11.0.47359518683.issue9320@psf.upfronthosting.co.za> Stefan Krah added the comment: I agree with Eric, Konstantin, Amaury and Georg. Closing for the third time. ---------- nosy: +skrah status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 12:23:49 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 22 Jul 2010 10:23:49 +0000 Subject: [issue9320] os.environ is global for threads In-Reply-To: <1279696046.14.0.777932115359.issue9320@psf.upfronthosting.co.za> Message-ID: <1279794229.87.0.613728532077.issue9320@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 12:24:10 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 22 Jul 2010 10:24:10 +0000 Subject: [issue9154] Parser module doesn't understand function annotations. In-Reply-To: <1278270204.2.0.0990664909847.issue9154@psf.upfronthosting.co.za> Message-ID: <1279794250.97.0.831573531136.issue9154@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The extra space in Grammar was already removed in r82624. The remaining part of the patch looks good to me. The lambda thing is not important, if you get an error when trying to compile the resulting st. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 12:37:55 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 22 Jul 2010 10:37:55 +0000 Subject: [issue9320] os.environ is global for threads In-Reply-To: <1279696046.14.0.777932115359.issue9320@psf.upfronthosting.co.za> Message-ID: <1279795075.73.0.451778382663.issue9320@psf.upfronthosting.co.za> Georg Brandl added the comment: Anatoly, I don't think it is a good idea to use signatures in tracker comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 13:12:15 2010 From: report at bugs.python.org (Juan Javier) Date: Thu, 22 Jul 2010 11:12:15 +0000 Subject: [issue6751] Default return value in ConfigParser In-Reply-To: <1250845077.86.0.224640008074.issue6751@psf.upfronthosting.co.za> Message-ID: <1279797135.92.0.834311786063.issue6751@psf.upfronthosting.co.za> Juan Javier added the comment: I've applied the enhancement to the three parsers, actually I've made the change to RawconfigParser with a small change to ConfigParser. I've also created some unit tests. ---------- keywords: +patch Added file: http://bugs.python.org/file18122/configparser.py.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 13:12:27 2010 From: report at bugs.python.org (Juan Javier) Date: Thu, 22 Jul 2010 11:12:27 +0000 Subject: [issue6751] Default return value in ConfigParser In-Reply-To: <1250845077.86.0.224640008074.issue6751@psf.upfronthosting.co.za> Message-ID: <1279797147.14.0.249818232922.issue6751@psf.upfronthosting.co.za> Changes by Juan Javier : Added file: http://bugs.python.org/file18123/test_cfgparser.py.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 13:24:06 2010 From: report at bugs.python.org (Paul Moore) Date: Thu, 22 Jul 2010 11:24:06 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1279797846.4.0.48897054451.issue5135@psf.upfronthosting.co.za> Paul Moore added the comment: I don't propose to raise a PEP myself. The issue with ABCs seems to me to be a fundamental design issue, and I think it's better to leave raising any PEP, and managing the subsequent discussion, to someone with a deeper understanding of, and interest in, generic functions. Not sure if the lack of a champion means that this issue should be closed. I'm happy if that's the consensus (but I'm also OK with it being left open indefinitely, until someone cares enough to pick it up). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 13:42:55 2010 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 22 Jul 2010 11:42:55 +0000 Subject: [issue1152248] Enhance file.readlines by making line separator selectable Message-ID: <1279798975.65.0.890728244207.issue1152248@psf.upfronthosting.co.za> Nick Coghlan added the comment: A recipe in the comments on a tracker item isn't enough reason to close the RFE, no. An entry on the cookbook with a pointer from the docs might be sufficient, although I'm still not averse to the idea of an actual readrecords method (with appropriate tests). ---------- resolution: works for me -> status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 13:45:19 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 22 Jul 2010 11:45:19 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1279799119.83.0.324849735556.issue5135@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Generic functions are a lesser-known paradigm than OO, and nowhere do common Python documents (including the official docs) try to teach them. That means the first public appearance of generic functions in the stdlib should really be well thought out if we don't want to encourage poor practices. I agree with Guido that a PEP is required to flesh out all the details. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 14:31:26 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 22 Jul 2010 12:31:26 +0000 Subject: [issue5120] Disabling test_ttk_guionly on mac In-Reply-To: <1233437150.39.0.445953575427.issue5120@psf.upfronthosting.co.za> Message-ID: <1279801886.72.0.0322194957461.issue5120@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Mark: maybe, why don't you test this? ---------- assignee: -> ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 14:45:38 2010 From: report at bugs.python.org (Ray.Allen) Date: Thu, 22 Jul 2010 12:45:38 +0000 Subject: [issue8297] AttributeError message text should include module name In-Reply-To: <1270272607.93.0.943961280816.issue8297@psf.upfronthosting.co.za> Message-ID: <1279802738.41.0.44358358584.issue8297@psf.upfronthosting.co.za> Ray.Allen added the comment: Amaury: Thanks for reviewing! I quite appreciate your ideas. I was not quite familiar with python source code convention at that time. Here I worked out a new patch based on your ideas. Since py2.7 has released, this feature can only go to py3k. So my new patch is against py3k. Hoping somebody could review it. Thanks all! By the way, I feel if module object's getattr can be customized, other types, like the super object, also needs this. ---------- Added file: http://bugs.python.org/file18124/issue_8297.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 15:20:36 2010 From: report at bugs.python.org (zenyatta) Date: Thu, 22 Jul 2010 13:20:36 +0000 Subject: [issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp In-Reply-To: <1274665334.09.0.561782804312.issue8797@psf.upfronthosting.co.za> Message-ID: <1279804836.75.0.50032414222.issue8797@psf.upfronthosting.co.za> zenyatta added the comment: See http://mercurial.selenic.com/bts/issue2299 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 15:41:24 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 22 Jul 2010 13:41:24 +0000 Subject: [issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0) In-Reply-To: <1278781256.75.0.101082302298.issue5978@psf.upfronthosting.co.za> Message-ID: Amaury Forgeot d'Arc added the comment: Profiling only works on functions that actually return; maybe we could add something about this fact in the documentation ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 16:13:05 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 22 Jul 2010 14:13:05 +0000 Subject: [issue5774] _winreg.OpenKey() is documented with keyword arguments, but doesn't take them In-Reply-To: <1239908773.0.0.157202779439.issue5774@psf.upfronthosting.co.za> Message-ID: <1279807985.8.0.274833015383.issue5774@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Please rename "sam" to something readable, "access" for example. And the "reserved" parameter should really go, at least not be documented. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 16:27:36 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Thu, 22 Jul 2010 14:27:36 +0000 Subject: [issue5774] _winreg.OpenKey() is documented with keyword arguments, but doesn't take them In-Reply-To: <1239908773.0.0.157202779439.issue5774@psf.upfronthosting.co.za> Message-ID: <1279808856.51.0.0765810364543.issue5774@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: +1 on better names, -1 on removing the reserved parameter The parameters of OpenKey mirror those of the underlying RegOpenKey call. If we remove the reserved parameter, then: 1) Any code currently using the sam parameter will break, since it's currently only positional 2) If Microsoft later makes the reserved parameter do something, then we will have to reinsert a parameter before sam or have our arguments in a different order than RegOpenKey For what it's worth, RegOpenKey names the parameters: hKey, lpSubKey, ulOptions, and samDesired. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 16:28:42 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 22 Jul 2010 14:28:42 +0000 Subject: [issue1506122] Add "compose" function to the functools Message-ID: <1279808922.69.0.39596013794.issue1506122@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The proposed code may be useful sometimes, but is not generic enough for the standard library. For example, the f() function can only take one argument, when g() can accept any number. Implementations of this kind are so easy to write, They are better described by their implementation rather than documentation. IMO they show the expressiveness of python, and don't need to be hidden in a C module. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 16:29:47 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 22 Jul 2010 14:29:47 +0000 Subject: [issue1506122] Add "compose" function to the functools Message-ID: <1279808987.08.0.148693640499.issue1506122@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 16:32:46 2010 From: report at bugs.python.org (Ray.Allen) Date: Thu, 22 Jul 2010 14:32:46 +0000 Subject: [issue1152248] Enhance file.readlines by making line separator selectable Message-ID: <1279809166.42.0.721348263154.issue1152248@psf.upfronthosting.co.za> Ray.Allen added the comment: I think it's a good idea adding a keyword argument to specify the separator of readlines(). I believe most people can accept the universal meaning of "line", which has similar meaning of "record", that is a chunk data, maybe from using line separators other than '\n' in perl, or akw, or the find command. Maybe doing this doesn't pollute the meaning of "readlines". Splitting the file contents with s special character is really a common usage. Besides, I feel using a line separator other than '\n' doesn't mean we're dealing with binary format, in fact, I often deal with text format with the record separator '\t'. ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 16:36:33 2010 From: report at bugs.python.org (Ray.Allen) Date: Thu, 22 Jul 2010 14:36:33 +0000 Subject: [issue1723038] Curses Menu Message-ID: <1279809393.23.0.935727306569.issue1723038@psf.upfronthosting.co.za> Changes by Ray.Allen : ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 16:39:38 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 22 Jul 2010 14:39:38 +0000 Subject: [issue9193] Versioned .so files In-Reply-To: <1278527607.97.0.766712002778.issue9193@psf.upfronthosting.co.za> Message-ID: <1279809578.05.0.651315390646.issue9193@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Updated patch. ---------- Added file: http://bugs.python.org/file18125/diff.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 16:40:33 2010 From: report at bugs.python.org (Matt Fleming) Date: Thu, 22 Jul 2010 14:40:33 +0000 Subject: [issue1533105] NetBSD build with --with-pydebug causes SIGSEGV In-Reply-To: <1279373874.52.0.733180723205.issue1533105@psf.upfronthosting.co.za> Message-ID: Matt Fleming added the comment: I'm not really tracking this anymore but i can certainly try to recreate the issue sometime this week if required? On 17 July 2010 14:37, Stefan Krah wrote: > > Stefan Krah added the comment: > > Matt, if you still follow this: Does this problem exist in 2.6/2.7/NetBSD? > > I think this should be set to pending. > > ---------- > nosy: +skrah > > _______________________________________ > Python tracker > > _______________________________________ > ---------- nosy: +mfleming _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 16:51:57 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 22 Jul 2010 14:51:57 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279810317.43.0.959344613421.issue1812@psf.upfronthosting.co.za> Mark Lawrence added the comment: The py3k stuff is fine on Windows but the 2.7 maintainance branch now fails. 1 items had failures: 1 of 6 in doctest_testfile.txt ***Test Failed*** 1 failures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 17:32:12 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 22 Jul 2010 15:32:12 +0000 Subject: [issue6135] subprocess seems to use local 8-bit encoding and gives no choice In-Reply-To: <1243494524.57.0.870766192683.issue6135@psf.upfronthosting.co.za> Message-ID: <1279812732.01.0.904250299315.issue6135@psf.upfronthosting.co.za> Mark Lawrence added the comment: Ran new unit test before and after patching subprocess on Windows Vista against 3.1 debug maintenance release, all ok apart from this at end of latter. File "test\test_subprocess.py", line 568, in test_encoded_stderr self.assertEqual(p.stderr.read(), send) AssertionError: '?[32943 refs]\r\n' != '?' I'm sure I've seen a ref to this somewhere, can anyone remember where? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 17:33:44 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 22 Jul 2010 15:33:44 +0000 Subject: [issue7579] Patch to add docstrings to msvcrt In-Reply-To: <1261862969.81.0.926821098705.issue7579@psf.upfronthosting.co.za> Message-ID: <1279812824.06.0.427550584027.issue7579@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: georg.brandl -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 17:37:18 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 22 Jul 2010 15:37:18 +0000 Subject: [issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module In-Reply-To: <1260961239.34.0.37704260724.issue7523@psf.upfronthosting.co.za> Message-ID: <1279813038.07.0.547403338162.issue7523@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Antoine could you respond to msg97699, thanks. ---------- nosy: +BreamoreBoy versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 17:37:56 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 22 Jul 2010 15:37:56 +0000 Subject: [issue7699] strptime, strftime documentation In-Reply-To: <1263433562.71.0.126740414986.issue7699@psf.upfronthosting.co.za> Message-ID: <1279813076.85.0.163058869326.issue7699@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: georg.brandl -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 17:46:43 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 22 Jul 2010 15:46:43 +0000 Subject: [issue7523] add SOCK_NONBLOCK and SOCK_CLOEXEC to socket module In-Reply-To: <1260961239.34.0.37704260724.issue7523@psf.upfronthosting.co.za> Message-ID: <1279813603.32.0.566932098959.issue7523@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > @Antoine could you respond to msg97699, thanks. Well my comments and the patch itself are outdated now that 2.7 is in bugfix mode. The socket implementation in 3.2 is slightly different, which means the patch should be updated (it isn't necessarily difficult to do so), and the accept() issue should be examined again. ---------- components: -IO nosy: +exarkun stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 17:47:18 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 22 Jul 2010 15:47:18 +0000 Subject: [issue5609] Create Unit Tests for nturl2path module In-Reply-To: <1238434174.72.0.622903214477.issue5609@psf.upfronthosting.co.za> Message-ID: <1279813638.58.0.0565224944292.issue5609@psf.upfronthosting.co.za> Mark Lawrence added the comment: Maksim could you please respond to the comments on Rietveld, thanks. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 17:50:43 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 22 Jul 2010 15:50:43 +0000 Subject: [issue5825] Patch to add "remove" method to tempfile.NamedTemporaryFile In-Reply-To: <1240532161.78.0.907773696305.issue5825@psf.upfronthosting.co.za> Message-ID: <1279813843.01.0.474794405375.issue5825@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can be closed unless someone can justify this change. ---------- nosy: +BreamoreBoy status: open -> pending versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 18:05:24 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 22 Jul 2010 16:05:24 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1279814724.48.0.199419732418.issue5673@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The documentation should mention somewhere that timeout can be a float. For example, as in time.sleep docstring: """ sleep(seconds) Delay execution for a given number of seconds. The argument may be a floating point number for subsecond precision. """ I would also like to see some discussion of supported precision. Is is the same as for time.sleep()? Does float precision ever affect timeout precision? (On systems with nanosleep it may, but probably this has no practical concequences.) This can be done as a future enhancement, but I would like to see datetime.timedelta as an acceptable type for timeout. This can be done by adding duck-typed code in the error branch which would attempt to call timeout.total_seconds() to extract a float. Looking further, it appears that timeout can be anything that can be added to a float to produce float. Is this an accident of implementation or a design decision? Note that a result Fraction can be used as timeout but Decimal cannot. Zero and negative timeouts are accepted by subprocess.call(), but the result is not documented. It looks like this still starts the process, but kills it immediately. An alternative would be to not start the process at all or disallow negative or maybe even zero timeouts altogether. I don't mind the current choice, but it should be documented at least in Popen.wait(timeout=None) section. + def wait(self, timeout=None, endtime=None): """Wait for child process to terminate. Returns returncode attribute.""" Docstring should describe timeout and endtime arguments. In fact I don't see endtime documented anywhere. It is not an obvious choice that endtime is ignored when timeout is given. An alternative would be to terminate at min(now + timeout, endtime). + delay = 0.0005 # 500 us -> initial delay of 1 ms I think this should be an argument to wait() and the use of busy loop should be documented. + delay = min(delay * 2, remaining, .05) Why .05? It would probably be an overkill to make this another argument, but maybe make it an attribute of Popen, say self._max_busy_loop_delay or a shorter descriptive name of your choice. If you start it with '_', you don't need to document it, but users may be able to mess with it if they suspect that 0.05 is not the right choice. + endtime = time.time() + timeout Did you consider using datetime module instead of time module here? (I know, you still need time.sleep() later, but you won't need to worry about variable precision of time.time().) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 18:08:00 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 22 Jul 2010 16:08:00 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1279814880.39.0.813979508677.issue5673@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: s/Note that a result Fraction/Note that as a result, Fraction/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 18:17:43 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 22 Jul 2010 16:17:43 +0000 Subject: [issue7579] Patch to add docstrings to msvcrt In-Reply-To: <1261862969.81.0.926821098705.issue7579@psf.upfronthosting.co.za> Message-ID: <1279815463.53.0.111319232506.issue7579@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- assignee: docs at python -> brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 18:20:56 2010 From: report at bugs.python.org (Sam Saint-Pettersen) Date: Thu, 22 Jul 2010 16:20:56 +0000 Subject: [issue9329] freeze tool cannot handle JSON module properly In-Reply-To: <1279815656.66.0.596140100357.issue9329@psf.upfronthosting.co.za> Message-ID: <1279815656.66.0.596140100357.issue9329@psf.upfronthosting.co.za> New submission from Sam Saint-Pettersen : Freeze tool can generate Makefile and C code for Python programs using the JSON module. The code can be compiled fine, but when a program using the JSON module is run, this is returned: Traceback (most recent call last): 2 File "myProgram.py", line 15, in 3 import json 4 File "/usr/local/lib/python2.7/json/__init__.py", line 108, in 5 from .decoder import JSONDecoder 6 File "/usr/local/lib/python2.7/json/decoder.py", line 24, in 7 NaN, PosInf, NegInf = _floatconstants() 8 File "/usr/local/lib/python2.7/json/decoder.py", line 18, in _floatconstants 9 _BYTES = '7FF80000000000007FF0000000000000'.decode('hex') 10 LookupError: unknown encoding: hex Something to do with .decode('hex') apparently. ---------- components: Demos and Tools messages: 111188 nosy: sam.sp priority: normal severity: normal status: open title: freeze tool cannot handle JSON module properly type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 18:33:45 2010 From: report at bugs.python.org (Douglas Alan) Date: Thu, 22 Jul 2010 16:33:45 +0000 Subject: [issue1152248] Enhance file.readlines by making line separator selectable Message-ID: <1279816425.37.0.999757304395.issue1152248@psf.upfronthosting.co.za> Douglas Alan added the comment: Personally, I think that this functionality should be built into Python's readlines. That's where a typical person would expect it to be, and this is something that is supported by most other scripting language I've used. E.g., awk has the RS variable which lets you set the "input record separator", which defaults to newline. And as I previously pointed out, xargs and find provide the option to use null as their line separator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 18:55:57 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 22 Jul 2010 16:55:57 +0000 Subject: [issue1718574] build_clib --build-clib/--build-temp option bugs Message-ID: <1279817757.46.0.985363188022.issue1718574@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Confirmed here: "python setup.py build_clib -b/some/dir" returns "error: option -/ not recognized" All other files (build_ext.py, clean.py) have a '=' after these options names. Patch is inlined: Index: Lib/distutils/command/build_clib.py =================================================================== --- Lib/distutils/command/build_clib.py (r?vision 82925) +++ Lib/distutils/command/build_clib.py (copie de travail) @@ -32,9 +32,9 @@ description = "build C/C++ libraries used by Python extensions" user_options = [ - ('build-clib', 'b', + ('build-clib=', 'b', "directory to build C/C++ libraries to"), - ('build-temp', 't', + ('build-temp=', 't', "directory to put temporary build by-products"), ('debug', 'g', "compile with debugging information"), ---------- keywords: +patch nosy: +amaury.forgeotdarc stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 19:05:44 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 22 Jul 2010 17:05:44 +0000 Subject: [issue1718574] build_clib --build-clib/--build-temp option bugs Message-ID: <1279818344.33.0.317299100288.issue1718574@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. It is indeed a stupid typo. Can someone produce a patch against current py3k? Confirmed in distutils2 too, I can fix it there. ---------- components: +Distutils2 nosy: +merwok resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 19:08:18 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 22 Jul 2010 17:08:18 +0000 Subject: [issue7742] please avoid 'which' in Modules/ld_so_aix In-Reply-To: <1263939351.94.0.865840686982.issue7742@psf.upfronthosting.co.za> Message-ID: <1279818498.8.0.843492298947.issue7742@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Michael: do you intend putting in a new patch for review as hinted at in msg98071? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 19:11:20 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 22 Jul 2010 17:11:20 +0000 Subject: [issue9330] assertIn should check for membership support before testing In-Reply-To: <1279818680.38.0.509759364598.issue9330@psf.upfronthosting.co.za> Message-ID: <1279818680.38.0.509759364598.issue9330@psf.upfronthosting.co.za> New submission from Brian Curtin : A recent sysconfig test which should have been skipped on Windows (now fixed) exposed a bug in the assertIn/assertNotIn methods. If the "container" you are testing doesn't support membership testing or iteration, such as None value when a previous call fails, the test is then an error rather than a fail. Before: ====================================================================== ERROR: test_ldshared_value (test.test_sysconfig.TestSysConfig) ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\python-dev\py3k\lib\test\test_sysconfig.py", line 285, in test_ldshar ed_value self.assertIn(ldflags, ldshared) File "c:\python-dev\py3k\lib\unittest\case.py", line 797, in assertIn if member not in container: TypeError: argument of type 'NoneType' is not iterable I believe this should be a fail with AssertionError, rather than an error with TypeError. ====================================================================== FAIL: test_ldshared_value (test.test_sysconfig.TestSysConfig) ---------------------------------------------------------------------- Traceback (most recent call last): File "c:\python-dev\py3k\lib\test\test_sysconfig.py", line 285, in test_ldshar ed_value self.assertIn(ldflags, ldshared) AssertionError: None does not support the `in` operator The patch adds a check that __contains__, __iter__, or __getitem__ exist on the object and fails the test if none of those are found. It also includes a few test updates. ---------- assignee: michael.foord components: Library (Lib) files: membership_check.diff keywords: needs review, patch, patch messages: 111193 nosy: brian.curtin, michael.foord priority: normal severity: normal stage: patch review status: open title: assertIn should check for membership support before testing type: behavior versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file18126/membership_check.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 19:13:51 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 22 Jul 2010 17:13:51 +0000 Subject: [issue9232] Allow trailing comma in any function argument list. In-Reply-To: <1278945017.29.0.842296068848.issue9232@psf.upfronthosting.co.za> Message-ID: <1279818831.94.0.04823778452.issue9232@psf.upfronthosting.co.za> Mark Dickinson added the comment: There was one place that needed to be changed in ast.c: namely, the check to make sure that there are keyword-only arguments following a bare star. Here's a new patch, that fixes that issue, updates the grammar in the ast.c comment to match that in Grammar/Grammar, and also updates the production list given in the docs for function definitions. ---------- Added file: http://bugs.python.org/file18127/trailing_commas2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 19:14:02 2010 From: report at bugs.python.org (Daniel Urban) Date: Thu, 22 Jul 2010 17:14:02 +0000 Subject: [issue9213] range purports to implement the Sequence ABC, but is missing index and count methods In-Reply-To: <1278702375.23.0.863463663463.issue9213@psf.upfronthosting.co.za> Message-ID: <1279818842.18.0.917669508313.issue9213@psf.upfronthosting.co.za> Daniel Urban added the comment: Sorry, the previous patch has a reference leak. I'm attaching the fixed patch as issue9213a.diff (I also added a few tests with really big ranges). ---------- Added file: http://bugs.python.org/file18128/issue9213a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 19:16:05 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 22 Jul 2010 17:16:05 +0000 Subject: [issue9232] Allow trailing comma in any function argument list. In-Reply-To: <1278945017.29.0.842296068848.issue9232@psf.upfronthosting.co.za> Message-ID: <1279818965.54.0.106983119079.issue9232@psf.upfronthosting.co.za> Changes by Mark Dickinson : Added file: http://bugs.python.org/file18129/trailing_commas2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 19:16:10 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 22 Jul 2010 17:16:10 +0000 Subject: [issue9232] Allow trailing comma in any function argument list. In-Reply-To: <1278945017.29.0.842296068848.issue9232@psf.upfronthosting.co.za> Message-ID: <1279818970.97.0.281602413768.issue9232@psf.upfronthosting.co.za> Changes by Mark Dickinson : Removed file: http://bugs.python.org/file18127/trailing_commas2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 19:26:57 2010 From: report at bugs.python.org (Anders Kaseorg) Date: Thu, 22 Jul 2010 17:26:57 +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: <1279819617.26.0.324585049541.issue8376@psf.upfronthosting.co.za> Anders Kaseorg added the comment: I don?t think that small change is good enough, if it is still the case that the only provided example is the dangerous one. It would be easy to clarify the differences between the classes: >>> rl = test.ReverseList('spam') >>> [c for c in rl] ['m', 'a', 'p', 's'] >>> [c for c in rl] ['m', 'a', 'p', 's'] >>> ri = iter(rl) >>> ri >>> [c for c in ri] ['m', 'a', 'p', 's'] >>> [c for c in ri] [] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 19:33:35 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 22 Jul 2010 17:33:35 +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: <1279820015.44.0.798479302915.issue8376@psf.upfronthosting.co.za> Antoine Pitrou added the comment: At least equally useful would be the mention that __iter__ can be a generator, eliminating the need for intermediate objects: >>> class C: ... def __iter__(self): ... yield 1 ... yield 2 ... >>> list(C()) [1, 2] ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 19:40:54 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 22 Jul 2010 17:40:54 +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: <1279820454.65.0.314700374951.issue8376@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Why do you call this "dangerous"? because the object can be iterated only once? But reversed() does the same thing. And all iterators objects must also implement the __iter__ method that return themselves, otherwise they cannot be used in a for loop. Better start with such an object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 19:43:38 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 22 Jul 2010 17:43:38 +0000 Subject: [issue9331] sys.setprofile is not described as CPython implementation detail In-Reply-To: <1279820617.97.0.227411152808.issue9331@psf.upfronthosting.co.za> Message-ID: <1279820617.97.0.227411152808.issue9331@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Unlike sys.settrace, sys.setprofile is not described as CPython implementation detail in Doc/library/sys.rst. ---------- assignee: docs at python components: Documentation messages: 111199 nosy: belopolsky, docs at python priority: normal severity: normal stage: needs patch status: open title: sys.setprofile is not described as CPython implementation detail type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 19:45:06 2010 From: report at bugs.python.org (Daniel Urban) Date: Thu, 22 Jul 2010 17:45:06 +0000 Subject: [issue8297] AttributeError message text should include module name In-Reply-To: <1270272607.93.0.943961280816.issue8297@psf.upfronthosting.co.za> Message-ID: <1279820706.07.0.000466799570873.issue8297@psf.upfronthosting.co.za> Daniel Urban added the comment: According to PEP 7 [1], all declarations must be at the top of a block. So you probably should move the "char *mod_name_str" and "PyModuleObject *module" declarations to the beginning of the function's body. [1] http://www.python.org/dev/peps/pep-0007/ ---------- nosy: +durban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 19:53:33 2010 From: report at bugs.python.org (Anders Kaseorg) Date: Thu, 22 Jul 2010 17:53: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: <1279821213.12.0.215611833561.issue8376@psf.upfronthosting.co.za> Anders Kaseorg added the comment: Antoine: That?s true. Amaury: See my original bug description (?This is reasonable advice for writing an iterator class, but terrible advice for writing a container class??), and my other comments. There is nothing wrong with explaining how to write an iterator, but the explanation needs to make clear that this is _not_ how you write a container. Currently the section opens with a misleading motivation (?By now you have probably noticed that most container objects can be looped over using a for statement?), but it does actually not explain how to write a container at all. So I proposed some language and an example to fix that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 19:54:15 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 22 Jul 2010 17:54:15 +0000 Subject: [issue1152248] Enhance file.readlines by making line separator selectable In-Reply-To: <1279816425.37.0.999757304395.issue1152248@psf.upfronthosting.co.za> Message-ID: <1279821249.3205.31.camel@localhost.localdomain> Antoine Pitrou added the comment: > Personally, I think that this functionality should be built into > Python's readlines. That's where a typical person would expect it to > be, and this is something that is supported by most other scripting > language I've used. Adding it to readline() and/or readlines() would modify the standard IO Abstract Base Classes, and would therefore probably need discussion on python-dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 19:57:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 22 Jul 2010 17:57:20 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1279821440.51.0.533432499759.issue9308@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Is anyone interested in reviewing this patch before it is committed? Since there are no user-visible changes and the only non-trivial change simply adds new tests, I think this can go in. Any refinements can be done later. ---------- components: +Tests keywords: -needs review stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 20:16:10 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 22 Jul 2010 18:16:10 +0000 Subject: [issue3196] Option in pydoc to show docs from private methods In-Reply-To: <1214386355.64.0.670337337662.issue3196@psf.upfronthosting.co.za> Message-ID: <1279822570.44.0.675304828476.issue3196@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It looks like OP has lost interest and I don't have time to move it forward. ---------- assignee: belopolsky -> priority: normal -> low stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 20:18:57 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 22 Jul 2010 18:18:57 +0000 Subject: [issue1738] filecmp.dircmp does exact match only In-Reply-To: <1199482445.72.0.241275927673.issue1738@psf.upfronthosting.co.za> Message-ID: <1279822737.23.0.776128975741.issue1738@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: belopolsky -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 20:23:22 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 22 Jul 2010 18:23:22 +0000 Subject: [issue9005] Year range in timetuple In-Reply-To: <1276660627.85.0.364876080456.issue9005@psf.upfronthosting.co.za> Message-ID: <1279823002.28.0.397850592704.issue9005@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Mark, Do you agree that conditions mentioned in msg109329 and msg109340 are never triggered? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 20:27:07 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 22 Jul 2010 18:27:07 +0000 Subject: [issue2920] Patch to print symbolic value or errno in EnvironmentError.__str__() In-Reply-To: <1211228076.96.0.534347381118.issue2920@psf.upfronthosting.co.za> Message-ID: <1279823227.22.0.478155731548.issue2920@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This looks like something that can become part of PEP 3151. ---------- assignee: belopolsky -> nosy: -Alexander.Belopolsky stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 20:27:18 2010 From: report at bugs.python.org (Robert Cronk) Date: Thu, 22 Jul 2010 18:27:18 +0000 Subject: [issue1652] subprocess should have an option to restore SIGPIPE to default action In-Reply-To: <1197992466.47.0.0612439954222.issue1652@psf.upfronthosting.co.za> Message-ID: <1279823238.87.0.136764016325.issue1652@psf.upfronthosting.co.za> Changes by Robert Cronk : ---------- nosy: +rcronk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 20:45:39 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 22 Jul 2010 18:45:39 +0000 Subject: [issue9332] Document requirements for os.symlink usage on Windows In-Reply-To: <1279824339.14.0.912688887592.issue9332@psf.upfronthosting.co.za> Message-ID: <1279824339.14.0.912688887592.issue9332@psf.upfronthosting.co.za> New submission from Brian Curtin : #1578269 introduced os.symlink support for Windows 6.0, but it requires the SeCreateSymbolicLinkPrivilege privilege to be enabled for the calling user, which is not always the case. Documentation needs to be added on the specific details here, possibly including a method to request privilege escalation. ---------- assignee: brian.curtin components: Documentation messages: 111207 nosy: brian.curtin, jaraco priority: normal severity: normal stage: needs patch status: open title: Document requirements for os.symlink usage on Windows type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 20:46:15 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 22 Jul 2010 18:46:15 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1279824375.55.0.487615137568.issue1578269@psf.upfronthosting.co.za> Brian Curtin added the comment: Closed. I created #9332 for the remaining side issues. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 20:56:19 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 22 Jul 2010 18:56:19 +0000 Subject: [issue7742] please avoid 'which' in Modules/ld_so_aix In-Reply-To: <1263939351.94.0.865840686982.issue7742@psf.upfronthosting.co.za> Message-ID: <1279824979.47.0.334145418501.issue7742@psf.upfronthosting.co.za> Stefan Krah added the comment: I'm not sure this should be changed: 1) Why is .cshrc sourced? It should only get sourced for a login shell. 2) If the user sets a PATH that excludes the compiler, then `which` will also not find the compiler on other systems (like Linux). Why would anyone set a PATH that excludes the compiler? Sridhar, has this ever been a problem for you on AIX? ---------- nosy: +skrah, srid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 20:57:19 2010 From: report at bugs.python.org (Eric Smith) Date: Thu, 22 Jul 2010 18:57:19 +0000 Subject: [issue9332] Document requirements for os.symlink usage on Windows In-Reply-To: <1279824339.14.0.912688887592.issue9332@psf.upfronthosting.co.za> Message-ID: <1279825039.15.0.633321896077.issue9332@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 21:11:08 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 22 Jul 2010 19:11:08 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1279825868.01.0.731115718443.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > [datetime.c] needs to be renamed in Modules/Setup.dist, and most > importantly in PC/config.c Fixed in issue7989d.diff, thanks. In order to commit this patch I need an SVN advise. I would like to copy datetime.py from sandbox to py3k in a way that will preserve the history. (I know, this strictly necessary, but I don't want my name on every line in svn blame datetime.py given how little I had to change there.) I tried both svn copy oldpath newpath and svn copy oldurl newpath and it did not work (most likely because sandbox and py3k are independent checkouts.) I don't want to use svn copy oldurl newurl because that would require a separate commit for datetime.py. ---------- Added file: http://bugs.python.org/file18130/issue7989d.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 21:14:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 22 Jul 2010 19:14:32 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1279826072.03.0.681689521127.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: s/strictly necessary/not strictly necessary/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 21:18:19 2010 From: report at bugs.python.org (Ryan Freckleton) Date: Thu, 22 Jul 2010 19:18:19 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1279799119.83.0.324849735556.issue5135@psf.upfronthosting.co.za> Message-ID: Ryan Freckleton added the comment: An elaborate PEP for generic functions already exists, PEP 3124 [ http://www.python.org/dev/peps/pep-3124/]. Also note the reasons for deferment. I'd be interested in creating a "more limited" generic function implementation based on this PEP, minus func_code rewriting and the other fancier items. Sadly I won't have any bandwidth to work on it until January of next year. I'd vote for keeping this issue open because of that. On Thu, Jul 22, 2010 at 5:45 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Generic functions are a lesser-known paradigm than OO, and nowhere do > common Python documents (including the official docs) try to teach them. > That means the first public appearance of generic functions in the stdlib > should really be well thought out if we don't want to encourage poor > practices. I agree with Guido that a PEP is required to flesh out all the > details. > > ---------- > nosy: +pitrou > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file18131/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- An elaborate PEP for generic functions already exists, PEP 3124 [http://www.python.org/dev/peps/pep-3124/]. Also note the reasons for deferment. I'd be interested in creating a "more limited" generic function implementation based on this PEP, minus func_code rewriting and the other fancier items. Sadly I won't have any bandwidth to work on it until January of next year.

I'd vote for keeping this issue open because of that.


On Thu, Jul 22, 2010 at 5:45 AM, Antoine Pitrou <report at bugs.python.org> wrote:

Antoine Pitrou <pitrou at free.fr> added the comment:

Generic functions are a lesser-known paradigm than OO, and nowhere do common Python documents (including the official docs) try to teach them. That means the first public appearance of generic functions in the stdlib should really be well thought out if we don't want to encourage poor practices. I agree with Guido that a PEP is required to flesh out all the details.

----------
nosy: +pitrou

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

From report at bugs.python.org Thu Jul 22 21:28:19 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 22 Jul 2010 19:28:19 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1279826899.42.0.687099993131.issue7989@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17913/issue9206a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 21:58:24 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 22 Jul 2010 19:58:24 +0000 Subject: [issue9333] Expose a way to enable os.symlink on Windows In-Reply-To: <1279828704.23.0.310372952456.issue9333@psf.upfronthosting.co.za> Message-ID: <1279828704.23.0.310372952456.issue9333@psf.upfronthosting.co.za> New submission from Brian Curtin : As it currently stands, the possibility exists that some users might not have the SeCreateSymbolicLinkPrivilege privilege enabled (depending on security settings, corporate policy, etc). There should be some method of enabling that privilege outside of the way we do it in the tests (using ctypes). Attached is a quick prototype...no docs or tests yet. If you don't have the privilege enabled, "os.enable_symlink()" will attempt to enable it for you (True if successful, False if not). For the security conscious: "The AdjustTokenPrivileges function cannot add new privileges to the access token. It can only enable or disable the token's existing privileges" ---------- assignee: brian.curtin components: Extension Modules files: enable_symlink.diff keywords: patch messages: 111213 nosy: brian.curtin, eric.smith, jaraco priority: normal severity: normal status: open title: Expose a way to enable os.symlink on Windows type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file18132/enable_symlink.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 22:48:03 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 22 Jul 2010 20:48:03 +0000 Subject: [issue1396825] subprocess: wait for a period of time Message-ID: <1279831683.56.0.370937581596.issue1396825@psf.upfronthosting.co.za> Stefan Krah added the comment: This is now being addressed in issue 5673, so closing this as a duplicate. astrand, please let me know if I'm wrong about this. ---------- nosy: +skrah resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Add timeout option to subprocess.Popen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 22:48:14 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 22 Jul 2010 20:48:14 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1238701276.41.0.515283298202.issue5673@psf.upfronthosting.co.za> Message-ID: <1279831694.24.0.180605599199.issue5673@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: +gd2shoe, ragnar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 23:07:43 2010 From: report at bugs.python.org (Peter Donis) Date: Thu, 22 Jul 2010 21:07:43 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279832863.77.0.691238184848.issue1812@psf.upfronthosting.co.za> Peter Donis added the comment: I don't normally run Windows, so it will take a little time for me to set up a Windows build environment. However, I've made a number of other improvements as a result of further testing on Linux, and I've uploaded the improved patch as doctest-fixes6.diff. When I apply this patch to a regular Python 2.7 installation on Windows (Windows 2000 running under VirtualBox on Linux), the tests pass (as well as on my Linux box when applied against the release27-maint SVN branch). Output from testing on Windows: C:\Python27\Lib\test>python test_doctest.py doctest (doctest) ... 66 tests with zero failures doctest (test.test_doctest) ... 443 tests with zero failures C:\Python27\Lib\test>python Python 2.7 (r27:82525, Jul 4 2010, 09:01:59) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. Hopefully the improved patch will test OK on your box as well. If not, I'll work on testing it in a Windows build environment against an SVN checkout. Improvements in doctest-fixes6.diff: - Uses with statements to guard all file reads (in earlier patches writes were guarded but reads were not); - Saves and restores sys.path the same way as test_importhooks; - Checks for byte-compiled files in __pycache__ when deleting temporary files (this was in the py3k patch already, but reading PEP 3147 it looks like this feature may be backported to 2.7 as well); - Test setup/cleanup is now done in a TestFixture class, for clarity and because it's easier that way to store the original sys.path in the setup and restore it in the cleanup. ---------- Added file: http://bugs.python.org/file18133/doctest-fixes6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 23:12:06 2010 From: report at bugs.python.org (Michael Foord) Date: Thu, 22 Jul 2010 21:12:06 +0000 Subject: [issue9330] assertIn should check for membership support before testing In-Reply-To: <1279818680.38.0.509759364598.issue9330@psf.upfronthosting.co.za> Message-ID: <1279833126.51.0.382388733549.issue9330@psf.upfronthosting.co.za> Michael Foord added the comment: No, assertIn is for testing for membership in a container. If you pass it something that isn't a container then it indicates an error in the test (or misuse of the assert!). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 23:14:53 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 22 Jul 2010 21:14:53 +0000 Subject: [issue9330] assertIn should check for membership support before testing In-Reply-To: <1279818680.38.0.509759364598.issue9330@psf.upfronthosting.co.za> Message-ID: <1279833293.7.0.485356412608.issue9330@psf.upfronthosting.co.za> Brian Curtin added the comment: I knew there was a reason I was thinking my whole idea was slightly ridiculous...duh. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 23:16:54 2010 From: report at bugs.python.org (Peter Donis) Date: Thu, 22 Jul 2010 21:16:54 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279833414.89.0.0964768185121.issue1812@psf.upfronthosting.co.za> Peter Donis added the comment: Uploaded revised diff against py3k branch, doctest-fixes6-py3k.diff, with same improvements as doctest-fixes6.diff. Tests still pass on my Linux box. ---------- Added file: http://bugs.python.org/file18134/doctest-fixes6-py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 22 23:21:06 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 22 Jul 2010 21:21:06 +0000 Subject: [issue4130] Intel icc 9.1 does not support __int128_t used by ctypes In-Reply-To: <1224103336.6.0.753228794094.issue4130@psf.upfronthosting.co.za> Message-ID: <1279833666.16.0.684713206881.issue4130@psf.upfronthosting.co.za> Stefan Krah added the comment: This thread contains a feature request for __int128_t support in icc and a workaround: http://software.intel.com/en-us/forums/showthread.php?t=56652 ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 00:15:12 2010 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 22 Jul 2010 22:15:12 +0000 Subject: [issue1152248] Enhance file.readlines by making line separator selectable In-Reply-To: <1279821249.3205.31.camel@localhost.localdomain> Message-ID: Nick Coghlan added the comment: On Fri, Jul 23, 2010 at 3:54 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> Personally, I think that this functionality should be built into >> Python's readlines. That's where a typical person would expect it to >> be, and this is something that is supported by most other scripting >> language I've used. > > Adding it to readline() and/or readlines() would modify the standard IO > Abstract Base Classes, and would therefore probably need discussion on > python-dev. That's also the reason why I'm suggesting a separate readrecords() method - the appropriate ABC should be able to implement it as a concrete method based on something like the recipe above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 00:15:39 2010 From: report at bugs.python.org (Anders Kaseorg) Date: Thu, 22 Jul 2010 22:15:39 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> New submission from Anders Kaseorg : Porting the a2x program to argparse from the now-deprecated optparse subtly breaks it when certain options are passed: $ a2x --asciidoc-opts --safe gitcli.txt $ ./a2x.argparse --asciidoc-opts --safe gitcli.txt usage: a2x [-h] [--version] [-a ATTRIBUTE] [--asciidoc-opts ASCIIDOC_OPTS] [--copy] [--conf-file CONF_FILE] [-D PATH] [-d DOCTYPE] [--epubcheck] [-f FORMAT] [--icons] [--icons-dir PATH] [-k] [--lynx] [-L] [-n] [-r PATH] [-s] [--stylesheet STYLESHEET] [--safe] [--dblatex-opts DBLATEX_OPTS] [--fop] [--fop-opts FOP_OPTS] [--xsltproc-opts XSLTPROC_OPTS] [-v] a2x: error: argument --asciidoc-opts: expected one argument Apparently argparse uses a heuristic to try to guess whether an argument looks like an argument or an option, going so far as to check whether it looks like a negative number (!). It should _never_ guess: the option was specified to take an argument, so the following argument should always be parsed as an argument. Small test case: >>> import optparse >>> parser = optparse.OptionParser(prog='a2x') >>> parser.add_option('--asciidoc-opts', ... action='store', dest='asciidoc_opts', default='', ... metavar='ASCIIDOC_OPTS', help='asciidoc options') >>> parser.parse_args(['--asciidoc-opts', '--safe']) (, []) >>> import argparse >>> parser = argparse.ArgumentParser(prog='a2x') >>> parser.add_argument('--asciidoc-opts', ... action='store', dest='asciidoc_opts', default='', ... metavar='ASCIIDOC_OPTS', help='asciidoc options') >>> parser.parse_args(['--asciidoc-opts', '--safe']) usage: a2x [-h] [--asciidoc-opts ASCIIDOC_OPTS] a2x: error: argument --asciidoc-opts: expected one argument ---------- components: Library (Lib) messages: 111221 nosy: andersk priority: normal severity: normal status: open title: argparse does not accept options taking arguments beginning with dash (regression from optparse) versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 00:18:41 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 22 Jul 2010 22:18:41 +0000 Subject: [issue9333] Expose a way to enable os.symlink on Windows In-Reply-To: <1279828704.23.0.310372952456.issue9333@psf.upfronthosting.co.za> Message-ID: <1279837121.8.0.574684205998.issue9333@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I think we should consider simply calling this function before running os.symlink. It would be nice if the API were as compatible as possible on both unix and Windows. My worry is that where code that works on unix systems is simply: os.symlink(...) But now to support symlinks on Windows, one must write: if hasattr(os, 'enable_symlink') and not os.enable_symlink(): raise WindowsError(...) os.symlink(...) Maybe instead of adding os.enable_symlink, Python should include the above logic before attempting to create a symlink and raise an exception if it fails? This would provide a consistent API across platforms for the most common use-case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 00:40:12 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 22 Jul 2010 22:40:12 +0000 Subject: [issue9193] Versioned .so files In-Reply-To: <1278527607.97.0.766712002778.issue9193@psf.upfronthosting.co.za> Message-ID: <1279838412.29.0.210180543817.issue9193@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Should the change also apply to Windows? on Windows, there is no "configure" phase, but the file PC/pyconfig.h is maintained manually. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 00:44:48 2010 From: report at bugs.python.org (Eric Smith) Date: Thu, 22 Jul 2010 22:44:48 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1279838688.06.0.347358358176.issue9334@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 01:06:22 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 22 Jul 2010 23:06:22 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1279839982.78.0.9049742028.issue9334@psf.upfronthosting.co.za> R. David Murray added the comment: It seems like reasonable request to me to be able to allow such arguments, especially since optparse did and we want people to be able to use argparse as a replacement. Though in general I find argparse's default behavior more useful. Since argparse has been released, I'm thinking this still has to be a feature request, since argparse is *not* a drop-in replacement for optparse. ---------- nosy: +bethard, r.david.murray stage: -> unit test needed type: -> feature request versions: -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 01:06:31 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 22 Jul 2010 23:06:31 +0000 Subject: [issue9333] Expose a way to enable os.symlink on Windows In-Reply-To: <1279828704.23.0.310372952456.issue9333@psf.upfronthosting.co.za> Message-ID: <1279839991.94.0.0346195734327.issue9333@psf.upfronthosting.co.za> Brian Curtin added the comment: That's a way better idea. It would also cut down some of the code in Lib/test/symlink_support.py. I'll take a whack at that and see how it looks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 01:38:11 2010 From: report at bugs.python.org (Eric Smith) Date: Thu, 22 Jul 2010 23:38:11 +0000 Subject: [issue9333] Expose a way to enable os.symlink on Windows In-Reply-To: <1279828704.23.0.310372952456.issue9333@psf.upfronthosting.co.za> Message-ID: <1279841891.02.0.786390273142.issue9333@psf.upfronthosting.co.za> Eric Smith added the comment: Wouldn't you have to set this, then restore it? This would then open a non thread-safe race condition, assuming this is a per-process setting, not a thread-local setting. Not that I'm necessarily opposed, but it's an issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 01:40:32 2010 From: report at bugs.python.org (Nelson Elhage) Date: Thu, 22 Jul 2010 23:40:32 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1279842032.0.0.281653044671.issue9334@psf.upfronthosting.co.za> Nelson Elhage added the comment: For what it's worth, I have trouble seeing this as anything but a bug. I understand the motivation of trying to catch user errors, but in doing so, you're breaking with the behavior of every other option parsing library that I'm aware of, in favor of an arbitrary heuristic that sometimes guesses wrong. That's not the kind of behavior I expect from my Python libraries; I want them to do what I ask them to, not try to guess what I probably meant. ---------- nosy: +nelhage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 01:43:59 2010 From: report at bugs.python.org (Anders Kaseorg) Date: Thu, 22 Jul 2010 23:43:59 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1279842239.68.0.254845284292.issue9334@psf.upfronthosting.co.za> Anders Kaseorg added the comment: > Though in general I find argparse's default behavior more useful. I?m not sure I understand. Why is it useful for an option parsing library to heuristically decide, by default, that I didn?t actually want to pass in the valid option that I passed in? Shouldn?t that be up to the caller (or up to the program, if it explicitly decides to reject such arguments)? Keep in mind that the caller might be another script instead of a user. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 02:11:17 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Fri, 23 Jul 2010 00:11:17 +0000 Subject: [issue9173] logger statement not guarded in shutil._make_tarball In-Reply-To: <1278374700.0.0.888108186461.issue9173@psf.upfronthosting.co.za> Message-ID: <1279843877.07.0.246018068395.issue9173@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: Patch looks good, but needs a test. ---------- keywords: +easy nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 02:11:39 2010 From: report at bugs.python.org (Greg Brockman) Date: Fri, 23 Jul 2010 00:11:39 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1279843899.5.0.162848339514.issue9334@psf.upfronthosting.co.za> Changes by Greg Brockman : ---------- nosy: +gdb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 02:52:04 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 23 Jul 2010 00:52:04 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1279846324.23.0.581023003806.issue9334@psf.upfronthosting.co.za> R. David Murray added the comment: Well, even if you call it a bug, it would be an argparse design bug, and design bug fixes are feature requests from a procedural point of view. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 03:19:38 2010 From: report at bugs.python.org (Sam Saint-Pettersen) Date: Fri, 23 Jul 2010 01:19:38 +0000 Subject: [issue9329] freeze tool cannot handle JSON module properly In-Reply-To: <1279815656.66.0.596140100357.issue9329@psf.upfronthosting.co.za> Message-ID: <1279847978.24.0.793982522061.issue9329@psf.upfronthosting.co.za> Sam Saint-Pettersen added the comment: Problem occurs with "frozen" programs if: from encodings import hex_codec ...is not explicitly written in the script. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 04:19:25 2010 From: report at bugs.python.org (Ray.Allen) Date: Fri, 23 Jul 2010 02:19:25 +0000 Subject: [issue8297] AttributeError message text should include module name In-Reply-To: <1270272607.93.0.943961280816.issue8297@psf.upfronthosting.co.za> Message-ID: <1279851565.28.0.520999492742.issue8297@psf.upfronthosting.co.za> Ray.Allen added the comment: Thanks! durban. Here is the updated patch fixing such problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 04:38:31 2010 From: report at bugs.python.org (Anthony Long) Date: Fri, 23 Jul 2010 02:38:31 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> New submission from Anthony Long : On mac 10.5, python 2.6.4 (via mac ports) performing len(string.letters) will produce 117 instead of 52. from terminal: along-mb:~ along$ locale LANG="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_CTYPE="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_ALL= This appears to be related to: locale.setlocale(locale.LC_CTYPE) not being respected. len(string.letters) should produce 52. ---------- assignee: ronaldoussoren components: Macintosh messages: 111233 nosy: antlong, ronaldoussoren priority: normal severity: normal status: open title: LC_CTYPE system setting not respected by setlocale() versions: Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 04:59:46 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 02:59:46 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279853986.25.0.0687391882342.issue9335@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I can reproduce this in Apple's idle, but not in trunk or 2.7 versions. I'll leave it open in case Ronald is interested. Antlong also reports that this happens on windows, but I cannot verify that. Here is my session copied from idle: Python 2.5.3c1 (release25-maint, Dec 17 2008, 21:50:37) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin Type "copyright", "credits" or "license()" for more information. **************************************************************** Personal firewall software may warn about the connection IDLE makes to its subprocess using this computer's internal loopback interface. This connection is not visible on any external interface and no data is sent to or received from the Internet. **************************************************************** IDLE 1.2.3c1 >>> from string import letters >>> letters 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\xaa\xb5\xba\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff' >>> len(letters) 117 >>> letters 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\xaa\xb5\xba\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff' >>> print _ ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz????????????????????????????????????????????????????????????????? >>> letters.isalpha() True >>> import locale >>> locale.getlocale() ('en_US', 'UTF8') >>> locale.setlocale(locale.LC_CTYPE) 'en_US.UTF-8' >>> ---------- components: +IDLE nosy: +belopolsky type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 05:16:14 2010 From: report at bugs.python.org (Anthony Long) Date: Fri, 23 Jul 2010 03:16:14 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279854974.09.0.203575359081.issue9335@psf.upfronthosting.co.za> Anthony Long added the comment: Also: windows 64x, python 2.7 1. Python 2.7 (r27:82525, Jul 4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)] on win32 2. Type "copyright", "credits" or "license()" for more information. 3. >>> import string 4. >>> string.letters 5. 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\x83\x8a\x8c\x8e\x9a\x9c\x9e\x9f\xaa\xb5\xba\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff' 6. >>> import locale 7. >>> locale.getdefaultlocale() 8. ('en_US', 'cp1252') 9. >>> ---------- components: -IDLE type: behavior -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 05:20:27 2010 From: report at bugs.python.org (Jeremy Kloth) Date: Fri, 23 Jul 2010 03:20:27 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279855227.02.0.250919094124.issue9335@psf.upfronthosting.co.za> Jeremy Kloth added the comment: Note that this behavior is only present when running IDLE. Python command-line does not show this oddity. ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 05:23:02 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 03:23:02 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279855382.56.0.274368185002.issue9335@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Here is a simpler test: in idle2.6, >>> '\xff'.isalpha() True but in idle2.7 and plain python prompt, it is False. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 05:27:53 2010 From: report at bugs.python.org (Anthony Long) Date: Fri, 23 Jul 2010 03:27:53 +0000 Subject: [issue9336] string.letters should display locale based equivalent of a-Z In-Reply-To: <1279855673.74.0.0304173911229.issue9336@psf.upfronthosting.co.za> Message-ID: <1279855673.74.0.0304173911229.issue9336@psf.upfronthosting.co.za> New submission from Anthony Long : string.letters should display the locale based equivalent of a-Z. In enUS this would be a-z A-Z, in total a len of 52, whereas in spain it would be a-z (with ?), and A-Z (?). Each locale should change the returned letters. http://en.wikipedia.org/wiki/Keyboard_layout ---------- components: Library (Lib) messages: 111238 nosy: antlong priority: normal severity: normal status: open title: string.letters should display locale based equivalent of a-Z versions: Python 2.5, Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 05:42:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 03:42:18 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279856538.89.0.851699054203.issue9335@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Here is a way to reproduce this from command line: $ python2.6 Python 2.6.5 (r265:79359, Mar 24 2010, 01:32:55) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> '\xff'.isalpha() False >>> import idlelib.run >>> '\xff'.isalpha() True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 05:47:03 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 03:47:03 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279856823.24.0.685642001572.issue9335@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Or even simpler: $ python2.6 Python 2.6.5 (r265:79359, Mar 24 2010, 01:32:55) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import Tkinter >>> '\xff'.isalpha() True ---------- components: +Tkinter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 05:54:45 2010 From: report at bugs.python.org (Eric Talevich) Date: Fri, 23 Jul 2010 03:54:45 +0000 Subject: [issue2734] 2to3 converts long(itude) argument to int In-Reply-To: <1209669660.53.0.857681626906.issue2734@psf.upfronthosting.co.za> Message-ID: <1279857285.11.0.68681334981.issue2734@psf.upfronthosting.co.za> Eric Talevich added the comment: This issue still occurs when the name "long" is a function argument: def double(long): return long * 2 2to3 converts it to: def double(long): return int * 2 Should I file a new bug, or can someone reopen this? ---------- nosy: +eric-talevich versions: +Python 2.7 -Python 3.0 Added file: http://bugs.python.org/file18135/long_fixer_bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 06:02:10 2010 From: report at bugs.python.org (Anthony Long) Date: Fri, 23 Jul 2010 04:02:10 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279857730.7.0.868634158605.issue9335@psf.upfronthosting.co.za> Anthony Long added the comment: Windows 64 bit, python 2.7: >>> '\xff'.isalpha() >>> False >>> import idlelib.run >>> '\xff'.isalpha() >>> False and- Windows 32 bit, python 2.6: Both False. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 06:02:45 2010 From: report at bugs.python.org (Anthony Long) Date: Fri, 23 Jul 2010 04:02:45 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279857765.27.0.389679309077.issue9335@psf.upfronthosting.co.za> Anthony Long added the comment: Mac 10.5.6: py 2.6.4 - broken Python 2.6.4 (r264:75706, Mar 18 2010, 14:58:13) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> '\xff'.isalpha() False >>> import Tkinter >>> '\xff'.isalpha() True >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 06:17:59 2010 From: report at bugs.python.org (Anthony Long) Date: Fri, 23 Jul 2010 04:17:59 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279858679.73.0.99912052927.issue9335@psf.upfronthosting.co.za> Anthony Long added the comment: Python 2.6.4, Mac 10.5: >>> from string import letters >>> letters 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\xaa\xb5\xba\xc0\xc1\xc2\xc 3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd 8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xe c\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff' >>> import locale >>> locale.getdefaultlocale() ('en_US', 'UTF8') >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 06:19:04 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 04:19:04 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279858744.26.0.168086003551.issue9335@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This is clearly a Tkinter rather than Mac issue, so I am unassigning this from Ronald. This appears to be the same problem as the one Mark described in msg102301. >>> import locale >>> locale.nl_langinfo(locale.CODESET) 'US-ASCII' >>> import _tkinter >>> locale.nl_langinfo(locale.CODESET) 'UTF-8' This happens in both 2.6 and 2.7, but seems to be deliberate. As Mark wrote in msg102328: """ 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 """ What is still unclear to me, is why after CODESET changes to 'UTF-8', 2.6 thinks that '\xff' is a letter, but 2.7 does not. Of course, '\xff' makes little sense in 'UTF-8', but why does the answer change between versions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 06:20:10 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 04:20:10 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279858810.79.0.392145246617.issue9335@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 06:20:29 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 04:20:29 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279858829.07.0.414471986809.issue9335@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: ronaldoussoren -> belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 06:26:57 2010 From: report at bugs.python.org (Anthony Long) Date: Fri, 23 Jul 2010 04:26:57 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279859217.25.0.344982987659.issue9335@psf.upfronthosting.co.za> Anthony Long added the comment: After import _tkinter, I would up getting this, which is totally different than before: >>> letters 'abcdefghijklmnopqrstuvwxyz\xaa\xb5\xba\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xffABCDEFGHIJKLMNOPQRSTUVWXYZ\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xde' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 06:40:42 2010 From: report at bugs.python.org (Anthony Long) Date: Fri, 23 Jul 2010 04:40:42 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279860042.03.0.225256180464.issue9335@psf.upfronthosting.co.za> Anthony Long added the comment: A bit more info: Python 2.6.4 (r264:75706, Mar 18 2010, 14:58:13) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.nl_langinfo(locale.CODESET) 'US-ASCII' >>> along-mb:~ along$ locale LANG="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_CTYPE="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_ALL= along-mb:~ along$ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 06:50:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 04:50:40 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279860640.83.0.120492535636.issue9335@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: In 3.x, it is different: >>> locale.nl_langinfo(locale.CODESET) 'UTF-8' Victor, This looks like your cup of tee. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 09:27:48 2010 From: report at bugs.python.org (Craig McQueen) Date: Fri, 23 Jul 2010 07:27:48 +0000 Subject: [issue7639] bdist_msi fails on files with long names In-Reply-To: <1262718207.72.0.84290104112.issue7639@psf.upfronthosting.co.za> Message-ID: <1279870068.68.0.630819828493.issue7639@psf.upfronthosting.co.za> Changes by Craig McQueen : ---------- nosy: +cmcqueen1975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 09:47:56 2010 From: report at bugs.python.org (Chris Rebert) Date: Fri, 23 Jul 2010 07:47:56 +0000 Subject: [issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True In-Reply-To: <1266401759.12.0.600282213979.issue7950@psf.upfronthosting.co.za> Message-ID: <1279871276.78.0.693282709234.issue7950@psf.upfronthosting.co.za> Chris Rebert added the comment: I found some extra time. Here's an initial suggested patch against py3k head. Disclaimer: I have no special expertise in computer security beyond having read "Secure Coding: Principles and Practices" a while back. ---------- keywords: +patch Added file: http://bugs.python.org/file18136/subprocess.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 10:03:45 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 23 Jul 2010 08:03:45 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279872225.3.0.538493653151.issue9335@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I fail to see the bug in this report. '\xff' is a letter because the C library says it is. If you think the result is wrong, file a bug report with the OS vendor. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 10:18:59 2010 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 23 Jul 2010 08:18:59 +0000 Subject: [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1279873139.97.0.853235033061.issue9264@psf.upfronthosting.co.za> Eli Bendersky added the comment: Attaching a patch vs. the 2.6 maintenance branch for the Doc/library/trace.rst file * Fixed some formatting issues for command line options and class references * Documented all relevant user-accessible methods * Divided command-line options logically into sub-sections and improved their explanations I ran `make html` from the Doc/ directory and made sure the HTML looks OK ---------- Added file: http://bugs.python.org/file18137/issue9262.py26.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 10:27:38 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 23 Jul 2010 08:27:38 +0000 Subject: [issue9193] Versioned .so files In-Reply-To: <1278527607.97.0.766712002778.issue9193@psf.upfronthosting.co.za> Message-ID: <1279873658.1.0.551524608831.issue9193@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'd love it if Windows was also supported, but right now I don't have the cycles to make and test the changes, or the expertise to understand any related Windows issues. I've mentioned this in PEP 3149, and I'd happily accept code and PEP updates for Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 11:37:50 2010 From: report at bugs.python.org (Virgil Dupras) Date: Fri, 23 Jul 2010 09:37:50 +0000 Subject: [issue839159] iterators broken for weak dicts Message-ID: <1279877870.23.0.904027188186.issue839159@psf.upfronthosting.co.za> Virgil Dupras added the comment: It looks like this issue has been fixed in issue7105 already. Can we close this ticket? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 11:38:22 2010 From: report at bugs.python.org (=?utf-8?b?U8OpYmFzdGllbiBTYWJsw6k=?=) Date: Fri, 23 Jul 2010 09:38:22 +0000 Subject: [issue3526] Customized malloc implementation on SunOS and AIX In-Reply-To: <1218190381.02.0.174331191244.issue3526@psf.upfronthosting.co.za> Message-ID: <1279877902.95.0.11468918001.issue3526@psf.upfronthosting.co.za> S?bastien Sabl? added the comment: Well I am still interested in getting this patch officially integrated in Python. This patch is integrated in the version of Python that we deploy to our customers with our products (Sungard GP3). So it runs in production at various clients sites (some European banks with massive SunOs and AIX servers running thousands of sessions of our application) and it has provided some huge memory consumption improvements. The problem appears quite obviously when you run a relatively big application on SunOS or AIX: if you allocate some memory in a Python process at some stage, this memory will never be released to the system until you leave that process, even if that memory is not used by Python anymore. With my patch, the process can actually release the memory to the system so that it can be used by other processes. Linux is not impacted by this problem because the GNU libc implements the same memory allocation mechanism based on dlmalloc. I guess there are not that many people running Python applications with a big memory footprint on AIX or SunOS, otherwise this problem would be more popular. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 11:49:17 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Jul 2010 09:49:17 +0000 Subject: [issue839159] iterators broken for weak dicts Message-ID: <1279878557.31.0.130761055116.issue839159@psf.upfronthosting.co.za> Mark Dickinson added the comment: It's not yet fixed in 2.7 or 2.6. Updating versions. ---------- nosy: +mark.dickinson versions: +Python 2.6 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 11:53:35 2010 From: report at bugs.python.org (Virgil Dupras) Date: Fri, 23 Jul 2010 09:53:35 +0000 Subject: [issue839159] iterators broken for weak dicts Message-ID: <1279878815.72.0.0719320362451.issue839159@psf.upfronthosting.co.za> Virgil Dupras added the comment: We might as well backport Antoine's patch rather than take this one (even if mine for 2.x already). It would be weird to have 2 wildly different patches to solve the same problem. Maybe close this ticket and flag issue7105 for backporting? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 11:56:06 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Jul 2010 09:56:06 +0000 Subject: [issue839159] iterators broken for weak dicts Message-ID: <1279878966.87.0.188259006281.issue839159@psf.upfronthosting.co.za> Mark Dickinson added the comment: Agreed. ---------- resolution: -> duplicate status: open -> closed superseder: -> weak dict iterators are fragile because of unpredictable GC runs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 11:57:24 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Jul 2010 09:57:24 +0000 Subject: [issue7105] weak dict iterators are fragile because of unpredictable GC runs In-Reply-To: <1255282166.4.0.13882602695.issue7105@psf.upfronthosting.co.za> Message-ID: <1279879044.73.0.605325480429.issue7105@psf.upfronthosting.co.za> Mark Dickinson added the comment: The issue still exists in 2.6 and 2.7. Closing issue 839159 as a duplicate of this one. ---------- nosy: +mark.dickinson resolution: fixed -> stage: committed/rejected -> status: closed -> open versions: +Python 2.6, Python 2.7 -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 11:58:05 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Jul 2010 09:58:05 +0000 Subject: [issue7105] weak dict iterators are fragile because of unpredictable GC runs In-Reply-To: <1255282166.4.0.13882602695.issue7105@psf.upfronthosting.co.za> Message-ID: <1279879085.11.0.14889740819.issue7105@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +BreamoreBoy, ajaksu2, dcjim, elachuni, tseaver, vdupras _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 11:59:12 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 09:59:12 +0000 Subject: [issue4047] test_run_abort triggers CrashReporter on MacOS X In-Reply-To: <1223212546.3.0.400600313868.issue4047@psf.upfronthosting.co.za> Message-ID: <1279879152.25.0.372158510613.issue4047@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Committed a fix in r83067 (py3k), will backport to other active branches shortly. ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:03:19 2010 From: report at bugs.python.org (Peter) Date: Fri, 23 Jul 2010 10:03:19 +0000 Subject: [issue2734] 2to3 converts long(itude) argument to int In-Reply-To: <1209669660.53.0.857681626906.issue2734@psf.upfronthosting.co.za> Message-ID: <1279879399.41.0.650879940787.issue2734@psf.upfronthosting.co.za> Changes by Peter : ---------- nosy: +maubp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:03:30 2010 From: report at bugs.python.org (Peter) Date: Fri, 23 Jul 2010 10:03:30 +0000 Subject: [issue9257] cElementTree iterparse requires events as bytes; ElementTree uses strings In-Reply-To: <1279078067.06.0.575324977312.issue9257@psf.upfronthosting.co.za> Message-ID: <1279879410.89.0.605916847943.issue9257@psf.upfronthosting.co.za> Changes by Peter : ---------- nosy: +maubp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:11:21 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 23 Jul 2010 10:11:21 +0000 Subject: [issue6095] os.curdir as the default argument for os.listdir In-Reply-To: <1243122886.86.0.888741323334.issue6095@psf.upfronthosting.co.za> Message-ID: <1279879881.19.0.529654540003.issue6095@psf.upfronthosting.co.za> Martin v. L?wis added the comment: At Europython, we agreed that this functionality is too trivial to add to the standard library; for all practical purposes, os.listdir(".") will do the right thing. So rejecting this as won't fix. ---------- nosy: +loewis resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:14:08 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 10:14:08 +0000 Subject: [issue9073] Tkinter module missing from install on OS X 10.6.4 In-Reply-To: <1277409787.07.0.389158105025.issue9073@psf.upfronthosting.co.za> Message-ID: <1279880048.81.0.0103121480519.issue9073@psf.upfronthosting.co.za> Ronald Oussoren added the comment: As Ned noted Tkinter is named tkinter in py3k. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:14:54 2010 From: report at bugs.python.org (Virgil Dupras) Date: Fri, 23 Jul 2010 10:14:54 +0000 Subject: [issue8392] unit tests rather light on testing __import__(..., level) In-Reply-To: <1271203412.15.0.504789215632.issue8392@psf.upfronthosting.co.za> Message-ID: <1279880094.7.0.898306505867.issue8392@psf.upfronthosting.co.za> Virgil Dupras added the comment: If I understand the patch correctly, this patch basically add a test for relative imports. I'm pretty sure this is already testes in importlib.test. Brett, am I right? If yes, there's no point in applying this patch. ---------- nosy: +vdupras _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:15:08 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 10:15:08 +0000 Subject: [issue7895] Mac 10.6 mac_ver() crashes with USING_FORK_WITHOUT_EXEC_IS _NOT_SUPPORTED_BY_FILE_MANAGER In-Reply-To: <1265741797.91.0.267775294764.issue7895@psf.upfronthosting.co.za> Message-ID: <1279880108.29.0.129059882169.issue7895@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:23:39 2010 From: report at bugs.python.org (Richard Jones) Date: Fri, 23 Jul 2010 10:23:39 +0000 Subject: [issue4184] Remove use of private attributes in smtpd In-Reply-To: <1224724634.09.0.0444621109477.issue4184@psf.upfronthosting.co.za> Message-ID: <1279880619.58.0.60432964275.issue4184@psf.upfronthosting.co.za> Richard Jones added the comment: After discussing with core devs at the EuroPython sprint I will implement a different approach: new attributes with the old, private attributes implemented as properties over the new attributes. The properties responsible for this will raise PendingDeprecationWarnings. I'll also be improving (well, *implementing*) test coverage for the module while I'm at it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:23:40 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 23 Jul 2010 10:23:40 +0000 Subject: [issue8392] unit tests rather light on testing __import__(..., level) In-Reply-To: <1271203412.15.0.504789215632.issue8392@psf.upfronthosting.co.za> Message-ID: <1279880620.86.0.476602994111.issue8392@psf.upfronthosting.co.za> Brett Cannon added the comment: Yes, importlib has tests for relative import, but those are only run against importlib and not __import__. Adding Skip's tests and seeing how they differ from what importlib.test.import_.test_relative_imports would be good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:24:58 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 10:24:58 +0000 Subject: [issue5120] Disabling test_ttk_guionly on mac In-Reply-To: <1233437150.39.0.445953575427.issue5120@psf.upfronthosting.co.za> Message-ID: <1279880698.05.0.556264191047.issue5120@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This is still an issue for the PPC Tiger buildbot: test_ttk_guionly make: *** [buildbottest] Segmentation fault (Direct link: http://www.python.org/dev/buildbot/builders/PPC%20Tiger%202.7/builds/39/steps/test/logs/stdio) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:29:51 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 23 Jul 2010 10:29:51 +0000 Subject: [issue6095] os.curdir as the default argument for os.listdir In-Reply-To: <1243122886.86.0.888741323334.issue6095@psf.upfronthosting.co.za> Message-ID: <1279880991.43.0.710768002209.issue6095@psf.upfronthosting.co.za> Tarek Ziad? added the comment: what do you mean by 'too trivial' ? I don't understand why this is now suddenly rejected. Raymond, Guido, and other people have +1 this on python-ideas. http://mail.python.org/pipermail/python-ideas/2009-May/004871.html People have worked on a patch, so I think this is unfair to close it now without more explanations, and just say that 'we agreed at EP'... ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:31:00 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 23 Jul 2010 10:31:00 +0000 Subject: [issue9337] Make float.__str__ behave identically to float.__repr__ In-Reply-To: <1279881060.45.0.501412515152.issue9337@psf.upfronthosting.co.za> Message-ID: <1279881060.45.0.501412515152.issue9337@psf.upfronthosting.co.za> New submission from Mark Dickinson : Proposal: make the str of a float (or complex number) identical to the repr of a float (or complex number), in Python 3.2. This idea came up a couple of times at EuroPython, and generally met with approval. An open question: what should be done on platforms that don't support the short float repr? In practice, I don't think this matters too much: it's difficult to find such platforms. The simplest thing to do would be to make __str__ identical to __repr__ on all platforms. This change *will* inevitably break code; the question is whether this level of breakage is acceptable for 3.1 -> 3.2. I'll also bring this up on the python-dev mailing list. ---------- assignee: mark.dickinson components: Interpreter Core messages: 111268 nosy: eric.smith, mark.dickinson priority: normal severity: normal stage: needs patch status: open title: Make float.__str__ behave identically to float.__repr__ type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:34:36 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 23 Jul 2010 10:34:36 +0000 Subject: [issue6095] os.curdir as the default argument for os.listdir In-Reply-To: <1243122886.86.0.888741323334.issue6095@psf.upfronthosting.co.za> Message-ID: <1279881276.8.0.420994676231.issue6095@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:45:00 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 23 Jul 2010 10:45:00 +0000 Subject: [issue6095] os.curdir as the default argument for os.listdir In-Reply-To: <1243122886.86.0.888741323334.issue6095@psf.upfronthosting.co.za> Message-ID: <1279881900.39.0.910425453719.issue6095@psf.upfronthosting.co.za> Martin v. L?wis added the comment: ok, so reopening. Linking to the mailing list would have helped. ---------- resolution: wont fix -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:46:29 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 10:46:29 +0000 Subject: [issue9338] argparse optionals with nargs='+' can't be followed by positionals In-Reply-To: <1279881989.28.0.725806934086.issue9338@psf.upfronthosting.co.za> Message-ID: <1279881989.28.0.725806934086.issue9338@psf.upfronthosting.co.za> New submission from Steven Bethard : [From the old argparse tracker: http://code.google.com/p/argparse/issues/detail?id=20] You can't follow a nargs='+' optional argument with a positional argument: >>> import argparse >>> parser = argparse.ArgumentParser(prog='PROG') >>> parser.add_argument('--badger', nargs='+') >>> parser.add_argument('spam') >>> parser.parse_args('--badger A B C D'.split()) usage: PROG [-h] [--badger BADGER [BADGER ...]] spam PROG: error: too few arguments Ideally, this should produce: >>> parser.parse_args('--badger A B C D'.split()) Namespace(badger=['A', 'B', 'C'], spam='D') The problem is that the nargs='+' causes the optional to consume all the arguments following it, even though we should know that we need to save one for the final positional argument. A workaround is to specify '--', e.g.: >>> parser.parse_args('--badger A B C -- D'.split()) Namespace(badger=['A', 'B', 'C'], spam='D') The problem arises from the fact that argparse uses regular-expression style matching for positional arguments, but it does that separately from what it does for optional arguments. One solution might be to build a regular expression of the possible things a parser could match. So given a parser like:: parser = argparse.ArgumentParser() parser.add_argument('-w') parser.add_argument('-x', nargs='+') parser.add_argument('y') parser.add_argument('z', nargs='*') the regular expression might look something like (where positionals have been replaced by the character A):: (-w A)? (-x A+)? A (-w A)? (-x A+)? A* (-w A)? (-x A+)? Note that the optionals can appear between any positionals, so I have to repeat their regular expressions multiple times. Because of this, I worry about how big the regular expression might grow to be for large parsers. But maybe this is the right way to solve the problem. ---------- messages: 111270 nosy: bethard priority: normal severity: normal stage: needs patch status: open title: argparse optionals with nargs='+' can't be followed by positionals type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:47:00 2010 From: report at bugs.python.org (Steve Holden) Date: Fri, 23 Jul 2010 10:47:00 +0000 Subject: [issue8118] PYTHON_API_VERSION needs to be bumped? In-Reply-To: <1268321904.88.0.141264356939.issue8118@psf.upfronthosting.co.za> Message-ID: <1279882020.4.0.422126950138.issue8118@psf.upfronthosting.co.za> Steve Holden added the comment: With the 2.7 release now completed should we close this issue? There's nothing to be done about the 2.6 issue. ---------- nosy: +holdenweb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:47:34 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 23 Jul 2010 10:47:34 +0000 Subject: [issue9338] argparse optionals with nargs='+' can't be followed by positionals In-Reply-To: <1279881989.28.0.725806934086.issue9338@psf.upfronthosting.co.za> Message-ID: <1279882054.37.0.0980361862527.issue9338@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> argparse does not accept options taking arguments beginning with dash (regression from optparse) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:51:56 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 23 Jul 2010 10:51:56 +0000 Subject: [issue6095] os.curdir as the default argument for os.listdir In-Reply-To: <1243122886.86.0.888741323334.issue6095@psf.upfronthosting.co.za> Message-ID: <1279882316.13.0.320471498942.issue6095@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Yes, sorry. I should have added the link when I opened the bug. Thanks for reopening it ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:53:15 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 23 Jul 2010 10:53:15 +0000 Subject: [issue6095] os.curdir as the default argument for os.listdir In-Reply-To: <1243122886.86.0.888741323334.issue6095@psf.upfronthosting.co.za> Message-ID: <1279882395.23.0.105058460087.issue6095@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- resolution: wont fix -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:53:31 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Fri, 23 Jul 2010 10:53:31 +0000 Subject: [issue9173] logger statement not guarded in shutil._make_tarball In-Reply-To: <1278374700.0.0.888108186461.issue9173@psf.upfronthosting.co.za> Message-ID: <1279882411.38.0.996502216091.issue9173@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- nosy: +tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:56:55 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 23 Jul 2010 10:56:55 +0000 Subject: [issue6095] os.curdir as the default argument for os.listdir In-Reply-To: <1243122886.86.0.888741323334.issue6095@psf.upfronthosting.co.za> Message-ID: <1279882615.04.0.850714016856.issue6095@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- nosy: -gvanrossum resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:57:45 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 23 Jul 2010 10:57:45 +0000 Subject: [issue6095] os.curdir as the default argument for os.listdir In-Reply-To: <1243122886.86.0.888741323334.issue6095@psf.upfronthosting.co.za> Message-ID: <1279882665.98.0.215869837838.issue6095@psf.upfronthosting.co.za> Tarek Ziad? added the comment: reopening again sorry (roundup bug) ---------- resolution: wont fix -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 12:59:48 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 10:59:48 +0000 Subject: [issue8118] PYTHON_API_VERSION needs to be bumped? In-Reply-To: <1268321904.88.0.141264356939.issue8118@psf.upfronthosting.co.za> Message-ID: <1279882788.95.0.748215329789.issue8118@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I agree, this issue can be closed as there's nothing useful we can do at this point in time. ---------- resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 13:13:27 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 11:13:27 +0000 Subject: [issue9275] python 2.7 OS X installer no longer installs /usr/local/bin symlinks by default In-Reply-To: <1279302354.45.0.244219891996.issue9275@psf.upfronthosting.co.za> Message-ID: <1279883607.56.0.37440827683.issue9275@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Fixed in r83070, NEWS update in r83071. ---------- resolution: -> fixed stage: -> committed/rejected type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 13:13:39 2010 From: report at bugs.python.org (Virgil Dupras) Date: Fri, 23 Jul 2010 11:13:39 +0000 Subject: [issue8392] unit tests rather light on testing __import__(..., level) In-Reply-To: <1271203412.15.0.504789215632.issue8392@psf.upfronthosting.co.za> Message-ID: <1279883619.33.0.589125685354.issue8392@psf.upfronthosting.co.za> Virgil Dupras added the comment: Because importlib is already well tested and that it already has the machinery to test __import__ instead of the importlib code, I suggest that we re-use importlib's relative tests instead. Attached is a patch that does this. I made sure that __import__ was actually called. ---------- Added file: http://bugs.python.org/file18138/issue8392.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 13:15:21 2010 From: report at bugs.python.org (Dmitry Jemerov) Date: Fri, 23 Jul 2010 11:15:21 +0000 Subject: [issue8123] TypeError in urllib when trying to use HTTP authentication In-Reply-To: <1268408265.34.0.392057078834.issue8123@psf.upfronthosting.co.za> Message-ID: <1279883721.22.0.748236755332.issue8123@psf.upfronthosting.co.za> Dmitry Jemerov added the comment: Patch (with unittest) attached. ---------- keywords: +patch Added file: http://bugs.python.org/file18139/8123.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 13:15:21 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 11:15:21 +0000 Subject: [issue9275] python 2.7 OS X installer no longer installs /usr/local/bin symlinks by default In-Reply-To: <1279302354.45.0.244219891996.issue9275@psf.upfronthosting.co.za> Message-ID: <1279883721.67.0.111129079229.issue9275@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 13:19:29 2010 From: report at bugs.python.org (Brian Brazil) Date: Fri, 23 Jul 2010 11:19:29 +0000 Subject: [issue9339] threading is_alive documnetation is unclear In-Reply-To: <1279883969.69.0.278185543155.issue9339@psf.upfronthosting.co.za> Message-ID: <1279883969.69.0.278185543155.issue9339@psf.upfronthosting.co.za> New submission from Brian Brazil : http://docs.python.org/py3k/library/threading.html "Roughly, a thread is alive from the moment the start() method returns until its run() method terminates." Using "Roughly" in relation to threading is a bit unspecific. I've had a look through _bootstrap_inner() and attached a patch to clarify this. ---------- assignee: docs at python components: Documentation files: threading-roughly-doc-fix.patch keywords: patch messages: 111278 nosy: bbrazil, docs at python priority: normal severity: normal status: open title: threading is_alive documnetation is unclear 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/file18140/threading-roughly-doc-fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 13:21:14 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 11:21:14 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1279884074.33.0.439403235075.issue9334@psf.upfronthosting.co.za> Steven Bethard added the comment: Note that the negative number heuristic you're complaining about doesn't actually affect your code below. The negative number heuristic is only used when you have some options that look like negative numbers. See the docs for more information: http://docs.python.org/library/argparse.html#arguments-containing Your problem is that you want "--safe" to be treated as a positional argument even though you've declared it as an option. Basically there are two reasonable interpretations of this situation. Consider something like "--conf-file --safe". Either the user wants a conf file named "--safe", or the user accidentally forgot to type the name of the conf file. Argparse assumes the latter, though either one is conceivable. Argparse assumes the latter because, while it occasionally throws an unnecessary exception, the other behavior would allow an error to pass silently. I'm definitely opposed to changing the default behavior to swallow some errors silently. If you'd like to propose an API for enabling such behavior explicitly and supply a patch and tests implementing it, I'll be happy to review it though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 13:26:18 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 11:26:18 +0000 Subject: [issue9338] argparse optionals with nargs='+' can't be followed by positionals In-Reply-To: <1279881989.28.0.725806934086.issue9338@psf.upfronthosting.co.za> Message-ID: <1279884378.98.0.0955897872204.issue9338@psf.upfronthosting.co.za> Steven Bethard added the comment: This is definitely a different bug from the one you just marked it as a duplicate of. ---------- resolution: duplicate -> stage: committed/rejected -> needs patch status: closed -> open superseder: argparse does not accept options taking arguments beginning with dash (regression from optparse) -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 13:29:52 2010 From: report at bugs.python.org (Brian Brazil) Date: Fri, 23 Jul 2010 11:29:52 +0000 Subject: [issue9339] threading is_alive documnetation is unclear In-Reply-To: <1279883969.69.0.278185543155.issue9339@psf.upfronthosting.co.za> Message-ID: <1279884592.65.0.39675623395.issue9339@psf.upfronthosting.co.za> Changes by Brian Brazil : Removed file: http://bugs.python.org/file18140/threading-roughly-doc-fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 13:30:30 2010 From: report at bugs.python.org (Brian Brazil) Date: Fri, 23 Jul 2010 11:30:30 +0000 Subject: [issue9339] threading is_alive documnetation is unclear In-Reply-To: <1279883969.69.0.278185543155.issue9339@psf.upfronthosting.co.za> Message-ID: <1279884630.27.0.145907328795.issue9339@psf.upfronthosting.co.za> Brian Brazil added the comment: Here's a slightly cleaner version. ---------- Added file: http://bugs.python.org/file18141/threading-roughly-doc-fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 13:41:48 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 23 Jul 2010 11:41:48 +0000 Subject: [issue9338] argparse optionals with nargs='+' can't be followed by positionals In-Reply-To: <1279881989.28.0.725806934086.issue9338@psf.upfronthosting.co.za> Message-ID: <1279885308.72.0.806892742864.issue9338@psf.upfronthosting.co.za> ?ric Araujo added the comment: I read too fast, I?m sorry for that. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 13:48:53 2010 From: report at bugs.python.org (=?utf-8?q?Petras_Zdanavi=C4=8Dius?=) Date: Fri, 23 Jul 2010 11:48:53 +0000 Subject: [issue6878] changed return type from tkinter.Canvas.coords In-Reply-To: <1252603508.57.0.591042976978.issue6878@psf.upfronthosting.co.za> Message-ID: <1279885733.8.0.327629515586.issue6878@psf.upfronthosting.co.za> Petras Zdanavi?ius added the comment: I have added tests. ---------- nosy: +Petras.Zdanavi?ius Added file: http://bugs.python.org/file18142/fix-6878-with-tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 13:50:53 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 23 Jul 2010 11:50:53 +0000 Subject: [issue6878] changed return type from tkinter.Canvas.coords In-Reply-To: <1252603508.57.0.591042976978.issue6878@psf.upfronthosting.co.za> Message-ID: <1279885853.01.0.987879572595.issue6878@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good to me. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:00:05 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 12:00:05 +0000 Subject: [issue9340] argparse parse_known_args does not work with subparsers In-Reply-To: <1279886405.92.0.918578525345.issue9340@psf.upfronthosting.co.za> Message-ID: <1279886405.92.0.918578525345.issue9340@psf.upfronthosting.co.za> New submission from Steven Bethard : [Moved from http://code.google.com/p/argparse/issues/detail?id=45] If you try to use parse_known_args and you have a subparser, the subparser will still complain if it sees extra arguments: >>> parser = argparse.ArgumentParser() >>> subparsers = parser.add_subparsers() >>> subparsers.add_parser('A') >>> parser.parse_known_args(['A', '--foo', 'b']) usage: A [-h] A: error: unrecognized arguments: --foo b What should be returned is probably: >>> parser.parse_known_args(['A', '--foo', 'b']) (Namespace(), ['--foo', 'b']) The problem is that subparsers don't know whether they're being called by parse_args() or parse_known_args(). I see a few possible fixes: * Add another argument to Action.__call__ that indicates what method is being called. But that would break any existing subclasses. * Do some stack inspection using sys._getframe(). But that's not guaranteed to work on other implementations of Python. * When parse_args is called, set some flag on the subparsers object that causes it to call parse_known_args instead, and restore that flag before parse_known_args returns. This probably introduces potential threading issues, though practically perhaps they'll never turn up. ---------- assignee: bethard components: Library (Lib) messages: 111285 nosy: bethard priority: normal severity: normal stage: needs patch status: open title: argparse parse_known_args does not work with subparsers type: behavior versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:08:16 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 23 Jul 2010 12:08:16 +0000 Subject: [issue9255] document that the 'test' package is for core developers only In-Reply-To: <1279058028.22.0.187583087672.issue9255@psf.upfronthosting.co.za> Message-ID: <1279886896.01.0.278012403331.issue9255@psf.upfronthosting.co.za> Brett Cannon added the comment: 3.2: 83072 3.1: 83076 2.7: 83077 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:13:41 2010 From: report at bugs.python.org (Virgil Dupras) Date: Fri, 23 Jul 2010 12:13:41 +0000 Subject: [issue7830] Flatten nested functools.partial In-Reply-To: <1265051251.66.0.305258896073.issue7830@psf.upfronthosting.co.za> Message-ID: <1279887221.71.0.0641768353595.issue7830@psf.upfronthosting.co.za> Virgil Dupras added the comment: Applies cleanly on the py3k branch at r83069, the tests work correctly (fail before applying the patch, success afterwards), and, to the best of my C-API knowledge, the C code is alright. Oh, and it behaves as described... Python 3.2a0 (py3k:83069M, Jul 23 2010, 12:40:49) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> def foo(a, b, c): pass ... >>> from functools import partial >>> p1 = partial(foo, 1) >>> p1.func, p1.args (, (1,)) >>> p2 = partial(foo, 2) >>> p2.func, p2.args (, (2,)) ---------- nosy: +vdupras _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:17:15 2010 From: report at bugs.python.org (Dmitry Jemerov) Date: Fri, 23 Jul 2010 12:17:15 +0000 Subject: [issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry In-Reply-To: <1279454095.41.0.733053669611.issue9291@psf.upfronthosting.co.za> Message-ID: <1279887435.13.0.990167220752.issue9291@psf.upfronthosting.co.za> Dmitry Jemerov added the comment: Patch (suggested fix and unittest) attached. ---------- keywords: +patch Added file: http://bugs.python.org/file18143/9291.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:17:17 2010 From: report at bugs.python.org (Virgil Dupras) Date: Fri, 23 Jul 2010 12:17:17 +0000 Subject: [issue7830] Flatten nested functools.partial In-Reply-To: <1265051251.66.0.305258896073.issue7830@psf.upfronthosting.co.za> Message-ID: <1279887437.03.0.968628863761.issue7830@psf.upfronthosting.co.za> Virgil Dupras added the comment: Oops, used it wrong (but it still works correctly). >>> p2 = partial(p1, 2) >>> p2.func, p2.args (, (1, 2)) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:17:31 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 12:17:31 +0000 Subject: [issue9341] allow argparse subcommands to be grouped In-Reply-To: <1279887451.34.0.723880615782.issue9341@psf.upfronthosting.co.za> Message-ID: <1279887451.34.0.723880615782.issue9341@psf.upfronthosting.co.za> New submission from Steven Bethard : [Moved from http://code.google.com/p/argparse/issues/detail?id=53] It's currently not possible to have subcommands formatted in groups, e.g. instead of: subcommands: {a,b,c,d,e} a a subcommand help b b subcommand help c c subcommand help d d subcommand help e e subcommand help you should be able to get something like: subcommands: group1: a a subcommand help b b subcommand help c c subcommand help group2: d d subcommand help e e subcommand help ---------- components: Library (Lib) messages: 111290 nosy: bethard priority: normal severity: normal stage: needs patch status: open title: allow argparse subcommands to be grouped type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:17:44 2010 From: report at bugs.python.org (Dmitry Jemerov) Date: Fri, 23 Jul 2010 12:17:44 +0000 Subject: [issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry In-Reply-To: <1279454095.41.0.733053669611.issue9291@psf.upfronthosting.co.za> Message-ID: <1279887464.88.0.0322238007963.issue9291@psf.upfronthosting.co.za> Dmitry Jemerov added the comment: And by the way I've verified that the problem doesn't happen in py3k trunk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:20:10 2010 From: report at bugs.python.org (John Chandler) Date: Fri, 23 Jul 2010 12:20:10 +0000 Subject: [issue9342] Tests for monthrange in calendar.py module In-Reply-To: <1279887609.81.0.197947140036.issue9342@psf.upfronthosting.co.za> Message-ID: <1279887609.81.0.197947140036.issue9342@psf.upfronthosting.co.za> New submission from John Chandler : Hi, Attaching a patch for the test_calendar.py file. Adds six tests to provide test coverage of the monthrange function. John ---------- components: Tests files: test_calendar.patch keywords: patch messages: 111292 nosy: John.Chandler priority: normal severity: normal status: open title: Tests for monthrange in calendar.py module versions: Python 3.2 Added file: http://bugs.python.org/file18144/test_calendar.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:21:20 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 23 Jul 2010 12:21:20 +0000 Subject: [issue6095] os.curdir as the default argument for os.listdir In-Reply-To: <1243122886.86.0.888741323334.issue6095@psf.upfronthosting.co.za> Message-ID: <1279887680.75.0.15567182074.issue6095@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for the patch. Committed (with modifications) as r83078. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:25:37 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 12:25:37 +0000 Subject: =?utf-8?q?=5Bissue4640=5D_optparse_doesn=E2=80=99t_disallow_adding_one-da?= =?utf-8?b?c2ggbG9uZyBvcHRpb25zICjigJwtb3B0aW9u4oCdKQ==?= In-Reply-To: <1229091283.09.0.553967635356.issue4640@psf.upfronthosting.co.za> Message-ID: <1279887937.39.0.324932109192.issue4640@psf.upfronthosting.co.za> Steven Bethard added the comment: In argparse, "-debug" is a perfectly valid flag (you're not required to have "--debug", and you can even have "+debug" if you want and you specify it correctly), so unless I misunderstand what the bug is, this doesn't apply to argparse. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:25:47 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 23 Jul 2010 12:25:47 +0000 Subject: [issue6095] os.curdir as the default argument for os.listdir In-Reply-To: <1243122886.86.0.888741323334.issue6095@psf.upfronthosting.co.za> Message-ID: <1279887947.15.0.398677072194.issue6095@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Thanks for looking into this ! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:30:37 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 23 Jul 2010 12:30:37 +0000 Subject: [issue9339] threading is_alive documnetation is unclear In-Reply-To: <1279883969.69.0.278185543155.issue9339@psf.upfronthosting.co.za> Message-ID: <1279888237.34.0.943670563625.issue9339@psf.upfronthosting.co.za> Brett Cannon added the comment: 3.2: 83080 3.1: 83081 2.7: 83082 ---------- nosy: +brett.cannon resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:32:33 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 12:32:33 +0000 Subject: [issue4047] test_run_abort triggers CrashReporter on MacOS X In-Reply-To: <1223212546.3.0.400600313868.issue4047@psf.upfronthosting.co.za> Message-ID: <1279888353.44.0.219472639278.issue4047@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Backported to 3.1 in r83069, 2.7 in r83079, 2.6 in r83083 ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:33:30 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 23 Jul 2010 12:33:30 +0000 Subject: [issue9255] document that the 'test' package is for core developers only In-Reply-To: <1279058028.22.0.187583087672.issue9255@psf.upfronthosting.co.za> Message-ID: <1279888410.93.0.300292219033.issue9255@psf.upfronthosting.co.za> ?ric Araujo added the comment: Brett, could you add ?r? or ?rev ? before revision numbers in the future? It?s Roundup implicit markup to make a link to a revision. (Evil but handy.) Thanks in advance :) ---------- nosy: +merwok stage: needs patch -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:33:38 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 23 Jul 2010 12:33:38 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279888418.44.0.85899030541.issue1812@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Peter again the py3k patch is fine and the 2.7 fails. Is this worth all your effort? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:34:19 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 23 Jul 2010 12:34:19 +0000 Subject: [issue2979] use_datetime in SimpleXMLRPCServer In-Reply-To: <1211846989.94.0.031553096454.issue2979@psf.upfronthosting.co.za> Message-ID: <1279888459.25.0.943551704892.issue2979@psf.upfronthosting.co.za> Martin v. L?wis added the comment: At EuroPython, Virgil remarked that there was some discussion of this patch somewhere. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:35:28 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 12:35:28 +0000 Subject: [issue4297] Add error_log attribute to optparse.OptionParser In-Reply-To: <1226413379.99.0.188665223227.issue4297@psf.upfronthosting.co.za> Message-ID: <1279888528.76.0.541765923313.issue4297@psf.upfronthosting.co.za> Steven Bethard added the comment: Not sure, but I think _print_message in argparse isn't exactly what the OP is looking for if they really only care about errors. If you want to override how errors are printed, then it's absolutely correct to override the error method (in argparse at least), and your overridden method should be given every message that is normally printed as an error. If by errors, you mean "anything the parser might print out" (e.g. the output of "--help"), then you may indeed want _print_message to become public so you can override it. Let me know. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:40:19 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 23 Jul 2010 12:40:19 +0000 Subject: [issue4297] Add error_log attribute to optparse.OptionParser In-Reply-To: <1226413379.99.0.188665223227.issue4297@psf.upfronthosting.co.za> Message-ID: <1279888819.46.0.944557432569.issue4297@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:40:30 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 23 Jul 2010 12:40:30 +0000 Subject: [issue9341] allow argparse subcommands to be grouped In-Reply-To: <1279887451.34.0.723880615782.issue9341@psf.upfronthosting.co.za> Message-ID: <1279888830.63.0.589312356023.issue9341@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok resolution: -> accepted versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:41:45 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 23 Jul 2010 12:41:45 +0000 Subject: =?utf-8?q?=5Bissue4640=5D_optparse_doesn=E2=80=99t_disallow_adding_one-da?= =?utf-8?b?c2ggbG9uZyBvcHRpb25zICjigJwtb3B0aW9u4oCdKQ==?= In-Reply-To: <1229091283.09.0.553967635356.issue4640@psf.upfronthosting.co.za> Message-ID: <1279888905.82.0.864511424391.issue4640@psf.upfronthosting.co.za> R. David Murray added the comment: In that case you are correct, it does not apply to argparse. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:42:03 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 23 Jul 2010 12:42:03 +0000 Subject: [issue8273] move generally useful test_support functions into the unittest package In-Reply-To: <1270034351.93.0.515899636762.issue8273@psf.upfronthosting.co.za> Message-ID: <1279888923.68.0.950392070961.issue8273@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:46:08 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 12:46:08 +0000 Subject: [issue7895] Mac 10.6 mac_ver() crashes with USING_FORK_WITHOUT_EXEC_IS _NOT_SUPPORTED_BY_FILE_MANAGER In-Reply-To: <1265741797.91.0.267775294764.issue7895@psf.upfronthosting.co.za> Message-ID: <1279889168.51.0.988431066288.issue7895@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Fixed in r83075 (3.2), r83084 (3.1), r83085 (2.7), r83086 (2.6) ---------- stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:48:23 2010 From: report at bugs.python.org (Peter Donis) Date: Fri, 23 Jul 2010 12:48:23 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279889303.91.0.131650849332.issue1812@psf.upfronthosting.co.za> Peter Donis added the comment: @Mark, I'm probably stubborn, yes. :-) Could you post verbose output from your testing on Windows? I'd at least like to be able to duplicate your findings; it's possible there's something simple I'm missing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:50:48 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 23 Jul 2010 12:50:48 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1279889448.91.0.913807599578.issue2001@psf.upfronthosting.co.za> Mark Lawrence added the comment: The patch seems clean to me. Applied patch to unit test and ran it, tests failed, then applied patch to module, tests passed. Also tried import pydoc;pydoc.gui() from the command line, the output looked fine to me. Tested on Windows Vista with Firefox. Could someone commit this please. ---------- nosy: +BreamoreBoy stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 14:57:27 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 12:57:27 +0000 Subject: [issue9343] Document that argparse "parents" must be fully declared before children In-Reply-To: <1279889847.13.0.579699796707.issue9343@psf.upfronthosting.co.za> Message-ID: <1279889847.13.0.579699796707.issue9343@psf.upfronthosting.co.za> New submission from Steven Bethard : [From http://code.google.com/p/argparse/issues/detail?id=61] It should be documented clearly that only the arguments present on the parent parser at the time ArgumentParser is called will be included in the parser. >>> parent = argparse.ArgumentParser(add_help=False) >>> child = argparse.ArgumentParser(parents=[parent]) >>> parent.add_argument('--foo', action='store_true') >>> child.parse_args(['--foo']) usage: [-h] : error: unrecognized arguments: --foo ---------- assignee: docs at python components: Documentation messages: 111306 nosy: bethard, docs at python priority: normal severity: normal status: open title: Document that argparse "parents" must be fully declared before children versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:02:13 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 23 Jul 2010 13:02:13 +0000 Subject: [issue9343] Document that argparse "parents" must be fully declared before children In-Reply-To: <1279889847.13.0.579699796707.issue9343@psf.upfronthosting.co.za> Message-ID: <1279890133.12.0.838907375068.issue9343@psf.upfronthosting.co.za> ?ric Araujo added the comment: I removed 3.3, since it currently means ?won?t be done for 3.2, so note for later.? I don?t know if the report applies to 3.1 (doc fixes go into stable releases too), so I?m not adding it. ---------- nosy: +merwok versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:06:52 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 13:06:52 +0000 Subject: [issue9343] Document that argparse "parents" must be fully declared before children In-Reply-To: <1279889847.13.0.579699796707.issue9343@psf.upfronthosting.co.za> Message-ID: <1279890412.25.0.430873768077.issue9343@psf.upfronthosting.co.za> Steven Bethard added the comment: Ah, thanks for the fix. No it doesn't need to go in 3.1 - argparse is only in 2.7 and 3.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:10:57 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 13:10:57 +0000 Subject: [issue9344] please add posix.getgrouplist() In-Reply-To: <1279890657.77.0.804697326433.issue9344@psf.upfronthosting.co.za> Message-ID: <1279890657.77.0.804697326433.issue9344@psf.upfronthosting.co.za> New submission from Ronald Oussoren : A number of unix systems expose a getgroupslist function to fetch the groups that a user is a member of. It would be nice if that function were exposed to python. See issue7900 for more information on why that would be useful. ---------- keywords: easy messages: 111309 nosy: ronaldoussoren priority: low severity: normal status: open title: please add posix.getgrouplist() versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:11:21 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 13:11:21 +0000 Subject: [issue9344] please add posix.getgrouplist() In-Reply-To: <1279890657.77.0.804697326433.issue9344@psf.upfronthosting.co.za> Message-ID: <1279890681.39.0.329527678471.issue9344@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:13:46 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 13:13:46 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1279890826.0.0.913482321407.issue7900@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've added issue9344 for adding os.getgroupslist. I'd prefer to keep adding that function separate from this issue. Btw. I'm +1 on adding such a function. I will shortly commit a port of os-getgroups-v3.patch to 3.2, but without the tests in "PosixGroupsTester" because those explictly exclude OSX. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:14:53 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 13:14:53 +0000 Subject: [issue9345] argparse wrap tests are sensitive to terminal size In-Reply-To: <1279890893.09.0.0931064949941.issue9345@psf.upfronthosting.co.za> Message-ID: <1279890893.09.0.0931064949941.issue9345@psf.upfronthosting.co.za> New submission from Steven Bethard : [From http://code.google.com/p/argparse/issues/detail?id=63] What steps will reproduce the problem? 1. PYTHONPATH=. python test/test_argparse.py 2. do the above in an 80x24 terminal window and it passes 3. do the same in an 80 wide emacs shell buffer and you get lots of failures To make sure this doesn't continue to be a problem, we probably need to do something like os.environ['COLUMNS'] = 80 and check output like that. ---------- components: Tests messages: 111311 nosy: bethard priority: normal severity: normal stage: needs patch status: open title: argparse wrap tests are sensitive to terminal size type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:15:43 2010 From: report at bugs.python.org (Bhargav) Date: Fri, 23 Jul 2010 13:15:43 +0000 Subject: [issue8792] xmlrpclib compatibility issues with Apache XML-RPC library In-Reply-To: <1274558114.05.0.260300491762.issue8792@psf.upfronthosting.co.za> Message-ID: <1279890943.24.0.886169507533.issue8792@psf.upfronthosting.co.za> Bhargav added the comment: I am seeing the same exception when the server returns ex:nil, even when I enable allow_none. The library only accepts 'nil' not 'ex:nil' As a workaround, I have added dispatch["ex:nil"] to my local library (which is obviously not a solution) ---------- nosy: +bhargav _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:24:01 2010 From: report at bugs.python.org (Brian Brazil) Date: Fri, 23 Jul 2010 13:24:01 +0000 Subject: [issue9346] Improve threading tests In-Reply-To: <1279891440.96.0.298342013248.issue9346@psf.upfronthosting.co.za> Message-ID: <1279891440.96.0.298342013248.issue9346@psf.upfronthosting.co.za> New submission from Brian Brazil : The attached patch: Remove unused "self-test" from threading.py that doesn't really test much. Add better testing for Thread.__repr__. This brings coverage as measured by regrtest from 40% to 45%. ---------- components: Interpreter Core files: threading_test_cleanup.patch keywords: patch messages: 111313 nosy: bbrazil priority: normal severity: normal status: open title: Improve threading tests type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file18145/threading_test_cleanup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:27:39 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 23 Jul 2010 13:27:39 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279891659.17.0.494242711863.issue1812@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Peter apologies hereby offered, the 2.7 patch is fine, I'd screwed up doctest_testfile.txt. As the patch is ok and has been very thoroughly tested please can this be committed. ---------- stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:27:47 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 23 Jul 2010 13:27:47 +0000 Subject: [issue9336] string.letters should display locale based equivalent of a-Z In-Reply-To: <1279855673.74.0.0304173911229.issue9336@psf.upfronthosting.co.za> Message-ID: <1279891667.12.0.245067721836.issue9336@psf.upfronthosting.co.za> R. David Murray added the comment: This would involve too much of a behavior change to be introduced in a point release. string.letters does not exist in py3k. Closing as out of date. ---------- nosy: +r.david.murray resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:27:50 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 13:27:50 +0000 Subject: [issue9347] Calling argparse add_argument with a sequence as 'type' causes spurious error message In-Reply-To: <1279891670.23.0.306869867423.issue9347@psf.upfronthosting.co.za> Message-ID: <1279891670.23.0.306869867423.issue9347@psf.upfronthosting.co.za> New submission from Steven Bethard : What steps will reproduce the problem? parser = argparse.ArgumentParser() parser.add_argument('--foo', type=(int, float)) What is the expected output? ValueError: (, ) is not callable What do you see instead? TypeError: not all arguments converted during string formatting Please provide any additional information below. This is caused by calling using the % string formatting operator without proper wrapping of the argument. The fix is basically: - raise ValueError('%r is not callable' % type_func) + raise ValueError('%r is not callable' % (type_func,)) ---------- components: Library (Lib) messages: 111316 nosy: bethard priority: low severity: normal stage: needs patch status: open title: Calling argparse add_argument with a sequence as 'type' causes spurious error message type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:34:16 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 13:34:16 +0000 Subject: [issue9348] Calling argparse's add_argument with the wrong number of metavars causes delayed error message In-Reply-To: <1279892056.3.0.745674136702.issue9348@psf.upfronthosting.co.za> Message-ID: <1279892056.3.0.745674136702.issue9348@psf.upfronthosting.co.za> New submission from Steven Bethard : What steps will reproduce the problem? parser = argparse.ArgumentParser() parser.add_argument('--foo', nargs=2, metavar=('X','Y','Z')) parser.parse_args(['-h']) The error dosn't show up until help is formatted. Giving any incorrect length of metavar will produce the problem, which includes a tuple whos length doesn't match a numerical value, more than two metavars to '*' or '+', and more than one metavar to '?'. Furthermore, a tuple of length one causes the error when nargs is greater than 1, '*', or '+'. What is the expected output? What do you see instead? When the help is displayed, you get: TypeError: not all arguments converted during string formatting Or a similar error message for other cases. It would be expected that the error message would be more specific. The error should definitely be raised when add_argument is called, rather than later. There should be a test that does something like: for meta in ('X', ('X',), ('X','Y'), ('X','Y','Z')): for n in (1, 2, 3, '?', '+', '*'): parser = argparse.ArgumentParser() parser.add_argument('--foo', nargs=n, metavar=meta) parser.format_help() and makes sure that the error shows up in add_argument, not format_help. ---------- components: Library (Lib) messages: 111317 nosy: bethard priority: normal severity: normal stage: needs patch status: open title: Calling argparse's add_argument with the wrong number of metavars causes delayed error message type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:35:13 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 23 Jul 2010 13:35:13 +0000 Subject: [issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry In-Reply-To: <1279454095.41.0.733053669611.issue9291@psf.upfronthosting.co.za> Message-ID: <1279892113.92.0.991014876964.issue9291@psf.upfronthosting.co.za> R. David Murray added the comment: And just for clarity: py3k trunk does contain the _winreg code path. ---------- stage: unit test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:36:27 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 23 Jul 2010 13:36:27 +0000 Subject: [issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry In-Reply-To: <1279454095.41.0.733053669611.issue9291@psf.upfronthosting.co.za> Message-ID: <1279892187.79.0.944021679593.issue9291@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:37:02 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 13:37:02 +0000 Subject: [issue7830] Flatten nested functools.partial In-Reply-To: <1265051251.66.0.305258896073.issue7830@psf.upfronthosting.co.za> Message-ID: <1279892222.54.0.577011843749.issue7830@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Since I am the OP of this patch, I would like a +1 from another developer before checking this in. (Or a couple of -1s before rejecting:-) Antoine, Does the latest patch address your concerns? Virgil, If you care enough about this feature, please post a summary on python-dev and ask for comments. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:46:36 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 13:46:36 +0000 Subject: [issue9349] document argparse's help=SUPPRESS In-Reply-To: <1279892796.46.0.177553560445.issue9349@psf.upfronthosting.co.za> Message-ID: <1279892796.46.0.177553560445.issue9349@psf.upfronthosting.co.za> New submission from Steven Bethard : Argparse supports silencing help for certain options using SUPPRESS. >>> parser = argparse.ArgumentParser() >>> parser.add_argument('--foo', help=argparse.SUPPRESS) >>> parser.print_help() usage: [-h] optional arguments: -h, --help show this help message and exit This should be documented in the description of help= http://docs.python.org/library/argparse.html#help ---------- assignee: docs at python components: Documentation messages: 111320 nosy: bethard, docs at python priority: normal severity: normal status: open title: document argparse's help=SUPPRESS versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:51:28 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 13:51:28 +0000 Subject: [issue9350] add remove_argument_group to argparse In-Reply-To: <1279893088.18.0.675631346333.issue9350@psf.upfronthosting.co.za> Message-ID: <1279893088.18.0.675631346333.issue9350@psf.upfronthosting.co.za> New submission from Steven Bethard : [From http://code.google.com/p/argparse/issues/detail?id=71] There is a method ArgumentParser.add_argument_group() to create and add an argument group to the parser. I would like the ability to remove an argument group via a method like remove_argument_group(group). The use case for me is I create an argument group and then conditionally add a bunch of arguments to it. If zero arguments are added I would like to then remove the group so that an empty group does not show up in the help output. ---------- components: Library (Lib) messages: 111321 nosy: bethard priority: normal severity: normal stage: needs patch status: open title: add remove_argument_group to argparse type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 15:54:40 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 23 Jul 2010 13:54:40 +0000 Subject: [issue9342] Tests for monthrange in calendar.py module In-Reply-To: <1279887609.81.0.197947140036.issue9342@psf.upfronthosting.co.za> Message-ID: <1279893280.26.0.736927069379.issue9342@psf.upfronthosting.co.za> Brett Cannon added the comment: 3.2 in r83089 ---------- nosy: +brett.cannon resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:05:15 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 23 Jul 2010 14:05:15 +0000 Subject: [issue8392] unit tests rather light on testing __import__(..., level) In-Reply-To: <1271203412.15.0.504789215632.issue8392@psf.upfronthosting.co.za> Message-ID: <1279893915.09.0.477430658181.issue8392@psf.upfronthosting.co.za> Brett Cannon added the comment: Committed in r83090. Tweaked the patch from Virgil slightly so that it sets the flag used by importlib to delineate whether to use __import__ back to its original setting after running the tests. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:06:52 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 14:06:52 +0000 Subject: [issue9351] argparse set_defaults on subcommands should override top level set_defaults In-Reply-To: <1279894012.43.0.0678646409.issue9351@psf.upfronthosting.co.za> Message-ID: <1279894012.43.0.0678646409.issue9351@psf.upfronthosting.co.za> New submission from Steven Bethard : If you use set_defaults on a subparser, but a default exists on the top level parser, the subparser defaults are ignored: >>> parser = argparse.ArgumentParser() >>> xparser = parser.add_subparsers().add_parser('X') >>> parser.set_defaults(foo=1) >>> xparser.set_defaults(foo=2) >>> parser.parse_args(['X']) Namespace(foo=1) This is counter to what people probably expect, that the subparser, when selected, would override the top level parser. The behavior is because of the following code in parse_known_args: for dest in self._defaults: if not hasattr(namespace, dest): setattr(namespace, dest, self._defaults[dest]) This happens before the subparser sees the namespace object, and so the subparser sees that no defaults need to be filled in. ---------- components: Library (Lib) messages: 111324 nosy: bethard priority: normal severity: normal stage: needs patch status: open title: argparse set_defaults on subcommands should override top level set_defaults type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:11:35 2010 From: report at bugs.python.org (Virgil Dupras) Date: Fri, 23 Jul 2010 14:11:35 +0000 Subject: [issue8392] unit tests rather light on testing __import__(..., level) In-Reply-To: <1271203412.15.0.504789215632.issue8392@psf.upfronthosting.co.za> Message-ID: <1279894295.91.0.179450514216.issue8392@psf.upfronthosting.co.za> Virgil Dupras added the comment: Brett, I think there's a problem with the tweak you made to the patch. There was already a testcase called RelativeImportTests and you've hidden it (that I why I called it ImportlibRelativeImportTests initially). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:13:28 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 14:13:28 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279872225.3.0.538493653151.issue9335@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, Jul 23, 2010 at 4:03 AM, Martin v. L??wis wrote: .. > I fail to see the bug in this report. '\xff' is a letter because the C library says it is. This does not explain the difference between 2.6 and 2.7. With attached issue9335-test.py, $ cat issue9335-test.py import locale locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') print(chr(255).isalpha()) $ python2.7 issue9335-test.py False $ python2.6 issue9335-test.py True $ python2.5 issue9335-test.py True Since chr(255) = '\xff', is not a valid UTF-8 byte sequence, it makes little sense to ask whether it is a letter or not in a locale that uses UTF-8 encoding. Nevertheless the behavior changed between revisions and it is not mentioned in "what's new in 2.7". (I suspect this was introduced in issue5793 (r72040), but I have not verified.) There are two possible action items here: 1. New behavior needs to be documented. I believe 2.7 is correct because when isalpha is used to sanitize untrusted input, it is better to reject in the case of uncertainy. 2. Arguably, this is a security issue and thus eligible for backporting to 2.6. ---------- Added file: http://bugs.python.org/file18146/issue9335-test.py _______________________________________ Python tracker _______________________________________ -------------- next part -------------- import locale locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') print(chr(255).isalpha()) From report at bugs.python.org Fri Jul 23 16:17:24 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 14:17:24 +0000 Subject: [issue9167] argv double encoding on OSX In-Reply-To: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> Message-ID: <1279894644.49.0.481918980196.issue9167@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Daniele: which version of OSX do you use? And if you use OSX 10.5 or 10.6: which is your system language according to system preferences (the topmost entry in the list of the "Language and Text" preference pane, whose icon looks a little like a UN flag. I can only reproduce this by explicitly setting LANG=C before running the test on OSX 10.6 (with English as the main language) This may be very hard to fix. What happens is that subprocess.Popen converts the argument array into the filesystem encoding (which on OSX is always UTF-8). The argv decoder then decodes the using the encoding specified in LANG, which on your system is different from UTF-8. This results in a string where each byte in the UTF-8 encoding of snowman is represented as a single character. Those characters are then encoded as UTF-8 by the test and that results in the error your seeing. That is, the output looks like the output of this code: >>> snowman = '\u2603' >>> snowman.encode('utf-8').decode('latin1').encode('utf-8') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:18:24 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 14:18:24 +0000 Subject: [issue9352] argparse eats characters when parsing multiple merged short options In-Reply-To: <1279894704.35.0.264649777176.issue9352@psf.upfronthosting.co.za> Message-ID: <1279894704.35.0.264649777176.issue9352@psf.upfronthosting.co.za> New submission from Steven Bethard : [Moved from http://code.google.com/p/argparse/issues/detail?id=73] What steps will reproduce the problem? parser = ArgumentParser(prefix_chars="-+") parser.add_argument("-a",action="store_true") parser.add_argument("+b",action="store_true") parser.add_argument("+c",action="store_true") print parser.parse_args("-abc".split()) What is the expected output? What do you see instead? I would expect Namespace(a=True, b=True, c=True) You get Namespace(a=True, b=False, c=True) because in the loop that iterates through the prefix characters it builds an option_string to try by pulling the first character off explicit_arg. If it doesn't match any option then it will try the next prefix character, but it will have lost that character from the explicit_arg. This is also a problem even with only one prefix character because if it doesn't match an option the error message will be missing that one character. The above match -a, tried -b and fails, but instead of trying +b, it tries +c because the b has been lost. I've included multiple_short.patch which fixes just this bug. However, I also don't agree with the behavior of trying all prefix characters. I would expect that when merging short options together they would have to all share the same prefix character. If I have prefix_chars="-+" and I have options -a, +a, -b, and +b and I type +ab I would expect my action to be called with option_strings +a and +b, not +a and -b. The patch to fix the above bug *and* only try the same prefix character as the first option is multiple_short_same_prefix.patch. [Only the latter patch (which sounds like the right behavior) is attached. It will need to be updated to work against Python trunk.] ---------- components: Library (Lib) files: multiple_short_same_prefix.patch keywords: patch messages: 111328 nosy: bethard priority: normal severity: normal stage: needs patch status: open title: argparse eats characters when parsing multiple merged short options type: behavior versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file18147/multiple_short_same_prefix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:20:22 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 14:20:22 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279894822.86.0.667658756674.issue9335@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Another issue that may be worth revisiting is whether or not it is OK for _tkinter to set the locale. """ 21.2.2. For extension writers and programs that embed Python Extension modules should never call setlocale(), except to find out what the current locale is. """ http://docs.python.org/dev/library/locale.html#for-extension-writers-and-programs-that-embed-python ---------- components: +Interpreter Core -Macintosh nosy: +eric.smith type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:21:35 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 23 Jul 2010 14:21:35 +0000 Subject: [issue4485] fast swap of "default" Windows python versions In-Reply-To: <1228207919.66.0.730717066553.issue4485@psf.upfronthosting.co.za> Message-ID: <1279894895.13.0.434601971614.issue4485@psf.upfronthosting.co.za> Mark Lawrence added the comment: Right now this would suit me down to the ground, as I'm running four maintenance versions, 2.6/7 and 3.1/2 in parallel. But as this is a feature request it will not happen until 3.2 at the earliest. ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:23:15 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 14:23:15 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1279894995.05.0.248211415251.issue7989@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file18148/datetimetester.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:25:11 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 14:25:11 +0000 Subject: [issue9353] argparse __all__ is incomplete In-Reply-To: <1279895111.13.0.483513856318.issue9353@psf.upfronthosting.co.za> Message-ID: <1279895111.13.0.483513856318.issue9353@psf.upfronthosting.co.za> New submission from Steven Bethard : [Moved from http://code.google.com/p/argparse/issues/detail?id=75] What steps will reproduce the problem? 1. import argparse 2. print dir(argparse) 3. print argparse.__all__ Compare the output for public methods and attributes from #2 that aren't in #3. I see the following entries that look like they should be public but aren't in __all__:: 'ArgumentTypeError', 'ONE_OR_MORE', 'OPTIONAL', 'PARSER', 'REMAINDER', 'SUPPRESS', 'ZERO_OR_MORE' I was writing a compat layer to allow unbundling argparse from ipython if it's already installed in the system when I ran across this. The particular public attribute that was missing there was 'SUPPRESS' ---------- components: Library (Lib) messages: 111331 nosy: bethard priority: normal severity: normal stage: needs patch status: open title: argparse __all__ is incomplete type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:27:09 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 23 Jul 2010 14:27:09 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279895229.23.0.377066098208.issue9335@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:28:01 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 14:28:01 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279895281.6.0.0873934243899.issue9335@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This might be caused by the fix for issue7072 (which is mentioned in the NEWS file). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:33:28 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 23 Jul 2010 14:33:28 +0000 Subject: [issue9354] fire_wrapper fails to provide getsockopt() In-Reply-To: <1279895608.81.0.80539572871.issue9354@psf.upfronthosting.co.za> Message-ID: <1279895608.81.0.80539572871.issue9354@psf.upfronthosting.co.za> New submission from ?ukasz Langa : Tested on Python 3.2a0 on Mac OS 10.6.4. When you specify the most basic `file_dispatcher` and run the loop, `file_wrapper` fails because it doesn't provide the `getsockopt()` to fake being a socket. The code -------- import asyncore import os class FileDispatcher(asyncore.file_dispatcher): def handle_read(self): data = self.recv(8192) fd = os.open('/etc/passwd', os.O_RDONLY) s = FileDispatcher(fd) os.close(fd) asyncore.loop(timeout=0.01, use_poll=True, count=2) Expected result --------------- None, it should run OK silently. Actual result ------------- error: uncaptured python exception, closing channel <__main__.FileDispatcher at 0x100524e10> (:'file_wrapper' object has no attribute 'getsockopt' [/opt/error-report/py3k/Lib/asyncore.py|readwrite|106] [/opt/error-report/py3k/Lib/asyncore.py|handle_write_event|449]) Traceback (most recent call last): File "/opt/error-report/py3k/Lib/asyncore.py", line 106, in readwrite obj.handle_write_event() File "/opt/error-report/py3k/Lib/asyncore.py", line 449, in handle_write_event err = self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR) AttributeError: 'file_wrapper' object has no attribute 'getsockopt' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/opt/error-report/error_report.py", line 11, in asyncore.loop(timeout=0.01, use_poll=True, count=2) File "/opt/error-report/py3k/Lib/asyncore.py", line 214, in loop poll_fun(timeout, map) File "/opt/error-report/py3k/Lib/asyncore.py", line 195, in poll2 readwrite(obj, flags) File "/opt/error-report/py3k/Lib/asyncore.py", line 119, in readwrite obj.handle_error() File "/opt/error-report/py3k/Lib/asyncore.py", line 489, in handle_error self.handle_close() File "/opt/error-report/py3k/Lib/asyncore.py", line 508, in handle_close self.close() File "/opt/error-report/py3k/Lib/asyncore.py", line 396, in close self.socket.close() File "/opt/error-report/py3k/Lib/asyncore.py", line 617, in close os.close(self.fd) OSError: [Errno 9] Bad file descriptor Patch ----- Please find attached a patch that does add a unit test for this specific case and adds the most simple `getsockopt()` possible that is still reasonable. The patch was made with trunk r83090. ---------- components: Library (Lib) messages: 111333 nosy: ambv, giampaolo.rodola, josiahcarlson priority: normal severity: normal status: open title: fire_wrapper fails to provide getsockopt() type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:33:32 2010 From: report at bugs.python.org (Javier Collado) Date: Fri, 23 Jul 2010 14:33:32 +0000 Subject: [issue9026] argparse subcommands not printed in the same order they were added In-Reply-To: <1276856679.08.0.64136890627.issue9026@psf.upfronthosting.co.za> Message-ID: <1279895612.29.0.982119637438.issue9026@psf.upfronthosting.co.za> Javier Collado added the comment: The hasattr expressions were added to TestHelpFormattingMetaclass because: - A new attribute (subparsers_signature) was added in test classes that wasn't used in the past. - The new test classes didn't make use of some of the already in place attributes (argument_signatures, argument_signatures) - The old test classes didn't make use of the new attribute (subparsers_signature). - TestHelpFormattingMetaclass assumed that those attributes were present in test classes (otherwise an exception was raised). Hence, in order not to change/break a lot of test cases, I decided to add the hasattr expressions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:35:28 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 23 Jul 2010 14:35:28 +0000 Subject: [issue9355] argparse add_mutually_exclusive_group more than once has incorrectly formatted help In-Reply-To: <1279895728.08.0.860550350605.issue9355@psf.upfronthosting.co.za> Message-ID: <1279895728.08.0.860550350605.issue9355@psf.upfronthosting.co.za> New submission from Steven Bethard : [Moved from http://code.google.com/p/argparse/issues/detail?id=78] What steps will reproduce the problem? 1. Create two mutually exclusive groups: eg agroup = subcmd_parser.add_mutually_exclusive_group() agroup.add_argument('--a1', action='store_true', help='blah') agroup.add_argument('--a2', action='store_true', help='blah') agroup.add_argument('--a3', action='store_true', help='blah') bgroup = subcmd_parser.add_mutually_exclusive_group() bgroup.add_argument('--b1', action='store_true', help='blah') bgroup.add_argument('--b2', action='store_true', help='blah') bgroup.add_argument('--b3', action='store_true', help='blah') What is the expected output? What do you see instead? Expected output (on running a help command which formats help) is: [ --a1 | --a2 | --a3 ] [ --b1 | --b2 | --b3 ] You see instead: [ --a1 | --a2 | --a3 [ --b1 | --b2 | --b3 ] Note that the closing brace for the first group is missing. ---------- components: Library (Lib) messages: 111335 nosy: bethard priority: normal severity: normal stage: needs patch status: open title: argparse add_mutually_exclusive_group more than once has incorrectly formatted help type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:35:49 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 23 Jul 2010 14:35:49 +0000 Subject: [issue9354] fire_wrapper fails to provide getsockopt() In-Reply-To: <1279895608.81.0.80539572871.issue9354@psf.upfronthosting.co.za> Message-ID: <1279895749.52.0.0685811889571.issue9354@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Here goes the patch. ---------- keywords: +patch Added file: http://bugs.python.org/file18149/issue9354.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:38:22 2010 From: report at bugs.python.org (Steve Holden) Date: Fri, 23 Jul 2010 14:38:22 +0000 Subject: [issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True In-Reply-To: <1265137684.99.0.487285282872.issue7839@psf.upfronthosting.co.za> Message-ID: <1279895902.4.0.0382114696441.issue7839@psf.upfronthosting.co.za> Steve Holden added the comment: The test program Larry provided does not appear to function as intended on Windows, and runs without either producing error messages or requiring interactive input. Here's a typical output, in this case from Python 3.1 on Vista: C:\Users\sholden\Documents\issue7839>\python31\python test_subprocess.py Testing with shell= True and array= True ** This is the one that runs an interactive shell. ** You should press Ctrl-D. Output: [] Python 3.1.1 Testing with shell= True and array= False Output: [] Python 3.1.1 Testing with shell= False and array= True Output: [] Python 3.1.1 Testing with shell= False and array= False Output: [] Python 3.1.1 The same behavior was observed on 2.6 and 2.5.2. [I also removed "Christophe Simonis" from the nosy list as the tracker was complaining that there was no such user]. ---------- nosy: +holdenweb -Christophe Simonis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:38:48 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 23 Jul 2010 14:38:48 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1279895928.21.0.713634815452.issue7989@psf.upfronthosting.co.za> Brian Curtin added the comment: One additional change was needed to compile on Windows: Index: PC/config.c =================================================================== --- PC/config.c (revision 83087) +++ PC/config.c (working copy) @@ -116,7 +116,7 @@ {"parser", PyInit_parser}, {"winreg", PyInit_winreg}, {"_struct", PyInit__struct}, - {"datetime", PyInit_datetime}, + {"_datetime", PyInit__datetime}, {"_functools", PyInit__functools}, {"_json", PyInit__json}, ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:47:38 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 23 Jul 2010 14:47:38 +0000 Subject: [issue9354] file_wrapper fails to provide getsockopt() In-Reply-To: <1279895608.81.0.80539572871.issue9354@psf.upfronthosting.co.za> Message-ID: <1279896458.98.0.664833766327.issue9354@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- title: fire_wrapper fails to provide getsockopt() -> file_wrapper fails to provide getsockopt() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:48:26 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 23 Jul 2010 14:48:26 +0000 Subject: [issue8392] unit tests rather light on testing __import__(..., level) In-Reply-To: <1271203412.15.0.504789215632.issue8392@psf.upfronthosting.co.za> Message-ID: <1279896506.62.0.873513531454.issue8392@psf.upfronthosting.co.za> Brett Cannon added the comment: Fixed in r83091. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:55:44 2010 From: report at bugs.python.org (Brian Brazil) Date: Fri, 23 Jul 2010 14:55:44 +0000 Subject: [issue9356] Improved tests and style for fnmatch In-Reply-To: <1279896944.36.0.615358088153.issue9356@psf.upfronthosting.co.za> Message-ID: <1279896944.36.0.615358088153.issue9356@psf.upfronthosting.co.za> New submission from Brian Brazil : The attached path adds tests for translate and filter, and also fixes a few style issues in fnmatch itself. ---------- components: Interpreter Core files: fnmatch_test_and_cleanup.patch keywords: patch messages: 111340 nosy: bbrazil priority: normal severity: normal status: open title: Improved tests and style for fnmatch type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file18150/fnmatch_test_and_cleanup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:56:52 2010 From: report at bugs.python.org (Brian Brazil) Date: Fri, 23 Jul 2010 14:56:52 +0000 Subject: [issue9356] Improved tests and style for fnmatch In-Reply-To: <1279896944.36.0.615358088153.issue9356@psf.upfronthosting.co.za> Message-ID: <1279897012.42.0.63920095774.issue9356@psf.upfronthosting.co.za> Changes by Brian Brazil : Removed file: http://bugs.python.org/file18150/fnmatch_test_and_cleanup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 16:57:10 2010 From: report at bugs.python.org (Brian Brazil) Date: Fri, 23 Jul 2010 14:57:10 +0000 Subject: [issue9356] Improved tests and style for fnmatch In-Reply-To: <1279896944.36.0.615358088153.issue9356@psf.upfronthosting.co.za> Message-ID: <1279897030.84.0.728360302334.issue9356@psf.upfronthosting.co.za> Brian Brazil added the comment: It helps if the diff is from the root... ---------- Added file: http://bugs.python.org/file18151/fnmatch_test_and_cleanup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 17:01:25 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 15:01:25 +0000 Subject: [issue9167] argv double encoding on OSX In-Reply-To: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> Message-ID: <1279897285.8.0.589511001401.issue9167@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Daniele: never mind, you already said you are on OSX 10.4. The current behavior is only a problem when the system default encoding as implied by LANG is different from the fileystem encoding. How to fix this is an entirely different question: most (all?) unix tools just work with byte-strings and pass those through unmodified, this means that with something like: subprocess.Popen(['ls', snowman]) The snowman character should be encoded using the filesystem encoding, as that is the bytestring that the C APIs that ls calls expect. Note that encoding using the preferred encoding would result in an exception, as the snowman character cannot be encoded in ASCII or even latin1. A possible workaround is to use the CFStringGetSystemEncoding from CoreFoundation to get the system encoding when LANG=C (and probably guarded by to be activate only on OSX releases before 10.5). Another workaround: upgrade from OSX 10.4 to at least OSX 10.5 ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 17:06:25 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 23 Jul 2010 15:06:25 +0000 Subject: [issue8879] Implement os.link on Windows In-Reply-To: <1275504458.06.0.136411734773.issue8879@psf.upfronthosting.co.za> Message-ID: <1279897585.26.0.693902685901.issue8879@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- dependencies: +Add ntpath.sameopenfile support for Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 17:16:24 2010 From: report at bugs.python.org (Steven Alderson) Date: Fri, 23 Jul 2010 15:16:24 +0000 Subject: [issue6064] Add "daemon" argument to threading.Thread constructor In-Reply-To: <1242760441.53.0.863717257975.issue6064@psf.upfronthosting.co.za> Message-ID: <1279898184.23.0.556626849563.issue6064@psf.upfronthosting.co.za> Steven Alderson added the comment: Hello, I've taken the liberty of updating the two patch files here for python3.2 at revision 83065. Apologies if I'm treading on anyones toes here. I'm taking part in a europython sprint and this is the first time I've tried this. I've modified the multiprocessing patch. The documentation didn't agree with the behaviour of the code, so I've changed the Doc file. I've also added an extra test for the default behaviour. I've reviewed the code for PEP 8 (as an exercise for me) and run the tests and they passed ok. Steven ---------- nosy: +steven type: feature request -> behavior Added file: http://bugs.python.org/file18152/threading3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 17:19:09 2010 From: report at bugs.python.org (Steven Alderson) Date: Fri, 23 Jul 2010 15:19:09 +0000 Subject: [issue6064] Add "daemon" argument to threading.Thread constructor In-Reply-To: <1242760441.53.0.863717257975.issue6064@psf.upfronthosting.co.za> Message-ID: <1279898349.09.0.937936468513.issue6064@psf.upfronthosting.co.za> Steven Alderson added the comment: Here's the patch for multiprocessing based on python 3 revision 83065, all credit to the original author, all problems probably mine! Steven ---------- Added file: http://bugs.python.org/file18153/multiprocessing3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 17:27:02 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 15:27:02 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279898822.7.0.097482989915.issue9335@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > This might be caused by the fix for issue7072. Ronald, You are absolutely right. Reverting r80178 in the trunk restores the old behavior. > msg103494: > Fixed in r80178 (trunk), r80180 (2.6), r80182 (3.2), r80183 (3.1) I think this can be closed as out of date, but I am giving it back to you to decide whether security implications are important enough to backport to 2.5. Anthony, Please open a separate issue for Tkinter if you want it considered. It was rejected once already [msg102328], but even if Tkinter behavior is deemed appropriate, I think it should at least be documented. ---------- assignee: belopolsky -> ronaldoussoren components: +Macintosh resolution: -> out of date stage: -> committed/rejected status: open -> pending versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 17:35:51 2010 From: report at bugs.python.org (Brian Brazil) Date: Fri, 23 Jul 2010 15:35:51 +0000 Subject: [issue6064] Add "daemon" argument to threading.Thread constructor In-Reply-To: <1242760441.53.0.863717257975.issue6064@psf.upfronthosting.co.za> Message-ID: <1279899351.45.0.315543380951.issue6064@psf.upfronthosting.co.za> Brian Brazil added the comment: I've updated the patch for 3.2 and improved the documentation formatting. ---------- nosy: +bbrazil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 17:43:10 2010 From: report at bugs.python.org (Brian Brazil) Date: Fri, 23 Jul 2010 15:43:10 +0000 Subject: [issue6064] Add "daemon" argument to threading.Thread constructor In-Reply-To: <1242760441.53.0.863717257975.issue6064@psf.upfronthosting.co.za> Message-ID: <1279899790.4.0.675009388511.issue6064@psf.upfronthosting.co.za> Brian Brazil added the comment: Looks like it lost my patch, but Steven's does the same. One tweak: in threading.rst put all of the class signature on one line or the html formatting will be a bit off. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 17:45:08 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 15:45:08 +0000 Subject: [issue9344] please add posix.getgrouplist() In-Reply-To: <1279890657.77.0.804697326433.issue9344@psf.upfronthosting.co.za> Message-ID: <1279899908.57.0.197792968672.issue9344@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> belopolsky components: +Extension Modules stage: -> needs patch type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 17:45:09 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 15:45:09 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279899909.65.0.22210981227.issue9335@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Why do you think this may have security implications? I'm closing this as out of date because the issue is fixed and the fix is imho inappropriate for a backport to 2.6 due to the change in behaviour. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 17:51:19 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 23 Jul 2010 15:51:19 +0000 Subject: [issue9346] Improve threading tests In-Reply-To: <1279891440.96.0.298342013248.issue9346@psf.upfronthosting.co.za> Message-ID: <1279900279.56.0.169605886765.issue9346@psf.upfronthosting.co.za> Brett Cannon added the comment: r83094 and r83095 ---------- nosy: +brett.cannon resolution: -> accepted stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 17:53:14 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 15:53:14 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279900394.81.0.497344548912.issue9335@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Accepting binary input where only letters are expected by an application is a very common source of security holes. An application that relies on s.isalpha() to guarantee that s does not contain non-ASCII characters when UTF-8 locale is in use, may have a security hole if it is ran with python 2.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:02:19 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 16:02:19 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279900939.97.0.256388182255.issue1812@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I'll take a look. Mark, "commit review" is a stage after a patch was reviewed by a committer and is deemed appropriate. Usually this comes with an "accepted" resolution. Sometimes "commit review" is skipped for simple patches, but in most cases, at least two committers should approve a patch before it is committed. See http://python.org/dev/workflow/. ---------- assignee: -> belopolsky priority: normal -> low stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:05:21 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 23 Jul 2010 16:05:21 +0000 Subject: [issue2304] subprocess under windows fails to quote properly when shell=True In-Reply-To: <1205685138.96.0.183811169845.issue2304@psf.upfronthosting.co.za> Message-ID: <1279901121.85.0.126958310407.issue2304@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Tim: @Gabriel: test_subprocess has changed a lot since the patch was done. If one of you could provide a new patch for 2.7 and py3k I'll test it, thanks. ---------- nosy: +BreamoreBoy versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:08:23 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 16:08:23 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1279901303.73.0.425830667785.issue7900@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Committed a port to python3 for os-getgroups-v3.patch in r83088, including test cases (contrary to what I wrote before). Backports: 3.1: r83093 I'll backport to 2.7 and 2.6 tomorrow. To complete the documentation for picking this patch: I've spoken with an Apple engineer about this issue. He says the the _DARWIN_C_SOURCE behavior is intentional and will not be reverted. Apple's build of python, and other system tools (including perl) also use the _DARWIN_C_SOURCE behavior. ---------- resolution: -> accepted versions: -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:12:26 2010 From: report at bugs.python.org (Brian Brazil) Date: Fri, 23 Jul 2010 16:12:26 +0000 Subject: [issue9357] Improve queue tests In-Reply-To: <1279901545.74.0.17670937551.issue9357@psf.upfronthosting.co.za> Message-ID: <1279901545.74.0.17670937551.issue9357@psf.upfronthosting.co.za> New submission from Brian Brazil : The attached patch improves the code coverage of queue to 98% by testing empty, full, put_nowait, get_nowait and some error conditions. ---------- components: Library (Lib) files: test_queue.patch keywords: patch messages: 111354 nosy: bbrazil priority: normal severity: normal status: open title: Improve queue tests versions: Python 3.2 Added file: http://bugs.python.org/file18154/test_queue.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:16:42 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Jul 2010 16:16:42 +0000 Subject: [issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True In-Reply-To: <1266401759.12.0.600282213979.issue7950@psf.upfronthosting.co.za> Message-ID: <1279901802.51.0.0672356681855.issue7950@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: -tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:18:33 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 16:18:33 +0000 Subject: [issue6812] Snow Leopard python program fails because _PyType_Modified is missing from python framework In-Reply-To: <1251757214.1.0.925595604794.issue6812@psf.upfronthosting.co.za> Message-ID: <1279901913.87.0.192860166265.issue6812@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Closing as invalid as I cannot reproduce the issue, this seems to be an issue with Apple's copy of Python and the sys.path settings seem odd at best. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:20:11 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 16:20:11 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1279902011.67.0.629756635424.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Brian, thanks for the fix and for testing. I am attaching a commit-ready patch issue7989e.diff, that includes Brian's fix and a few white-space changes. I hope I've resolved the SVN issue: I was working in a read-only checkout while sandbox checkout was read/write. Here is the svn status now: M PCbuild/pythoncore.vcproj M setup.py M Misc/NEWS M PC/config.c A + Lib/datetime.py A + Lib/test/datetimetester.py M Lib/test/test_datetime.py A + Modules/_datetimemodule.c D Modules/datetimemodule.c M Modules/Setup.dist Note that unlike previous patches, issue7989e.diff, contains only datetime.py differences compared to sandbox. You should do svn cp svn+ssh://pythondev at svn.python.org/sandbox/branches/py3k-datetime/datetime.py Lib before it can be applied. Depending on your patch utility, you may also need to do svn cp Lib/test/test_datetime.py Lib/test/datetimetester.py I am running final tests and will commit this patch shortly. ---------- Added file: http://bugs.python.org/file18155/issue7989e.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:23:47 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 23 Jul 2010 16:23:47 +0000 Subject: [issue9356] Improved tests and style for fnmatch In-Reply-To: <1279896944.36.0.615358088153.issue9356@psf.upfronthosting.co.za> Message-ID: <1279902227.61.0.464844205399.issue9356@psf.upfronthosting.co.za> Brett Cannon added the comment: r83100 and r83101 ---------- nosy: +brett.cannon resolution: -> accepted stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:25:28 2010 From: report at bugs.python.org (Brian Brazil) Date: Fri, 23 Jul 2010 16:25:28 +0000 Subject: [issue9358] Document fnmatch.translate's lack of support for escaping In-Reply-To: <1279902328.19.0.409453550243.issue9358@psf.upfronthosting.co.za> Message-ID: <1279902328.19.0.409453550243.issue9358@psf.upfronthosting.co.za> New submission from Brian Brazil : fnmatch.translate's docstraing says "There is no way to quote meta-characters.", but this isn't in the html docs. The attached patch fixes that. ---------- assignee: docs at python components: Documentation files: fnmatch_translate_doc.patch keywords: patch messages: 111358 nosy: bbrazil, docs at python priority: normal severity: normal status: open title: Document fnmatch.translate's lack of support for escaping versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file18156/fnmatch_translate_doc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:34:14 2010 From: report at bugs.python.org (Piotr Kasprzyk) Date: Fri, 23 Jul 2010 16:34:14 +0000 Subject: [issue9359] Misspelled exception In-Reply-To: <1279902854.94.0.37527153601.issue9359@psf.upfronthosting.co.za> Message-ID: <1279902854.94.0.37527153601.issue9359@psf.upfronthosting.co.za> New submission from Piotr Kasprzyk : Misspelled: exception ---------- components: IDLE files: misspelled_exception.diff keywords: patch messages: 111359 nosy: kwadrat priority: normal severity: normal status: open title: Misspelled exception versions: Python 3.2 Added file: http://bugs.python.org/file18157/misspelled_exception.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:38:02 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 23 Jul 2010 16:38:02 +0000 Subject: [issue8410] Fix emulated lock to be 'fair' In-Reply-To: <1271361646.51.0.206027864382.issue8410@psf.upfronthosting.co.za> Message-ID: <1279903082.98.0.0472571054633.issue8410@psf.upfronthosting.co.za> Ronald Oussoren added the comment: It turns out that posix semaphores aren't supported on OSX. The patch doesn't apply cleanly anymore, and that is not just because of whitespace issues (the patch contains tabs while the tree no longer does). The chunk that affects 'PyThread_acquire_lock_timed' doesn't apply even with 'patch -l' (which ignores whitespace). I'll try to update the patch, but I'm not that well versed in pthread so that might take a while. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:41:53 2010 From: report at bugs.python.org (Peter Donis) Date: Fri, 23 Jul 2010 16:41:53 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279903313.15.0.986066893631.issue1812@psf.upfronthosting.co.za> Peter Donis added the comment: @Mark, no problem, thanks for keeping up with all my patches. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:47:36 2010 From: report at bugs.python.org (Daniel Urban) Date: Fri, 23 Jul 2010 16:47:36 +0000 Subject: [issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method In-Reply-To: <1278702217.69.0.69895367614.issue9212@psf.upfronthosting.co.za> Message-ID: <1279903656.19.0.363254084293.issue9212@psf.upfronthosting.co.za> Daniel Urban added the comment: The attached patch adds the isdisjoint method to dict_keys and dict_items. Pseudocode for the method: def isdisjoint(self, other): if self is other: if len(self) == 0: return True else: return False else: for item in other: if item in self: return False return True ---------- keywords: +patch nosy: +durban Added file: http://bugs.python.org/file18158/issue9212.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:49:40 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Jul 2010 16:49:40 +0000 Subject: [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1279903780.66.0.830183493225.issue9264@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To the doc person who reads this: this patch is only the first for this issue. It is being submitted now since the 2.6.6 release candidate is due in 10 days. Please leave the issue open after committing this. I have read the diff but not the patched result (cannot make such yet), so someone else should recheck the formatted result. Marked release blocker with agreement of Barry W., who also wants to take a look too. ---------- assignee: tjreedy -> docs at python nosy: +barry priority: normal -> release blocker stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:54:18 2010 From: report at bugs.python.org (Dmitry Jemerov) Date: Fri, 23 Jul 2010 16:54:18 +0000 Subject: [issue9360] nntplib cleanup In-Reply-To: <1279904057.7.0.917806545674.issue9360@psf.upfronthosting.co.za> Message-ID: <1279904057.7.0.917806545674.issue9360@psf.upfronthosting.co.za> New submission from Dmitry Jemerov : The patch performs an extensive cleanup of nntplib: - Change API methods to return strings instead of bytes. This breaks API compatibility, but given that the parameters need to be passed as strings and many of the returned values would need to be passed to other API methods, I consider the current API to be broken. I've discussed this with Brett at the EuroPython sprint, and he agrees. - Add tests. - Add pending deprecation warnings for xgtitle() and xpath() methods, which are not useful in modern environments. - Use named tuples for returned values where appopriate. - Modernize the implementation a little bit. - Clean up the docstrings. ---------- components: Library (Lib) files: nntplib_cleanup.patch keywords: patch messages: 111364 nosy: Dmitry.Jemerov priority: normal severity: normal status: open title: nntplib cleanup versions: Python 3.2 Added file: http://bugs.python.org/file18159/nntplib_cleanup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:56:04 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 23 Jul 2010 16:56:04 +0000 Subject: [issue9357] Improve queue tests In-Reply-To: <1279901545.74.0.17670937551.issue9357@psf.upfronthosting.co.za> Message-ID: <1279904164.74.0.348452471975.issue9357@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> accepted stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:56:34 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 23 Jul 2010 16:56:34 +0000 Subject: [issue9357] Improve queue tests In-Reply-To: <1279901545.74.0.17670937551.issue9357@psf.upfronthosting.co.za> Message-ID: <1279904194.58.0.909673233895.issue9357@psf.upfronthosting.co.za> Brett Cannon added the comment: r83108 ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 18:59:13 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 23 Jul 2010 16:59:13 +0000 Subject: [issue9358] Document fnmatch.translate's lack of support for escaping In-Reply-To: <1279902328.19.0.409453550243.issue9358@psf.upfronthosting.co.za> Message-ID: <1279904353.04.0.556787956002.issue9358@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- resolution: -> accepted stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 19:02:05 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Jul 2010 17:02:05 +0000 Subject: =?utf-8?q?=5Bissue4640=5D_optparse_doesn=E2=80=99t_disallow_adding_one-da?= =?utf-8?b?c2ggbG9uZyBvcHRpb25zICjigJwtb3B0aW9u4oCdKQ==?= In-Reply-To: <1229091283.09.0.553967635356.issue4640@psf.upfronthosting.co.za> Message-ID: <1279904525.72.0.135177486673.issue4640@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: -tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 19:09:38 2010 From: report at bugs.python.org (=?utf-8?q?M=C3=A1rcio_Faustino?=) Date: Fri, 23 Jul 2010 17:09:38 +0000 Subject: [issue1441530] socket read() can cause MemoryError in Windows Message-ID: <1279904978.34.0.216695368532.issue1441530@psf.upfronthosting.co.za> M?rcio Faustino added the comment: I got that error on Windows 7 Professional 64 bits, using Python 2.6.4 64 bits. I just changed the "imaplib.IMAP4_SSL" class, by making the "read" and "readline" functions use "cStringIO.StringIO()" instead of an array of strings for "chunks = []". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 19:39:22 2010 From: report at bugs.python.org (Anders Kaseorg) Date: Fri, 23 Jul 2010 17:39:22 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1279906762.27.0.521778607413.issue9334@psf.upfronthosting.co.za> Anders Kaseorg added the comment: > Note that the negative number heuristic you're complaining about > doesn't actually affect your code below. Yes it does: >>> import argparse >>> parser = argparse.ArgumentParser(prog='a2x') >>> parser.add_argument('--asciidoc-opts', ... action='store', dest='asciidoc_opts', default='', ... metavar='ASCIIDOC_OPTS', help='asciidoc options') >>> parser.parse_args(['--asciidoc-opts', '-1']) Namespace(asciidoc_opts='-1') >>> parser.parse_args(['--asciidoc-opts', '-one']) usage: a2x [-h] [--asciidoc-opts ASCIIDOC_OPTS] a2x: error: argument --asciidoc-opts: expected one argument > Your problem is that you want "--safe" to be treated as a positional > argument even though you've declared it as an option. No, it doesn?t matter whether --safe was declared as an option: argparse rejected it on the basis of beginning with a dash (as I demonstrated in my small test case, which did not declare --safe as an option, and again in the example above with -one). > Either the user wants a conf file named "--safe", or the user > accidentally forgot to type the name of the conf file. But it?s not argparse?s job to decide that the valid option I passed was actually a typo for something invalid. This would be like Python rejecting the valid call shell = "bash" p = subprocess.Popen(shell) just because shell happens to also be a valid keyword argument for the Popen constructor and I might have forgotten to specify its value. Including these special heuristics by default, that (1) are different from the standard behavior of all other option parsing libraries and (2) interfere with the ability to pass certain valid options, only leads to strange inconsistencies between command line programs written in different languages, and ultimately makes the command line harder to use for everyone. The default behavior should be the standard one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 19:56:18 2010 From: report at bugs.python.org (Daniel Urban) Date: Fri, 23 Jul 2010 17:56:18 +0000 Subject: [issue8507] abc.abstractproperty does not copy docstring In-Reply-To: <1272029588.75.0.820614439308.issue8507@psf.upfronthosting.co.za> Message-ID: <1279907778.39.0.939312013376.issue8507@psf.upfronthosting.co.za> Daniel Urban added the comment: I tried, and wasn't able to reproduce with py3k (r83091), 3.1.2, release27-maint (r83111), release26-maint (r83111). ---------- nosy: +durban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 19:56:48 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 23 Jul 2010 17:56:48 +0000 Subject: [issue9360] nntplib cleanup In-Reply-To: <1279904057.7.0.917806545674.issue9360@psf.upfronthosting.co.za> Message-ID: <1279907808.61.0.842411786294.issue9360@psf.upfronthosting.co.za> R. David Murray added the comment: I haven't looked at the patch in detail, but if my quick skim is correct, it looks like you are decoding using latin1. If you don't provide any way to get at the original bytes (which I presume you don't if you have "converted the API to return strings"), then it will be difficult and non-obvious to correctly decode messages using a content transfer encoding of 8bit and some other character set. (Of course, it is currently impossible to do this using the Py3k email package either, but I'm working on fixing that). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 20:09:29 2010 From: report at bugs.python.org (Ron Adam) Date: Fri, 23 Jul 2010 18:09:29 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1279908569.46.0.791441886509.issue2001@psf.upfronthosting.co.za> Ron Adam added the comment: Thank You for the review Mark. It's very much appreciated. I took another look at it and decided to offer another patch that moves the html/text server to the http package where the rest of the server stuff is. I also corrected the example in it. Everything still works the same as when mark tested it. This makes the diff file easier to read and tell what's going on. ---------- Added file: http://bugs.python.org/file18160/pydoc_server.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 20:31:05 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 18:31:05 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1279909865.07.0.690710991277.issue2001@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Ron, Can you add a Misc/NEWS entry summarizing your change? Also, please check if any changes need to be made to ReST documentation, Doc/library/pydoc.rst . Ka-Ping, Do you want to hold on to this, you can I take it over? ---------- nosy: +belopolsky resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 20:31:34 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Jul 2010 18:31:34 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1279909894.2.0.755636795057.issue2986@psf.upfronthosting.co.za> Terry J. Reedy added the comment: For 2.6 and 3.1, this is a documentation only issue. For 2.7, this is a doc + behavior issue. For 3.2, this is a doc + behavior + new feature issue. For 2.6.6 (release candidate due Aug 2, 10 days), I propose to add the following paragraph after the current 'Timing:' paragraph in the SequenceMatcher entry ('Heuristic:' should be bold-faced, like 'Timing:') Heuristic: To speed matching, items that appear more than 1% of the time in sequences of at least 200 items are treated as junk. This has the unfortunate side-effect of giving bad results for sequences constructed from a small set of items. An option to turn off the heuristic will be added to a future version. I would have said 'to 2.7.1' but that has not happened yet. I thought about putting the heuristic paragraph first, but I think it fits better after the discussion of quadratic run time. I think it should be a separate paragraph and not tacked on the end of the previous paragraph so people will be more likely to take notice. I have marked this a release blocker because at least 6 issues have been filed for this bug and so I think it important that the explanation be added to the next released doc. I plan to temporarily reassign this to docs at python in a few days. ---------- nosy: +barry priority: normal -> release blocker type: feature request -> behavior versions: +Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 20:58:43 2010 From: report at bugs.python.org (John Chandler) Date: Fri, 23 Jul 2010 18:58:43 +0000 Subject: [issue9361] Tests for leapdays in calendar.py module In-Reply-To: <1279911522.69.0.474631084692.issue9361@psf.upfronthosting.co.za> Message-ID: <1279911522.69.0.474631084692.issue9361@psf.upfronthosting.co.za> New submission from John Chandler : Hi, Attaching a patch for the test_calendar.py file. Adds four tests to provide coverage of the leapdays() function. John ---------- components: Tests files: test_calendar.diff keywords: patch messages: 111373 nosy: John.Chandler priority: normal severity: normal status: open title: Tests for leapdays in calendar.py module versions: Python 3.2 Added file: http://bugs.python.org/file18161/test_calendar.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 21:24:03 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 19:24:03 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1279913042.97.0.618415832845.issue9362@psf.upfronthosting.co.za> Message-ID: <1279913042.97.0.618415832845.issue9362@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : This bikeshed have been repainted several times already, but here is a true story. Cast: Me = myself Novice = a 14-year-old boy Laptop = a MacBook Air Novice: How do i exit [from python prompt]? Me: What's your best guess? Novice: [typing] exit [pressing Enter] Laptop: Use exit() or Ctrl-D (i.e. EOF) to exit Novice: [typing] Ctrl... Me: OMG, you don't know what Ctrl-D means? Look for the Ctrl key. Novice: There is no such key. --- curtains --- I suggest changing Use exit() or Ctrl-D (i.e. EOF) to exit to Type exit() or quit() and press the Enter key to exit or Type exit() or quit() and press Enter to exit or just Use exit() to exit My theory is that someone who knows what EOF is, will probably already know how to exit from common terminal oriented programs and Ctrl-D is not universally bound to EOF. TOOWTDI: two ways to exit is more than enough to teach a novice. ---------- assignee: docs at python components: Documentation keywords: easy messages: 111374 nosy: belopolsky, docs at python priority: normal severity: normal status: open title: Make exit/quit hint more novice friendly type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 21:32:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 19:32:40 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1279913560.33.0.260397952421.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in r83112. ---------- resolution: accepted -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 21:36:52 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Jul 2010 19:36:52 +0000 Subject: [issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method In-Reply-To: <1278702217.69.0.69895367614.issue9212@psf.upfronthosting.co.za> Message-ID: <1279913812.91.0.238594444431.issue9212@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Titles that fit in the box, like 'Dict.keys lacks .isjoint method.' are easier to read and keep track of. Unless there is a reason I have missed, I would iterate through the smaller set, which might even be empty or nearly so, rather than either in particular. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 21:50:15 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 23 Jul 2010 19:50:15 +0000 Subject: [issue7566] Add ntpath.sameopenfile support for Windows In-Reply-To: <1261529807.86.0.672662668527.issue7566@psf.upfronthosting.co.za> Message-ID: <1279914615.64.0.555823846749.issue7566@psf.upfronthosting.co.za> Brian Curtin added the comment: Here's a patch implementing ntpath.sameopenfile with _getfileinformation in Modules/posixmodule.c. Martin's suggestion is the best way of doing this, which was the basis for _getfileinformation implementation. It returns a tuple of the three relevant fields, and ntpath.sameopenfile compares the results of those tuples for two files and returns the result. ---------- keywords: +patch Added file: http://bugs.python.org/file18162/issue7566.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 21:51:04 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Jul 2010 19:51:04 +0000 Subject: [issue9218] pop multiple elements of a list at once In-Reply-To: <1278790209.67.0.359453381678.issue9218@psf.upfronthosting.co.za> Message-ID: <1279914664.21.0.188167665243.issue9218@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree with Raymond, as did, I believe, most of the participants in the thread beginning with http://mail.python.org/pipermail/python-ideas/2010-July/007563.html ---------- nosy: +tjreedy resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 22:08:02 2010 From: report at bugs.python.org (Ron Adam) Date: Fri, 23 Jul 2010 20:08:02 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1279915682.91.0.958291157579.issue2001@psf.upfronthosting.co.za> Ron Adam added the comment: Here's the new patch with the Misc/NEWS and pydoc.rst additions added to it. I'm not sure if local_text_server is the best name for the server module. In pydoc it's a local server, but it may not be limited to that use. I've also considered text_server, text_html_server, or simple_text_server. ---------- Added file: http://bugs.python.org/file18163/pydoc_server2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 22:10:49 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 20:10:49 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1279915682.91.0.958291157579.issue2001@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, Jul 23, 2010 at 4:08 PM, Ron Adam wrote: .. > Here's the new patch with the Misc/NEWS and pydoc.rst additions added to it. s/Romoved/Removed/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 22:15:12 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 20:15:12 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1279915682.91.0.958291157579.issue2001@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: s/navagation/navigation/ Please spell-check your changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 22:17:37 2010 From: report at bugs.python.org (Ron Adam) Date: Fri, 23 Jul 2010 20:17:37 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1279916257.18.0.680046891061.issue2001@psf.upfronthosting.co.za> Ron Adam added the comment: Sorry, will do... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 22:23:20 2010 From: report at bugs.python.org (Dmitry Jemerov) Date: Fri, 23 Jul 2010 20:23:20 +0000 Subject: [issue9360] nntplib cleanup In-Reply-To: <1279904057.7.0.917806545674.issue9360@psf.upfronthosting.co.za> Message-ID: <1279916600.65.0.729180192232.issue9360@psf.upfronthosting.co.za> Dmitry Jemerov added the comment: This is an issue only for the actual article content, right? I'll be happy to extend the API to allow getting the original bytes of the article content, while keeping the rest of API (like group names) string-based. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 22:29:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 20:29:56 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1279916996.21.0.218424094909.issue2001@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: +:program:`pydoc` :option:`-g` will start the server and additionally open a web +browser to a module index page. Each served page has a navagation bar at the +top where you can 'get' help on a individual item, 'find' all modules with a +keyword in thier synopsis line, and goto indexes for 'modules', 'topics' and +'keywords'. I am not sure I like the fact that the browser is started automatically. Please bring this up on python-dev. This may be an opportunity to rethink pydoc command line switches. For example, -p and -g are currently exclusive, but it would make sense for -g to start server on the port specified by -p. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 22:35:04 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 23 Jul 2010 20:35:04 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1279917304.52.0.324920467509.issue2001@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Ron, Your latest patch does not work for me: $ ./python.exe -m pydoc -g Traceback (most recent call last): File "/Users/sasha/Work/python-svn/py3k-commit/Lib/runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/Users/sasha/Work/python-svn/py3k-commit/Lib/runpy.py", line 73, in _run_code exec(code, run_globals) File "/Users/sasha/Work/python-svn/py3k-commit/Lib/pydoc.py", line 2315, in if __name__ == '__main__': cli() File "/Users/sasha/Work/python-svn/py3k-commit/Lib/pydoc.py", line 2259, in cli gui() File "/Users/sasha/Work/python-svn/py3k-commit/Lib/pydoc.py", line 2222, in gui serverthread = http.text_server.startserver(url_handler, port) AttributeError: 'module' object has no attribute 'text_server' ---------- resolution: accepted -> stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 23:08:37 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Jul 2010 21:08:37 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1279919317.21.0.892953400078.issue9226@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Chris, when posting something like this, *please* include the output. I had to insert ()s to run this with 3.1. I will upload the py3 version as test3.py. Is your output the same as mine? x: success Test.x: error Test2.y: success Test3.x: error Test3.y: error Test4.x: success There is an obvious inconsistency between Test2 and Test/Test3. This shows up also in the dis.dis(test) output. So there is definitely a bug. To me, the Test2 result is the error. I base this on 7.7 Class Definitions: "The class?s suite is then executed in a new execution frame (see section Naming and binding), using a newly created local namespace and the original global namespace." I interpret this to mean that intermediate namespaces are not used (as was the case before 2.2). Indeed, this sentence is unchanged from the 2.1 doc (and before). http://docs.python.org/release/2.1/ref/class.html Of course, the intent could have changed without changing the wording, by reference to the Naming and Binding section, but then this sentence really should be changed too. The current Naming and Binding section includes: "A scope defines the visibility of a name within a block. If a local variable is defined in a block, its scope includes that block. If the definition occurs in a function block, the scope extends to any blocks contained within the defining one, unless a contained block introduces a different binding for the name. The scope of names defined in a class block is limited to the class block; it does not extend to the code blocks of methods." So class blocks are an exception in propagating down, and I thought they were also an exception for propagating into, for the reason stated above. It is possible that this is an undefined corner of the language. Certainly, the compiler is confused as it treats one nested class (Test2) as a closure and the other three nested classes as not. Since the name and binding design is Guido's and central to Python's operation, I personally would not touch it without his input. Hence I have added him as nosy and second the idea of pydev discussion. ---------- nosy: +gvanrossum, tjreedy Added file: http://bugs.python.org/file18164/test3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 23:10:49 2010 From: report at bugs.python.org (Ron Adam) Date: Fri, 23 Jul 2010 21:10:49 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1279919449.83.0.023657636667.issue2001@psf.upfronthosting.co.za> Ron Adam added the comment: Ok, spell, check and attribute error corrected. I agree on the -p / -g issue. I'll bring this up on python dev. Thanks for the reviews and feedback. It really helps. ---------- Added file: http://bugs.python.org/file18165/pydoc_server3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 23:27:02 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Jul 2010 21:27:02 +0000 Subject: [issue9237] Add sys.call_tracing to on-line sys module documentation In-Reply-To: <1278973764.17.0.0501374635668.issue9237@psf.upfronthosting.co.za> Message-ID: <1279920422.49.0.69838679391.issue9237@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I verified that in 3.1, sys.call_tracing exists but is undocumented. I also noticed that the sys doc entries are *almost* in alphabetical order. Out of place: subversion, dont_write_bytecode, api_version Reversed pairs (abbreviated) copyright clearxxx dllxxx disxxx getrefxx getrecxx ---------- keywords: +easy nosy: +tjreedy stage: -> needs patch versions: -Python 2.5, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 23:33:02 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Jul 2010 21:33:02 +0000 Subject: [issue9246] os.getcwd() hardcodes max path len In-Reply-To: <1279023059.26.0.245683093399.issue9246@psf.upfronthosting.co.za> Message-ID: <1279920782.43.0.39999044991.issue9246@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On WinXP, 3.1, I get ... mkdir: 242 Traceback (most recent call last): File "C:\Programs\Python31\misc\t1.py", line 14, in os.mkdir(s) WindowsError: [Error 206] The filename or extension is too long: 'C:\\Programs\\Python31\\misc\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab' ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 23:36:57 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 23 Jul 2010 21:36:57 +0000 Subject: [issue9255] document that the 'test' package is for core developers only In-Reply-To: <1279058028.22.0.187583087672.issue9255@psf.upfronthosting.co.za> Message-ID: <1279921017.18.0.145706454239.issue9255@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 3.2: r83072 3.1: r83076 2.7: r83077 ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 23:43:41 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 23 Jul 2010 21:43:41 +0000 Subject: [issue9246] os.getcwd() hardcodes max path len In-Reply-To: <1279920782.43.0.39999044991.issue9246@psf.upfronthosting.co.za> Message-ID: <20100723214202.GA17002@yoda.bytereef.org> Stefan Krah added the comment: Terry J. Reedy wrote: > mkdir: 242 > Traceback (most recent call last): > File "C:\Programs\Python31\misc\t1.py", line 14, in > os.mkdir(s) > WindowsError: [Error 206] The filename or extension is too long: 'C:\\Programs\\Python31\\misc\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab\\aaaaab' On Windows MAX_PATH seems to be 260 characters: http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 23:50:42 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 23 Jul 2010 21:50:42 +0000 Subject: [issue1812] doctest _load_testfile function -- newline handling seems incorrect In-Reply-To: <1200117455.4.0.563963262174.issue1812@psf.upfronthosting.co.za> Message-ID: <1279921842.1.0.332363441415.issue1812@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Alexander: If I understand this correctly it means that there is effectively no distinction betwen "patch review" and "commit review". Hence it is perfectly possible that the work that myself and Peter have put in goes down the drain? This is not acceptable. Either the patch gets committed accepting the work that Peter and myself have put in or it gets rejected. Please make your mind up. Also note that I've several more issues in the pipeline that need a bit of TLC. I've a note of every issue number, and if they don't get committed within the next few days I will be asking why. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 23:54:21 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 23 Jul 2010 21:54:21 +0000 Subject: [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1279922061.74.0.403524519647.issue9264@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: If the changes are to the documentation only, you've confirmed that the docs build in 2.6.6, and you get the changes in before 2.6.6rc1, then you can go ahead and commit them. I don't need to review them too closely - I trust you - but if you want me to do a detailed review before rc1, let me know and I'm happy to. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 23 23:55:48 2010 From: report at bugs.python.org (Mark Lawrence) Date: Fri, 23 Jul 2010 21:55:48 +0000 Subject: [issue4629] getopt should not accept no_argument that ends with '=' In-Reply-To: <1228978458.01.0.0804138423997.issue4629@psf.upfronthosting.co.za> Message-ID: <1279922148.12.0.552187040729.issue4629@psf.upfronthosting.co.za> Mark Lawrence added the comment: msg84276 "the patch is good". What is the problem with committing this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 00:46:04 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 23 Jul 2010 22:46:04 +0000 Subject: [issue9359] Misspelled exception In-Reply-To: <1279902854.94.0.37527153601.issue9359@psf.upfronthosting.co.za> Message-ID: <1279925164.54.0.187925058087.issue9359@psf.upfronthosting.co.za> Brian Curtin added the comment: Fixed by Ezio Melotti in r83103. ---------- nosy: +brian.curtin resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 01:01:26 2010 From: report at bugs.python.org (rioch) Date: Fri, 23 Jul 2010 23:01:26 +0000 Subject: [issue9363] data_files are not installed relative to sys.prefix In-Reply-To: <1279926086.74.0.751307014326.issue9363@psf.upfronthosting.co.za> Message-ID: <1279926086.74.0.751307014326.issue9363@psf.upfronthosting.co.za> New submission from rioch : In the disutils documentation for data_files, it states: "If directory is a relative path, it is interpreted relative to the installation prefix (Python?s sys.prefix for pure-Python packages, sys.exec_prefix for packages that contain extension modules)." However, on my system, sys.prefix outputs as '/usr' but the files are installed to '/usr/local'. OS: Linux Mint 9 Python: 2.6.5 ---------- assignee: tarek components: Distutils messages: 111396 nosy: rioch, tarek priority: normal severity: normal status: open title: data_files are not installed relative to sys.prefix type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 01:35:29 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 23 Jul 2010 23:35:29 +0000 Subject: [issue4510] ValueError for list.remove() not very helpful In-Reply-To: <1228347518.63.0.0108612017272.issue4510@psf.upfronthosting.co.za> Message-ID: <1279928129.83.0.0870939967551.issue4510@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Amaury, I agree about having a limit. It is a really bad idea to dump the full list repr for a potentially huge list or even for a small list of objects with huge individual reprs. We should limit the output to just a few characters at most or risk spewing pages of garbage into people's tracebacks and log files. That being said, limiting the output defeats the original purpose of the feature request. ISTM that the proposal is only helpful in simple toy examples like [1,2,3].remove(4). With real world data, the new message is probably going to cause more harm than good. Accordingly, I recommend rejecting this feature request. ---------- nosy: +rhettinger type: behavior -> feature request versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 01:36:56 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 23 Jul 2010 23:36:56 +0000 Subject: [issue9359] Misspelled exception In-Reply-To: <1279902854.94.0.37527153601.issue9359@psf.upfronthosting.co.za> Message-ID: <1279928216.45.0.568628296029.issue9359@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks Piotr for the patch and Brian for closing the issue! ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 01:46:09 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 23 Jul 2010 23:46:09 +0000 Subject: [issue7113] ConfigParser load speedup In-Reply-To: <1255351384.96.0.56907836791.issue7113@psf.upfronthosting.co.za> Message-ID: <1279928769.44.0.976466347906.issue7113@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Won't happen for Python 2.x but the idea is good. The original patch won't apply for Py3k so I implemented this approach from scratch for Python 3.2. Patch included. Some microbenchmarks of mine show: - a 3-5% slowdown for very small files (we can ignore this since it's still a blink of an eye) - a 10% speedup in usual cases (files the size of a typical Pylons app configuration or a typical buildout) - more so in unrealistic ones (many values with > 100 lines each) Brett, a quick summary of changes: - the idea to introduce a list of lines instead of gluing '%s\n%s' during file reading was introduced - this approach needs an additional phase of joining the lists to strings after reading is done. - I used itertools.chain to add the default section for iteration purposes without having to create a separate list. I hope the additional dependency on itertools is no problem. - I reformatted a bit the changes by fred.drake in r78233 (he added support for valueless keys) - some other slight formatting changes apply as well - in the tests I've added a testcase for a file that uses multi-line values heavily. The file is generated temporarily since it's 127kB in size. Creation takes a fraction of a second so shouldn't be noticeable. ---------- nosy: +brett.cannon, lukasz.langa versions: +Python 3.2 -Python 2.6 Added file: http://bugs.python.org/file18166/issue7113.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 01:48:34 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 23 Jul 2010 23:48:34 +0000 Subject: [issue1506122] Add "compose" function to the functools Message-ID: <1279928914.19.0.795805203205.issue1506122@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I agree with Amaury that this should be closed. It has been previously discussed and rejected in other forums. One the issues is that the usual mathematical order is unintuitive and not self-documenting -- i.e. is compose(f,g) the same as f(g(x)) or g(f(x))? Also, it is already dirt simple to create your own compose function or to do the composition directly: h = lambda x: f(g(x)). ---------- nosy: +rhettinger resolution: works for me -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 01:54:20 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 23 Jul 2010 23:54:20 +0000 Subject: [issue7830] Flatten nested functools.partial In-Reply-To: <1265051251.66.0.305258896073.issue7830@psf.upfronthosting.co.za> Message-ID: <1279929260.01.0.742169565975.issue7830@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Antoine> Flattening should only happen for instances of the exact type. FWIW, I agree with Antoine. You cannot know in advance whether a partial-subclass has semantics that need to be preserved when flattening. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 02:01:40 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 24 Jul 2010 00:01:40 +0000 Subject: [issue9167] argv double encoding on OSX In-Reply-To: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> Message-ID: <1279929700.84.0.0588194798363.issue9167@psf.upfronthosting.co.za> STINNER Victor added the comment: > This may be very hard to fix I wrote a patch to fix this problem: see #8775. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 02:26:34 2010 From: report at bugs.python.org (Reid Kleckner) Date: Sat, 24 Jul 2010 00:26:34 +0000 Subject: [issue5673] Add timeout option to subprocess.Popen In-Reply-To: <1279814724.48.0.199419732418.issue5673@psf.upfronthosting.co.za> Message-ID: Reid Kleckner added the comment: On Thu, Jul 22, 2010 at 9:05 AM, Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > The documentation should mention somewhere that timeout can be a float. ?For example, as in time.sleep docstring: > > """ > ? ?sleep(seconds) > > ? ?Delay execution for a given number of seconds. ?The argument may be > ? ?a floating point number for subsecond precision. > """ > > I would also like to see some discussion of supported precision. ?Is is the same as for time.sleep()? ?Does float precision ever affect timeout precision? (On systems with nanosleep it may, but probably this has no practical concequences.) I added info to wait and communicate, but left the docs for call, check_call, check_output all saying that their arguments are the same as Popen(...) and wait(...). > This can be done as a future enhancement, but I would like to see datetime.timedelta as an acceptable type for timeout. ?This can be done by adding duck-typed code in the error branch which would attempt to call timeout.total_seconds() to extract a float. I'd prefer to leave it as a future enhancement. > Looking further, it appears that timeout can be anything that can be added to a float to produce float. ?Is this an accident of implementation or a design decision? ?Note that a result Fraction can be used as timeout but Decimal cannot. Implementation detail. I don't think it should matter. > Zero and negative timeouts are accepted by subprocess.call(), but the result is not documented. ?It looks like this still starts the process, but kills it immediately. An alternative would be to not start the process at all or disallow negative or maybe even zero timeouts altogether. ?I don't mind the current choice, but it should be documented at least in Popen.wait(timeout=None) section. > > + ? ? ? ?def wait(self, timeout=None, endtime=None): > ? ? ? ? ? ? """Wait for child process to terminate. ?Returns returncode > ? ? ? ? ? ? attribute.""" > > Docstring should describe timeout and endtime arguments. ?In fact I don't see endtime documented anywhere. ?It is not an obvious choice > that endtime is ignored when timeout is given. ?An alternative would be to terminate at min(now + timeout, endtime). I didn't intend for the endtime parameter to be documented, it is just a convenience for implementing communicate, which gets woken up at various times so it is easier to remember the final deadline rather than recompute the timeout frequently. > + ? ? ? ? ? ? ? ?delay = 0.0005 # 500 us -> initial delay of 1 ms > > I think this should be an argument to wait() and the use of busy loop should be documented. > > + ? ? ? ? ? ? ? ? ? ?delay = min(delay * 2, remaining, .05) > > Why .05? ?It would probably be an overkill to make this another argument, but maybe make it an attribute of Popen, say self._max_busy_loop_delay or a shorter descriptive name of your choice. ?If you start it with '_', you don't need to document it, but users may be able to mess with it if they suspect that 0.05 is not the right choice. *Points to whoever impelemented it for Thread.wait(timeout=...)*. If it was good enough for that (until we got real lock acquisitions with timeouts), then I think it's good enough for this. > + ? ? ? ? ? ? ? ?endtime = time.time() + timeout > > Did you consider using datetime module instead of time module here? ?(I know, you still need time.sleep() later, but you won't need to worry about variable precision of time.time().) How does the datetime module help here? It seems like time.time uses roughly the same time sources that datetime.datetime.now does. One other thing I'm worried about here is that time.time can be non-increasing if the system clock is adjusted. :( Maybe someone should file a feature request for a monotonic clock. Reid ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 02:48:48 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 24 Jul 2010 00:48:48 +0000 Subject: [issue9360] nntplib cleanup In-Reply-To: <1279904057.7.0.917806545674.issue9360@psf.upfronthosting.co.za> Message-ID: <1279932528.75.0.194774503134.issue9360@psf.upfronthosting.co.za> R. David Murray added the comment: Correct, if by 'article content' you mean what is returned by the article command. So I think it is necessary to be able to get bytes for two commands: article and body. Then for symmetry it should also be possible to get bytes from the head command. (It is actually possible for headers to include 8bit data, but it is a violation of the RFC and both rare outside of spam and impossible to handle sensibly in most cases...and it may be the case that most if not all nttpservers sanitize such headers, I don't have any experience in that area.) On the other hand, this tells me that a possible use case I had been wondering about in email is in fact a valid concern: being able to parse a data stream that contains both strings and bytes :( That is, one might use nntplib in a mode where you pull the headers as text and the body as bytes and want to hand it off to email to build a Message object from those parts. ---------- stage: -> patch review type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 03:00:45 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 24 Jul 2010 01:00:45 +0000 Subject: [issue4686] Exceptions in ConfigParser don't set .args In-Reply-To: <1229545362.85.0.86911392572.issue4686@psf.upfronthosting.co.za> Message-ID: <1279933245.42.0.0140589645406.issue4686@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Sound argument. I've prepared a patch for Py3k that adds `args` for all exceptions. Unit tests were modified as to check whether the `args` are set correctly (which helped finding a couple of flaky assertions in the tests themselves :)). Brett, the code change is trivial. Tests aren't complicated as well. Should this change also be ported to py27-maint? ---------- keywords: +patch nosy: +brett.cannon, lukasz.langa versions: +Python 3.2 -Python 2.6, Python 2.7, Python 3.0, Python 3.1 Added file: http://bugs.python.org/file18167/issue4686_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 03:13:20 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 24 Jul 2010 01:13:20 +0000 Subject: [issue4629] getopt should not accept no_argument that ends with '=' In-Reply-To: <1228978458.01.0.0804138423997.issue4629@psf.upfronthosting.co.za> Message-ID: <1279934000.28.0.604280440125.issue4629@psf.upfronthosting.co.za> STINNER Victor added the comment: Fixed in 3.2 (r83116), 2.7 (r83117), 3.1 (r83118) and 2.6 (r83119). ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 03:31:16 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 24 Jul 2010 01:31:16 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1279935076.32.0.422412848755.issue1682942@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Part of the patch has already been independently implemented (support for custom `dict_type`s). As for the custom delimiters the patch is somewhat incomplete. Let's take for instance delimiting by space characters (e.g. `delimiters = (" ", )`). ConfigParser would input so it would be quite bizarre. Brett, I have a patch ready but it depends on issue7113 changes I've made. ---------- nosy: +brett.cannon, lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 03:34:51 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 24 Jul 2010 01:34:51 +0000 Subject: [issue9283] buggy repr for os.environ In-Reply-To: <1279364859.98.0.0796685002752.issue9283@psf.upfronthosting.co.za> Message-ID: <1279935291.04.0.12263637996.issue9283@psf.upfronthosting.co.za> STINNER Victor added the comment: Patch to fix _Environ.__repr__(), regression introduced by #8603. ---------- keywords: +patch Added file: http://bugs.python.org/file18168/os_environ_repr.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 03:36:08 2010 From: report at bugs.python.org (Ned Batchelder) Date: Sat, 24 Jul 2010 01:36:08 +0000 Subject: [issue231540] threads and profiler don't work together Message-ID: <1279935368.45.0.00518963940605.issue231540@psf.upfronthosting.co.za> Ned Batchelder added the comment: Isn't this problem solved by the threading.settrace and threading.setprofile functions? ---------- nosy: +nedbat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 03:42:25 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 24 Jul 2010 01:42:25 +0000 Subject: [issue8888] Promote SafeConfigParser and warn about ConfigParser In-Reply-To: <1275565799.83.0.624762218664.issue8888@psf.upfronthosting.co.za> Message-ID: <1279935745.77.0.313894495826.issue8888@psf.upfronthosting.co.za> ?ukasz Langa added the comment: This issue is superseeded by issue #6517 (because the other has an actual patch). Brett, shall we close this as duplicate and resolve the original? ---------- nosy: +brett.cannon, lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 03:43:32 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 24 Jul 2010 01:43:32 +0000 Subject: [issue6517] configparser: add possibility to escape formatstrings In-Reply-To: <1247949399.94.0.0752877480689.issue6517@psf.upfronthosting.co.za> Message-ID: <1279935812.4.0.0588481169309.issue6517@psf.upfronthosting.co.za> ?ukasz Langa added the comment: This issue superseeds #8888 because of the patches attached. Brett, there are two ways we can solve this issue: 1. Rewrite the documentation so it clearly puts more emphasis on the fact that SafeConfigParser is the one to choose. 2. We deprecate ConfigParser in the code and in the documentation. I personally would go with 1. and maybe just "hint" about the fact that ConfigParser is not for end users. Formal deprecation seems too big for this since the regular ConfigParser still does have its valid use cases. Please decide on what we're going to do and I'll edit the docs and add the tests here to py3k. ---------- nosy: +brett.cannon, lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 03:48:51 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 24 Jul 2010 01:48:51 +0000 Subject: [issue3022] mailbox module, two small fixes In-Reply-To: <1212355773.67.0.369854949727.issue3022@psf.upfronthosting.co.za> Message-ID: <1279936131.28.0.800375526502.issue3022@psf.upfronthosting.co.za> STINNER Victor added the comment: self.get_sequences() => self.get_sequences().iteritems() was fixed in trunk (r71046) and py3k (r71067). The patch on .get_sequences() has no test: (test_get_message_with_sequences() doesn't fail without the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 04:05:56 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 24 Jul 2010 02:05:56 +0000 Subject: [issue9246] os.getcwd() hardcodes max path len In-Reply-To: <1279023059.26.0.245683093399.issue9246@psf.upfronthosting.co.za> Message-ID: <1279937156.73.0.100854434346.issue9246@psf.upfronthosting.co.za> STINNER Victor added the comment: Patch based on Python 2 source code, but raises a MemoryError (instead of an OSError) on memory allocation failure. With my patch, bigpath.py ends with "cwd: 1028 ...aab/aaaaab" with Python Python 3.2. Same result with Python 2.6. 1028 is bigger than 1026 (previous hardcoded max length in bytes including nul byte). ---------- keywords: +patch Added file: http://bugs.python.org/file18169/os_getcwd_buffer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 04:09:01 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 24 Jul 2010 02:09:01 +0000 Subject: [issue9246] os.getcwd() hardcodes max path len In-Reply-To: <1279023059.26.0.245683093399.issue9246@psf.upfronthosting.co.za> Message-ID: <1279937341.98.0.134661780887.issue9246@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm not sure that PyMem_Realloc(NULL, size) is always equivalent to PyMem_Malloc(size). And I don't really know why I'm using PyMem_* instead of malloc() / free() :-) I suppose that Python has a faster memory allocator, or that it has better checks when compiled with pydebug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 04:09:47 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 24 Jul 2010 02:09:47 +0000 Subject: [issue7519] ConfigParser can't read files with BOM markers In-Reply-To: <1260905357.88.0.211998340765.issue7519@psf.upfronthosting.co.za> Message-ID: <1279937387.31.0.792926317289.issue7519@psf.upfronthosting.co.za> ?ukasz Langa added the comment: This is a sign of a broaded issue and should either be closed as invalid or superseeded by the main BOM issue. Brett, I would close it. ---------- nosy: +brett.cannon, lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 04:15:04 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 24 Jul 2010 02:15:04 +0000 Subject: [issue7651] Python3: guess text file charset using the BOM In-Reply-To: <1262833437.24.0.308267564541.issue7651@psf.upfronthosting.co.za> Message-ID: <1279937704.4.0.511430250383.issue7651@psf.upfronthosting.co.za> ?ukasz Langa added the comment: I agree with MvL that this is a broader issue that shouldn't be patched in user code (e.g. #7519) but on the codec level. The sniff codec idea seems neat. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 04:17:26 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 24 Jul 2010 02:17:26 +0000 Subject: [issue2204] document ConfigParser behaviour when a file has same section multiple times In-Reply-To: <1204236720.35.0.634026900248.issue2204@psf.upfronthosting.co.za> Message-ID: <1279937846.57.0.59906201881.issue2204@psf.upfronthosting.co.za> ?ukasz Langa added the comment: I personally would keep the current behaviour so that: - creating a duplicate section programatically invokes an error - reading a file which has duplicate sections causes an implicit merge without any exceptions This is quite understandable, more so when you consider how ConfigParser merges configuration from multiple sources as well. Brett, the only thing I guess we could do here is to adjust the documentation so it's more clear on the default behaviour. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 04:24:27 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 24 Jul 2010 02:24:27 +0000 Subject: [issue2651] Strings passed to KeyError do not round trip In-Reply-To: <1208453081.65.0.886847251895.issue2651@psf.upfronthosting.co.za> Message-ID: <1279938267.87.0.0441791109495.issue2651@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Alexander, Brett, I could update the patch but first I need thumbs up that this is going to be accepted and some eventual code breaks will be patched (again, I can do that but it has to be accepted on time). Brett, what to do? ---------- nosy: +brett.cannon, lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 04:28:22 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 24 Jul 2010 02:28:22 +0000 Subject: [issue9101] reference json format in file formats chapter In-Reply-To: <1277739443.04.0.607128047102.issue9101@psf.upfronthosting.co.za> Message-ID: <1279938502.63.0.934622715745.issue9101@psf.upfronthosting.co.za> ?ukasz Langa added the comment: 1: Agreed. 2: Would use wording like: "The json module can also be used for this purpose." Can be used does not imply that it is its main function but it hints in the right direction. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 04:34:28 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 24 Jul 2010 02:34:28 +0000 Subject: [issue5412] extend configparser to support [] syntax In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1279938868.52.0.963252463733.issue5412@psf.upfronthosting.co.za> ?ukasz Langa added the comment: I'd say we go for it. At the moment most (if not all) "drop-in replacements" for ConfigParser support this functionality. It's backwards compatible and useful. One might argue than it's more pythonic than getfloat() & co. I'd also add attribute-like syntax but before I present a patch I'd need #7113, #4686 and #1682942 accepted. The last one is waiting for the first two as well. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 04:47:43 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 24 Jul 2010 02:47:43 +0000 Subject: [issue5542] Socket is closed prematurely in httplib, if server sends response before request body has been sent In-Reply-To: <1237800550.85.0.782891199129.issue5542@psf.upfronthosting.co.za> Message-ID: <1279939663.26.0.986517031649.issue5542@psf.upfronthosting.co.za> STINNER Victor added the comment: jhylton> Committed revision 70643. I backported the fix to 2.7 (r83122). It's required to fix #9032 (XML-RPC bug? in 2.7. I don't think that it should be backported to 2.6 or 3.1, so I close the issue. ---------- nosy: +haypo resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 04:52:24 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 24 Jul 2010 02:52:24 +0000 Subject: [issue9032] xmlrpc: Transport.request() should also catch socket.error(EPIPE) In-Reply-To: <1276900346.42.0.945858543799.issue9032@psf.upfronthosting.co.za> Message-ID: <1279939944.8.0.909284435954.issue9032@psf.upfronthosting.co.za> STINNER Victor added the comment: I fixed the bug in 2.7 (r83123) and 3.2 (r83120). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 05:41:58 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 24 Jul 2010 03:41:58 +0000 Subject: [issue6213] Incremental encoder incompatibility between 2.x and py3k In-Reply-To: <1244233063.22.0.634170589597.issue6213@psf.upfronthosting.co.za> Message-ID: <1279942918.43.0.428714098467.issue6213@psf.upfronthosting.co.za> STINNER Victor added the comment: Codecs are inconsistents: utf-32 has working getstate() / setstate() methods, whereas utf-8-sig and utf-16 don't (getstate() always return 0, setstate() does nothing). > Simply moving py3ks getstate/setstate implementation > over to 2.x might do the trick. That's what my patch does :-) It just a copy/paste of Python3 code. It does fix #5006 tests (which are re-enabled by the patch). Using the patch, it's possible to save/restore utf-8-sig and utf-16 codecs state. ---------- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file18170/utf_8_16.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 06:24:29 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Sat, 24 Jul 2010 04:24:29 +0000 Subject: [issue6517] configparser: add possibility to escape formatstrings In-Reply-To: <1279935812.4.0.0588481169309.issue6517@psf.upfronthosting.co.za> Message-ID: Fred L. Drake, Jr. added the comment: I disagree. The documentation should promote RawConfigParser, and note SafeConfigParser and ConfigParser as remaining for backward compatibility for existing software. Maintainers of legacy software using ConfigParser should be encouraged to convert to SafeConfigParser (or even RawConfigParser) if possible. Documentation changes should be sufficient; deprecation warnings typically generate more pain than good. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 06:59:20 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 24 Jul 2010 04:59:20 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1279947560.36.0.662429746647.issue2986@psf.upfronthosting.co.za> Eli Bendersky added the comment: Here's a patch for Doc/library/difflib.rst of the 2.6 branch, following Terry's suggested addition to the docs of the SequenceMatcher class. Tested 'make html'. ---------- keywords: +patch Added file: http://bugs.python.org/file18171/issue2986.docs26.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 07:23:47 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 24 Jul 2010 05:23:47 +0000 Subject: [issue9364] some problems with the documentation of pydoc In-Reply-To: <1279949027.26.0.1869842795.issue9364@psf.upfronthosting.co.za> Message-ID: <1279949027.26.0.1869842795.issue9364@psf.upfronthosting.co.za> New submission from Eli Bendersky : The first paragraph in its documentation says: """ In the Python interpreter, do "from pydoc import help" to provide online help. Calling help(thing) on a Python object documents the object. """ Which is no longer accurate, because the help() function has long ago become a built-in. Below is an excerpt from Terry Reedy in a private email discussion on this subject, that raises more issues. --------------------------------------------- 1. The output from help(help) could be made more clear. The nature of 'help' has been a point of confusion. A recent python-list post asked something like "What is 'help'?" Now (with some parallel examples: >>> help(int) Help on class int in module builtins: class int(object) [snip] >>> help(1) Help on int object: class int(object) [snip] >>> help(help) Help on _Helper in module site object: class _Helper(builtins.object) | Define the built-in 'help'. | This is a wrapper around pydoc.help (with a twist). | | Methods defined here: | | __call__(self, *args, **kwds) | a. 'module site object' is nonsense, it should just be 'module site', except that to be parallel to what is done for other instances, it should be 'Help on _Helper object'. Why should help special-case itself (with a slightly garbled line?) Is that done in site._Helper or pydoc.help? However, it would be more helpful for all instances to give the location of the class when one asks for help on an instance, just as when one asks for help on the class itself. It is annoying to to have to repeat help() just to get that info. So I would like to see "Help on instance of class int in module builtins:" "Help on instance of class _Helper in module site:" This would be a code patch to pydoc.help b. "This is a wrapper around pydoc.help" good so far "(with a twist)" thanks a lot. I think the comment should be either removed or explained. A reference manual should explain, not tease. Replace "Define the built-in 'help'." with something clearer and more accurate, such as "The name 'help' is injected in module builtins after being bound to an instance of this class.". Put this after, not before, the 'wrapper' line. A patch for site._Helper doc string. 2. Improve manual chapter for site module. a. It currently starts "Importing this module will append site-specific paths to the module search path." Add "inject 'help' into builtins and " after append. Then add a short explanation paragraph before the search path stuff. Something like "This module contains a class (_Helper) that wraps function pydoc.help. An instance of the class is bound to name 'help' in the builtins module." A recent discussion on pydev or maybe python-list (in the thread mentioned above?) implied that one could usefully make another instance of _Helper or maybe a subclass thereof. I did not pay enough attention, though, to really get it. b. It currently ends with "XXX Update documentation XXX document python -m site ?user-base ?user-site" ---------- assignee: docs at python components: Documentation messages: 111426 nosy: docs at python, eli.bendersky, tjreedy priority: normal severity: normal status: open title: some problems with the documentation of pydoc type: behavior versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 07:45:35 2010 From: report at bugs.python.org (Ron Adam) Date: Sat, 24 Jul 2010 05:45:35 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1279913042.97.0.618415832845.issue9362@psf.upfronthosting.co.za> Message-ID: <1279950335.61.0.614604441185.issue9362@psf.upfronthosting.co.za> Ron Adam added the comment: I agree it could be improved a bit. A little experimenting comes up with the following inconsistencies. >>> quit Use quit() or Ctrl-D (i.e. EOF) to exit >>> exit Use exit() or Ctrl-D (i.e. EOF) to exit help(exit) and help(quit) is not helpful. It instead shows the Quitter class in site.py with no doc strings. exit() and quit() are both equivalent to sys.exit() and both except an exit code or message. I think your third choice is good. Type exit() or quit() and press Enter to exit Advance users can still use Cntl-D. Add a topics entry for help('EXIT') which can explain exiting the console in more detail and include the Ctrl-D short cut. help('QUIT') can point to the same topics info used for 'EXIT'. Then add a doc string the the Quitter class that says to use help('EXIT') or help('QUIT') to get help for exit and quit. On another note: I've sometimes wanted quit() to exit from a running script to the python console so I can do a little value checking. And for exit() to exit both the program and the console. But I think it may be too lake to make that particular change. ---------- nosy: +ron_adam _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 07:46:05 2010 From: report at bugs.python.org (Anthony Long) Date: Sat, 24 Jul 2010 05:46:05 +0000 Subject: [issue9365] Installing a distro without sqlite3 will require a reinstall of python to function if installed at a later date In-Reply-To: <1279950365.76.0.579184415242.issue9365@psf.upfronthosting.co.za> Message-ID: <1279950365.76.0.579184415242.issue9365@psf.upfronthosting.co.za> New submission from Anthony Long : install a distro of without sqlite3 support. now you should have a /usr/lib/python2.6/sqlite3, which obviously isn't usable. now if you install sqlite3, and try a 'import sqlite3' it still doesn't work. so you have to compile/install python2.6 again. after which it works fine. http://www.linuxfromscratch.org/blfs/view/svn/general/python.html ---------- components: Library (Lib) messages: 111428 nosy: antlong priority: normal severity: normal status: open title: Installing a distro without sqlite3 will require a reinstall of python to function if installed at a later date type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 07:50:47 2010 From: report at bugs.python.org (Anthony Long) Date: Sat, 24 Jul 2010 05:50:47 +0000 Subject: [issue9365] Installing a distro without sqlite3 will require a reinstall of python to function if installed at a later date In-Reply-To: <1279950365.76.0.579184415242.issue9365@psf.upfronthosting.co.za> Message-ID: <1279950647.42.0.133417824878.issue9365@psf.upfronthosting.co.za> Anthony Long added the comment: Same behaviour on python 3, http://pastebin.ca/1907343 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 08:38:54 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 24 Jul 2010 06:38:54 +0000 Subject: [issue6517] configparser: add possibility to escape formatstrings In-Reply-To: <1247949399.94.0.0752877480689.issue6517@psf.upfronthosting.co.za> Message-ID: <1279953534.7.0.728418384204.issue6517@psf.upfronthosting.co.za> ?ukasz Langa added the comment: > The documentation should promote RawConfigParser, and note > SafeConfigParser and ConfigParser as remaining for backward > compatibility for existing software. That is another way to go around this. Anyway, ConfigParser is the least predictable of all three for end users and the documentation should be adjusted to emphasize this. > Maintainers of legacy software > using ConfigParser should be encouraged to convert to SafeConfigParser > (or even RawConfigParser) if possible. That's another comment that should appear in the documentation. > Documentation changes should be sufficient; deprecation warnings > typically generate more pain than good. Isn't is what I was saying above? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 10:04:02 2010 From: report at bugs.python.org (Daniel Urban) Date: Sat, 24 Jul 2010 08:04:02 +0000 Subject: [issue9212] dict_keys purports to implement the Set ABC, but is missing the isdisjoint method In-Reply-To: <1278702217.69.0.69895367614.issue9212@psf.upfronthosting.co.za> Message-ID: <1279958642.41.0.26316375838.issue9212@psf.upfronthosting.co.za> Daniel Urban added the comment: > Unless there is a reason I have missed, I would iterate through the > smaller set, which might even be empty or nearly so, rather than > either in particular. You're right, here is a new patch. Pseudocode: def isdisjoint(self, other): if self is other: if len(self) == 0: return True else: return False else: if len(other) > len(self): self, other = other, self for item in other: if item in self: return False return True ---------- Added file: http://bugs.python.org/file18172/issue9212a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 11:14:42 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 24 Jul 2010 09:14:42 +0000 Subject: [issue8775] Use locale encoding to encode command line arguments (subprocess, os.exec*(), etc.) In-Reply-To: <1274357365.37.0.0731450159524.issue8775@psf.upfronthosting.co.za> Message-ID: <1279962882.58.0.552247486148.issue8775@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This issue only seems to be relevant for OSX, and then only for OSX releases before 10.5, because in that release Apple made sure that the LANG variable and simular LC_* ones specify a UTF-8 encoding and we're back at the common case where the filesystem encoding matches the locale encoding. A system where the filesystem encoding doesn't match the locale encoding is hard to get right. While it would be possible to add sys.cmdlineencoding that doesn't actually solve the semantic problem because external tools might not cooperate. That is, most system tools seem to work with bytes internally and do not treat arguments as text encoded in the locale encoding that should be re-encoded in the filesystem encoding before passing them to the C APIs. That is, when calling "ls somefile" the "ls" command will pass the bytes in argv[1] to the POSIX routines for getting file information without trying to reencode. In short, having a filesystem encoding that is different from the command-line only works when all system tools cooperate and are unicode aware. To be honest, I'd say the behavior of OSX 10.4 is a bug and we might add a workaround on that platform that uses CFStringGetSystemEncoding() to fetch the actual system encoding when LANG=C. (And I'm -1 on adding the patch) See also: issue9167 ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 11:46:41 2010 From: report at bugs.python.org (Kay Hayen) Date: Sat, 24 Jul 2010 09:46:41 +0000 Subject: [issue9366] Reference leak for local new style class In-Reply-To: <1279964801.22.0.925376306196.issue9366@psf.upfronthosting.co.za> Message-ID: <1279964801.22.0.925376306196.issue9366@psf.upfronthosting.co.za> New submission from Kay Hayen : Hello, I have created tests that check the reference counting and found that the following simple function leaks references in CPython: def simpleFunction39(): class Parent( object ): pass I have attached a test that needs to be run with python-dbg and checks the total reference count for many language constructs. Sometimes a warmup can be useful, if CPython caches something, but it doesn't help in this case. Removing object or replacing it with an old style class helps. I think I saw that 3 references of object leak, and a total of ca. 20 for each call to the function. I suspect a memory leak too. Use the attached file for reproduction of the problem. ---------- components: Interpreter Core files: Referencing.py messages: 111433 nosy: kayhayen priority: normal severity: normal status: open title: Reference leak for local new style class type: resource usage versions: Python 2.6 Added file: http://bugs.python.org/file18173/Referencing.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 11:52:04 2010 From: report at bugs.python.org (Darren Worrall) Date: Sat, 24 Jul 2010 09:52:04 +0000 Subject: [issue9367] test_getgroups in test_posix fails In-Reply-To: <1279965124.79.0.0313564801642.issue9367@psf.upfronthosting.co.za> Message-ID: <1279965124.79.0.0313564801642.issue9367@psf.upfronthosting.co.za> New submission from Darren Worrall : In my checkout of py3k (r83123), test_getgroups in test_posix fails - the right elements are returned but the ordering is different: $ ./python -m test.regrtest test_posix test_posix test test_posix failed -- Traceback (most recent call last): File "/home/daz/src/py3k/Lib/test/test_posix.py", line 360, in test_getgroups self.assertEqual([int(x) for x in groups.split()], posix.getgroups()) AssertionError: Lists differ: [1000, 4, 6, 20, 24, 46, 105, ... != [4, 6, 20, 24, 46, 105, 119, 1... First differing element 0: 1000 4 - [1000, 4, 6, 20, 24, 46, 105, 119, 122, 125, 126, 128] + [4, 6, 20, 24, 46, 105, 119, 122, 125, 126, 128, 1000] 1 test failed: test_posix Platform is Ubuntu 10.04 x86_64, kernel is 2.6.32 - unfortunately my C sucks so I'm not sure what's going on. ---------- messages: 111434 nosy: DazWorrall priority: normal severity: normal status: open title: test_getgroups in test_posix fails _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 11:52:59 2010 From: report at bugs.python.org (Armin Ronacher) Date: Sat, 24 Jul 2010 09:52:59 +0000 Subject: [issue9368] Const-Correctness for Method Calls In-Reply-To: <1279965179.09.0.525264342338.issue9368@psf.upfronthosting.co.za> Message-ID: <1279965179.09.0.525264342338.issue9368@psf.upfronthosting.co.za> New submission from Armin Ronacher : The following patch changes some parts of the public C API for const correctness which would help C++ programmers. The original patch was provided by neXyon on irc.freenode.net. It does not produce any compiler warnings on GCC and I don't expect any compiler warnings on other systems either. ---------- components: None files: const.patch keywords: patch messages: 111435 nosy: aronacher priority: normal severity: normal stage: patch review status: open title: Const-Correctness for Method Calls type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file18174/const.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 11:53:13 2010 From: report at bugs.python.org (Richard Jones) Date: Sat, 24 Jul 2010 09:53:13 +0000 Subject: [issue4184] Remove use of private attributes in smtpd In-Reply-To: <1224724634.09.0.0444621109477.issue4184@psf.upfronthosting.co.za> Message-ID: <1279965193.11.0.17343378585.issue4184@psf.upfronthosting.co.za> Richard Jones added the comment: Committed in revision 83125. ---------- assignee: -> richard resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 11:53:22 2010 From: report at bugs.python.org (=?utf-8?b?SsO2cmcgTcO8bGxlcg==?=) Date: Sat, 24 Jul 2010 09:53:22 +0000 Subject: [issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction In-Reply-To: <1279965202.04.0.507207277215.issue9369@psf.upfronthosting.co.za> Message-ID: <1279965202.04.0.507207277215.issue9369@psf.upfronthosting.co.za> New submission from J?rg M?ller : Patch attached ---------- components: Interpreter Core files: patch.diff keywords: patch messages: 111437 nosy: neXyon priority: normal severity: normal status: open title: const char* for PyObject_CallMethod and PyObject_CallFunction type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file18175/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 11:53:38 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 24 Jul 2010 09:53:38 +0000 Subject: [issue9336] string.letters should display locale based equivalent of a-Z In-Reply-To: <1279855673.74.0.0304173911229.issue9336@psf.upfronthosting.co.za> Message-ID: <1279965218.16.0.159910437796.issue9336@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Actually, in Python 2.x, string.letters *does* contain the letters based on the locale. Just make sure to call locale.setlocale. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 12:02:21 2010 From: report at bugs.python.org (=?utf-8?b?SsO2cmcgTcO8bGxlcg==?=) Date: Sat, 24 Jul 2010 10:02:21 +0000 Subject: [issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction In-Reply-To: <1279965202.04.0.507207277215.issue9369@psf.upfronthosting.co.za> Message-ID: <1279965741.18.0.587945450414.issue9369@psf.upfronthosting.co.za> J?rg M?ller added the comment: I've merged the patch with the changes from Armin in issue9368. ---------- type: feature request -> behavior Added file: http://bugs.python.org/file18176/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 12:02:48 2010 From: report at bugs.python.org (=?utf-8?b?SsO2cmcgTcO8bGxlcg==?=) Date: Sat, 24 Jul 2010 10:02:48 +0000 Subject: [issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction In-Reply-To: <1279965202.04.0.507207277215.issue9369@psf.upfronthosting.co.za> Message-ID: <1279965768.81.0.887829775438.issue9369@psf.upfronthosting.co.za> Changes by J?rg M?ller : Removed file: http://bugs.python.org/file18175/patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 12:04:07 2010 From: report at bugs.python.org (=?utf-8?b?SsO2cmcgTcO8bGxlcg==?=) Date: Sat, 24 Jul 2010 10:04:07 +0000 Subject: [issue9368] Const-Correctness for Method Calls In-Reply-To: <1279965179.09.0.525264342338.issue9368@psf.upfronthosting.co.za> Message-ID: <1279965847.89.0.987128790309.issue9368@psf.upfronthosting.co.za> J?rg M?ller added the comment: Uhm, while I reported this Armin was faster than me :) However, I've merged our patches in issue9369. ---------- nosy: +neXyon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 12:06:10 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 24 Jul 2010 10:06:10 +0000 Subject: [issue7900] posix.getgroups() failure on Mac OS X In-Reply-To: <1265814298.66.0.86998714187.issue7900@psf.upfronthosting.co.za> Message-ID: <1279965970.84.0.2847799726.issue7900@psf.upfronthosting.co.za> Ronald Oussoren added the comment: 2.7: r83124 2.6: r83126 The fix is now in all active branches, and I therefore close the issue. ---------- stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 12:14:33 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 24 Jul 2010 10:14:33 +0000 Subject: [issue8792] xmlrpclib compatibility issues with Apache XML-RPC library In-Reply-To: <1274558114.05.0.260300491762.issue8792@psf.upfronthosting.co.za> Message-ID: <1279966473.21.0.943078494396.issue8792@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can somebody please point to a current version of the Apache documentation? The link in msg106322 does not work anymore. I'm tempted to close this as invalid: Apache is clearly violating the XML-RPC specification, so the bug is theirs. As a work-around, adding this to dispatch in your own application seems like a good solution to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 12:14:53 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 24 Jul 2010 10:14:53 +0000 Subject: [issue7041] test_macostools fails on os x 10.6 In-Reply-To: <1254518062.04.0.658322870516.issue7041@psf.upfronthosting.co.za> Message-ID: <1279966493.52.0.303477202182.issue7041@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- assignee: -> ronaldoussoren components: +Macintosh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 12:19:13 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 24 Jul 2010 10:19:13 +0000 Subject: [issue8792] Support Apache extensions to XML-RPC in xmlrpclib In-Reply-To: <1274558114.05.0.260300491762.issue8792@psf.upfronthosting.co.za> Message-ID: <1279966753.38.0.280650976163.issue8792@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I just noticed that I only need to strip the comma from the URL. So I now see it's not an Apache bug, but explicitly marked as an extension. So I'm reclassifying this as a feature request. As a new feature, it can only go into 3.2. Attila, Bhargav: is either of you interested in providing a patch? ---------- priority: normal -> low title: xmlrpclib compatibility issues with Apache XML-RPC library -> Support Apache extensions to XML-RPC in xmlrpclib type: behavior -> feature request versions: +Python 3.3 -Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 12:19:47 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 24 Jul 2010 10:19:47 +0000 Subject: [issue8798] tkinter build variants on OSX In-Reply-To: <1274692007.27.0.519809230611.issue8798@psf.upfronthosting.co.za> Message-ID: <1279966787.52.0.77726619794.issue8798@psf.upfronthosting.co.za> Ronald Oussoren added the comment: We talked about this at the language summit at EuroPython 2010. We'll resolve the installer issue by moving the 64-bit capable installer to Tk 8.5 (with a minimal OSX version of 10.6). The 32-bit installer will still use Tk 8.4 because it needs to run on OSX 10.3.9 and later, and that's they only version of Tk that is available everywhere as part of a system install. I'm closing this issue because the proposed mechanism would only be truly useful as part of the OSX installer and that won't happen. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 12:23:53 2010 From: report at bugs.python.org (Darren Worrall) Date: Sat, 24 Jul 2010 10:23:53 +0000 Subject: [issue9367] test_getgroups in test_posix fails In-Reply-To: <1279965124.79.0.0313564801642.issue9367@psf.upfronthosting.co.za> Message-ID: <1279967033.06.0.58937499232.issue9367@psf.upfronthosting.co.za> Darren Worrall added the comment: After a quick chat with Ronald at the EP sprint he says the ordering didnt matter, so here's a quick patch to check only for deltas. ---------- keywords: +patch Added file: http://bugs.python.org/file18177/py3k-issue9367.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 12:32:40 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 24 Jul 2010 10:32:40 +0000 Subject: [issue4813] On OS-X the directories searched by setup.py for Tk are in the wrong order. In-Reply-To: <1230940206.74.0.201449731913.issue4813@psf.upfronthosting.co.za> Message-ID: <1279967560.26.0.710940484761.issue4813@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This issue is no longer valid, the current search order from setup.py: def detect_tkinter_darwin(self, inc_dirs, lib_dirs): # The _tkinter module, using frameworks. Since frameworks are quite # different the UNIX search logic is not sharable. from os.path import join, exists framework_dirs = [ '/Library/Frameworks', '/System/Library/Frameworks/', join(os.getenv('HOME'), '/Library/Frameworks') ] sysroot = macosx_sdk_root() This matches the order in which the linker searches. ---------- resolution: -> out of date stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 12:33:56 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 24 Jul 2010 10:33:56 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279967636.11.0.622271840949.issue9335@psf.upfronthosting.co.za> Martin v. L?wis added the comment: If an application uses .isalpha for a security-relevant check, this is a security issue in the application, not in Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 12:35:30 2010 From: report at bugs.python.org (Anthony Long) Date: Sat, 24 Jul 2010 10:35:30 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279967730.86.0.461933142358.issue9335@psf.upfronthosting.co.za> Anthony Long added the comment: I disagree. It's expected that the function will return valid data. This doesn't return valid data so isalpha() is compromised. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 12:41:13 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 24 Jul 2010 10:41:13 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279968073.12.0.466559754465.issue9335@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I agree with Martin that the security problem would be in the application, not python itself. Testing with isalpha is generally not the right thing to do anyway, it is much better to restrict input to a know-good set of data, such as by using regular expressions. For multi-byte encodings like UTF-8 you cannot rely on per-byte calls to isalpha anyway. The situation is even worse for an encoding like Shift-JIS where you need context to know if a byte is part of a multi-byte value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 12:49:07 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 24 Jul 2010 10:49:07 +0000 Subject: [issue9370] Add reader redirect from test package docs to unittest module In-Reply-To: <1279968547.11.0.280770421062.issue9370@psf.upfronthosting.co.za> Message-ID: <1279968547.11.0.280770421062.issue9370@psf.upfronthosting.co.za> New submission from Nick Coghlan : Brett updated the docs for the test package to (correctly) point out that it is our internal testing package and isn't subject to the same stringent backwards compatibility rules as the rest of the standard library. A "see also" link pointing readers that have landed there over to the unittest module for their testing infrastructure needs would be a friendly thing to include. ---------- assignee: docs at python components: Documentation keywords: easy messages: 111450 nosy: docs at python, ncoghlan priority: normal severity: normal stage: needs patch status: open title: Add reader redirect from test package docs to unittest module versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 12:51:17 2010 From: report at bugs.python.org (=?utf-8?q?Petras_Zdanavi=C4=8Dius?=) Date: Sat, 24 Jul 2010 10:51:17 +0000 Subject: [issue1560032] confusing error msg from random.randint Message-ID: <1279968677.72.0.140613828873.issue1560032@psf.upfronthosting.co.za> Petras Zdanavi?ius added the comment: I have written a patch thats makes these strange error messages go away. What actually I have done was something like this: >>> randint = _inst.randint Was replaced with: >>> def randint(a, b): return _inst.randint(a, b) But I do not think it is worth to add additional stack frame just for error messages be a little more better. ---------- keywords: +patch nosy: +Petras.Zdanavi?ius Added file: http://bugs.python.org/file18178/pseudo-fix-1560032.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 12:52:32 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 24 Jul 2010 10:52:32 +0000 Subject: [issue9197] Crash when importer an extension after Py_Initialize, Py_Finalize and Py_Initialize In-Reply-To: <1278579237.82.0.673928899274.issue9197@psf.upfronthosting.co.za> Message-ID: <1279968752.19.0.430542500433.issue9197@psf.upfronthosting.co.za> Ronald Oussoren added the comment: (changing subject to better tell what this issue is about) ---------- title: subprocess module causing crash -> Crash when importer an extension after Py_Initialize, Py_Finalize and Py_Initialize _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 13:13:28 2010 From: report at bugs.python.org (Ralph Corderoy) Date: Sat, 24 Jul 2010 11:13:28 +0000 Subject: [issue1152248] Enhance file.readlines by making line separator selectable Message-ID: <1279970008.95.0.569523330052.issue1152248@psf.upfronthosting.co.za> Ralph Corderoy added the comment: fileLineIter() is not a solution that allows this bug to be closed, no. readline() needs modifying and if that means python-dev discussion then that's what it needs. Things to consider include changing the record separator as the file is read. $ printf 'a b c\nd e f ' | > awk '{print "<" $0 ">"} NR == 1 {RS = " "}' $ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 13:15:32 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 24 Jul 2010 11:15:32 +0000 Subject: [issue7041] test_macostools fails on os x 10.6 In-Reply-To: <1254518062.04.0.658322870516.issue7041@psf.upfronthosting.co.za> Message-ID: <1279970132.67.0.814706347598.issue7041@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This issue was fixed in the repository a while back by disabling these tests on 64-bit systems. As Ned notes the code uses APIs that aren't available for 64-bit processes. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 13:16:57 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 24 Jul 2010 11:16:57 +0000 Subject: [issue9368] Const-Correctness for Method Calls In-Reply-To: <1279965179.09.0.525264342338.issue9368@psf.upfronthosting.co.za> Message-ID: <1279970217.55.0.630260214039.issue9368@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> duplicate stage: patch review -> committed/rejected status: open -> closed superseder: -> const char* for PyObject_CallMethod and PyObject_CallFunction _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 13:17:49 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 24 Jul 2010 11:17:49 +0000 Subject: [issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction In-Reply-To: <1279965202.04.0.507207277215.issue9369@psf.upfronthosting.co.za> Message-ID: <1279970269.62.0.83889995834.issue9369@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +aronacher stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 13:26:42 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 24 Jul 2010 11:26:42 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1279913042.97.0.618415832845.issue9362@psf.upfronthosting.co.za> Message-ID: <1279970802.25.0.825795897531.issue9362@psf.upfronthosting.co.za> Mark Lawrence added the comment: I assume that this is on *nix boxes, on Windows it's:- >>> quit Use quit() or Ctrl-Z plus Return to exit >>> exit Use exit() or Ctrl-Z plus Return to exit ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 13:26:53 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 24 Jul 2010 11:26:53 +0000 Subject: [issue8775] Use locale encoding to encode command line arguments (subprocess, os.exec*(), etc.) In-Reply-To: <1274357365.37.0.0731450159524.issue8775@psf.upfronthosting.co.za> Message-ID: <1279970813.91.0.52228700077.issue8775@psf.upfronthosting.co.za> Martin v. L?wis added the comment: It seems that everybody now agrees to close this issue as "won't fix". ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 13:37:49 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 24 Jul 2010 11:37:49 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279967730.86.0.461933142358.issue9335@psf.upfronthosting.co.za> Message-ID: <4C4AD085.5000007@v.loewis.de> Martin v. L?wis added the comment: > I disagree. It's expected that the function will return valid data. This doesn't return valid data so isalpha() is compromised. What is "valid data"? The function (isalpha) should return a boolean, and it does. So the result is certainly "valid". The documentation says "For 8-bit strings, this method is locale-dependent." So it is correct if it returns what the OS vendor says to return. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 13:38:20 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 24 Jul 2010 11:38:20 +0000 Subject: [issue2454] sha and md5 fixer In-Reply-To: <1206147643.89.0.60936055638.issue2454@psf.upfronthosting.co.za> Message-ID: <1279971500.61.0.971612791274.issue2454@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can this be committed please. In msg110796 I over-emphasised the technical aspects, the patch is actually against 2to3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 13:39:50 2010 From: report at bugs.python.org (Mark Smith) Date: Sat, 24 Jul 2010 11:39:50 +0000 Subject: [issue7635] 19.6 xml.dom.pulldom doc: stub? In-Reply-To: <1262651647.28.0.891885115157.issue7635@psf.upfronthosting.co.za> Message-ID: <1279971590.1.0.0511853815788.issue7635@psf.upfronthosting.co.za> Mark Smith added the comment: I have a patch that provides full documentation for pulldom, and adds sensible docstrings to the pulldom module. I have unfortunately created the patch on the py3k branch -- please let me know what I should do regarding porting these changes to Python 2.7. ---------- keywords: +patch nosy: +mark.smith Added file: http://bugs.python.org/file18179/7635.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 13:46:09 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 24 Jul 2010 11:46:09 +0000 Subject: [issue2454] sha and md5 fixer In-Reply-To: <1206147643.89.0.60936055638.issue2454@psf.upfronthosting.co.za> Message-ID: <1279971969.26.0.988420871658.issue2454@psf.upfronthosting.co.za> ?ric Araujo added the comment: Minor nit: I suggest naming the fixer fix_hashlib, since the name fix_hash could easily be understood as something fixing __hash__ (even if such a fix is impossible for a machine to do). This fix could also go into fix_imports, but it?s useful as a standalone fixer e.g. to run on code that drops <2.5 compatibility. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 13:48:34 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 24 Jul 2010 11:48:34 +0000 Subject: [issue2927] expose html.parser.unescape In-Reply-To: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> Message-ID: <1279972114.82.0.678055476323.issue2927@psf.upfronthosting.co.za> Mark Lawrence added the comment: msg110657 recommends close -> wontfix. Does anybody want this kept open or can it be closed? ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 13:51:43 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 24 Jul 2010 11:51:43 +0000 Subject: [issue2927] expose html.parser.unescape In-Reply-To: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> Message-ID: <1279972303.0.0.853168950027.issue2927@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +ezio.melotti, haypo status: pending -> open versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 13:53:23 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 24 Jul 2010 11:53:23 +0000 Subject: [issue7473] Compile error when building a 3-way universal framework when a 2-way universal framework is present In-Reply-To: <1260470622.19.0.0787488117432.issue7473@psf.upfronthosting.co.za> Message-ID: <1279972403.91.0.839310445987.issue7473@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The attached patch makes sure that os.path.join(sys.prefix, 'lib') isn't added to the link path when using a framework build. This fixes the issue at hand in that I can then build a 3-way build of 2.7 when the default 32-bit is already installed. Without the patch _curses_panel fails to build because it tries to link to a 32-bit only library. What I haven't done yet is check how this affects the script that builds the installer. That's the primary reason for not applying the patch at this time ---------- keywords: +patch versions: +Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file18180/setup.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 13:56:13 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 24 Jul 2010 11:56:13 +0000 Subject: [issue3704] cookielib doesn't handle URLs with / in parameters In-Reply-To: <1219856501.23.0.0473308500082.issue3704@psf.upfronthosting.co.za> Message-ID: <1279972573.35.0.199067083663.issue3704@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can we have the patch committed to 2.7 and 3.1 please. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 14:00:36 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 24 Jul 2010 12:00:36 +0000 Subject: [issue4485] fast swap of "default" Windows python versions In-Reply-To: <1228207919.66.0.730717066553.issue4485@psf.upfronthosting.co.za> Message-ID: <1279972836.91.0.590163134628.issue4485@psf.upfronthosting.co.za> Mark Lawrence added the comment: Hum, I think I spoke too soon. @Brian: @Tim: what do you think about this? ---------- nosy: +brian.curtin, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 14:10:55 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 24 Jul 2010 12:10:55 +0000 Subject: [issue9047] Python 2.7rc2 includes -isysroot twice on each gcc command line In-Reply-To: <1277145493.52.0.0439952052215.issue9047@psf.upfronthosting.co.za> Message-ID: <1279973455.25.0.0957515289538.issue9047@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The root cause of having the flags twice is that the Makefile explicitly sets LDFLAGS in the environment before when running setup.py, and that distutils appens the value of $(LDFLAGS) to $(LDSHARED) when LDFLAGS is set in the environment. Line from the makefile: $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build; And in Lib/distutils/ccompiler.py (in customize_compiler): if 'LDFLAGS' in os.environ: ldshared = ldshared + ' ' + os.environ['LDFLAGS'] A quick workaround to remove the duplicate flags is to explictly remove the related values from os.environ before calling main in setup.py: # --install-platlib if __name__ == '__main__': import os del os.environ['LDFLAGS'] main() I've attached a patch that implements this behavior. I'm not 100% sure this is the right solution because sysconfig._parse_makefile also looks at the environment and it may be better to remove the code from ccompiler.customize_compiler instead. ---------- keywords: +patch nosy: +tarek Added file: http://bugs.python.org/file18181/setup.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 14:22:48 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 24 Jul 2010 12:22:48 +0000 Subject: [issue6135] subprocess seems to use local 8-bit encoding and gives no choice In-Reply-To: <1243494524.57.0.870766192683.issue6135@psf.upfronthosting.co.za> Message-ID: <1279974168.77.0.0822589446103.issue6135@psf.upfronthosting.co.za> Mark Lawrence added the comment: In 2.7 and py3k test_subprocess has a class BaseTestCase which has a assertStderrEqual method. These don't exist in 3.1. I believe that the py3k code will need to be backported to 3.1. Can this be done on this issue, or do we need a new one to keep things clean? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 14:23:26 2010 From: report at bugs.python.org (Anthony Long) Date: Sat, 24 Jul 2010 12:23:26 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1279974206.67.0.40295959809.issue9335@psf.upfronthosting.co.za> Anthony Long added the comment: The locale is set incorrectly though - so it is not valid data. Valid data is a-Z. nothing more nothing less, and the locale and the alphabet should not be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 14:33:36 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 24 Jul 2010 12:33:36 +0000 Subject: [issue8938] Mac OS dialogs(Save As..., Load) translation In-Reply-To: <1275996872.25.0.17428013193.issue8938@psf.upfronthosting.co.za> Message-ID: <1279974816.53.0.94201920088.issue8938@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I don't think the Tk framework that is used by Tkinter is actually localized, but I don't know enough of Tcl/Tk to know for sure. EasyDialogs isn't explicitly localized either, and I guess the system doesn't do automatic localization either because neither the embedded Python.app nor the framework are localized which makes the system assume that they are english only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 14:37:30 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 24 Jul 2010 12:37:30 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1279975050.84.0.723853267524.issue9315@psf.upfronthosting.co.za> Eli Bendersky added the comment: I'm attaching a file with some unit tests for Lib/trace.py module in Python 2.7. Currently the unit tests check the API only, for line counting, func call counting and function caller relationships, because these can be tested through the API, without capturing stdout and resulting coverage files. All in all, these features are given a pretty good coverage. I've named the file test_trace_module.py because test_trace.py hasn't yet been renamed in 2.7 and I don't want to get into the naming mess. More tests can (and will) be added, but this is a start. ---------- Added file: http://bugs.python.org/file18182/test_trace_module.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 14:47:03 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 24 Jul 2010 12:47:03 +0000 Subject: [issue9167] argv double encoding on OSX In-Reply-To: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> Message-ID: <1279975623.1.0.83899500431.issue9167@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Using the CF API to fetch the system encoding won't work: Using PyObjC: >>> CFStringConvertEncodingToIANACharSetName(CFStringGetSystemEncoding()) u'macintosh' There doesn't seem to be another way to extract the prefered encoding from the system. I see two possible resolutions for this issue: * Close as won't fix This is technically a platform issue that has been fixed in OSX 10.5 * Add a workaround that explicitly sets os.environ['LANG'] to 'en_US.UTF-8' before converting argument and environment values to Unicode (only on OSX < 10.4, when LANG=C and of course resetting the previous value after conversion) I have a 10.4 system I could develop this on, but that's currently in a different country than me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 14:49:13 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 24 Jul 2010 12:49:13 +0000 Subject: [issue8095] test_urllib2 crashes on OS X 10.3 attempting to retrieve network proxy configuration In-Reply-To: <1268128420.33.0.487140127067.issue8095@psf.upfronthosting.co.za> Message-ID: <1279975753.61.0.705827343166.issue8095@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Ned: could you please check if the issue is present in Python 2.7? I don't have access to machines that are capable of running OSX 10.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 14:50:17 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Sat, 24 Jul 2010 12:50:17 +0000 Subject: [issue6517] configparser: add possibility to escape formatstrings In-Reply-To: <1279953534.7.0.728418384204.issue6517@psf.upfronthosting.co.za> Message-ID: Fred L. Drake, Jr. added the comment: We're in agreement; I was specifically adding weight to *not* selecting the second optoin ?ukasz Langa presented: > 2. We deprecate ConfigParser in the code and in the documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 14:55:30 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 24 Jul 2010 12:55:30 +0000 Subject: [issue7635] 19.6 xml.dom.pulldom doc: stub? In-Reply-To: <1262651647.28.0.891885115157.issue7635@psf.upfronthosting.co.za> Message-ID: <1279976130.14.0.657090018876.issue7635@psf.upfronthosting.co.za> ?ric Araujo added the comment: Working off py3k is the thing to do. If the patch is trivial to apply to the other branches, the committer will probably use svnmerge to do it, else it may be useful to adapt your patch to 2.7. I?d recommend waiting for feedback before doing this. ---------- assignee: georg.brandl -> docs at python nosy: +docs at python, merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 15:01:52 2010 From: report at bugs.python.org (Mark Smith) Date: Sat, 24 Jul 2010 13:01:52 +0000 Subject: [issue9371] pulldom doesn't provide END_DOCUMENT or COMMENT nodes. In-Reply-To: <1279976512.14.0.00983593867016.issue9371@psf.upfronthosting.co.za> Message-ID: <1279976512.14.0.00983593867016.issue9371@psf.upfronthosting.co.za> New submission from Mark Smith : I've been developing unit tests to increase the code coverage for pulldom, and have discovered that comments and end_document do not appear to result in events being obtained from the DOMEventStream. I've attached a failing TestCase to demonstrate this. ---------- components: XML files: test_pulldom.py messages: 111474 nosy: mark.smith priority: normal severity: normal status: open title: pulldom doesn't provide END_DOCUMENT or COMMENT nodes. type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file18183/test_pulldom.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 15:04:54 2010 From: report at bugs.python.org (Mark Smith) Date: Sat, 24 Jul 2010 13:04:54 +0000 Subject: [issue9372] pulldom.DOMEventStream.__getitem__ is broken In-Reply-To: <1279976693.98.0.219854761696.issue9372@psf.upfronthosting.co.za> Message-ID: <1279976693.98.0.219854761696.issue9372@psf.upfronthosting.co.za> New submission from Mark Smith : DOMEventStream implements __getitem__, but ignores the index/key that is passed in and simply returns the next item from the stream. This is seriously unexpected behaviour. I don't believe this functionality can be sensibly implemented in this class, and plan to submit a patch deprecating this method. ---------- components: XML messages: 111475 nosy: mark.smith priority: normal severity: normal status: open title: pulldom.DOMEventStream.__getitem__ is broken versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 15:06:44 2010 From: report at bugs.python.org (Mark Smith) Date: Sat, 24 Jul 2010 13:06:44 +0000 Subject: [issue9373] pulldom has low code coverage In-Reply-To: <1279976804.16.0.216063093383.issue9373@psf.upfronthosting.co.za> Message-ID: <1279976804.16.0.216063093383.issue9373@psf.upfronthosting.co.za> New submission from Mark Smith : pulldom has poor code coverage, so I am currently implementing thorough unit tests for it. ---------- components: XML messages: 111476 nosy: mark.smith priority: normal severity: normal status: open title: pulldom has low code coverage versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 15:10:51 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 24 Jul 2010 13:10:51 +0000 Subject: [issue9372] pulldom.DOMEventStream.__getitem__ is broken In-Reply-To: <1279976693.98.0.219854761696.issue9372@psf.upfronthosting.co.za> Message-ID: <1279977051.88.0.413837466654.issue9372@psf.upfronthosting.co.za> ?ric Araujo added the comment: You may want to keep existing functionality, this time in the proper method (__iter__). ---------- nosy: +merwok stage: -> unit test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 15:19:03 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 24 Jul 2010 13:19:03 +0000 Subject: [issue4199] add shorthand global and nonlocal statements In-Reply-To: <1224887535.03.0.272495603252.issue4199@psf.upfronthosting.co.za> Message-ID: <1279977543.78.0.453856888741.issue4199@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- versions: +Python 3.3 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 15:37:51 2010 From: report at bugs.python.org (Brian Curtin) Date: Sat, 24 Jul 2010 13:37:51 +0000 Subject: [issue4485] fast swap of "default" Windows python versions In-Reply-To: <1228207919.66.0.730717066553.issue4485@psf.upfronthosting.co.za> Message-ID: <1279978671.63.0.710630345667.issue4485@psf.upfronthosting.co.za> Brian Curtin added the comment: msg77014 could bring startup time down significantly so I'm -1 on that. Overall I've never found difficulty in running scripts with the right version so I don't have a strong enough opinion on any of it. I think it's probably something which should be baked in python-ideas for a while to get a wider audience to think about it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 15:46:57 2010 From: report at bugs.python.org (Mark Smith) Date: Sat, 24 Jul 2010 13:46:57 +0000 Subject: [issue9372] pulldom.DOMEventStream.__getitem__ is broken In-Reply-To: <1279976693.98.0.219854761696.issue9372@psf.upfronthosting.co.za> Message-ID: <1279979217.64.0.364591672426.issue9372@psf.upfronthosting.co.za> Mark Smith added the comment: I should have mentioned: __iter__ is already implemented, and works as expected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 15:58:01 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 24 Jul 2010 13:58:01 +0000 Subject: [issue9367] test_getgroups in test_posix fails In-Reply-To: <1279965124.79.0.0313564801642.issue9367@psf.upfronthosting.co.za> Message-ID: <1279979881.75.0.815950927081.issue9367@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- assignee: -> ronaldoussoren nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 16:22:06 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 24 Jul 2010 14:22:06 +0000 Subject: [issue9365] Installing a distro without sqlite3 will require a reinstall of python to function if installed at a later date In-Reply-To: <1279950365.76.0.579184415242.issue9365@psf.upfronthosting.co.za> Message-ID: <1279981326.32.0.191109970377.issue9365@psf.upfronthosting.co.za> R. David Murray added the comment: This is not a bug in Python. Your link implies you are building things from scratch, so it is your responsibility to resolve the dependencies. sqlite3 support is implemented via an extension module (compiled C code). That extension module must be built against sqlite3. If you don't have sqlite3 installed, the extension can't be built (which the Python build process tells you in the summary at the end). If you later install sqlite3, there's no way the extension module to get automatically compiled. You have to do it, as you discovered. On systems with a package manager, the sqlite3 dependency would be automatically resolved. Unless you told the system to build without sqlite, in which case it would again be your responsibility to reinstall python after changing your mind. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 16:23:45 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Sat, 24 Jul 2010 14:23:45 +0000 Subject: [issue9367] test_getgroups in test_posix fails In-Reply-To: <1279965124.79.0.0313564801642.issue9367@psf.upfronthosting.co.za> Message-ID: <1279981425.15.0.652756248361.issue9367@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Committed a fix in: 3.2: r83133 3.1: r83134 2.7: r83135 2.6: r83136 I ended up committing a slightly different patch than attached here, the test now calls sorted to sort both lists before comparing, which IMO makes it slightly clearer. ---------- resolution: -> accepted stage: -> committed/rejected status: open -> pending type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 16:30:07 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 24 Jul 2010 14:30:07 +0000 Subject: [issue9277] test_struct failure on ARM In-Reply-To: <1279311086.16.0.957118455274.issue9277@psf.upfronthosting.co.za> Message-ID: <1279981807.94.0.758981029233.issue9277@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 16:30:57 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 24 Jul 2010 14:30:57 +0000 Subject: [issue9367] test_getgroups in test_posix fails In-Reply-To: <1279965124.79.0.0313564801642.issue9367@psf.upfronthosting.co.za> Message-ID: <1279981857.24.0.357114850851.issue9367@psf.upfronthosting.co.za> R. David Murray added the comment: Except for the 2.6 backport, you could also have used assertItemsEqual, which is a smart wrapper around the idiom you implemented. ---------- nosy: +r.david.murray status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 16:31:17 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 24 Jul 2010 14:31:17 +0000 Subject: [issue9367] test_getgroups in test_posix fails In-Reply-To: <1279965124.79.0.0313564801642.issue9367@psf.upfronthosting.co.za> Message-ID: <1279981877.51.0.580387676811.issue9367@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 16:32:25 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 24 Jul 2010 14:32:25 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1279913042.97.0.618415832845.issue9362@psf.upfronthosting.co.za> Message-ID: <1279981945.78.0.074747826137.issue9362@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > I assume that this is on *nix boxes It's a bit of a stretch to call OSX unix, but yes: >> Laptop = a MacBook Air If you have not seen one of these, the control key is marked "control" on its keyboard. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 16:37:24 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 24 Jul 2010 14:37:24 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1279913042.97.0.618415832845.issue9362@psf.upfronthosting.co.za> Message-ID: <1279982244.95.0.474681675852.issue9362@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Now, as I look at it, the windows message is probably even worse. What is "plus"? Is "Ctrl-Z" control *minus* z? For a novice, you really have to say: press Ctrl and Z keys together and then press Return or Enter key. Of course this longer phrase is not appropriate for the exit hint. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 16:39:08 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 24 Jul 2010 14:39:08 +0000 Subject: [issue9336] string.letters should display locale based equivalent of a-Z In-Reply-To: <1279855673.74.0.0304173911229.issue9336@psf.upfronthosting.co.za> Message-ID: <1279982348.67.0.885044088568.issue9336@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, right. I was misled by examples from another ticket and did not verify. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 16:47:20 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 24 Jul 2010 14:47:20 +0000 Subject: [issue9371] pulldom doesn't provide END_DOCUMENT or COMMENT nodes. In-Reply-To: <1279976512.14.0.00983593867016.issue9371@psf.upfronthosting.co.za> Message-ID: <1279982840.33.0.645371344388.issue9371@psf.upfronthosting.co.za> ?ric Araujo added the comment: I tried looking at the doc to see if this was by design, and well, pulldom docs :) So I looked at the code, same thing, and finally read the commit history. It appears that pulldom is supposed to be DOM-compliant, so go ahead in adding unit tests for that and fixing it. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 16:49:38 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 24 Jul 2010 14:49:38 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1279913042.97.0.618415832845.issue9362@psf.upfronthosting.co.za> Message-ID: <1279982978.8.0.561005262906.issue9362@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > On another note: I've sometimes wanted quit() to exit from a running > script to the python console so I can do a little value checking. This is what -i command line switch or PYTHONINSPECT environment variable is for. See python -h output. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 17:23:22 2010 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 24 Jul 2010 15:23:22 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1279985002.48.0.77449355531.issue9226@psf.upfronthosting.co.za> Guido van Rossum added the comment: Hm. This seems an old bug, probably introduced when closures where first introduced (2.1 ISTR, by Jeremy Hylton). Class scopes *do* behave differently from function scopes; outside a nested function, this should work: x = 1 class C(object): x = x assert X.x == 1 And I think it should work that way inside a function too. So IMO the bug is that in classes Test and Test3, the x defined in the function scope is not used. Test2 shows that normally, the x defined in the inner scope is accessed. So, while for *function scopes* the rules are "if it is assigned anywhere in the function, every reference to it references the local version", for *class scopes* (outsided methods) the lookup rules are meant to be dynamic, meaning "if it isn't defined locally yet at the point of reference, use the next outer definition". I haven't reviewed the patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 17:23:55 2010 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 24 Jul 2010 15:23:55 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1279985035.07.0.068017212313.issue9226@psf.upfronthosting.co.za> Guido van Rossum added the comment: I meant, of course, assert C.x == 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 17:49:07 2010 From: report at bugs.python.org (Bhargav) Date: Sat, 24 Jul 2010 15:49:07 +0000 Subject: [issue8792] Support Apache extensions to XML-RPC in xmlrpclib In-Reply-To: <1274558114.05.0.260300491762.issue8792@psf.upfronthosting.co.za> Message-ID: <1279986547.47.0.0470121231578.issue8792@psf.upfronthosting.co.za> Bhargav added the comment: What I do is not a possible solution, because some other machine might add e:nil, what we need is XML namespace parsing. Also I can't really use my solution, as it makes my client non-portable, I cant move it from my dev machine to production at all. This is just a workaround so that I am not stuck at ex:nil for my development. I am not an expert in xmlrpc nor in python to really contribute a patch, but if I could really do think of something, I will contribute it. Having said that, I know for sure the server works for Java clients and I have heard it works for .Net. I know this is not a standard, but a widely used and published extension, and hence I think we should atleast port it back to the 2.7 branch as not everyone has moved to python 3 yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 18:00:00 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 24 Jul 2010 16:00:00 +0000 Subject: [issue6759] zipfile.ZipExtFile.read() is missing universal newline support In-Reply-To: <1250922122.86.0.650490470964.issue6759@psf.upfronthosting.co.za> Message-ID: <1279987200.78.0.592452848991.issue6759@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Art: @David: A lot of changes have been made to test_zipfile since the last patch was produced. I'm unsure as to whether the patch could be applied to 2.7 as is, or it would be simpler to rework the patch for 2.7 and the py3k branches. Could one of you take a look please, thanks. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 18:26:44 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 24 Jul 2010 16:26:44 +0000 Subject: [issue7825] test_threadsignals leaks references In-Reply-To: <1264981703.5.0.296078231343.issue7825@psf.upfronthosting.co.za> Message-ID: <1279988804.91.0.359968170904.issue7825@psf.upfronthosting.co.za> Mark Lawrence added the comment: The patch is small and easily applied, but no point me trying it as I've only a Windows box. Also note that my earlier comment was incorrect as I misread the original post. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 19:21:23 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 24 Jul 2010 17:21:23 +0000 Subject: [issue5752] xml.dom.minidom does not escape CR, LF and TAB characters within attribute values In-Reply-To: <1239707588.77.0.33795755364.issue5752@psf.upfronthosting.co.za> Message-ID: <1279992083.52.0.01353662568.issue5752@psf.upfronthosting.co.za> Mark Lawrence added the comment: minidom.patch had the new file listed before the old, so I've uploaded minidom.diff. The patch is tiny and looks clean. Tests have been repeated on Windows against 2.7 and are fine, so I believe this can be committed. ---------- Added file: http://bugs.python.org/file18184/minidom.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 19:48:45 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 24 Jul 2010 17:48:45 +0000 Subject: [issue1672568] silent error in email.message.Message.get_payload Message-ID: <1279993725.77.0.398336212925.issue1672568@psf.upfronthosting.co.za> Mark Lawrence added the comment: I've double checked this and still all tests pass before patching message.py. Could somebody else please pick this one up, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 20:02:46 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 24 Jul 2010 18:02:46 +0000 Subject: [issue7113] ConfigParser load speedup In-Reply-To: <1255351384.96.0.56907836791.issue7113@psf.upfronthosting.co.za> Message-ID: <1279994566.34.0.247739453281.issue7113@psf.upfronthosting.co.za> Mark Lawrence added the comment: @?ukasz: I patched the unit test file only and ran it and all tests passed, I assume that this behaviour is incorrect. ---------- nosy: +BreamoreBoy stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 20:18:55 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 24 Jul 2010 18:18:55 +0000 Subject: [issue4686] Exceptions in ConfigParser don't set .args In-Reply-To: <1229545362.85.0.86911392572.issue4686@psf.upfronthosting.co.za> Message-ID: <1279995535.43.0.155521994559.issue4686@psf.upfronthosting.co.za> Mark Lawrence added the comment: Tests failed after patching test file, all passed after patching the code on Windows against 3.2. The patch looks simple and clean so I don't see why it can't be committed. As this is a behaviour issue the code should also be backported. ---------- nosy: +BreamoreBoy stage: -> patch review versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 20:20:26 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 24 Jul 2010 18:20:26 +0000 Subject: [issue7113] ConfigParser load speedup In-Reply-To: <1255351384.96.0.56907836791.issue7113@psf.upfronthosting.co.za> Message-ID: <1279995626.61.0.404385677067.issue7113@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Thanks, Mark. The tests should pass for both the old version and the patched one. The change in the code involves performance, not functionality. I didn't want to set assertions that are time based so naturally the new test also runs on the old implementation. The thing is that it runs slower. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 20:24:17 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sat, 24 Jul 2010 18:24:17 +0000 Subject: [issue4686] Exceptions in ConfigParser don't set .args In-Reply-To: <1229545362.85.0.86911392572.issue4686@psf.upfronthosting.co.za> Message-ID: <1279995857.9.0.806674303045.issue4686@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Thanks, Mark. Should I do the backporting or do you have some technology/process for this? I can do the backport as well if it doesn't require SVN commit access. I would need some help because it would be my first backport :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 20:29:16 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 24 Jul 2010 18:29:16 +0000 Subject: [issue4686] Exceptions in ConfigParser don't set .args In-Reply-To: <1229545362.85.0.86911392572.issue4686@psf.upfronthosting.co.za> Message-ID: <1279996156.85.0.757219528996.issue4686@psf.upfronthosting.co.za> Mark Lawrence added the comment: ?ukasz, no problem. It would be my first backport too! :) I think that it's best left to the committers as they've well used to doing things like this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 20:34:17 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 24 Jul 2010 18:34:17 +0000 Subject: [issue7113] ConfigParser load speedup In-Reply-To: <1255351384.96.0.56907836791.issue7113@psf.upfronthosting.co.za> Message-ID: <1279996457.26.0.183576956318.issue7113@psf.upfronthosting.co.za> Mark Lawrence added the comment: ?ukasz in that case I think we should get this committed as the patch is small and looks clean. I assume that this will be backported as 2.7 and 3.1 are likely to be around for some years yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 20:41:21 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 24 Jul 2010 18:41:21 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1279996881.79.0.47594099305.issue1682942@psf.upfronthosting.co.za> Mark Lawrence added the comment: ?ukasz please attach your patch and I'll run with it, while you're at it could you also provide a unit test patch for #5412, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 20:59:08 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 24 Jul 2010 18:59:08 +0000 Subject: [issue1706039] Added clearerr() to clear EOF state Message-ID: <1279997948.44.0.622378371461.issue1706039@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could somebody with an OS X system please try out the py3k patch, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 21:20:34 2010 From: report at bugs.python.org (David Watson) Date: Sat, 24 Jul 2010 19:20:34 +0000 Subject: [issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked In-Reply-To: <1231803037.62.0.52390349364.issue4926@psf.upfronthosting.co.za> Message-ID: <1279999234.24.0.262162548665.issue4926@psf.upfronthosting.co.za> David Watson added the comment: Unit tests were in the patch! However, none of the patches applied any more, so I've updated them and also improved the tests a bit. Again, I haven't tried them on Windows. Unsetting a nonexistent variable isn't supposed to be an error (see POSIX), but I did find a different problem with checking unsetenv()'s return value, which is that older systems declare it as void. I've removed the check from the patch, mainly because I don't know how to write the appropriate autoconf test, but it isn't strictly necessary as long as putenv() can't set a name that unsetenv() can fail to remove. I did however find one more case where that can happen, which is with an environment variable that has an empty name. Linux at least allows such variables to be set and passed to new processes, but its unsetenv() will not remove them - the latter behaviour is required by POSIX. To avoid a use-after-free problem similar to the embedded-'=' one, I've made a separate patch to make putenv() raise ValueError for empty names as well, but it's a more awkward case as Python may receive such a variable on startup, which it would then be unable to change (although even without the patch, it's already unable to remove it - posix.unsetenv() just silently fails). Checking unsetenv()'s return value would avoid the use-after-free without having to change putenv(), but it would, for example, make os.environ.clear() fail if an empty-named variable was present - which would be correct, since the variable was not removed, but rather surprising. To really delete such a variable would require editing **environ directly, AFAIK. ---------- Added file: http://bugs.python.org/file18185/putenv-equals-2.x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 21:21:10 2010 From: report at bugs.python.org (David Watson) Date: Sat, 24 Jul 2010 19:21:10 +0000 Subject: [issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked In-Reply-To: <1231803037.62.0.52390349364.issue4926@psf.upfronthosting.co.za> Message-ID: <1279999270.58.0.767099607092.issue4926@psf.upfronthosting.co.za> Changes by David Watson : Added file: http://bugs.python.org/file18186/putenv-empty-2.x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 21:21:46 2010 From: report at bugs.python.org (David Watson) Date: Sat, 24 Jul 2010 19:21:46 +0000 Subject: [issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked In-Reply-To: <1231803037.62.0.52390349364.issue4926@psf.upfronthosting.co.za> Message-ID: <1279999306.07.0.289877087455.issue4926@psf.upfronthosting.co.za> Changes by David Watson : Added file: http://bugs.python.org/file18187/putenv-equals-3.x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 21:22:22 2010 From: report at bugs.python.org (David Watson) Date: Sat, 24 Jul 2010 19:22:22 +0000 Subject: [issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked In-Reply-To: <1231803037.62.0.52390349364.issue4926@psf.upfronthosting.co.za> Message-ID: <1279999342.06.0.151232130408.issue4926@psf.upfronthosting.co.za> Changes by David Watson : Added file: http://bugs.python.org/file18188/putenv-empty-3.x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 21:24:11 2010 From: report at bugs.python.org (David Watson) Date: Sat, 24 Jul 2010 19:24:11 +0000 Subject: [issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked In-Reply-To: <1231803037.62.0.52390349364.issue4926@psf.upfronthosting.co.za> Message-ID: <1279999451.78.0.915488936704.issue4926@psf.upfronthosting.co.za> Changes by David Watson : Added file: http://bugs.python.org/file18189/visibility-2.x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 21:24:30 2010 From: report at bugs.python.org (David Watson) Date: Sat, 24 Jul 2010 19:24:30 +0000 Subject: [issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked In-Reply-To: <1231803037.62.0.52390349364.issue4926@psf.upfronthosting.co.za> Message-ID: <1279999470.82.0.981564509467.issue4926@psf.upfronthosting.co.za> Changes by David Watson : Added file: http://bugs.python.org/file18190/visibility-3.x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 22:26:49 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 24 Jul 2010 20:26:49 +0000 Subject: [issue6759] zipfile.ZipExtFile.read() is missing universal newline support In-Reply-To: <1250922122.86.0.650490470964.issue6759@psf.upfronthosting.co.za> Message-ID: <1280003209.51.0.952468808267.issue6759@psf.upfronthosting.co.za> R. David Murray added the comment: Well, you could try applying the patch and see if it applies cleanly and passes the tests. But it would be helpful to have it reworked for py3k, since we now commit first to py3k and then backport to 2.7. I have not reviewed the updated patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 24 23:53:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 24 Jul 2010 21:53:59 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1280008439.87.0.49950806695.issue2001@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Hmm. Still no luck $ ./python.exe -m pydoc -g Server ready at: http://localhost:7464/ Segmentation fault The Segmentation fault happens after I enter pydoc in the search window and press the "Search!" button. BTW, please remove !'s from the labels. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 00:00:05 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 24 Jul 2010 22:00:05 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1280008805.48.0.508026194277.issue2001@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: OK, the crash is due to issue9319, but as far as I understand, the faulty code is in the error handling branch, so there must be a bug in your code as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 00:02:57 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 24 Jul 2010 22:02:57 +0000 Subject: [issue7635] 19.6 xml.dom.pulldom doc: stub? In-Reply-To: <1262651647.28.0.891885115157.issue7635@psf.upfronthosting.co.za> Message-ID: <1280008977.85.0.342758699683.issue7635@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thank you for the patch. I can now imagine using the module. Comments: "+ :synopsis: Iterative XML parsing with DOM nodes." seem a bit too terse and confusing. Would "+ :synopsis: Iterative parsing of XML to event, DOM node pairs, with option subtree creation." be accurate? -.. class:: PullDOM(documentFactory=None) - :class:`xml.sax.handler.ContentHandler` implementation that ... I was expecting this to be filled out with the methods of PullDOM. But you new docstring "+ """A ContentHandler that is used internally by :class:`DOMEventStream` to + provide an iterator over the nodes in an XML stream. This class would not + normally be used directly - its main responsibility is to produce DOM + nodes from SAX events." suggests that it is sufficiently private that it should not be documented at all, and that anyone who wanted to use it directly should either try help(pullDom) or read the code. Correct? I am not sure of the standard for when to document or not helper classes, so I will leave this question to a doc person. "\ No newline at end of file" Is this a message from diff to add one? -------------- The py3k branch is now trunk. Most applicable patches should be developed on that branch and then possibly backported. The current pullDOM page is useless, so this should be backported. Since the docs appear to have been untouched since the beginning, the manual page, at least, should apply directly. To go into 2.6.6, the final 2.6 bugfix release, a patch needs be applied by the end of July. So consider my first and third comments first and a possible minor update. I would recommend that for commit/review for at least 2.6. ---------- stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 00:12:49 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 24 Jul 2010 22:12:49 +0000 Subject: [issue7830] Flatten nested functools.partial In-Reply-To: <1265051251.66.0.305258896073.issue7830@psf.upfronthosting.co.za> Message-ID: <1280009569.47.0.660491269319.issue7830@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > FWIW, I agree with Antoine. You cannot know in advance whether a > partial-subclass has semantics that need to be preserved when > flattening. Raymond, I have actually conceded this point to Antoine. See msg108980 above. Not only the latest patch preserves partial-subclasses, it also foregoes the optimization if there is anything in __dict__ of the inner partial. It looks like we have a consensus on the features, the remaining question is whether this is enough of an optimization to justify adding extra code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 00:21:33 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 24 Jul 2010 22:21:33 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1278878196.2.0.124754685152.issue9226@psf.upfronthosting.co.za> Message-ID: <1280010093.66.0.525907822617.issue9226@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Guido clarified: > Class scopes *do* behave differently from function scopes; > outside a nested function, this should work: > x = 1 > class C(object): > x = x > assert C.x == 1 > And I think it should work that way inside a function too. I take that to mean that x = 0 def f() x = 1 class C(object): x = x assert C.x == 1 f() should work, meaning that C.x==0 and UnboundLocalError are both wrong. That would mean to me that in "The class?s suite is then executed in a new execution frame (see section Naming and binding), using a newly created local namespace and the original global namespace." the phrase "the original global namespace" should be changed to "the surrounding namespaces". I also think this from Guido "So, while for *function scopes* the rules are "if it is assigned anywhere in the function, every reference to it references the local version", for *class scopes* (outsided methods) the lookup rules are meant to be dynamic, meaning "if it isn't defined locally yet at the point of reference, use the next outer definition"." should somehow also be clearer, probably also in the class page, so that people will neither expect an UnboundLocalError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 00:49:46 2010 From: report at bugs.python.org (Ron Adam) Date: Sat, 24 Jul 2010 22:49:46 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1280011786.09.0.681560099007.issue2001@psf.upfronthosting.co.za> Ron Adam added the comment: Ok, on the "!" marks. The Segmentation fault exits python and isn't catchable as far as I know. It's happens in the compiled tokenize.c file. The python side error detection doesn't get a chance to catch it. The problem is present without the patch applied and when using the console help so it wasn't anything I did. I could use a hack to bypass that particular file, but I don't think that is the correct answer to this particular problem. Better to get that issue resolved first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 00:58:41 2010 From: report at bugs.python.org (Nick Welch) Date: Sat, 24 Jul 2010 22:58:41 +0000 Subject: [issue9374] urlparse should parse query and fragment for arbitrary schemes In-Reply-To: <1280012321.31.0.791086727515.issue9374@psf.upfronthosting.co.za> Message-ID: <1280012321.31.0.791086727515.issue9374@psf.upfronthosting.co.za> New submission from Nick Welch : While the netloc/path parts of URLs are scheme-specific, and urlparse can be forgiven for refusing to parse them for unknown schemes, the query and fragment parts are standardized, and should be parsed for unrecognized schemes. According to Wikipedia: ------------------ Internet standard STD 66 (also RFC 3986) defines the generic syntax to be used in all URI schemes. Every URI is defined as consisting of four parts, as follows: : [ ? ] [ # ] ------------------ http://en.wikipedia.org/wiki/URI_scheme#Generic_syntax Here is a demonstration of what urlparse currently does: >>> urlparse.urlsplit('myscheme://netloc/path?a=b#frag') SplitResult(scheme='myscheme', netloc='', path='//netloc/path?a=b#frag', query='', fragment='') >>> urlparse.urlsplit('http://netloc/path?a=b#frag') SplitResult(scheme='http', netloc='netloc', path='/path', query='a=b', fragment='frag') ---------- components: Library (Lib) messages: 111511 nosy: Nick.Welch priority: normal severity: normal status: open title: urlparse should parse query and fragment for arbitrary schemes type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 01:10:12 2010 From: report at bugs.python.org (Guido van Rossum) Date: Sat, 24 Jul 2010 23:10:12 +0000 Subject: [issue9226] erroneous behavior when creating classes inside a closure In-Reply-To: <1280010093.66.0.525907822617.issue9226@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: On Sat, Jul 24, 2010 at 3:21 PM, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > Guido clarified: >> Class scopes *do* behave differently from function scopes; >> outside a nested function, this should work: >> x = 1 >> class C(object): >> ? x = x >> assert C.x == 1 >> And I think it should work that way inside a function too. > > I take that to mean that > > x = 0 > def f() > ?x = 1 > ?class C(object): > ? ?x = x > ?assert C.x == 1 > f() > > should work, meaning that C.x==0 and UnboundLocalError are both wrong. Indeed. > That would mean to me that in "The class?s suite is then executed in a new execution frame (see section Naming and binding), using a newly created local namespace and the original global namespace." the phrase "the original global namespace" should be changed to "the surrounding namespaces". Those words sound like they were never revised since I wrote them for Python 0.9.8 or so... > I also think this from Guido > > "So, while for *function scopes* the rules are "if it is assigned anywhere in the function, every reference to it references the local version", for *class scopes* (outsided methods) the lookup rules are meant to be dynamic, meaning "if it isn't defined locally yet at the point of reference, use the next outer definition"." > > should somehow also be clearer, probably also in the class page, so that people will neither expect an UnboundLocalError. FWIW, unless something drastically changed recently, the language reference is likely out of date in many areas. I would love it if a team of anal retentive freaks started going through it with a fine comb so as to make it describe the state of the implementation(s) more completely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 01:26:33 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 24 Jul 2010 23:26:33 +0000 Subject: [issue8792] Support Apache extensions to XML-RPC in xmlrpclib In-Reply-To: <1274558114.05.0.260300491762.issue8792@psf.upfronthosting.co.za> Message-ID: <1280013993.1.0.45883094425.issue8792@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Adding it to 2.7 is really out of the question. Assuming somebody would implement (which might not happen in the next three years or so), it can only go into 3.x, so you'ld have to port your code to 3.x to use it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 02:15:27 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 25 Jul 2010 00:15:27 +0000 Subject: [issue9299] os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1280016927.22.0.361992214199.issue9299@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: I suggest to raise exception when target regular file exists: try: mkdir(name, mode) except OSError as e: if not (exist_ok and e.errno == errno.EEXIST and path.isdir(name)): raise ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 02:19:09 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 25 Jul 2010 00:19:09 +0000 Subject: [issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1280017149.33.0.714646759507.issue9299@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- title: os.mkdir() and os.makedirs() add a keyword argument to suppress "File exists" exception. -> os.makedirs(): Add a keyword argument to suppress "File exists" exception _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 02:37:44 2010 From: report at bugs.python.org (ipatrol) Date: Sun, 25 Jul 2010 00:37:44 +0000 Subject: [issue8340] bytearray undocumented on trunk In-Reply-To: <1270682579.64.0.491172746908.issue8340@psf.upfronthosting.co.za> Message-ID: <1280018264.02.0.490119418589.issue8340@psf.upfronthosting.co.za> ipatrol added the comment: Yeah, I'll say. I prefer bytearray to back-and-forth mapping with chr and ord. I use it particularly as a mid-step in working with binary representations of strings. Please backport these docs with changes reflecting 2.x's paradigms. ---------- nosy: +ipatrol type: behavior -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 03:11:12 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 25 Jul 2010 01:11:12 +0000 Subject: [issue1706039] Added clearerr() to clear EOF state Message-ID: <1280020272.87.0.490209158336.issue1706039@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The patch passes tests on OSX, but the old code passes the new tests as well, so I am not sure what this patch fixes anymore. Looking back through the messages I see that I had trouble reproducing the problem, then I succeeded, but I don't remember the details. In any case, I am replacing issue1706039-py3k.patch with the same patch against recent SVN revision and with tabs replaced by spaces in C code. ---------- keywords: +needs review resolution: accepted -> stage: commit review -> unit test needed Added file: http://bugs.python.org/file18191/issue1706039-py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 03:27:54 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 25 Jul 2010 01:27:54 +0000 Subject: [issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1280021274.77.0.96865924056.issue9299@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Ray, what does mkdir -p do if the last target name exists but is a regular file rather than a directory? A slightly separate question is 'What do we want mkdirs to do (in this case)?' ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 03:56:21 2010 From: report at bugs.python.org (Ron Adam) Date: Sun, 25 Jul 2010 01:56:21 +0000 Subject: [issue9319] segfault when searching modules with help() In-Reply-To: <1279693765.46.0.777254335316.issue9319@psf.upfronthosting.co.za> Message-ID: <1280022981.75.0.54766106983.issue9319@psf.upfronthosting.co.za> Ron Adam added the comment: Trying to look at this a bit further... The PyErr_Format function then calls PyUnicode_FromFormatV in Objects/unicodeobject.c to do the actual formating. It looks like there have been a number of issues of this type. Search the tracker for unicodeobject.c and PyUnicode_FromFormatV. This may be related to http://bugs.python.org/issue7330. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 04:46:16 2010 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 25 Jul 2010 02:46:16 +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: <1280025976.08.0.963185809235.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-20100725.zip is a new version of the regex module. More tweaks for speed. re regex bm_regex_compile.py 87.05secs 278.00secs bm_regex_effbot.py 14.00secs 6.58secs bm_regex_v8.py 16.11secs 6.66secs ---------- Added file: http://bugs.python.org/file18192/issue2636-20100725.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 07:00:37 2010 From: report at bugs.python.org (Grant Limberg) Date: Sun, 25 Jul 2010 05:00:37 +0000 Subject: [issue7303] pkgutil lacks documentation for useful functions In-Reply-To: <1257891153.41.0.767469344024.issue7303@psf.upfronthosting.co.za> Message-ID: <1280034037.13.0.0706862948248.issue7303@psf.upfronthosting.co.za> Grant Limberg added the comment: I've taken the liberty of creating a patch for this issue. I've taken the docstrings fromt he pkgutil module and conveted them to reST. Please let me know if there are any changes necessary. ---------- keywords: +patch nosy: +Grant.Limberg Added file: http://bugs.python.org/file18193/pkgutil-docs-py3k-branch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 09:32:09 2010 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 25 Jul 2010 07:32:09 +0000 Subject: [issue9375] ElementPath parser in ElementTree 1.3 does not reject "element//" as invalid In-Reply-To: <1280043129.76.0.83882182954.issue9375@psf.upfronthosting.co.za> Message-ID: <1280043129.76.0.83882182954.issue9375@psf.upfronthosting.co.za> New submission from Stefan Behnel : Subject says it all: Python 2.7 (r27:82500, Jul 5 2010, 13:37:06) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import xml.etree.ElementTree as ET >>> el = ET.Element('hui') >>> el.findall('section//') [] ---------- components: Library (Lib), XML messages: 111521 nosy: scoder priority: normal severity: normal status: open title: ElementPath parser in ElementTree 1.3 does not reject "element//" as invalid versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 09:32:26 2010 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 25 Jul 2010 07:32:26 +0000 Subject: [issue9375] ElementPath parser in ElementTree 1.3 does not reject "element//" as invalid In-Reply-To: <1280043129.76.0.83882182954.issue9375@psf.upfronthosting.co.za> Message-ID: <1280043146.24.0.588239596847.issue9375@psf.upfronthosting.co.za> Changes by Stefan Behnel : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 09:43:43 2010 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 25 Jul 2010 07:43:43 +0000 Subject: [issue9375] ElementPath parser in ElementTree 1.3 does not reject "element//" as invalid In-Reply-To: <1280043129.76.0.83882182954.issue9375@psf.upfronthosting.co.za> Message-ID: <1280043823.43.0.873676875222.issue9375@psf.upfronthosting.co.za> Stefan Behnel added the comment: The parser actually starts with this code: def iterfind(elem, path, namespaces=None): # compile selector pattern if path[-1:] == "/": path = path + "*" # implicit all (FIXME: keep this?) IMHO, the 'FIXME' is worth revisiting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 09:47:51 2010 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 25 Jul 2010 07:47:51 +0000 Subject: [issue9375] ElementPath parser in ElementTree 1.3 does not reject "element//" as invalid In-Reply-To: <1280043129.76.0.83882182954.issue9375@psf.upfronthosting.co.za> Message-ID: <1280044071.14.0.528290445394.issue9375@psf.upfronthosting.co.za> Changes by Stefan Behnel : ---------- nosy: +effbot, flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 10:27:01 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 08:27:01 +0000 Subject: [issue7303] pkgutil lacks documentation for useful functions In-Reply-To: <1257891153.41.0.767469344024.issue7303@psf.upfronthosting.co.za> Message-ID: <1280046421.26.0.324910123549.issue7303@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 10:38:16 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 08:38:16 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1280047096.19.0.410379815795.issue1818@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closing as no response to msg110598. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 10:41:03 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 08:41:03 +0000 Subject: [issue2796] Build issues in DragonFly BSD In-Reply-To: <1210316878.4.0.717885872695.issue2796@psf.upfronthosting.co.za> Message-ID: <1280047263.51.0.736695140703.issue2796@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closing as no response to msg97413 or msg110632. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 10:43:47 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 08:43:47 +0000 Subject: [issue3532] bytes.tohex method In-Reply-To: <1218299394.34.0.421334599583.issue3532@psf.upfronthosting.co.za> Message-ID: <1280047427.15.0.158304250838.issue3532@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closing as no response to msg110681. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 10:52:02 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 08:52:02 +0000 Subject: [issue8888] Promote SafeConfigParser and warn about ConfigParser In-Reply-To: <1275565799.83.0.624762218664.issue8888@psf.upfronthosting.co.za> Message-ID: <1280047922.7.0.83754178902.issue8888@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closed as duplicate of #6517. ---------- nosy: +BreamoreBoy resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 10:58:22 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 08:58:22 +0000 Subject: [issue2204] document ConfigParser behaviour when a file has same section multiple times In-Reply-To: <1204236720.35.0.634026900248.issue2204@psf.upfronthosting.co.za> Message-ID: <1280048302.47.0.222058759171.issue2204@psf.upfronthosting.co.za> Mark Lawrence added the comment: @?ukasz: could you provide a patch that clarifies the default behaviour. ---------- assignee: georg.brandl -> docs at python nosy: +BreamoreBoy, docs at python stage: unit test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 11:05:05 2010 From: report at bugs.python.org (Mark Smith) Date: Sun, 25 Jul 2010 09:05:05 +0000 Subject: [issue7635] 19.6 xml.dom.pulldom doc: stub? In-Reply-To: <1262651647.28.0.891885115157.issue7635@psf.upfronthosting.co.za> Message-ID: <1280048705.83.0.173875117089.issue7635@psf.upfronthosting.co.za> Mark Smith added the comment: Terry, thanks for the feedback! I have added a patch, replacing the previous one, which deals with your points 1 and 3 in the following ways: 1. I have used (an edited form of) your synopsis - I've removed the details of exactly what is returned from the iterator, as I thought it made the sentence structure slightly awkward - hope you don't mind. I've moved the old synopsis to the heading, which is where I intended it to be anyway. 3. I added the newline - I don't think this is really a problem, but neither is the fix :) Regarding point 2: I agree with you - I struggled with whether to include references to these classes, eventually settling for what you see. I suppose they could be re-used for converting SAX events to DOM nodes, so it could be useful to know they are there. SAX2DOM isn't even used internally, so is technically part of the module's public interface, but with such brittle behaviour that I think it should really be removed. It automatically adds children to their parent when they are parsed -- but the children will only be parsed if the buffer is large enough. If it isn't then you can get incorrectly empty or even partial subtrees. ---------- Added file: http://bugs.python.org/file18194/7635_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 11:06:26 2010 From: report at bugs.python.org (Mark Smith) Date: Sun, 25 Jul 2010 09:06:26 +0000 Subject: [issue7635] 19.6 xml.dom.pulldom doc: stub? In-Reply-To: <1262651647.28.0.891885115157.issue7635@psf.upfronthosting.co.za> Message-ID: <1280048786.44.0.161748390279.issue7635@psf.upfronthosting.co.za> Changes by Mark Smith : Removed file: http://bugs.python.org/file18179/7635.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 11:09:03 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 09:09:03 +0000 Subject: [issue7519] ConfigParser can't read files with BOM markers In-Reply-To: <1260905357.88.0.211998340765.issue7519@psf.upfronthosting.co.za> Message-ID: <1280048943.17.0.212489603684.issue7519@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closing as the main BOM issue is addressed on #7651 and a solution to the OP's problem is given in msg97335. ---------- nosy: +BreamoreBoy resolution: -> duplicate status: open -> closed superseder: -> Python3: guess text file charset using the BOM _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 11:15:11 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 09:15:11 +0000 Subject: [issue2651] Strings passed to KeyError do not round trip In-Reply-To: <1208453081.65.0.886847251895.issue2651@psf.upfronthosting.co.za> Message-ID: <1280049311.65.0.508730513901.issue2651@psf.upfronthosting.co.za> Mark Lawrence added the comment: @?ukasz: please provide an updated patch. ---------- nosy: +BreamoreBoy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 11:20:36 2010 From: report at bugs.python.org (Alex Willmer) Date: Sun, 25 Jul 2010 09:20:36 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1280025976.08.0.963185809235.issue2636@psf.upfronthosting.co.za> Message-ID: Alex Willmer added the comment: On 25 July 2010 03:46, Matthew Barnett wrote: > issue2636-20100725.zip is a new version of the regex module. This is now packaged and uploaded to PyPI http://pypi.python.org/pypi/regex/0.1.20100725 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 12:02:38 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 10:02:38 +0000 Subject: [issue1773632] Remove references to _xmlrpclib from xmlrpclib.py Message-ID: <1280052158.17.0.0190010995176.issue1773632@psf.upfronthosting.co.za> Mark Lawrence added the comment: This has already been done for py3k. Is it worth doing for 2.6 or 2.7? ---------- nosy: +BreamoreBoy versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 12:10:13 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 10:10:13 +0000 Subject: [issue2864] etree: Add XPath documentation In-Reply-To: <1210863012.97.0.696135529968.issue2864@psf.upfronthosting.co.za> Message-ID: <1280052613.83.0.689586932979.issue2864@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: effbot -> docs at python nosy: -effbot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 12:18:28 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 10:18:28 +0000 Subject: [issue648658] xmlrpc can't do proxied HTTP Message-ID: <1280053108.12.0.777309376087.issue648658@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: effbot -> orsenthil nosy: +orsenthil -effbot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 12:23:26 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 10:23:26 +0000 Subject: [issue1767933] Badly formed XML using etree and utf-16 Message-ID: <1280053406.03.0.159823892697.issue1767933@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Richard: Could you provide a test case for this, or do you consider it beyond your Python capabilities allowing for your comments on msg75875? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 12:48:17 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 10:48:17 +0000 Subject: [issue1739648] zipfile.testzip() using progressive file reads Message-ID: <1280054897.49.0.460144903136.issue1739648@psf.upfronthosting.co.za> Mark Lawrence added the comment: Tried the patch against 2.7 and got "RuntimeError: Attempt to read ZIP archive that was already closed" for TestsWithSourceFile test_deflated and test_stored. The patch needs updating for py3k. ---------- nosy: +BreamoreBoy stage: unit test needed -> patch review versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 13:40:59 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 11:40:59 +0000 Subject: [issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked In-Reply-To: <1231803037.62.0.52390349364.issue4926@psf.upfronthosting.co.za> Message-ID: <1280058059.82.0.588856829332.issue4926@psf.upfronthosting.co.za> Mark Lawrence added the comment: @David: I couldn't apply the patches directly with tortoisesvn cos of the git format so tried to do them manually but failed. E.g. in test_os I couldn't find PYTHONTESTVAROS to insert the two new lines after and in test_posix couldn't find PYTHONTESTVARB. Am I having a bad day at the office or did you have one yesterday? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 13:58:46 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 11:58:46 +0000 Subject: [issue9376] Refer to gnuwin32 diff util on development FAQ In-Reply-To: <1280059126.9.0.527330657398.issue9376@psf.upfronthosting.co.za> Message-ID: <1280059126.9.0.527330657398.issue9376@psf.upfronthosting.co.za> New submission from Mark Lawrence : Section 6.1 How to make a patch? currently reads in part (a Windows version is available as part of the cygwin tools). I suggest that this is reworded to read (Windows versions are available as part of the cygwin tools or as part of the gnuwin32 project) I simply find it much easier to download and install these individual tools, e.g. I also have their version of grep which is vastly superior to Windows find ---------- assignee: docs at python components: Documentation keywords: easy messages: 111536 nosy: BreamoreBoy, docs at python priority: normal severity: normal status: open title: Refer to gnuwin32 diff util on development FAQ type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 14:45:43 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 12:45:43 +0000 Subject: [issue1463043] test_minidom.py fails for Python-2.4.3 on SUSE 9.3 Message-ID: <1280061943.04.0.349600428296.issue1463043@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can this be closed given that we're now at 2.7 and py3k and openSUSE is at 11.3? ---------- nosy: +BreamoreBoy status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 14:49:06 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 12:49:06 +0000 Subject: [issue6098] xml.dom.minidom incorrectly claims DOM Level 3 conformance In-Reply-To: <1243197780.58.0.272636351535.issue6098@psf.upfronthosting.co.za> Message-ID: <1280062146.97.0.373585542684.issue6098@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could someone with minidom experience please comment on this, thanks. ---------- nosy: +BreamoreBoy versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 14:57:13 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 12:57:13 +0000 Subject: [issue777884] minidom.py -- TypeError: object doesn't support slice assig Message-ID: <1280062633.41.0.29223691103.issue777884@psf.upfronthosting.co.za> Mark Lawrence added the comment: This is still an issue with all Python versions, is there anybody who could take this on please? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 15:00:56 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 13:00:56 +0000 Subject: [issue7139] ElementTree: Incorrect serialization of end-of-line characters in attribute values In-Reply-To: <1255587690.83.0.0369111720877.issue7139@psf.upfronthosting.co.za> Message-ID: <1280062856.99.0.425693735651.issue7139@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closed as a duplicate of #5752 which has patches attached. ---------- nosy: +BreamoreBoy resolution: -> duplicate status: open -> closed versions: +Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 15:02:06 2010 From: report at bugs.python.org (Alan McIntyre) Date: Sun, 25 Jul 2010 13:02:06 +0000 Subject: [issue1739648] zipfile.testzip() using progressive file reads Message-ID: <1280062926.89.0.410511011379.issue1739648@psf.upfronthosting.co.za> Alan McIntyre added the comment: Ok, I'll see if I can update that in the next week or so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 15:05:56 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 13:05:56 +0000 Subject: [issue1495229] W3C <-> Python DOM type mapping docs need updating Message-ID: <1280063156.09.0.139025483592.issue1495229@psf.upfronthosting.co.za> Mark Lawrence added the comment: Nobody has objected to Terry Reedy's recommendations so can the docs be updated please. ---------- assignee: loewis -> docs at python nosy: +BreamoreBoy, docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 15:09:27 2010 From: report at bugs.python.org (Alan McIntyre) Date: Sun, 25 Jul 2010 13:09:27 +0000 Subject: [issue1773632] Remove references to _xmlrpclib from xmlrpclib.py Message-ID: <1280063367.49.0.195161968732.issue1773632@psf.upfronthosting.co.za> Alan McIntyre added the comment: Both 2.6 and 2.7 are in the maintenance-only stage at this point, aren't they? I personally don't think this important enough to worry about for 2.x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 15:09:53 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 13:09:53 +0000 Subject: [issue6655] etree iterative find[text] In-Reply-To: <1249529720.45.0.62463367335.issue6655@psf.upfronthosting.co.za> Message-ID: <1280063393.25.0.678542399104.issue6655@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Digitalxero: could you provide an updated unit test file please. ---------- nosy: +BreamoreBoy stage: -> unit test needed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 15:14:23 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 13:14:23 +0000 Subject: [issue5762] AttributeError: 'NoneType' object has no attribute 'replace' In-Reply-To: <1239798874.6.0.325655580097.issue5762@psf.upfronthosting.co.za> Message-ID: <1280063663.51.0.83706496777.issue5762@psf.upfronthosting.co.za> Mark Lawrence added the comment: This issue will not move unless somebody provides a unit test for it. ---------- nosy: +BreamoreBoy stage: -> unit test needed type: crash -> behavior versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 15:17:08 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sun, 25 Jul 2010 13:17:08 +0000 Subject: [issue7637] Improve 19.5. xml.dom.minidom doc In-Reply-To: <1262659434.4.0.874382323645.issue7637@psf.upfronthosting.co.za> Message-ID: <1280063828.85.0.382802347208.issue7637@psf.upfronthosting.co.za> Mark Lawrence added the comment: Items 1) and 3) have been committed, only 2) needs to be addressed. ---------- assignee: georg.brandl -> docs at python nosy: +BreamoreBoy, docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 17:04:35 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 25 Jul 2010 15:04:35 +0000 Subject: [issue9375] ElementPath parser in ElementTree 1.3 does not reject "element//" as invalid In-Reply-To: <1280043129.76.0.83882182954.issue9375@psf.upfronthosting.co.za> Message-ID: <1280070275.7.0.242378861561.issue9375@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 17:14:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 25 Jul 2010 15:14:56 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280070896.77.0.331925252656.issue9315@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Lib/test/test_trace.py is now moved to Lib/test/test_sys_settrace.py. 3.2: r83140 r83141 3.1: r83143 2.7: r83142 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 18:21:24 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 25 Jul 2010 16:21:24 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280074884.86.0.215095317309.issue9315@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Eli, test_trace_module.py is a good start and I would like to commit it soon. I have a few nitpicks and a suggestion. 1. pprint module is not used in the tests so it should not be imported. 2. It is better to do run_unittest(__name__) in test_main() than list tests explicitly. run_unittest(__name__) will find all classes that derive from TestCase in the module. Note that not all test runners use test_main(). 3. Please don't start docstrings with a space. 4. test_trace is out of the way in 2.7 now, so you can use proper name. If you use SVN, please do svn add Lib/test/test_trace.py with your next revision and post the output of svn diff. 5. A suggestion: since we are doing "white-box" testing of the Trace class, I would recommend calling Trace methods such as globaltrace or localtrace directly from unit tests rather than rely on settrace registrations. That may require faking frames, but I think you can get away with simply passing the current frame with the events. Whether or not sys.settrace is working correctly is tested in the old test_trace (renamed to test_sys_settrace) now. Thanks for moving this forward. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 19:22:42 2010 From: report at bugs.python.org (Daniel Urban) Date: Sun, 25 Jul 2010 17:22:42 +0000 Subject: [issue8733] list type and UserList do not call super in __init__ and therefore, they cannot be parents in a multiple inheritence scheme In-Reply-To: <1274269644.21.0.524799705686.issue8733@psf.upfronthosting.co.za> Message-ID: <1280078562.63.0.943406970767.issue8733@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +durban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 20:23:57 2010 From: report at bugs.python.org (David Watson) Date: Sun, 25 Jul 2010 18:23:57 +0000 Subject: [issue4926] putenv() accepts names containing '=', return value of unsetenv() not checked In-Reply-To: <1231803037.62.0.52390349364.issue4926@psf.upfronthosting.co.za> Message-ID: <1280082237.89.0.766722798456.issue4926@psf.upfronthosting.co.za> David Watson added the comment: You're having a bad day at the office :) Just use "patch -p1". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 20:33:04 2010 From: report at bugs.python.org (David Watson) Date: Sun, 25 Jul 2010 18:33:04 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <1280082784.57.0.628810673592.issue9377@psf.upfronthosting.co.za> Message-ID: <1280082784.57.0.628810673592.issue9377@psf.upfronthosting.co.za> New submission from David Watson : The functions in the socket module which return host/domain names, such as gethostbyaddr() and getnameinfo(), are wrappers around byte-oriented interfaces but return Unicode strings in 3.x, and have not been updated to deal with undecodable byte sequences in the results, as discussed in PEP 383. Some DNS resolvers do discard hostnames not matching the ASCII-only RFC 1123 syntax, but checks for this may be absent or turned off, and non-ASCII bytes can be returned via other lookup facilities such as /etc/hosts. Currently, names are converted to str objects using PyUnicode_FromString(), i.e. by attempting to decode them as UTF-8. This can fail with UnicodeError of course, but even if it succeeds, any non-ASCII names returned will fail to round-trip correctly because most socket functions encode string arguments into IDNA ASCII-compatible form before using them. For example, with UTF-8 encoded entries 127.0.0.2 ? 127.0.0.3 xn--lzg in /etc/hosts, I get: 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 * >>> getnameinfo(("127.0.0.2", 0), 0) ('?', '0') >>> getaddrinfo(*_) [(2, 1, 6, '', ('127.0.0.3', 0)), (2, 2, 17, '', ('127.0.0.3', 0)), (2, 3, 0, '', ('127.0.0.3', 0))] Here, getaddrinfo() has encoded "?" to its corresponding ACE label "xn--lzg", which maps to a different address. PEP 383 can't be applied as-is here, since if the name happened to be decodable in the file system encoding (and thus was returned as valid non-ASCII Unicode), the result would fail to round-trip correctly as shown above, but I think there is a solution which follows the general idea of PEP 383. Surrogate characters are not allowed in IDNs, since they are prohibited by Nameprep[1][2], so if names were instead decoded as ASCII with the surrogateescape error handler, strings representing non-ASCII names would always contain surrogate characters representing the non-ASCII bytes, and would therefore fail to encode with the IDNA codec. Thus there would be no ambiguity between these strings and valid IDNs. The attached ascii-surrogateescape.diff does this. The returned strings could then be made to round-trip as arguments, by having functions that take hostname arguments attempt to encode them using ASCII/surrogateescape first before trying IDNA encoding. Since IDNA leaves ASCII names unchanged and surrogate characters are not allowed in IDNs, this would not change the interpretation of any string hostnames that are currently accepted. It would remove the 63-octet limit on label length currently imposed due to the IDNA encoding, for ASCII names only, but since this is imposed due to the 63-octet limit of the DNS, and non-IDN names may be intended for other resolution mechanisms, I think this is a feature, not a bug :) The patch try-surrogateescape-first.diff implements the above for all relevant interfaces, including gethostbyaddr() and getnameinfo(), which do currently accept hostnames, even if the documentation is vague (in the standard library, socket.fqdn() calls gethostbyaddr() with a hostname, and the "os" module docs suggest calling socket.gethostbyaddr(socket.gethostname()) to get the fully-qualified hostname). The patch still allows hostnames to be passed as bytes objects, but to simplify the implementation, it removes support for bytearray (as has been done for pathnames in 3.2). Bytearrays are currently only accepted by the socket object methods (.connect(), etc.), and this is undocumented and perhaps unintentional - the get*() functions have never accepted them. One problem with the surrogateescape scheme would be with existing code that looks up an address and then tries to write the hostname to a log file or use it as part of the wire protocol, since the surrogate characters would fail to encode as ASCII or UTF-8, but the code would appear to work normally until it encountered a non-ASCII hostname, allowing the problem to go undetected. On the other hand, such code is probably broken as things stand, given that the address lookup functions can undocumentedly raise UnicodeError in the same situation. Also, protocol definitions often specify some variant of the RFC 1123 syntax for hostnames (thus making non-ASCII bytes illegal), so code that checked for this prior to encoding the name would probably be OK, but it's more likely the exception than the rule. An alternative approach might be to return all hostnames as bytes objects, thus breaking everything immediately and obviously... [1] http://tools.ietf.org/html/rfc3491#section-5 [2] http://tools.ietf.org/html/rfc3454#appendix-C.5 ---------- components: Extension Modules files: ascii-surrogateescape.diff keywords: patch messages: 111550 nosy: baikie priority: normal severity: normal status: open title: socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file18195/ascii-surrogateescape.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 20:33:54 2010 From: report at bugs.python.org (David Watson) Date: Sun, 25 Jul 2010 18:33:54 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <1280082784.57.0.628810673592.issue9377@psf.upfronthosting.co.za> Message-ID: <1280082834.97.0.563759569665.issue9377@psf.upfronthosting.co.za> Changes by David Watson : Added file: http://bugs.python.org/file18196/try-surrogateescape-first.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 20:34:14 2010 From: report at bugs.python.org (=?utf-8?q?Teemu_Rytk=C3=B6nen?=) Date: Sun, 25 Jul 2010 18:34:14 +0000 Subject: [issue9172] zipfile.extractall always raises an OSError after successfully unzipping all files In-Reply-To: <1278355031.26.0.155948134842.issue9172@psf.upfronthosting.co.za> Message-ID: <1280082854.58.0.375424672065.issue9172@psf.upfronthosting.co.za> Teemu Rytk?nen added the comment: Hi! I encountered the same problem and I debugged it a bit.. I think it not doing the entire unzipping again, but the problem is that the winzip packaged zip actually contains all file and directory entries and it fails trying to create already existing directory (because the dir has been created for the files that are in it). I tried a quick and dirty fix for the zipfile _extract_member method, which basically should fix the problem! So here I create the directory only if it is not already existing, to get those empty directories created inside the zip. zipfile: 959: if member.filename[-1] == '/': if not os.path.isdir(targetpath): 960: os.mkdir(targetpath) ---------- nosy: +terytkon versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 21:12:14 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 25 Jul 2010 19:12:14 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1280085134.39.0.971017063221.issue1818@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Re-opening because we ought to do something along these lines at some point. The DictReader and DictWriter are inadequate for preserving order and they are unnecessarily memory intensive (one dict per record). FWIW, the non-conforming field name problem has already been solved by recent improvements to collections.namedtuple using rename=True. ---------- assignee: barry -> rhettinger status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 21:12:35 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 25 Jul 2010 19:12:35 +0000 Subject: [issue9378] Make python -m pickle do something useful In-Reply-To: <1280085155.28.0.122928002341.issue9378@psf.upfronthosting.co.za> Message-ID: <1280085155.28.0.122928002341.issue9378@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Attached patch makes python -m pickle unpickle the first object from the pickle file and display it using pprint. Future enhancements may include printing the summary (object number, object type) of the multiobject pickles, option to control display: pprint/repr or type only, lines/columns limits, and selective display from multi-object pickles. I considered adding this functionality to pickletools (see issue 9094), but rejected because pickletools is more oriented towards pickle protocol developers and this functionality may be useful for casual pickle users. ---------- assignee: belopolsky components: Library (Lib) files: pickle-m.diff keywords: easy, patch messages: 111553 nosy: belopolsky priority: normal severity: normal stage: patch review status: open title: Make python -m pickle do something useful type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file18197/pickle-m.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 21:12:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 25 Jul 2010 19:12:56 +0000 Subject: [issue9378] Make python -m pickle do something useful In-Reply-To: <1280085155.28.0.122928002341.issue9378@psf.upfronthosting.co.za> Message-ID: <1280085176.55.0.356457152067.issue9378@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +alexandre.vassalotti, mark.dickinson, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 21:17:44 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 25 Jul 2010 19:17:44 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280085464.23.0.652893010171.issue7447@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 21:18:53 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sun, 25 Jul 2010 19:18:53 +0000 Subject: [issue9379] random.randrange behaviour problems In-Reply-To: <1280085533.93.0.218883892309.issue9379@psf.upfronthosting.co.za> Message-ID: <1280085533.93.0.218883892309.issue9379@psf.upfronthosting.co.za> New submission from ?ukasz Langa : Two behaviour problems with random.randrange: 1. Method argument `start` behaves as `stop` if `stop` is not defined: ====================================================================== >>> from random import randrange >>> help(randrange) Help on method randrange in module random: randrange(self, start, stop=None, step=1, int=, default=None, maxwidth=9007199254740992) method of random.Random instance Choose a random item from range(start, stop[, step]). >>> randrange(10) #start=10 2 Clearly this is because randrange() mimicks the range() interface. Sphinx documentation specifies the behaviour clearly. The problem is, help() can mislead someone in this case. 2. `step` does not work when only `start` (acting as `stop`) specified: ======================================================================= >>> [randrange(0, 10, step=5) for i in range(10)] [5, 5, 5, 0, 5, 5, 5, 0, 0, 5] >>> [randrange(10, step=5) for i in range(10)] [5, 2, 4, 4, 6, 2, 7, 1, 5, 7] One would expect the latter to work the same way as the former. What next ========= Case 2 is clearly a bug that should be addressed. Raymond, Mark - would a patch for this be accepted for 2.7.x, 3.1.x and 3.2? If so I can provide one. In Case 1 we can do one of two things (or both): A. Tweak the docstring to specify the actual behaviour explicitly. B. Change the function definition to: `randrange(self, limit, *args, **kwargs)`. This is backwards compatible if we'd process `args` and `kwargs` correctly to keep the current interface intact (e.g. `start` would be processed in `kwargs`). This would leave a more predictable help(). Raymond, Mark - I'd say we absolutely do A. Does any of you object about B? ---------- components: Library (Lib) messages: 111554 nosy: BreamoreBoy, lukasz.langa, rhettinger priority: normal severity: normal status: open title: random.randrange behaviour problems type: behavior versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 21:22:21 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 25 Jul 2010 19:22:21 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280085741.84.0.803994803418.issue7447@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: A nitpick: "lol" is a very well-known acronym and "list of lists" is not the expansion that first comes to mind. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 22:00:17 2010 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 25 Jul 2010 20:00:17 +0000 Subject: [issue3704] cookielib doesn't handle URLs with / in parameters In-Reply-To: <1219856501.23.0.0473308500082.issue3704@psf.upfronthosting.co.za> Message-ID: <1280088017.62.0.834433023059.issue3704@psf.upfronthosting.co.za> Gregory P. Smith added the comment: release27-maint r83145 release31-maint r83146 release26-maint r83147 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 22:14:42 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Jul 2010 20:14:42 +0000 Subject: [issue9379] random.randrange behaviour problems In-Reply-To: <1280085533.93.0.218883892309.issue9379@psf.upfronthosting.co.za> Message-ID: <1280088882.07.0.214911970205.issue9379@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 23:04:26 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 25 Jul 2010 21:04:26 +0000 Subject: [issue9379] random.randrange behaviour problems In-Reply-To: <1280085533.93.0.218883892309.issue9379@psf.upfronthosting.co.za> Message-ID: <1280091866.26.0.0369028349832.issue9379@psf.upfronthosting.co.za> Mark Dickinson added the comment: On issue 2: I agree that this is strange behavior, and would be interested to see a patch. It's not 100% clear to me what the patched code should do, though. In particular, an example like: >>> randrange(10, step=5) that mixes positional and keyword arguments is a bit odd. It's not clear in this case whether the '10' should be interpreted as a 'start' argument or a 'stop' argument: on a 'refuse the temptation to guess' basis, I'd say that 'randrange(10, step=5)' should be an error. More generally, perhaps any randrange call that mixes positional and keyword arguments should raise an exception? A related behaviour is: >>> randrange(start=10) 9 This should also be an error, IMO. Any patch should include comprehensive tests, of course. On the first issue, yes, it would be good to clarify the docs (see the range docs for how this might be done). [?ukasz] > B. Change the function definition to: `randrange(self, limit, *args, > **kwargs)`. This is backwards compatible if we'd process `args` and > `kwargs` correctly to keep the current interface intact (e.g. `start` > would be processed in `kwargs`). This would leave a more predictable > help(). Not sure I follow this bit: is this supposed to be a solution to problem 1 or problem 2? (Or both?) I don't really see the benefit of describing randrange this way in the docstring. ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 23:31:04 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sun, 25 Jul 2010 21:31:04 +0000 Subject: [issue9379] random.randrange behaviour problems In-Reply-To: <1280085533.93.0.218883892309.issue9379@psf.upfronthosting.co.za> Message-ID: <1280093464.08.0.43731742955.issue9379@psf.upfronthosting.co.za> ?ukasz Langa added the comment: My suggestions on how the patches should work always assumed that we want 100% backward compatibility and there might exist some crazy code that is actually using positional/keyword argument mixing. If that is no problem for us then I'm all in favor of removing the posibility to mix positional with keyword args in this case. 1B is meant to solve the help() issue. The basic idea is to change the definition so that help() shows a sensible default for all cases. The current one when `start` becomes `stop` is not. The new definition would be: def randrange(self, limit, *args, **kwargs) The docstring would need to have an explanation on the role of `limit` in each sensible case. Then in the function body there would be some basic code going through what was specified by the user in the args, to assign these values to variables for existing implementation (which is OK). In effect, there would be 3 major advantages: - this is backward compatible - help() would not confuse users - invocations like randrange(start=30) or randrange(stop=10, step=8) would work properly If you don't strongly disagree then maybe it will be simpler to just provide a patch for you to review :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 23:33:27 2010 From: report at bugs.python.org (Ask Solem) Date: Sun, 25 Jul 2010 21:33:27 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1280093607.19.0.238573406733.issue9205@psf.upfronthosting.co.za> Ask Solem added the comment: > A potential implementation is in termination.patch. Basically, > try to shut down gracefully, but if you timeout, just give up and > kill everything. You can't have a sensible default timeout, because the worker may be processing something important... > It's a lot less code (one could write an even shorter patch > that doesn't try to do any additional graceful error handling), > doesn't add a new monitor thread, doesn't add any more IPC > mechanism, etc.. FWIW, I don't see any of these changes as bad, > but I don't feel like I have a sense of how generally useful they > would be. Not everything can be simple. Getting this right may require a bit of code. I think we can get rid of the ack_handler thread by making the result handler responsible for both acks and results, but I haven't tried it yet, and this code is already running in production by many so didn't want to change it unless I had to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jul 25 23:34:35 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 25 Jul 2010 21:34:35 +0000 Subject: [issue1495229] W3C <-> Python DOM type mapping docs need updating Message-ID: <1280093675.25.0.0121638112617.issue1495229@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Unlike with some issues, my in-message recommendations here do not constitute a patch. docs at python could update the link immediately. I would be willing to review the more extensive patch for 3.x if someone makes one. ---------- keywords: +easy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 00:01:59 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 25 Jul 2010 22:01:59 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280095319.31.0.560347593732.issue7447@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Leonard, that you for the patch, in particular, the list of hints. I think the first is good but overly specific. It also has an extra '.itertools' in the path. Now: ''' + - To concatenate a list of lists ``lol`` use ``list(itertools.chain.from_iterable(lol))`` + (see :func:`from_iterable `). ''' How about instead" ''' + - To concatenate an iterable of iterables, such as a list of lists, + see :func:`from_iterable ` + and call the appropriate constructor on the result, such as :class: `list`. ''' ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 00:05:55 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 25 Jul 2010 22:05:55 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280095555.69.0.121121593553.issue7447@psf.upfronthosting.co.za> Georg Brandl added the comment: Note that using `~itertools.chain.from_iterable` is equivalent to `from_iterable ` and saves a repetition. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 00:11:53 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 25 Jul 2010 22:11:53 +0000 Subject: [issue1495229] W3C <-> Python DOM type mapping docs need updating Message-ID: <1280095913.61.0.332047947177.issue1495229@psf.upfronthosting.co.za> A.M. Kuchling added the comment: The current link in the docs works; it's http://www.omg.org/spec/PYTH/1.2/PDF/. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 00:17:29 2010 From: report at bugs.python.org (Grant Limberg) Date: Sun, 25 Jul 2010 22:17:29 +0000 Subject: [issue9294] Dead code in Objects/object.c In-Reply-To: <1279464944.67.0.616745975029.issue9294@psf.upfronthosting.co.za> Message-ID: <1280096249.5.0.739891038391.issue9294@psf.upfronthosting.co.za> Grant Limberg added the comment: It looks like at one point, internal_print was a recursive function, but this is no longer the case. I've updated the function parameters to no longer contain the "nesting" parameter and removed the if block shown in this case. ---------- keywords: +patch nosy: +Grant.Limberg Added file: http://bugs.python.org/file18198/internal_print_non_recursive.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 00:23:50 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 25 Jul 2010 22:23:50 +0000 Subject: [issue9167] argv double encoding on OSX In-Reply-To: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> Message-ID: <1280096630.93.0.114680479302.issue9167@psf.upfronthosting.co.za> STINNER Victor added the comment: Issue #8622 proposes the creation of an environment variable PYTHONFSENCODING. It will be used to set sys.getfilesystemencoding(). Would it help this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 00:30:20 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 25 Jul 2010 22:30:20 +0000 Subject: [issue2927] expose html.parser.unescape In-Reply-To: <1211262235.18.0.705526453605.issue2927@psf.upfronthosting.co.za> Message-ID: <1280097020.94.0.0548842486361.issue2927@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm not sure that using an hardcoded mapping CP1252 => unicode is a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 00:34:15 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 25 Jul 2010 22:34:15 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280097255.45.0.787585382736.issue7447@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In order to have a chance at 2.6.6rc, due out in a week, I hand-edited the patch, incorporating Georg's suggestion, and uploaded. I think it is ready to commit. Since this is not a critical doc fix, I am not marking it a blocker, but I still think it would be good to get it in. Raymond, since you have not posted anything, I am assuming that your main interest was that the code not be changed, at least not without your notice. Since this is staying a doc issue, I am re-assigning. ---------- assignee: rhettinger -> docs at python nosy: +docs at python stage: patch review -> commit review Added file: http://bugs.python.org/file18199/functions.rst.patch2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 00:42:13 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sun, 25 Jul 2010 22:42:13 +0000 Subject: [issue4686] Exceptions in ConfigParser don't set .args In-Reply-To: <1229545362.85.0.86911392572.issue4686@psf.upfronthosting.co.za> Message-ID: <1280097733.69.0.600886176351.issue4686@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 00:52:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 25 Jul 2010 22:52:59 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280098379.18.0.284065284287.issue7447@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: FWIW, I like the new patch better, but still have a few nitpicks: - Starting a sentence with an argument name is a bit awkward because that makes a sentence that starts with a lower case letter. - There is an extra space in :class: `list`. - It would make more boring prose, but I would prefer to see similar language used in each alternative. I.e. - To concatenate ... - To concatenate ... - To add ... - Why "an *iterable* of iterables" but "a *sequence* of strings"? - I am not sure it is correct to say "to concatenate an iterable", I think it should be "to concatenate items from an iterable." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 01:04:20 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sun, 25 Jul 2010 23:04:20 +0000 Subject: [issue7113] ConfigParser load speedup In-Reply-To: <1255351384.96.0.56907836791.issue7113@psf.upfronthosting.co.za> Message-ID: <1280099060.8.0.660236107648.issue7113@psf.upfronthosting.co.za> ?ukasz Langa added the comment: In msg111399 I remarked the new itertools dependency. It seems it is in fact problematic because when building Python from scratch `setup.py` which is used to build C extensions is using configparser. And one of the C-only modules is itertools :) Attached a new patch that doesn't include itertools dependencies. The only difference with the last one is: 96d95 < import itertools 549,550c548,550 < all_sections = itertools.chain([self._defaults], < self._sections.values()) --- > all_sections = [self._defaults] > all_sections.extend(self._sections.values()) > ---------- nosy: +michael.foord Added file: http://bugs.python.org/file18200/issue7113_without_itertools.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 01:07:13 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 25 Jul 2010 23:07:13 +0000 Subject: [issue1495229] W3C <-> Python DOM type mapping docs need updating Message-ID: <1280099233.96.0.209433126018.issue1495229@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Changed on the trunk in rev83149. I removed both paragraphs after the table, adding null and DOMString to the table, and took the word 'primitive' out of the first sentence (so the table isn't listing just primitive types, but can list DOMString). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 01:14:50 2010 From: report at bugs.python.org (Michael Foord) Date: Sun, 25 Jul 2010 23:14:50 +0000 Subject: [issue4686] Exceptions in ConfigParser don't set .args In-Reply-To: <1229545362.85.0.86911392572.issue4686@psf.upfronthosting.co.za> Message-ID: <1280099690.87.0.323361527328.issue4686@psf.upfronthosting.co.za> Michael Foord added the comment: Committed revision 83150. Still needs backporting to 3.1, 2.7 and possibly even 2.6. ---------- assignee: -> michael.foord resolution: -> accepted stage: patch review -> commit review versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 01:20:49 2010 From: report at bugs.python.org (Grant Limberg) Date: Sun, 25 Jul 2010 23:20:49 +0000 Subject: [issue9294] Dead code in Objects/object.c In-Reply-To: <1279464944.67.0.616745975029.issue9294@psf.upfronthosting.co.za> Message-ID: <1280100049.14.0.0146085460877.issue9294@psf.upfronthosting.co.za> Grant Limberg added the comment: On second thought, internal_print() doesn't look like it's needed anymore as it's only called by PyObject_Print() and is no longer recursive. This second patch moves internal_print()'s function body into PyObject_Print and removes the internal_print function. ---------- Added file: http://bugs.python.org/file18201/internal_print_remove.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 01:21:01 2010 From: report at bugs.python.org (Grant Limberg) Date: Sun, 25 Jul 2010 23:21:01 +0000 Subject: [issue9294] Dead code in Objects/object.c In-Reply-To: <1279464944.67.0.616745975029.issue9294@psf.upfronthosting.co.za> Message-ID: <1280100061.95.0.611780181697.issue9294@psf.upfronthosting.co.za> Changes by Grant Limberg : Removed file: http://bugs.python.org/file18198/internal_print_non_recursive.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 01:24:34 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 25 Jul 2010 23:24:34 +0000 Subject: [issue7637] Improve 19.5. xml.dom.minidom doc In-Reply-To: <1262659434.4.0.874382323645.issue7637@psf.upfronthosting.co.za> Message-ID: <1280100274.01.0.880377108441.issue7637@psf.upfronthosting.co.za> A.M. Kuchling added the comment: 2) changed in rev83151. I extensively rearranged the description of toxml(), hopefully making its meaning clearer. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 01:27:21 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 25 Jul 2010 23:27:21 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1280100441.33.0.101426017348.issue9335@psf.upfronthosting.co.za> STINNER Victor added the comment: > Victor, This looks like your cup of tee. Unicode is my cup of tee, but not programs considering that bytes are characters. .isalpha() doesn't mean anything to me :-) This issue is a more question about the C library, not about Python :-) So try the attached program "isalpha.c" if you would like to test your libc. Results on my Linux box (Debian Sid, eglibc 2.11.2): ---------------- $ ./isalpha C ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz (52) $ ./isalpha fr_FR.UTF-8 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz (52) $ ./isalpha fr_FR.iso88591 ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\xaa\xb5\xba\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff (117) $ ./isalpha fr_FR.iso885915 at euro ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\xa6\xa8\xaa\xb4\xb5\xb8\xba\xbc\xbd\xbe\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff (124) ---------------- If your libc consider that \xff is a valid UTF-8 character, you should change your OS for a better one :-) -- > >>> len(letters) > 117 > ... > >>> locale.setlocale(locale.LC_CTYPE) > 'en_US.UTF-8' It looks like Mac OS X uses ISO-8859-1 instead of UTF-8. -- string.letters is built using strop.lowercase + strop.uppsercase which are built using the C functions islower() and islower(). locale.setlocale() regenerates strop/string.lowercase, strop/string.uppercase and string.letters for LC_CTYPE and LC_ALL categories. -- You don't need to run IDLE or import Tkinter to set the locale: import locale; locale.setlocale(locale.LC_ALL, '') is enough. -- A library should not change the locale (only the application). $ python2.6 >>> import locale >>> locale.getlocale() (None, None) >>> import Tkinter >>> locale.getlocale() ('fr_FR', 'UTF8') => Tkinter is an horrible library! (The bug is in the C library, not in the Python wrapper) Use a better one like Gtk ou Qt ;-) $ python >>> import locale >>> import pygtk >>> locale.getlocale() (None, None) >>> import PyQt4 >>> locale.getlocale() (None, None) (IDLE is based on Tkinter) -- I don't understand why Alexander gets different results on Python 2.6 and Python 2.7. @belopolsky: Are both programs linked to (built with?) the same C library? (same libray version) ---------- Added file: http://bugs.python.org/file18202/isalpha.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 01:29:23 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 25 Jul 2010 23:29:23 +0000 Subject: [issue1463043] test_minidom.py fails for Python-2.4.3 on SUSE 9.3 Message-ID: <1280100563.1.0.297472144387.issue1463043@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Closing. The replaceChild() bug reported by tobixx was fixed by patch #1094164. ---------- resolution: -> fixed status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 01:38:59 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 25 Jul 2010 23:38:59 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280101139.95.0.627031006222.issue7447@psf.upfronthosting.co.za> Terry J. Reedy added the comment: patch3 incorporates all your suggestions. I verified the itertools hint: >>> list(itertools.chain.from_iterable([[10],[1,2],['a']])) [10, 1, 2, 'a'] I think the hints are clear enough; anyone with more questions should follow the link to the respective function doc. ---------- Added file: http://bugs.python.org/file18203/functions.rst.patch3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 01:40:25 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sun, 25 Jul 2010 23:40:25 +0000 Subject: [issue7113] ConfigParser load speedup In-Reply-To: <1255351384.96.0.56907836791.issue7113@psf.upfronthosting.co.za> Message-ID: <1280101225.92.0.905871876539.issue7113@psf.upfronthosting.co.za> Changes by ?ukasz Langa : Removed file: http://bugs.python.org/file18200/issue7113_without_itertools.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 01:41:23 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 25 Jul 2010 23:41:23 +0000 Subject: [issue9379] random.randrange behaviour problems In-Reply-To: <1280085533.93.0.218883892309.issue9379@psf.upfronthosting.co.za> Message-ID: <1280101283.9.0.980353583014.issue9379@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm happy to improve the docs and docstring a bit to match the description for range(). I don't want to change any of the keyword arguments because it can break code that currently works and has been working for ages. It's a fact of life that the range() signature is complicated to express in pure Python. I don't feel any need to reformulate the existing code -- it has been working fine for people for a *very* long time. Conceptually, it's misleading but in practice people seem to just get it. ---------- assignee: -> rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 01:41:35 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sun, 25 Jul 2010 23:41:35 +0000 Subject: [issue7113] ConfigParser load speedup In-Reply-To: <1255351384.96.0.56907836791.issue7113@psf.upfronthosting.co.za> Message-ID: <1280101295.83.0.252824220989.issue7113@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Patch from py3k root. Some minor formatting changes suggested by Ezio Melotti included. ---------- Added file: http://bugs.python.org/file18204/issue7113_without_itertools.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 01:44:25 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 25 Jul 2010 23:44:25 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280101465.81.0.0187483092534.issue7447@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I want to look at this more before it goes forward. The docs are roughly correct as-is. In a effort to make them precise, it is easy make them more confusing or at least a bit harder to understand the basic function of sum(). ---------- assignee: docs at python -> rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 01:48:47 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sun, 25 Jul 2010 23:48:47 +0000 Subject: [issue9379] random.randrange behaviour problems In-Reply-To: <1280085533.93.0.218883892309.issue9379@psf.upfronthosting.co.za> Message-ID: <1280101727.06.0.428537457182.issue9379@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Raymond, I agree, that is reasonable. Would you like me to send a patch for the docstring or would you rather make the change on your own? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 01:50:18 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Sun, 25 Jul 2010 23:50:18 +0000 Subject: [issue777884] minidom.py -- TypeError: object doesn't support slice assig Message-ID: <1280101818.08.0.762645949514.issue777884@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Well, we certainly can't going making any incompatible changes now, so I've opted to add an empty normalize() method to the Childless mix-in. This makes minidom a little more liberal than other DOM implementations, but I think that's OK. Committed to trunk in rev83152, and backported to 2.7 in rev83153. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 01:53:19 2010 From: report at bugs.python.org (Eric Smith) Date: Sun, 25 Jul 2010 23:53:19 +0000 Subject: [issue9337] Make float.__str__ behave identically to float.__repr__ In-Reply-To: <1279881060.45.0.501412515152.issue9337@psf.upfronthosting.co.za> Message-ID: <1280101999.66.0.965470006947.issue9337@psf.upfronthosting.co.za> Eric Smith added the comment: I think this is a good idea. To test how much impact it would have, I changed float's str to return the same value as repr. regrtest broke only 3 tests: test_float test_tokenize test_unicodedata. It's not clear to me why unicodedata failed. With short float repr, I don't think the str != repr distinction makes much sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 02:04:58 2010 From: report at bugs.python.org (ipatrol) Date: Mon, 26 Jul 2010 00:04:58 +0000 Subject: [issue9380] Allow popping of n elements at once from a deque In-Reply-To: <1280102698.23.0.646561377953.issue9380@psf.upfronthosting.co.za> Message-ID: <1280102698.23.0.646561377953.issue9380@psf.upfronthosting.co.za> New submission from ipatrol : Yes, I know, this was proposed with builtin lists years before. But I can't help but think that at least for pop-append oriented deques, a popping analogue to extend would make use of deques in iterators easier. It should ideally return an iterator, possibly with an added __len__ method. I suggest the names popn and popnleft. ---------- components: Library (Lib) messages: 111583 nosy: ipatrol priority: normal severity: normal status: open title: Allow popping of n elements at once from a deque type: feature request 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 Mon Jul 26 02:08:34 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 26 Jul 2010 00:08:34 +0000 Subject: [issue9379] random.randrange behaviour problems In-Reply-To: <1280085533.93.0.218883892309.issue9379@psf.upfronthosting.co.za> Message-ID: <1280102914.16.0.0886564853062.issue9379@psf.upfronthosting.co.za> Raymond Hettinger added the comment: You are welcome to suggest wording. Aim for the shortest explanation that guides people to the right understanding. Being overly specific often causes more harm than good. Instead, try to be maximally helpful to someone just learning about randrange() for the first time and is trying to figure out what it does. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 02:08:56 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 26 Jul 2010 00:08:56 +0000 Subject: [issue9379] random.randrange behaviour problems In-Reply-To: <1280085533.93.0.218883892309.issue9379@psf.upfronthosting.co.za> Message-ID: <1280102936.64.0.796360120451.issue9379@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- components: +Documentation -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 02:12:30 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 26 Jul 2010 00:12:30 +0000 Subject: [issue7637] Improve 19.5. xml.dom.minidom doc In-Reply-To: <1262659434.4.0.874382323645.issue7637@psf.upfronthosting.co.za> Message-ID: <1280103150.78.0.931404957464.issue7637@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Thank you for the patches, but I do not think this is quite done. 1. "It is recommended that you always specify an encoding; you may use any encoding you like, but an argument of "utf-8" is the most common, avoid :exc:`UnicodeError` exceptions in case of unrepresentable text data." The phrase after the comma is garbled. I think it means something like "It avoids :exc:`UnicodeError` exceptions for unrepresentable text data." 2. For Node.toprettyxml(indent="", newl="", encoding="") I think "There's also an *encoding* argument, that behaves like the corresponding argument of :meth:`toxml`." should simply say "The ``encoding`` argument behaves like the corresponding argument of :meth:`toxml`." We already know there is one because it is there in the signature. I suspect saying so might date back to when there either was no signature or encoding was left out of it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 02:17:28 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 26 Jul 2010 00:17:28 +0000 Subject: [issue9380] Allow popping of n elements at once from a deque In-Reply-To: <1280102698.23.0.646561377953.issue9380@psf.upfronthosting.co.za> Message-ID: <1280103448.03.0.579384212959.issue9380@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, I'm going to reject this one. Looking at implementations in other languages, I see that this is almost never needed. It is not worth complicating the API which is currently very simple. Also, there is an issue in that the semantics are not self-evident. Is d.popnleft(n) equal to [d.pop() for i in range(n)] or is it equal to list(d)[:n]? Should it return a list or deque? Should it raise an exception if 0 < len(d) < n? There are many uses possible operations that could be added to deques (such as swap, pick, roll, etc) but it is better to leave those for someone to write their own utility functions. The important thing for deques is to provide the building blocks. ---------- assignee: -> rhettinger nosy: +rhettinger resolution: -> rejected status: open -> closed versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 02:20:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 26 Jul 2010 00:20:56 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1280100441.33.0.101426017348.issue9335@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Sun, Jul 25, 2010 at 7:27 PM, STINNER Victor wrote: .. > Unicode is my cup of tee, but not programs considering that bytes are characters. > What I called "your cup of tee" was 3.x returning 'UTF-8' from locale.nl_langinfo(locale.CODESET) where 2.x returned 'US-ASCII'. (In both cases this was the first call to locale module functions.) > I don't understand why Alexander gets different results on Python 2.6 and Python 2.7. > It looks like you have missed most of the discussion under this issue. Sorry that you had to reinvestigate. Ronald explained the difference in msg111332. He introduced a workaround for broken OSX C library isalpha in r80178. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 02:26:25 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 26 Jul 2010 00:26:25 +0000 Subject: [issue9335] LC_CTYPE system setting not respected by setlocale() In-Reply-To: <1279852711.38.0.0249345603825.issue9335@psf.upfronthosting.co.za> Message-ID: <1280103985.27.0.779127825285.issue9335@psf.upfronthosting.co.za> STINNER Victor added the comment: Oops, the issue is already closed /o\ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 04:28:35 2010 From: report at bugs.python.org (Craig McQueen) Date: Mon, 26 Jul 2010 02:28:35 +0000 Subject: [issue4755] Common path prefix In-Reply-To: <1230350435.61.0.221193783724.issue4755@psf.upfronthosting.co.za> Message-ID: <1280111315.86.0.457233453465.issue4755@psf.upfronthosting.co.za> Craig McQueen added the comment: http://code.activestate.com/recipes/577016-path-entire-split-commonprefix/ ---------- nosy: +cmcqueen1975 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 04:31:22 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 26 Jul 2010 02:31:22 +0000 Subject: [issue7113] ConfigParser load speedup In-Reply-To: <1255351384.96.0.56907836791.issue7113@psf.upfronthosting.co.za> Message-ID: <1280111482.83.0.498395979814.issue7113@psf.upfronthosting.co.za> Brian Curtin added the comment: Committed to py3k in r83154 and release27-maint in r83155. ---------- nosy: +brian.curtin resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 05:03:39 2010 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 26 Jul 2010 03:03:39 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280113419.65.0.711984671263.issue9315@psf.upfronthosting.co.za> Eli Bendersky added the comment: Alexander, 1. Done 2. Done 3. Done. Made docstrings follow PEP 257, to the best of my understanding 4. Done. Attached patch is made on fresh SVN 2.7 branch, file renamed to test_trace.py and 'svn add' executed 5. I'm not sure I agree with you on this point. IMHO, it's taking the "whiteness" of testing a bit too far. I will explain: The globaltrace and localtrace methods of Trace are quite thin, taking frame information and shoving it into an internal counts dict. To test them a lot of manual construction is required, which is very implementation dependent. In the future, Trace's implementation may be modified, and such tests will have to be completely re-coded as a result. At the moment, checking Trace via its 'runfunc' API allows 100% coverage on the relevant globaltrace and localtrace functions without getting into implementation details too deep. I think that given this there's no real point in getting deeper. Had I not been able to thoroughly examine their inner workings via runfunc, I would indeed consider getting deeper in the unit tests, but now I just don't really see the point. ---------- Added file: http://bugs.python.org/file18205/test_trace.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 05:03:49 2010 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 26 Jul 2010 03:03:49 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280113429.24.0.958574079353.issue9315@psf.upfronthosting.co.za> Changes by Eli Bendersky : Removed file: http://bugs.python.org/file18205/test_trace.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 05:04:04 2010 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 26 Jul 2010 03:04:04 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280113444.52.0.535915885252.issue9315@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- keywords: +patch Added file: http://bugs.python.org/file18206/issue9315.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 05:47:24 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 26 Jul 2010 03:47:24 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280116044.74.0.83617235071.issue9315@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I will defer to your judgement on the level of "whiteness" that is appropriate. I have passed your patch through 2to3, replaced test_support with support and it looks like we have a test case for a regression in 3.x: ====================================================================== FAIL: test_loop_caller_importing (__main__.TestCallers) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_trace.py", line 203, in test_loop_caller_importing self.assertEqual(self.tr.results().callers, expected) AssertionError: {(('/Users/sasha/Work/python-svn/py3k-commit/Lib/trace.py', 'trace', 'runfunc'), [truncated]... != {(('Lib/test/test_trace.py', 'test_trace', '_traced_func_importing'), ('fakefile [truncated]... Diff is 973 characters long. Set self.maxDiff to None to see it. ---------------------------------------------------------------------- I am attaching a py3k patch. Let's decide how to proceed. I would like to commit 3.x and 2.x versions at the same time. Ideally together with fixes for 3.x bugs. Another approach would be to temporarily disable failing tests in 3.x, but that would make merging between branches more difficult. A few more nitpicks: 1. There is no need to use leading or trailing underscores in function or variable names. 2. It would make code more readable if you use longer name for the Trace instance: 'trace' or 'tracer' instead of 'tr'. 3. Your file seems to have white space issues. Please run "make patchcheck". 4. This may be gratuitous, but I would rather see "func" instead of "foo" and testmodule, testfile, etc. instead of fake*. ---------- Added file: http://bugs.python.org/file18207/issue9315.1-py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 06:27:49 2010 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 26 Jul 2010 04:27:49 +0000 Subject: [issue9214] Most Set methods of KeysView and ItemsView do not work right In-Reply-To: <1278703905.18.0.125671722438.issue9214@psf.upfronthosting.co.za> Message-ID: <1280118469.15.0.492522805022.issue9214@psf.upfronthosting.co.za> Eli Bendersky added the comment: Hello, I'm attaching a patch for this issue. 1. _from_iterable in KeysView and ItemsView overridden as per Daniel's suggestion (Lib/_abcoll.py) 2. Added a test case to Lib/test/test_collections.py that uses this test case (creates the subclass and attempts modifying the view), with Raymond's suggestions incorporated, as well as a simple correctness test. The patch was made against the latest dev checkout. If it's found sufficient, I can backport it to 2.6/2.7 --- P.S. The patch was generated from a Hg mirror, so to patch it -p1 is to be used. If this is a problem, let me know and I'll generate a patch from an SVN working directory. I got the impression from the #python-dev IRC channel that submitting patches from Hg is fine, but I may be wrong here. ---------- keywords: +patch Added file: http://bugs.python.org/file18208/issue9214.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 06:35:48 2010 From: report at bugs.python.org (Fernando Perez) Date: Mon, 26 Jul 2010 04:35:48 +0000 Subject: [issue1170] shlex have problems with parsing unicode In-Reply-To: <1190045833.27.0.172281845017.issue1170@psf.upfronthosting.co.za> Message-ID: <1280118948.27.0.388300795057.issue1170@psf.upfronthosting.co.za> Fernando Perez added the comment: Here is an illustration of the problem with a simple test case (the value of the posix flag doesn't make any difference): Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import shlex >>> list(shlex.shlex('ab')) ['ab'] >>> list(shlex.shlex(u'ab', posix=True)) ['a', '\x00', '\x00', '\x00', 'b', '\x00', '\x00', '\x00'] >>> list(shlex.shlex(u'ab', posix=False)) ['a', '\x00', '\x00', '\x00', 'b', '\x00', '\x00', '\x00'] >>> ---------- nosy: +fperez _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 06:49:25 2010 From: report at bugs.python.org (Eli Bendersky) Date: Mon, 26 Jul 2010 04:49:25 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280119765.6.0.405609709685.issue9315@psf.upfronthosting.co.za> Eli Bendersky added the comment: The test failure of the py3k ports boils down to this: the 'runfunc' method of 'Trace' appears as a caller to '_traced_func_importing_caller'. In 2.7 it appears as 'Trace.runfunc', in py3k as just 'runfunc'. This raises a question: should method names of classes come after the class names when appearing in a trace? Intuitively yes, but I want to investigate some more, probably by adding a couple more test cases where the traced functions are methods of objects rather than plain functions. I hope to get to it later today. If not, later this week. In any case, I will address both this issue and your other comments and will submit a new patch. Thanks for the quick review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 06:53:04 2010 From: report at bugs.python.org (Chris Rebert) Date: Mon, 26 Jul 2010 04:53:04 +0000 Subject: [issue9381] syntax error in Unicode C API docs In-Reply-To: <1280119983.35.0.570535028701.issue9381@psf.upfronthosting.co.za> Message-ID: <1280119983.35.0.570535028701.issue9381@psf.upfronthosting.co.za> New submission from Chris Rebert : See http://docs.python.org/py3k/c-api/unicode.html#file-system-encoding Note the literal and unhyperlinked ":func:PyUnicode_FSConverter" in the last sentence of the first paragraph. I suspect there's a trivial syntax error in the ReST source. ---------- assignee: docs at python components: Documentation messages: 111596 nosy: cvrebert, docs at python priority: normal severity: normal status: open title: syntax error in Unicode C API docs versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 07:24:09 2010 From: report at bugs.python.org (Chris Rebert) Date: Mon, 26 Jul 2010 05:24:09 +0000 Subject: [issue9382] os.popen referenced but not documented in Python 3.x In-Reply-To: <1280121849.18.0.464291520909.issue9382@psf.upfronthosting.co.za> Message-ID: <1280121849.18.0.464291520909.issue9382@psf.upfronthosting.co.za> New submission from Chris Rebert : http://docs.python.org/py3k/library/os.html currently mentions os.popen() in several places. The docs for os.popen() itself say: 'These functions are described in section "File Object Creation"' However, unlike the 2.x version of that section ( http://docs.python.org/library/os.html#file-object-creation ), the os.popen*() family is not documented there [or indeed anywhere] anymore ( http://docs.python.org/py3k/library/os.html#os-newstreams ); the entire section now only documents os.fdopen(). The 2.7 docs say that the os.popen*() family are deprecated, and indeed, of the family, only os.popen() seems to still exist in Python 3.x (at least based on my testing via ideone.com). Thus, from what I can see, one of the following is the case: (A) The entire os.popen*() family is supposed be gone in Python 3.x, so os.popen() should be removed entirely from both the code and the docs. (B) os.popen() is the sole legitimate survivor of its family, and should be properly documented again. (C) os.popen() was left in as a kludge, shouldn't be mentioned in the docs, and possibly should be renamed os._popen() to reflect its status. So, which one of these is it? ---------- assignee: docs at python components: Documentation messages: 111597 nosy: cvrebert, docs at python priority: normal severity: normal status: open title: os.popen referenced but not documented in Python 3.x versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 07:33:09 2010 From: report at bugs.python.org (Chris Rebert) Date: Mon, 26 Jul 2010 05:33:09 +0000 Subject: [issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True In-Reply-To: <1266401759.12.0.600282213979.issue7950@psf.upfronthosting.co.za> Message-ID: <1280122389.58.0.556747803628.issue7950@psf.upfronthosting.co.za> Changes by Chris Rebert : Added file: http://bugs.python.org/file18209/subprocess.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 07:45:11 2010 From: report at bugs.python.org (Chris Rebert) Date: Mon, 26 Jul 2010 05:45:11 +0000 Subject: [issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True In-Reply-To: <1266401759.12.0.600282213979.issue7950@psf.upfronthosting.co.za> Message-ID: <1280123111.78.0.758482803537.issue7950@psf.upfronthosting.co.za> Chris Rebert added the comment: My apologies for the extra email... ---------- Added file: http://bugs.python.org/file18210/subprocess.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 07:46:14 2010 From: report at bugs.python.org (Chris Rebert) Date: Mon, 26 Jul 2010 05:46:14 +0000 Subject: [issue7950] subprocess.Popen documentation should contain a good warning about the security implications when using shell=True In-Reply-To: <1266401759.12.0.600282213979.issue7950@psf.upfronthosting.co.za> Message-ID: <1280123174.12.0.677843819998.issue7950@psf.upfronthosting.co.za> Changes by Chris Rebert : Removed file: http://bugs.python.org/file18209/subprocess.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 10:04:05 2010 From: report at bugs.python.org (Matthias Klose) Date: Mon, 26 Jul 2010 08:04:05 +0000 Subject: [issue7567] Messed up terminal after calling curses.initscr() twice. In-Reply-To: <1261532778.06.0.257601342471.issue7567@psf.upfronthosting.co.za> Message-ID: <1280131445.53.0.793099157561.issue7567@psf.upfronthosting.co.za> Matthias Klose added the comment: shouldn't `initialised_setupterm' be tested instead? ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 10:52:03 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 26 Jul 2010 08:52:03 +0000 Subject: [issue9381] syntax error in Unicode C API docs In-Reply-To: <1280119983.35.0.570535028701.issue9381@psf.upfronthosting.co.za> Message-ID: <1280134323.54.0.0490020267458.issue9381@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r83160. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 12:11:26 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 26 Jul 2010 10:11:26 +0000 Subject: [issue9259] Python 2.7 breaks assigned __exit__s In-Reply-To: <1279108398.28.0.504653003054.issue9259@psf.upfronthosting.co.za> Message-ID: <1280139086.79.0.014265980677.issue9259@psf.upfronthosting.co.za> Changes by Dave Malcolm : ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 13:31:09 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 26 Jul 2010 11:31:09 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <1280082784.57.0.628810673592.issue9377@psf.upfronthosting.co.za> Message-ID: <1280143869.0.0.395380616846.issue9377@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +ezio.melotti, haypo, lemburg, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 13:31:35 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 26 Jul 2010 11:31:35 +0000 Subject: [issue9382] os.popen referenced but not documented in Python 3.x In-Reply-To: <1280121849.18.0.464291520909.issue9382@psf.upfronthosting.co.za> Message-ID: <1280143895.17.0.691069247007.issue9382@psf.upfronthosting.co.za> R. David Murray added the comment: (D) in python 3, os.popen has been reimplemented using subprocess.Popen. So the other mentions of os.popen should probably be replaced with mentions of subprocess.Popen. Your (C) is close...the continued existence of os.popen in Python3 is, I think, a bit of a kludge (I wasn't around for the discussion), but a backward compatibility one. I don't know if there is a plan to deprecate it, but I suspect not. On the other hand I certainly wouldn't recommend using it, since it does an import inside the function, which can get one into trouble if one uses threads. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 13:38:14 2010 From: report at bugs.python.org (Daniele Varrazzo) Date: Mon, 26 Jul 2010 11:38:14 +0000 Subject: [issue9167] argv double encoding on OSX In-Reply-To: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> Message-ID: <1280144294.4.0.0803776548049.issue9167@psf.upfronthosting.co.za> Daniele Varrazzo added the comment: Ronald, Thank you for the interest. For me trying to deal with such a tricky issue on a system whose Best Before date is already passed would be a waste of time. I was only interested in factor out the bugs in my extension module from the ones not under my responsibility and I had the bad luck to find a 10.4 to test on. I don't have a direct interest in this bug to be fixed. Thank you very much again for your time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 14:01:15 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 26 Jul 2010 12:01:15 +0000 Subject: [issue5166] ElementTree and minidom don't prevent creation of not well-formed XML In-Reply-To: <1233918825.25.0.360851750395.issue5166@psf.upfronthosting.co.za> Message-ID: <1280145675.77.0.0709100655035.issue5166@psf.upfronthosting.co.za> Mark Lawrence added the comment: In msg89685 it's stated that this behaviour is deliberate for ET. Could somebody please comment on the minidom aspects. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 14:05:29 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 26 Jul 2010 12:05:29 +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: <1280145929.56.0.902424045398.issue4147@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Thomas: could you provide a unit test to go with your patch. ---------- nosy: +BreamoreBoy stage: -> unit test needed versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 14:24:25 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 26 Jul 2010 12:24:25 +0000 Subject: [issue1813] Codec lookup failing under turkish locale In-Reply-To: <1200150013.57.0.828744211276.issue1813@psf.upfronthosting.co.za> Message-ID: <1280147065.64.0.171302198691.issue1813@psf.upfronthosting.co.za> Mark Lawrence added the comment: Does anyone know if this was discussed on python-dev? I've tried searching the archives and didn't find anything, but that's not to say it isn't there. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 14:54:53 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Mon, 26 Jul 2010 12:54:53 +0000 Subject: [issue7637] Improve 19.5. xml.dom.minidom doc In-Reply-To: <1262659434.4.0.874382323645.issue7637@psf.upfronthosting.co.za> Message-ID: <1280148893.13.0.320700516726.issue7637@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Thanks for the catch; it was intended to be ', avoiding ...'. Fixed in rev83162, along with the sentence simplification you suggest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 15:02:32 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Mon, 26 Jul 2010 13:02:32 +0000 Subject: [issue1886] Permit to easily use distutils "--formats=tar, gztar, bztar" on all systems In-Reply-To: <1200950920.27.0.810221024065.issue1886@psf.upfronthosting.co.za> Message-ID: <1280149352.99.0.610155279992.issue1886@psf.upfronthosting.co.za> Changes by A.M. Kuchling : ---------- assignee: akuchling -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 15:03:57 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 26 Jul 2010 13:03:57 +0000 Subject: [issue3075] make minidom.toxml() encoding argument useful In-Reply-To: <1213121523.99.0.8342553488.issue3075@psf.upfronthosting.co.za> Message-ID: <1280149437.09.0.688016084555.issue3075@psf.upfronthosting.co.za> Mark Lawrence added the comment: This is how toprettyxml looks in 3.1/2 which seems to meet the OP's need, I'll close in a few days time unless someone objects. def toprettyxml(self, indent="\t", newl="\n", encoding=None): # indent = the indentation string to prepend, per level # newl = the newline string to append use_encoding = "utf-8" if encoding is None else encoding writer = codecs.getwriter(use_encoding)(io.BytesIO()) if self.nodeType == Node.DOCUMENT_NODE: # Can pass encoding only to document, to put it into XML header self.writexml(writer, "", indent, newl, encoding) else: self.writexml(writer, "", indent, newl) if encoding is None: return writer.stream.getvalue().decode(use_encoding) else: return writer.stream.getvalue() ---------- nosy: +BreamoreBoy status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 15:24:29 2010 From: report at bugs.python.org (Richard Urwin) Date: Mon, 26 Jul 2010 13:24:29 +0000 Subject: [issue1767933] Badly formed XML using etree and utf-16 Message-ID: <1280150669.81.0.281018228654.issue1767933@psf.upfronthosting.co.za> Richard Urwin added the comment: I can't produce an automated test, for want of time, but here is a demonstrator. Grab the example XHTML from http://docs.python.org/library/xml.etree.elementtree.html#elementtree-objects or use some tiny ASCII-encoded xml file. Save it as "file.xml" in the same folder as bug-test.py attached here. Execute bug-test.xml file.xml is read and then written in UTF-16. The output file is then read and dumped to stdout as a byte-stream. 1. To be correct UTF-16, the output should start with 255 254, which should never occur in the rest of the file. 2. The rest of the output (including the first line) should alternate zeros with ASCII character codes. 3. The file output.xml should be loadable in a UTF16-capable text editor (eg jEdit), be recognised as UTF-16 and be identical in terms of content to file.xml ---------- nosy: +Richard.Urwin Added file: http://bugs.python.org/file18211/bug-test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 15:26:16 2010 From: report at bugs.python.org (Ray.Allen) Date: Mon, 26 Jul 2010 13:26:16 +0000 Subject: [issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1280150776.82.0.894651006453.issue9299@psf.upfronthosting.co.za> Ray.Allen added the comment: Oh, I'm sorry, I forgot about that case. I agree with Arfrever, we should suppress the OSError only if the target file exists as a directory, but not other types. That is, the "exist_ok" argument in makedirs() should mean "dir existing is ok", only existing of the exact same thing as we specified to create is ok, not other things. I will fixed this later. Besides, I wonder what should we do if the target directory exists but with a different mode than we specified(if we specified the "mode" argument). I guess we should also raise the OSError because the existing thing is not the same as what we want. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 15:26:42 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 26 Jul 2010 13:26:42 +0000 Subject: [issue9376] Refer to gnuwin32 diff util on development FAQ In-Reply-To: <1280059126.9.0.527330657398.issue9376@psf.upfronthosting.co.za> Message-ID: <1280150802.95.0.799383854843.issue9376@psf.upfronthosting.co.za> anatoly techtonik added the comment: There is diff.py utility that is already available from standard Python distribution. ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 15:27:34 2010 From: report at bugs.python.org (Richard Urwin) Date: Mon, 26 Jul 2010 13:27:34 +0000 Subject: [issue1767933] Badly formed XML using etree and utf-16 Message-ID: <1280150854.18.0.498057894746.issue1767933@psf.upfronthosting.co.za> Richard Urwin added the comment: > Execute bug-test.xml I meant bug-test.py, of course ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 15:32:27 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 26 Jul 2010 13:32:27 +0000 Subject: [issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1280151147.62.0.903521347725.issue9299@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: Alternatively you could call os.chmod. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 15:35:51 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 26 Jul 2010 13:35:51 +0000 Subject: [issue4686] Exceptions in ConfigParser don't set .args In-Reply-To: <1229545362.85.0.86911392572.issue4686@psf.upfronthosting.co.za> Message-ID: <1280151351.19.0.984159368867.issue4686@psf.upfronthosting.co.za> Michael Foord added the comment: Patch doesn't apply cleanly to 3.1 or earlier. As it is *arguably* a new feature rather than a bugfix I'm closing the issue. I certainly wouldn't argue against someone else backporting though... ---------- stage: commit review -> committed/rejected status: open -> closed versions: -Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 15:38:28 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 26 Jul 2010 13:38:28 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1280151508.59.0.794944695348.issue1682942@psf.upfronthosting.co.za> Michael Foord added the comment: This would change the format of config files that configparser supports. Should there be some discussion of this on python-dev first? The patch for the docs is against the latex docs, so definitely needs updating. ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 15:41:20 2010 From: report at bugs.python.org (Tim Lesher) Date: Mon, 26 Jul 2010 13:41:20 +0000 Subject: [issue4510] ValueError for list.remove() not very helpful In-Reply-To: <1228347518.63.0.0108612017272.issue4510@psf.upfronthosting.co.za> Message-ID: <1280151680.09.0.0544368793266.issue4510@psf.upfronthosting.co.za> Tim Lesher added the comment: Ugh. That's a reasonable objection. What's the best thing to do in this case, generally speaking? list.index() does print the full repr on a value error; and a quick grep shows a number of other similar uses, although those don't seem to be as easy to trigger inadvertently. Should this feature be removed from list.index as well? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 15:42:46 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 26 Jul 2010 13:42:46 +0000 Subject: [issue5412] extend configparser to support [] syntax In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1280151766.62.0.192601213492.issue5412@psf.upfronthosting.co.za> Michael Foord added the comment: There are no docs or tests in the patch. I like the functionality though and doubt it will be controversial. The current api is a bit "arcane". So +1 from me. ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 15:47:42 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 26 Jul 2010 13:47:42 +0000 Subject: [issue6517] configparser: add possibility to escape formatstrings In-Reply-To: <1247949399.94.0.0752877480689.issue6517@psf.upfronthosting.co.za> Message-ID: <1280152062.58.0.0976909305078.issue6517@psf.upfronthosting.co.za> Michael Foord added the comment: This should just be applied. I'll do it shortly unless there is an objection. ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 15:48:52 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 26 Jul 2010 13:48:52 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1279913042.97.0.618415832845.issue9362@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: On Fri, Jul 23, 2010 at 10:24 PM, Alexander Belopolsky wrote: > I suggest changing > > Use exit() or Ctrl-D (i.e. EOF) to exit > > ?to > > Type exit() or quit() and press the Enter key to exit Type exit() or press Ctrl-D to exit. ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 15:53:46 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 26 Jul 2010 13:53:46 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1279913042.97.0.618415832845.issue9362@psf.upfronthosting.co.za> Message-ID: <1280152426.95.0.814748905777.issue9362@psf.upfronthosting.co.za> Michael Foord added the comment: +1 to improving the message and improving the help message too. ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 16:17:06 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 26 Jul 2010 14:17:06 +0000 Subject: [issue6517] configparser: add possibility to escape formatstrings In-Reply-To: <1247949399.94.0.0752877480689.issue6517@psf.upfronthosting.co.za> Message-ID: <1280153826.9.0.677023354104.issue6517@psf.upfronthosting.co.za> Michael Foord added the comment: It is (very) unfortunate that configparser.ConfigParser should *not* be used and that configparser.SafeConfigParser is the correct class instead. I would be *in favour* of deprecating ConfigParser and eventually renaming SafeConfigParser back to ConfigParser (leaving SafeConfigParser as an alias). Now that deprecation warnings are silent by default this should be less of an issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 16:21:29 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 26 Jul 2010 14:21:29 +0000 Subject: [issue9376] Refer to gnuwin32 diff util on development FAQ In-Reply-To: <1280059126.9.0.527330657398.issue9376@psf.upfronthosting.co.za> Message-ID: <1280154089.73.0.475672003568.issue9376@psf.upfronthosting.co.za> Brian Curtin added the comment: I don't think we should have a list of three alternatives to the single way you really should be creating diffs. If you are working on Python you should have Subversion and run "svn diff", or have Mercurual and run "hg diff". I guess I'm -0 on this idea. I also don't even know where the dev/faq page is located in SVN to make any potential change. ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 16:24:39 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 26 Jul 2010 14:24:39 +0000 Subject: [issue9376] Refer to gnuwin32 diff util on development FAQ In-Reply-To: <1280059126.9.0.527330657398.issue9376@psf.upfronthosting.co.za> Message-ID: <1280154279.21.0.413044940155.issue9376@psf.upfronthosting.co.za> Michael Foord added the comment: "svn diff" should be the one true way for creating patches, especially for windows users. This will all change when we switch to mercurial. ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 16:27:40 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 26 Jul 2010 14:27:40 +0000 Subject: [issue9376] Refer to gnuwin32 diff util on development FAQ In-Reply-To: <1280059126.9.0.527330657398.issue9376@psf.upfronthosting.co.za> Message-ID: <1280154460.4.0.315255835556.issue9376@psf.upfronthosting.co.za> anatoly techtonik added the comment: The better way would be > python -m easy_install review > python -m review ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 16:30:43 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 26 Jul 2010 14:30:43 +0000 Subject: [issue9376] Refer to gnuwin32 diff util on development FAQ In-Reply-To: <1280059126.9.0.527330657398.issue9376@psf.upfronthosting.co.za> Message-ID: <1280154643.52.0.204821080583.issue9376@psf.upfronthosting.co.za> Brian Curtin added the comment: Until Rietveld has a defined place in our workflow, I don't think that's a good idea. I think that will be a part of the process in the future, but we're not defining that here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 16:32:35 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 26 Jul 2010 14:32:35 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: Message-ID: Alexander Belopolsky added the comment: On Mon, Jul 26, 2010 at 9:48 AM, anatoly techtonik wrote: .. > Type exit() or press Ctrl-D to exit. Anatoly, I think you missed the point of the story that I posted. The young user, who was not completely new to computers, by the way, was not familiar with "Ctrl" abbreviation and there was no key marked that way on his keyboard. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 16:38:32 2010 From: report at bugs.python.org (=?utf-8?q?Dirk_J=C3=BClich?=) Date: Mon, 26 Jul 2010 14:38:32 +0000 Subject: [issue6074] .pyc files created readonly if .py file is readonly, python won't overwrite In-Reply-To: <1242857063.47.0.919073638283.issue6074@psf.upfronthosting.co.za> Message-ID: <1280155112.38.0.197326877144.issue6074@psf.upfronthosting.co.za> Dirk J?lich added the comment: Applies also to Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32. ---------- nosy: +mucisland versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 16:50:56 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 26 Jul 2010 14:50:56 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1279913042.97.0.618415832845.issue9362@psf.upfronthosting.co.za> Message-ID: <1280155856.08.0.249111529401.issue9362@psf.upfronthosting.co.za> Mark Lawrence added the comment: 1) I'm with Michael on this one. 2) Python is not responsible for dotting every i and crossing every t for a computer novice. What would the novice make of my HP keyboard which doesn't have keys marked RETURN or BS, they both have symbols. There isn't an ANY key on the keyboard either! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 17:00:16 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 26 Jul 2010 15:00:16 +0000 Subject: [issue6517] configparser: add possibility to escape formatstrings In-Reply-To: <1247949399.94.0.0752877480689.issue6517@psf.upfronthosting.co.za> Message-ID: <1280156416.98.0.255878258559.issue6517@psf.upfronthosting.co.za> R. David Murray added the comment: You are right, IMO, at least the current doc patch should be applied. Please go ahead, if you want to, I won't have time to get to it for a couple of days. Maybe you could come up with a new title for this issue that reflects the concerns being addressed here... ---------- assignee: r.david.murray -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 17:07:02 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 26 Jul 2010 15:07:02 +0000 Subject: [issue9376] Refer to gnuwin32 diff util on development FAQ In-Reply-To: <1280059126.9.0.527330657398.issue9376@psf.upfronthosting.co.za> Message-ID: <1280156822.63.0.636283230392.issue9376@psf.upfronthosting.co.za> Mark Lawrence added the comment: I believe that the switch to mercurial is months if not years away, so I'd quite happily see just a reference to svn diff. Failing that I wouldn't loose any sleep over closing this, ok to leave it with you Brian? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 17:08:32 2010 From: report at bugs.python.org (Arrnaud Fabre) Date: Mon, 26 Jul 2010 15:08:32 +0000 Subject: [issue9383] PIL Bug with split In-Reply-To: <1280156912.66.0.913857583224.issue9383@psf.upfronthosting.co.za> Message-ID: <1280156912.66.0.913857583224.issue9383@psf.upfronthosting.co.za> New submission from Arrnaud Fabre : >>> import Image >>> im = Image.open('whatever') >>> im.split() Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/dist-packages/PIL/Image.py", line 1497, in split if self.im.bands == 1: AttributeError: 'NoneType' object has no attribute 'bands' Bug can be fixed by using getdata before split() : >>> import Image >>> im = Image.open('whatever') >>> im.getdata() >>> im.split() (, , ) ---------- messages: 111630 nosy: Arrnaud.Fabre priority: normal severity: normal status: open title: PIL Bug with split type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 17:09:22 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 26 Jul 2010 15:09:22 +0000 Subject: [issue1767933] Badly formed XML using etree and utf-16 Message-ID: <1280156962.25.0.901214213124.issue1767933@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Florent: is this something you could pick up, I think it's out of my league. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 17:09:48 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 26 Jul 2010 15:09:48 +0000 Subject: [issue9376] Refer to gnuwin32 diff util on development FAQ In-Reply-To: <1280154643.52.0.204821080583.issue9376@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: > Brian Curtin added the comment: > > Until Rietveld has a defined place in our workflow, I don't think that's a good idea. 1. AFAIK Python don't have any workflow. Do you speak about your own workflow? 2. What conditions should become True for you to think that's a good idea? I.e. fill the blanks: if ... and ... and ...: debug("Rietveld has a defined place in out workflow") good_idea = True ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 17:10:27 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 26 Jul 2010 15:10:27 +0000 Subject: [issue9383] PIL Bug with split In-Reply-To: <1280156912.66.0.913857583224.issue9383@psf.upfronthosting.co.za> Message-ID: <1280157027.98.0.184678075424.issue9383@psf.upfronthosting.co.za> Ezio Melotti added the comment: You should report this on the PIL bug tracker. PIL is not part of the Python standard library. ---------- nosy: +ezio.melotti resolution: -> invalid stage: -> committed/rejected status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 17:10:38 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 26 Jul 2010 15:10:38 +0000 Subject: [issue9376] Refer to gnuwin32 diff util on development FAQ In-Reply-To: <1280059126.9.0.527330657398.issue9376@psf.upfronthosting.co.za> Message-ID: <1280157038.93.0.447222365572.issue9376@psf.upfronthosting.co.za> Brian Curtin added the comment: "svn diff" is already explained a few times in the doc, including the line above the suggested change. ---------- resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 17:31:52 2010 From: report at bugs.python.org (Richard Urwin) Date: Mon, 26 Jul 2010 15:31:52 +0000 Subject: [issue1767933] Badly formed XML using etree and utf-16 Message-ID: <1280158312.83.0.106373300369.issue1767933@psf.upfronthosting.co.za> Richard Urwin added the comment: As an example, here is the first two lines of output when I use Python 2.6.3: 60 63 120 109 108 32 118 101 114 115 105 111 110 61 39 49 46 48 39 32 101 110 99 111 100 105 110 103 61 39 85 84 70 45 49 54 39 63 62 10 60 255 254 104 0 116 0 109 0 108 0 62 255 254 10 Note: No 255 254 at the start of the file, but several within it. No zeros interspersing the first line and the odd one missing thereafter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 17:32:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 26 Jul 2010 15:32:20 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1280155856.08.0.249111529401.issue9362@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Mon, Jul 26, 2010 at 10:50 AM, Mark Lawrence wrote: .. > 2) Python is not responsible for dotting every i and crossing every t for a computer novice. Yes, but it is not responsible for teaching a novice more than one way to exit the interpreter right off the bat. Note that the Ctrl-D/Ctrl-Z recommendation has a long history from the time when there was no exit/quit object defined in the default site.py and the alternative to the magic key-press was an unwieldy raise SystemExit. Note the following bug report from IDLEfork project: http://sourceforge.net/tracker/?func=detail&atid=109579&aid=693333&group_id=9579 Apparently, some IDEs may want to rebind Ctrl-Z form EOF to (in this case) undo action. This is quite reasonable, but it makes the exit hint misleading. There are many reasons outside of python control for EOF to be bound to the keys other than Ctrl-Z/D. The current logic in site.py that makes a choice based on the filepath separator character is quite fragile: if os.sep == ':': eof = 'Cmd-Q' elif os.sep == '\\': eof = 'Ctrl-Z plus Return' else: eof = 'Ctrl-D (i.e. EOF)' > ?What would the novice make of my HP keyboard which doesn't have keys marked RETURN or BS, > they both have symbols. There is very little you can do at the command prompt without knowing where your enter key is. In fact, you will not even see the hint in question if you don't press enter after typing exit. On the other hand, you can get quite far without using control key and if it is marked "control" or a national equivalent on your keyboard, you may not know the ctrl abbreviation for quite some time. Note that my last alternative, "Use exit() to exit" or "Enter exit() to exit" does not require knowing how the enter key is called. The user just need to know the means of entering commands and he or she must know this before seeing the exit hint anyways. > ?There isn't an ANY key on the keyboard either! :) Right. And computer industry would save loads of money in support calls if they instructed users to press the space bar instead. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 17:43:22 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 26 Jul 2010 15:43:22 +0000 Subject: [issue6517] Emphasising in the docs configparser.SafeConfigParser over ConfigParser In-Reply-To: <1247949399.94.0.0752877480689.issue6517@psf.upfronthosting.co.za> Message-ID: <1280159002.27.0.965666804268.issue6517@psf.upfronthosting.co.za> Michael Foord added the comment: Note that the patch doesn't apply cleanly. ?ukasz Langa is going to update it. There is still discussion as to whether we should *also* deprecate ConfigParser (well - PendingDeprecation in 3.2, Deprecation in 3.3 and in 3.4 making ConfigParser an alias for SafeConfigParser). ---------- title: configparser: add possibility to escape formatstrings -> Emphasising in the docs configparser.SafeConfigParser over ConfigParser _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 17:45:54 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 26 Jul 2010 15:45:54 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1279913042.97.0.618415832845.issue9362@psf.upfronthosting.co.za> Message-ID: <1280159154.09.0.253078853435.issue9362@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could we (easily) add a third line at startup that says how to quit? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 18:03:06 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 26 Jul 2010 16:03:06 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1280159154.09.0.253078853435.issue9362@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Mon, Jul 26, 2010 at 11:45 AM, Mark Lawrence wrote: > > Mark Lawrence added the comment: > > Could we (easily) add a third line at startup that says how to quit? +1 Alternatively, we can add the second line to help output: Type help() for interactive help, or help(object) for help about object. Type exit() to exit python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 18:36:30 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Mon, 26 Jul 2010 16:36:30 +0000 Subject: [issue7742] please avoid 'which' in Modules/ld_so_aix In-Reply-To: <1279824979.47.0.334145418501.issue7742@psf.upfronthosting.co.za> Message-ID: <2DACE180-DCB9-405D-9AE2-DF514503B29A@activestate.com> Sridhar Ratnakumar added the comment: On 2010-07-22, at 11:56 AM, Stefan Krah wrote: > > Stefan Krah added the comment: > > I'm not sure this should be changed: > > 1) Why is .cshrc sourced? It should only get sourced for a login > shell. /usr/bin/which is a csh script on our AIX machine too: bash-2.04$ head -n 5 /usr/bin/which #!/usr/bin/csh -f set prompt = "% " if ( -f ~/.cshrc) then source ~/.cshrc endif > 2) If the user sets a PATH that excludes the compiler, then `which` > will also not find the compiler on other systems (like Linux). > Why would anyone set a PATH that excludes the compiler? > > > Sridhar, has this ever been a problem for you on AIX? Not at all, we use bash as the default shell. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 18:45:01 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 26 Jul 2010 16:45:01 +0000 Subject: [issue9384] Tkinter windows pop under the terminal in OSX In-Reply-To: <1280162701.76.0.316880678419.issue9384@psf.upfronthosting.co.za> Message-ID: <1280162701.76.0.316880678419.issue9384@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : I believe any Tkinter app will exhibit the same behavior, but I discovered this with idle and verified with wish.py: $ ./python.exe Demo/tkinter/guido/wish.py % quit Traceback (most recent call last): File "Demo/tkinter/guido/wish.py", line 22, in if tk.getboolean(tk.call('info', 'complete', cmd)): _tkinter.TclError: expected boolean value but got "" Note that the Traceback above is probably due to another bug. If you start wish.py from a terminal covering the top left corner of the screen, the wish window will appear under the terminal window. ---------- assignee: ronaldoussoren components: IDLE, Macintosh, Tkinter messages: 111641 nosy: belopolsky, ronaldoussoren priority: normal severity: normal status: open title: Tkinter windows pop under the terminal in OSX type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 18:49:41 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 26 Jul 2010 16:49:41 +0000 Subject: [issue5752] xml.dom.minidom does not escape CR, LF and TAB characters within attribute values In-Reply-To: <1239707588.77.0.33795755364.issue5752@psf.upfronthosting.co.za> Message-ID: <1280162981.02.0.125364686539.issue5752@psf.upfronthosting.co.za> Ezio Melotti added the comment: #7139 has been closed as duplicate of this and contains a few messages that might be worth reading. ---------- nosy: +effbot, ezio.melotti, moriyoshi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 18:53:35 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 26 Jul 2010 16:53:35 +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: <1280163215.14.0.977575490231.issue2636@psf.upfronthosting.co.za> Ezio Melotti added the comment: Does 'regex' implement "default word boundaries" (see #7255)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 19:02:36 2010 From: report at bugs.python.org (Radoslaw Madej) Date: Mon, 26 Jul 2010 17:02:36 +0000 Subject: [issue9385] python-2.6.5 and 3.2.1 uses 'rwx' mmap() calls for the ctypes module In-Reply-To: <1280163756.22.0.278914543931.issue9385@psf.upfronthosting.co.za> Message-ID: <1280163756.22.0.278914543931.issue9385@psf.upfronthosting.co.za> New submission from Radoslaw Madej : Hi, Python ctypes module creates a 'rwx' memory mapping (defined in malloc_closure.c) which causes python to crash when running under grsecurity enabled kernel and could also have a negative security impact. Is there any specific need for the mmap call to create an executable mapping or can it be safely removed? Please refer here for more information and proposed patch: http://bugs.gentoo.org/show_bug.cgi?id=329499 The actual mmap call: item = (ITEM *)mmap(NULL, count * sizeof(ITEM), PROT_READ | PROT_WRITE | PROT_EXEC, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0); There has been further investigation done by Gentoo users and work towards python handling this error gracefully rather than segfaulting. It seems that dereference at Py_XDECREF(self->restype); (line 23 of Modules/_ctypes/callbacks.c) causes the segfault. Thanks. ---------- assignee: theller components: ctypes messages: 111644 nosy: radegand532, theller priority: normal severity: normal status: open title: python-2.6.5 and 3.2.1 uses 'rwx' mmap() calls for the ctypes module type: security versions: Python 2.6, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 19:07:31 2010 From: report at bugs.python.org (Radoslaw Madej) Date: Mon, 26 Jul 2010 17:07:31 +0000 Subject: [issue9385] python-2.6.5 and 3.2.1 uses 'rwx' mmap() calls for the ctypes module In-Reply-To: <1280163756.22.0.278914543931.issue9385@psf.upfronthosting.co.za> Message-ID: <1280164051.07.0.987143489924.issue9385@psf.upfronthosting.co.za> Radoslaw Madej added the comment: segfault info: # grep 65725f6b /var/log/grsec.log # Jul 27 00:58:53 [kernel] grsec: Segmentation fault occurred at 65725f6b in /home/root/syschroot/usr/bin/python2.6[python2.6:23877] uid/euid:0/0 gid/egid:0/0, parent /home/root/syschroot/bin/bash[bash:25516] uid/euid:0/0 gid/egid:0/0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 19:16:44 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 26 Jul 2010 17:16:44 +0000 Subject: [issue7077] SysLogHandler can't handle Unicode In-Reply-To: <1254919358.82.0.721761611674.issue7077@psf.upfronthosting.co.za> Message-ID: <1280164604.24.0.50876039083.issue7077@psf.upfronthosting.co.za> Georg Brandl added the comment: There is indeed a problem with the patch: the BOM is put in front of the angle brackets indicating the priority/facility, so the syslog can't find it anymore. The BOM should be put after the brackets. ---------- nosy: +georg.brandl status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 19:18:50 2010 From: report at bugs.python.org (Pavel Labushev) Date: Mon, 26 Jul 2010 17:18:50 +0000 Subject: [issue9385] python-2.6.5 and 3.2.1 uses 'rwx' mmap() calls for the ctypes module In-Reply-To: <1280163756.22.0.278914543931.issue9385@psf.upfronthosting.co.za> Message-ID: <1280164730.52.0.323659413592.issue9385@psf.upfronthosting.co.za> Pavel Labushev added the comment: Note that the removing of PROT_EXEC flag doesn't break any ctypes test. ---------- nosy: +Arach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 19:23:30 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 26 Jul 2010 17:23:30 +0000 Subject: [issue9268] Add annotation option to pickletools.dis In-Reply-To: <1279222638.31.0.459529413565.issue9268@psf.upfronthosting.co.za> Message-ID: <1280165010.4.0.0579850953961.issue9268@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Reopening as a documentation issue: - manual entry should have a versionchanged - use *arg* instead of 'arg' - add a ReST entry describing -m pickletools ---------- components: +Documentation nosy: +ezio.melotti status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 19:28:27 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 26 Jul 2010 17:28:27 +0000 Subject: [issue9386] Bad indentation in urllib import fixer with multipe imports In-Reply-To: <1280165305.89.0.706403927201.issue9386@psf.upfronthosting.co.za> Message-ID: <1280165305.89.0.706403927201.issue9386@psf.upfronthosting.co.za> New submission from Dave Malcolm : Running 2to3 on lxml-2.2.6 failed with broken indentation. This fragment from lxml/html/__init__.py: > def open_http_urllib(method, url, values): > ## FIXME: should test that it's not a relative URL or something > try: > from urllib import urlencode, urlopen > except ImportError: # Python 3 became: > def open_http_urllib(method, url, values): > ## FIXME: should test that it's not a relative URL or something > try: > from urllib.parse import urlencode > from urllib.request import urlopen > except ImportError: # Python 3 which is syntactically invalid: note the invalid indentation for the second "import" line. Seems to work when there's a single name imported per line; fails when more than one name is imported from urlib. Am attaching a patch to test_fixers (for the 2.7 branch) which adds a reproducer. I don't have a fix. test test_lib2to3 failed -- Traceback (most recent call last): File "/home/david/coding/python-svn/2.7-2to3/Lib/lib2to3/tests/test_fixers.py", line 1858, in test_import_indentation self.check(b, a) File "/home/david/coding/python-svn/2.7-2to3/Lib/lib2to3/tests/test_fixers.py", line 37, in check tree = self._check(before, after) File "/home/david/coding/python-svn/2.7-2to3/Lib/lib2to3/tests/test_fixers.py", line 33, in _check self.assertEqual(after, unicode(tree)) AssertionError: u"\ndef foo():\n from urllib.parse import urlencode\n from urllib.parse im [truncated]... != u"\ndef foo():\n from urllib.parse import urlencode\nfrom urllib.request impo [truncated]... def foo(): from urllib.parse import urlencode - from urllib.parse import urlopen ? ---- -- ^ + from urllib.request import urlopen ? ++++ ^ print('got here') (Note to self: tracking this downstream in Fedora for lxml as https://bugzilla.redhat.com/show_bug.cgi?id=600036 ) ---------- components: 2to3 (2.x to 3.0 conversion tool) files: urllib-indentation-issue.patch keywords: patch messages: 111649 nosy: dmalcolm priority: normal severity: normal stage: needs patch status: open title: Bad indentation in urllib import fixer with multipe imports type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file18212/urllib-indentation-issue.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 19:32:26 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 26 Jul 2010 17:32:26 +0000 Subject: [issue9385] _ctypes module uses 'rwx' mmap() calls In-Reply-To: <1280163756.22.0.278914543931.issue9385@psf.upfronthosting.co.za> Message-ID: <1280165546.06.0.631056491703.issue9385@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever title: python-2.6.5 and 3.2.1 uses 'rwx' mmap() calls for the ctypes module -> _ctypes module uses 'rwx' mmap() calls versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 19:36:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 26 Jul 2010 17:36:09 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1280119765.6.0.405609709685.issue9315@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Mon, Jul 26, 2010 at 12:49 AM, Eli Bendersky wrote: .. > This raises a question: should method names of classes come after the class names when appearing > in a trace? Intuitively yes, but I want to investigate some more, probably by adding a couple more test > cases where the traced functions are methods of objects rather than plain functions. > I want to agree, but finding the class name of the method may not be trivial in 3.x because we don't have unbound methods anymore. Please bring this up on python-dev. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 19:36:13 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 26 Jul 2010 17:36:13 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: Message-ID: anatoly techtonik added the comment: On Mon, Jul 26, 2010 at 5:32 PM, Alexander Belopolsky wrote: > > I think you missed the point of the story that I posted. ?The young > user, who was not completely new to computers, by the way, was not > familiar with "Ctrl" ?abbreviation and there was no key marked that > way on his keyboard. The stuff that should be explained once in a lifetime to every newborn software engineer will waste million of braincycles over the world every time the stuff is read. You need to consider changing the school program in your region to add practical computer lessons where chindren are explained all questions they have about computers. -- anatoly t. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 19:28:39 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 26 Jul 2010 17:28:39 +0000 Subject: [issue9386] Bad indentation in urllib import fixer with multiple imports In-Reply-To: <1280165305.89.0.706403927201.issue9386@psf.upfronthosting.co.za> Message-ID: <1280165319.31.0.388964278398.issue9386@psf.upfronthosting.co.za> Changes by Dave Malcolm : ---------- title: Bad indentation in urllib import fixer with multipe imports -> Bad indentation in urllib import fixer with multiple imports _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 19:41:28 2010 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 26 Jul 2010 17:41:28 +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: <1280166088.15.0.130685712476.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: No. Wouldn't that break compatibility with 're'? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 19:42:27 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 26 Jul 2010 17:42:27 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: Message-ID: anatoly techtonik added the comment: On Mon, Jul 26, 2010 at 7:03 PM, Alexander Belopolsky wrote: >> >> Could we (easily) add a third line at startup that says how to quit? > > +1 +1 - Type "help", "copyright", "credits" or "license" for more information. + Type "help", "copyright", "credits" or "license" for more information, "exit" to quit. > Alternatively, we can add the second line to help output: > > Type help() for interactive help, or help(object) for help about object. > Type exit() to exit python. -0.5 (no beer from me) BTW, Ctrl-D works on Windows also. No need to maintain system-specific Ctrl-Z shortcut. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 19:46:28 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 26 Jul 2010 17:46:28 +0000 Subject: [issue9387] Make python -m tkinter run tkinter test In-Reply-To: <1280166388.67.0.0667183564509.issue9387@psf.upfronthosting.co.za> Message-ID: <1280166388.67.0.0667183564509.issue9387@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Since tkinter is a package, it requires __main__.py in order to be runnable using -m option. Attached tkinter-m.patch fixes this. ---------- assignee: belopolsky components: Tkinter files: tkinter-m.py keywords: easy messages: 111654 nosy: belopolsky priority: normal severity: normal status: open title: Make python -m tkinter run tkinter test type: feature request Added file: http://bugs.python.org/file18213/tkinter-m.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 19:47:25 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 26 Jul 2010 17:47:25 +0000 Subject: [issue9387] Make python -m tkinter run tkinter test In-Reply-To: <1280166388.67.0.0667183564509.issue9387@psf.upfronthosting.co.za> Message-ID: <1280166445.75.0.458006510296.issue9387@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- keywords: +needs review stage: -> patch review versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 19:47:32 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 26 Jul 2010 17:47:32 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1279913042.97.0.618415832845.issue9362@psf.upfronthosting.co.za> Message-ID: <1280166452.33.0.955350641752.issue9362@psf.upfronthosting.co.za> Brian Curtin added the comment: Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> ^D File "", line 1 ? ^ SyntaxError: invalid syntax ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 19:50:20 2010 From: report at bugs.python.org (Jeffrey C. Jacobs) Date: Mon, 26 Jul 2010 17:50:20 +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: <1280166620.78.0.544239099098.issue2636@psf.upfronthosting.co.za> Jeffrey C. Jacobs added the comment: What about a regex flag? Like regex.W or (?w)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 19:56:11 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 26 Jul 2010 17:56:11 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1280166971.84.0.0682951520863.issue1682942@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 20:04:18 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 26 Jul 2010 18:04:18 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1280167458.97.0.542075881748.issue1682942@psf.upfronthosting.co.za> ?ukasz Langa added the comment: The original patch was of no use because didn't let users specify multicharacter delimiters and comment delimiters. The main goal behind the implementation was making monstrosities like the Samba configuration file work. This is why a sample smb.conf is added to the tests as to show what is now parsable. The patch is called issue1682942.diff and is quite big. Georg, Brian, before you panic, please note the following: the old test suite with the new code works (which means it's by default backwards compatible). With a patch of that size it also might just be easier for you to browse the patched code and not the patch itself. The Doc/ part still needs work but after 10 hours of coding I have enough for today :) ---------- Added file: http://bugs.python.org/file18214/issue1682942.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 20:05:54 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 26 Jul 2010 18:05:54 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1280167554.48.0.272208772837.issue1682942@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- nosy: +georg.brandl Added file: http://bugs.python.org/file18215/cfgparser.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 20:06:45 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 26 Jul 2010 18:06:45 +0000 Subject: [issue8834] Define order of Misc/ACKS entries In-Reply-To: <1274993181.13.0.347164864235.issue8834@psf.upfronthosting.co.za> Message-ID: <1280167605.88.0.111682425443.issue8834@psf.upfronthosting.co.za> ?ukasz Langa added the comment: LGTM :) ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 20:11:46 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 26 Jul 2010 18:11:46 +0000 Subject: [issue1524825] ConfigParser: accept leading whitespace on options+comments Message-ID: <1280167906.98.0.80294125954.issue1524825@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Implemented as part of issue1682942 since it touches the same code. Moreover, this issue mentions Samba config parsing in the original comment (msg50719) which was not doable without the changes introduced by issue1682942. So I would supersede this issue with issue1682942. One way or the other, they both fly or both go. Michael, can you close this as superseded? ---------- nosy: +lukasz.langa, michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 20:13:24 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 26 Jul 2010 18:13:24 +0000 Subject: [issue1524825] ConfigParser: accept leading whitespace on options+comments Message-ID: <1280168004.56.0.151466186107.issue1524825@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 20:33:00 2010 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 26 Jul 2010 18:33:00 +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: <1280169180.57.0.102434967347.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: That's a possibility. I must admit that I don't entirely understand it enough to implement it (the OP said "I don't believe that the algorithm for this is a whole lot more complicated"), and I don't have a need for it myself, but if someone would like to provide some code for it, even if it's in the form of a function written in Python: def at_default_word_boundary(text, pos): ... then I'll see what I can do! :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 21:04:40 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 26 Jul 2010 19:04:40 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1280166452.33.0.955350641752.issue9362@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: Something is broken in your 3.1.2 - this is Ctrl-D for me. {{{ Microsoft Windows [Version 6.0.6002] Copyright (c) 2006 Microsoft Corporation. All rights reserved. C:\~env\Python26>python 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. >>> C:\~env\Python26> }}} ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 21:18:35 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 26 Jul 2010 19:18:35 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1279913042.97.0.618415832845.issue9362@psf.upfronthosting.co.za> Message-ID: <1280171915.53.0.478568876984.issue9362@psf.upfronthosting.co.za> Brian Curtin added the comment: Do you have pyreadline installed? If so, that is causing it. If not, it's something else as Ctrl-D is not an EOF character on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 21:48:51 2010 From: report at bugs.python.org (Leonhard Vogt) Date: Mon, 26 Jul 2010 19:48:51 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280173731.9.0.726954469023.issue7447@psf.upfronthosting.co.za> Leonhard Vogt added the comment: Thank you. I think the specific list of list example is better for the sum documentation because lists support the + operator. I don't think that someone would consider using sum for chaining arbitrary iterables. What about a concise "To concatenate lists use itertools.chain.from_iterable." and letting the "apply list constructor" part as an exercise to the reader? I did the explicit reference to itertools.itertools.chain.from_iterable since the default or the explicit link to itertools.chain.from_iterable did not produce a correct link in the html docs. I applied patch3 and ran make html; there is no html link to from_iterable produced. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 22:16:56 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 26 Jul 2010 20:16:56 +0000 Subject: [issue9387] Make python -m tkinter run tkinter test In-Reply-To: <1280166388.67.0.0667183564509.issue9387@psf.upfronthosting.co.za> Message-ID: <1280175416.04.0.273908860238.issue9387@psf.upfronthosting.co.za> ?ric Araujo added the comment: I lack context: Why is being able to run ?python -m tkinter? useful? Tests can be run directly or via regrtest, and I recall Guido saying that using modules as scripts was an anti-pattern to him, i.e. sometimes useful but not always necessary. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 22:17:23 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 26 Jul 2010 20:17:23 +0000 Subject: [issue1524825] ConfigParser: accept leading whitespace on options+comments Message-ID: <1280175443.83.0.709219785032.issue1524825@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- superseder: -> ConfigParser support for alt delimiters _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 22:32:14 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 26 Jul 2010 20:32:14 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1280171915.53.0.478568876984.issue9362@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: It appears that `import pyreadline` goes ok. It appears that this lib is used for unification of console incompatibilities between platform. Why not to ship it in Python by default? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 22:38:38 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 26 Jul 2010 20:38:38 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: Message-ID: Alexander Belopolsky added the comment: On Jul 26, 2010, at 4:32 PM, anatoly techtonik wrote: > > Why not to ship it in Python by default? > Because it is under GPL? ---------- nosy: +Alexander.Belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 22:39:18 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 26 Jul 2010 20:39:18 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1279913042.97.0.618415832845.issue9362@psf.upfronthosting.co.za> Message-ID: <1280176758.89.0.540834467361.issue9362@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: -brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 22:48:45 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 26 Jul 2010 20:48:45 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1279913042.97.0.618415832845.issue9362@psf.upfronthosting.co.za> Message-ID: <1280177325.41.0.954101652287.issue9362@psf.upfronthosting.co.za> Mark Lawrence added the comment: c:\py3k\Lib>py32 Python 3.2a0 (py3k:83057M, Jul 22 2010, 15:20:27) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> ^D File "", line 1 ? ^ SyntaxError: invalid syntax [49008 refs] >>> This to me is getting stupid. Let's make a decision and move on, there are far more pressing issues that need attention. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 23:07:07 2010 From: report at bugs.python.org (Mark Lawrence) Date: Mon, 26 Jul 2010 21:07:07 +0000 Subject: [issue3402] test_nis is hanging on Solaris In-Reply-To: <1216346193.57.0.216784355152.issue3402@psf.upfronthosting.co.za> Message-ID: <1280178427.44.0.0514885255587.issue3402@psf.upfronthosting.co.za> Mark Lawrence added the comment: I'll close this unless someone gives a good reason as to why it should be kept open. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jul 26 23:53:50 2010 From: report at bugs.python.org (Steven Bethard) Date: Mon, 26 Jul 2010 21:53:50 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1280181230.38.0.810079356117.issue9334@psf.upfronthosting.co.za> Steven Bethard added the comment: I still disagree. You're giving the parser ambiguous input. If a parser sees "--foo --bar", and "--foo" is a valid option, but "--bar" is not, this is a legitimately ambiguous situation. Either the user really wanted "--bar", and the parser doesn't support it, or the "--bar" was meant to be the argument to the "--foo" flag. At this point, the parser must make an arbitrary decision, and argparse chooses the interpretation that the user wanted the "--bar" flag. I understand that you have a good use case for the other interpretation. That's why I suggest you come up with a patch that allows this other interpretation to be enabled when necessary. Changing the default behavior is really a non-starter unless you can propose a sensible transition strategy (as is always necessary for changing APIs in backwards incompatible ways). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 00:43:39 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 26 Jul 2010 22:43:39 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1280184219.56.0.866604320021.issue1682942@psf.upfronthosting.co.za> Changes by ?ukasz Langa : Removed file: http://bugs.python.org/file18214/issue1682942.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 00:43:48 2010 From: report at bugs.python.org (Anders Kaseorg) Date: Mon, 26 Jul 2010 22:43:48 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1280184228.85.0.303225775786.issue9334@psf.upfronthosting.co.za> Anders Kaseorg added the comment: > I still disagree. You're giving the parser ambiguous input. If a > parser sees "--foo --bar", and "--foo" is a valid option, but "--bar" > is not, this is a legitimately ambiguous situation. There is no ambiguity. According to the way that every standard option parsing library has worked for decades, the parser knows that --foo takes an argument, so the string after --foo is in a different grammatical context than options are, and is automatically interpreted as an argument to --foo. (It doesn?t matter whether that string begins with a dash, is a valid argument, might become a valid argument in some future version, looks like a negative number, or any other such condition.) arguments = *(positional-argument / option) [-- *(positional-argument)] positional-argument = string option = foo-option / bar-option foo-option = "--foo" string bar-option = "--bar" This is just like how variable names in Python are in a different grammatical position than keyword argument names, so that Popen(shell) is not confused with Popen(shell=True). This is not ambiguity; it simply follows from the standard definition of the grammar. argparse?s alternative interpretation of that string as another option does not make sense because it violates the requirement that --foo has been defined to take an argument. The only justification for considering that input ambiguous is if you start assuming that argparse knows better than the user (?the user accidentally forgot to type the name of the conf file?) and try to guess what they meant. This violates the user?s expectations of how the command line should work. It also creates subtle bugs in scripts that call argparse-based programs (think about call(["program", "--foo", foo_argument]) where foo_argument comes from some complex computation or even untrusted network input). > Changing the default behavior is really a non-starter unless you can > propose a sensible transition strategy (as is always necessary for > changing APIs in backwards incompatible ways). This would not be a backwards incompatible change, since every option that previously parsed successfully would also parse in the same way after the fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 00:44:42 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 26 Jul 2010 22:44:42 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1280184282.65.0.224962802487.issue1682942@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Updated the patch after review by Georg Brandl. This version includes documentation updates as well. ---------- Added file: http://bugs.python.org/file18216/issue1682942.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 01:10:01 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 26 Jul 2010 23:10:01 +0000 Subject: [issue9387] Make python -m tkinter run tkinter demo In-Reply-To: <1280166388.67.0.0667183564509.issue9387@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Mon, Jul 26, 2010 at 4:16 PM, ?ric Araujo wrote: .. > I lack context: Why is being able to run ?python -m tkinter? useful? The missing context is in issue 9384. I discovered that python -m tkinter did not work when I was looking for a simple way to demonstrate the tkinter pop-under bug. The demo code was already in the package but would not run using -m option. > Tests can be run directly or via regrtest, and I recall Guido saying that using modules as scripts > was an anti-pattern to him, i.e. sometimes useful but not always necessary. I have not heard it from Guido, but I agree with one exception. If the module contains doctests, it is useful to have doctest run boilerplate in the file. While regrtest runs most of the existing doctests, it does not discover them and there is no option to run doctests separately from unit tests as far as I know. Note that tkinter._test() is not really a test, it is a tiny demo program. (I am changing the title accordingly.) I think exposing it as python -m tkinter would provide one obvious way for users to see if they have working tkinter and what its widgets look like. ---------- title: Make python -m tkinter run tkinter test -> Make python -m tkinter run tkinter demo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 01:18:01 2010 From: report at bugs.python.org (Anders Kaseorg) Date: Mon, 26 Jul 2010 23:18:01 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1280186281.31.0.00394781535191.issue9334@psf.upfronthosting.co.za> Anders Kaseorg added the comment: > arguments = *(positional-argument / option) [-- *(positional-argument)] > positional-argument = string > option = foo-option / bar-option > foo-option = "--foo" string > bar-option = "--bar" Er, obviously positional arguments before the first ?--? can?t begin with a dash (I don?t think there?s any confusion over how those should work). arguments = *(non-dash-positional-argument / option) ["--" *(positional-argument)] non-dash-positional-argument = positional-argument = string The point was just that the grammar unambiguously allows the argument of --foo to be any string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 01:37:53 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 26 Jul 2010 23:37:53 +0000 Subject: [issue9387] Make python -m tkinter run tkinter demo In-Reply-To: <1280166388.67.0.0667183564509.issue9387@psf.upfronthosting.co.za> Message-ID: <1280187473.41.0.848108789286.issue9387@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for explaining. +1 on the patch. Maybe add a note in library/tkinter to explain this way of checking if the installation is right. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 02:13:15 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 00:13:15 +0000 Subject: [issue9387] Make python -m tkinter run tkinter demo In-Reply-To: <1280166388.67.0.0667183564509.issue9387@psf.upfronthosting.co.za> Message-ID: <1280189595.67.0.274997623158.issue9387@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: issue9387a.diff includes a note in library/tkinter.rst. The note can probably be improved. ---------- keywords: +patch Added file: http://bugs.python.org/file18217/issue9387a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 02:13:46 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 00:13:46 +0000 Subject: [issue9387] Make python -m tkinter run tkinter demo In-Reply-To: <1280166388.67.0.0667183564509.issue9387@psf.upfronthosting.co.za> Message-ID: <1280189626.91.0.807321168685.issue9387@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- resolution: -> accepted stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 03:20:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 01:20:23 +0000 Subject: [issue9384] Tkinter windows pop under the terminal in OSX In-Reply-To: <1280162701.76.0.316880678419.issue9384@psf.upfronthosting.co.za> Message-ID: <1280193623.3.0.624210022944.issue9384@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This is probably Tk issue, but there might me a way that tkinter can work around it. On OSX 10.6, the pre-installed /usr/bin/wish shows the same behavior, but mac ports' /opt/local/bin/wish works fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 03:32:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 01:32:09 +0000 Subject: [issue7962] Demo and Tools need to be tested and pruned In-Reply-To: <1266531589.82.0.915519058153.issue7962@psf.upfronthosting.co.za> Message-ID: <1280194329.86.0.381435210289.issue7962@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I wonder if it would be possible as a part of Demo and Tools clean-up to move them into packages under Lib. I would really like to be able to do $ python -m demo.turtle instead of (on a Mac) $ cd /Applications/Python\ 2.6/Extras/Demo/turtle/ $ python turtleDemo.py and I still cannot find where Apple decided to put Tools. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 03:45:54 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 27 Jul 2010 01:45:54 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1280195154.59.0.833739304881.issue1682942@psf.upfronthosting.co.za> Brian Curtin added the comment: I uploaded the current patch to Rietveld and reviewed it there, CC'ed ?ukasz. http://codereview.appspot.com/1848051/show is the link. I only gave the tests a once-over since they failed for not having the test file ?ukasz meant to include. I'll review those more in depth on the next patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 04:20:05 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 27 Jul 2010 02:20:05 +0000 Subject: [issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1280197205.3.0.551865960226.issue9299@psf.upfronthosting.co.za> Ray.Allen added the comment: I feel we do too much things in such a function if we change the mod the target directory to the mod we specified. Does anybody feel such behavior maybe dangerous? Because if the function success, we know nothing about weather we create a new directory or we convert an existing directory to the directory we need. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 04:55:23 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 27 Jul 2010 02:55:23 +0000 Subject: [issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1280199323.69.0.795686174143.issue9299@psf.upfronthosting.co.za> Terry J. Reedy added the comment: What does mkdir -p do, which would at least be a starting point? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 05:36:47 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 27 Jul 2010 03:36:47 +0000 Subject: [issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1280201807.61.0.215862071041.issue9299@psf.upfronthosting.co.za> Ray.Allen added the comment: I want to explain "mkdir -p" as this: We want to create a specified directory, if such a directory doesn't exist, then create it. If such a directory already exists, then we have already reached our goal, do nothing. While we port this function to os.makedir(), there is a more specified information of the target directory, the "mode". If the target directory already exists but with a different mode, we need not create it, but we haven't reach our goal, yet. So we can raise a exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 05:56:41 2010 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 27 Jul 2010 03:56:41 +0000 Subject: [issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1280203001.86.0.712838108607.issue9299@psf.upfronthosting.co.za> Changes by Guido van Rossum : ---------- nosy: -gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 05:58:44 2010 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Jul 2010 03:58:44 +0000 Subject: [issue7962] Demo and Tools need to be tested and pruned In-Reply-To: <1266531589.82.0.915519058153.issue7962@psf.upfronthosting.co.za> Message-ID: <1280203124.59.0.686144477353.issue7962@psf.upfronthosting.co.za> Ned Deily added the comment: "instead of (on a Mac) $ cd /Applications/Python\ 2.6/Extras/Demo/turtle/ $ python turtleDemo.py and I still cannot find where Apple decided to put Tools." This has nothing to do with Apple. "/Applications/Python x.y" is created by the python.org OS X installer, not supplied by Apple. See Mac/BuildScript/build-installer.py for the details. AFAIK, the Tools directory is currently not installed by the OS X installer. Should it be? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 06:09:16 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 04:09:16 +0000 Subject: [issue9388] locale documentation describes non-existing ERA_YEAR constant In-Reply-To: <1280203756.3.0.102200795898.issue9388@psf.upfronthosting.co.za> Message-ID: <1280203756.3.0.102200795898.issue9388@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Grepping through the source tree, reveals a single match for ERA_YEAR: Doc/library/locale.rst:247: .. data:: ERA_YEAR Google search for it shows an OpenSolaris bug report that explains the origin of this constant: """ There appears to be an IBM-private field in _LC_time_t struct, era_year. We should remove "era_year" from the _LC_time_t struct. This should only affect the LC_TIME functions, localedef command, and locale objects. (nl_langinfo and langinfo.h are unaffected because they don't reference era_year.) """ I believe this entry should simply be removed. ---------- assignee: docs at python components: Documentation keywords: easy messages: 111683 nosy: belopolsky, docs at python priority: normal severity: normal stage: needs patch status: open title: locale documentation describes non-existing ERA_YEAR constant versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 06:18:44 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 04:18:44 +0000 Subject: [issue7962] Demo and Tools need to be tested and pruned In-Reply-To: <1280203124.59.0.686144477353.issue7962@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Mon, Jul 26, 2010 at 11:58 PM, Ned Deily wrote: .. > This has nothing to do with Apple. ?"/Applications/Python x.y" is created by the python.org OS X > installer, not supplied by Apple. ?See Mac/BuildScript/build-installer.py for the details. Does this mean that Apple distributes neither Tools nor Demo? That would be another reason to move anything anyone cares about to Lib. > ?AFAIK, the Tools directory is currently not installed by the OS X installer. ?Should it be? Probably not all of it. Moving to "tools" package would give an opportunity to select which tools are only of interest to those working with python source and which are of general utility. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 06:32:41 2010 From: report at bugs.python.org (Guy) Date: Tue, 27 Jul 2010 04:32:41 +0000 Subject: [issue9389] Traceback: Exception Shows Code that's On-Disk (Not in memory) In-Reply-To: <1280205161.63.0.842402205651.issue9389@psf.upfronthosting.co.za> Message-ID: <1280205161.63.0.842402205651.issue9389@psf.upfronthosting.co.za> New submission from Guy : When an exception is raised and Python's showing a traceback, the lines of the Python scripts are that of those on-disk, not in memory. For example, if I run a Python script which raises an exception, but I edit the line the exception occurs on and save the script in the same location, the new line (The one that's not interpreted), will be shown in the traceback. ---------- components: Interpreter Core messages: 111685 nosy: Guy priority: normal severity: normal status: open title: Traceback: Exception Shows Code that's On-Disk (Not in memory) type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 06:50:28 2010 From: report at bugs.python.org (Ned Deily) Date: Tue, 27 Jul 2010 04:50:28 +0000 Subject: [issue7962] Demo and Tools need to be tested and pruned In-Reply-To: <1266531589.82.0.915519058153.issue7962@psf.upfronthosting.co.za> Message-ID: <1280206228.69.0.204207365545.issue7962@psf.upfronthosting.co.za> Ned Deily added the comment: >Does this mean that Apple distributes neither Tools nor Demo? That >would be another reason to move anything anyone cares about to Lib. I believe that neither are included in the Apple-supplied Python in OS X, which resides primarily in /System/Library/Frameworks/Python.framework. In recent OS releases, Apple seems to have taken their cue from the python.org installer framework layouts but tweaked things somewhat. Ronald may have more insight and/or an opinion on this. He's also had some contact with the people inside Apple. ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 07:18:44 2010 From: report at bugs.python.org (Michael Stephens) Date: Tue, 27 Jul 2010 05:18:44 +0000 Subject: [issue6325] robotparser doesn't handle URL's with query strings In-Reply-To: <1245731150.83.0.504271486523.issue6325@psf.upfronthosting.co.za> Message-ID: <1280207924.92.0.599113427743.issue6325@psf.upfronthosting.co.za> Michael Stephens added the comment: Supplied patch matches rules with query params. ---------- keywords: +patch nosy: +mikejs Added file: http://bugs.python.org/file18218/6325.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 07:49:27 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 27 Jul 2010 05:49:27 +0000 Subject: [issue7962] Demo and Tools need to be tested and pruned In-Reply-To: <1266531589.82.0.915519058153.issue7962@psf.upfronthosting.co.za> Message-ID: <1280209767.75.0.583270728433.issue7962@psf.upfronthosting.co.za> Ronald Oussoren added the comment: What Apple does and doesn't ship is not important for this discussion. FWIW: Apple doesn't ship any of the GUI wrappers installed in /Applications, although they seem to ship Applet Builder as part of Developer tools (beets my why the bother). They don't ship any of the examples or tools, and don't ship documentation as well. Our OSX installer does install most of these, on the assumption that anything that is part of the source distribution might be of interest for users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 07:54:36 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 27 Jul 2010 05:54:36 +0000 Subject: [issue9384] Tkinter windows pop under the terminal in OSX In-Reply-To: <1280162701.76.0.316880678419.issue9384@psf.upfronthosting.co.za> Message-ID: <1280210076.91.0.404579647596.issue9384@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I was more interested in the other problem you mentioned about "pydoc -g" crashing when you search for something. Does "pydoc -k" also crash? The -g option works for me, working or not working depends on the set of installed python packages as the search option, like "pydoc -k", searches through the docstrings of all availables modules/packages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 11:05:38 2010 From: report at bugs.python.org (Greg Brockman) Date: Tue, 27 Jul 2010 09:05:38 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1280221538.41.0.58357192877.issue9205@psf.upfronthosting.co.za> Greg Brockman added the comment: > You can't have a sensible default timeout, because the worker may be > processing something important... In my case, the jobs are either functional or idempotent anyway, so aborting halfway through isn't a problem. In general though, I'm not sure what kinds of use cases would tolerate silently-dropped jobs. And for example, if an OOM kill has just occurred, then you're already in a state where a job was unexpectedly terminated... you wouldn't be violating any more contracts by aborting. In general, I can't help but feel that the approach of "ignore errors and keep going" leads to rather unexpected bugs (and in this case, it leads to infinite hangs). But even in languages where errors are ignored by default (e.g. sh), there are mechanisms for turning on abort-on-error handlers (e.g. set -e). So my response is yes, you're right that there's no great default here. However, I think it'd be worth (at least) letting the user specify "if something goes wrong, then abort". Keep in mind that this will only happen in very exceptional circumstances anyway. > Not everything can be simple. Sure, but given the choice between a simple solution and a complex one, all else being equal the simple one is desirable. And in this case, the more complicated mechanism seems to introduce subtle race conditions and failures modes. Anyway, Jesse, it's been a while since we've heard anything from you... do you have thoughts on these issues? It would probably be useful to get a fresh opinion :). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 11:37:41 2010 From: report at bugs.python.org (Steven Bethard) Date: Tue, 27 Jul 2010 09:37:41 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1280223461.34.0.798585138576.issue9334@psf.upfronthosting.co.za> Steven Bethard added the comment: It *would* be a backwards incompatible change. Currently, if I have a parser with both a "--foo" and a "--bar" option, and my user types "--foo --bar", they get an error saying that they were missing the argument to "--foo". Under your proposal, the "--foo" option will now silently consume the "--bar" option without an error. I know this is good from your perspective, but it would definitely break some of my scripts, and I imagine it would break other people's scripts as well. As I keep saying, I'm happy to add your alternative parsing as an option (assuming you provide a patch), but I really don't think it's the right thing to do by default. Most command line programs don't have options that take other option-like things as arguments (which is the source of your problem), so in most command line programs, people want an error when they get an option they don't recognize or an option that's missing its argument. Under your proposal, more such errors will pass silently and will have to be caught by additional code in the script. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 11:48:44 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 27 Jul 2010 09:48:44 +0000 Subject: [issue9387] Make python -m tkinter run tkinter demo In-Reply-To: <1280166388.67.0.0667183564509.issue9387@psf.upfronthosting.co.za> Message-ID: <1280224124.42.0.809590774224.issue9387@psf.upfronthosting.co.za> ?ric Araujo added the comment: The note seems fine to me. I?d used a semicolon, not a period, but that?s just me. You want to use `` to mark up code, not `. Aside: I?ve been told before not to do wrapping or whitespace changes unrelated to the object of my patch, to ease review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 11:58:09 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 27 Jul 2010 09:58:09 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1280224689.57.0.6121113411.issue1682942@psf.upfronthosting.co.za> Changes by ?ukasz Langa : Removed file: http://bugs.python.org/file18216/issue1682942.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 12:01:10 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 27 Jul 2010 10:01:10 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1280224870.24.0.959633722876.issue1682942@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Updated the patch after review by Brian Curtin and Alexander Belopolsky. All remarks addressed, I think it's ready for inclusion. ---------- Added file: http://bugs.python.org/file18219/issue1682942.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 13:12:16 2010 From: report at bugs.python.org (Andreas Balogh) Date: Tue, 27 Jul 2010 11:12:16 +0000 Subject: [issue7198] csv.writer In-Reply-To: <1256422121.38.0.499052368843.issue7198@psf.upfronthosting.co.za> Message-ID: <1280229136.06.0.184681348717.issue7198@psf.upfronthosting.co.za> Andreas Balogh added the comment: I encountered the same problem. It is unclear that using binary mode for the file is solving the problem. I suggest to add a hint to the documentation. ---------- nosy: +baloan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 14:51:29 2010 From: report at bugs.python.org (sorin) Date: Tue, 27 Jul 2010 12:51:29 +0000 Subject: [issue9390] Error in sys.excepthook on windows when redirecting output of the script In-Reply-To: <1280235089.13.0.870066677678.issue9390@psf.upfronthosting.co.za> Message-ID: <1280235089.13.0.870066677678.issue9390@psf.upfronthosting.co.za> New submission from sorin : create a test.py with this content: print("test") run this file from command line by redirecting the output: test.py >out.log You get: ---- close failed in file object destructor: Error in sys.excepthook: Original exception was: ---- This does not happen if you call the script by using "python test.py >out.log" Also this does not reproduce with Python 3.1 but it does reproduce with latest Python 2.6 and 2.7 under windows. You can switch the registered python interpreter via registry key: [HKEY_CLASSES_ROOT\Python.File\shell\open\command] @="\"C:\\lib\\Python27\\python.exe\" \"%1\" %*" ---------- components: Windows messages: 111695 nosy: sorin priority: normal severity: normal status: open title: Error in sys.excepthook on windows when redirecting output of the script type: crash versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 16:15:20 2010 From: report at bugs.python.org (Jesse Noller) Date: Tue, 27 Jul 2010 14:15:20 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1280240120.32.0.678238722187.issue9205@psf.upfronthosting.co.za> Jesse Noller added the comment: You two are bigger users of this then I currently am (the curse/blessing of switching jobs), which is why I've let you hash it out. Let me point out: my goal is to deal with errors in a way which does not cause a total crash, a lockup, or hanging processes. Whether or not we lose jobs is another thing entirely, and something I'm torn on. I also need to mention - I think we can add fixes to the behavior to 2.7 - we can not, however, change the API. If we change the API, this fix will be only on Python 3.2 which is not what I suspect either of you want. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 16:16:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 14:16:56 +0000 Subject: [issue9387] Make python -m tkinter run tkinter demo In-Reply-To: <1280166388.67.0.0667183564509.issue9387@psf.upfronthosting.co.za> Message-ID: <1280240216.73.0.917023728517.issue9387@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed with changes suggested by ?ric in r83177. ---------- resolution: accepted -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 16:38:49 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 14:38:49 +0000 Subject: [issue9384] Tkinter windows pop under the terminal in OSX In-Reply-To: <1280210076.91.0.404579647596.issue9384@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Tue, Jul 27, 2010 at 1:54 AM, Ronald Oussoren wrote: .. > Does "pydoc -k" also crash? Yes, it does: $ ./python.exe -m pydoc -k xyz lib2to3.fixes.fix_repr - Fixer that transforms `xyzzy` into repr(xyzzy). Segmentation fault but this is not an OSX specific issue. I believe this is the same as issue9319. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 16:44:51 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 27 Jul 2010 14:44:51 +0000 Subject: [issue9387] Make python -m tkinter run tkinter demo In-Reply-To: <1280166388.67.0.0667183564509.issue9387@psf.upfronthosting.co.za> Message-ID: <1280241891.29.0.179174090144.issue9387@psf.upfronthosting.co.za> ?ric Araujo added the comment: BTW, why is the sys.argv hackery necessary? Does import or runpy or something force us to jump through hoops? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 17:00:52 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 15:00:52 +0000 Subject: [issue7962] Demo and Tools need to be tested and pruned In-Reply-To: <1280209767.75.0.583270728433.issue7962@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Tue, Jul 27, 2010 at 1:49 AM, Ronald Oussoren wrote: .. > What Apple does and doesn't ship is not important for this discussion. > I agree. I used Apple as an example because I happened to post from an Apple laptop. I am sure it is similarly hard to find demo programs on every other OS and there is no consistency between different distributions. However they do ship Lib/test. This tells me that they don't try to prune Lib and I think most distributions similarly ship Lib as is. > Our OSX installer does install most of these, on the assumption that anything that is part of the > source distribution might be of interest for users. Installing some of the tools (and I don't think any demos are installed that way) next to python executable presents a namespace problem. Since tools are not consistently prefixed with 'py', they may conflict with system or user tools that happen to be in the path. Support for multiple python versions is also somewhat ad hoc. For example, on my system I have 2to3, 2to32.6 and 2to3-3.1. I do agree that 2to3-3.1 is an improvement over 2to32.6, but how can I guess that idle2.6 gets upgraded to idle3.1 rather than idle-3.1? With -m approach, all I need to know is how to start python of the desired version: python, python2.6, or even ./python.exe from the root of the development tree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 17:10:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 15:10:56 +0000 Subject: [issue9387] Make python -m tkinter run tkinter demo In-Reply-To: <1280241891.29.0.179174090144.issue9387@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Tue, Jul 27, 2010 at 10:44 AM, ?ric Araujo wrote: > > ?ric Araujo added the comment: > > BTW, why is the sys.argv hackery necessary? > Does import or runpy or something force us to jump through hoops? I guess we need to ask benjamin.peterson or michael.foord. I just copied the hack from unittest/__main__.py. I believe this is done in order to convince optparse to print "python -m modname" rather than "modname.py" in the python -m modname -h output. Of course, tkinter does not support -h (yet?), but I thought it would be better to maintain consistency in how __main__.py is written. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 17:11:24 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 15:11:24 +0000 Subject: [issue9387] Make python -m tkinter run tkinter demo In-Reply-To: <1280166388.67.0.0667183564509.issue9387@psf.upfronthosting.co.za> Message-ID: <1280243484.96.0.881893177684.issue9387@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +benjamin.peterson, michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 17:13:04 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 27 Jul 2010 15:13:04 +0000 Subject: [issue1886] Permit to easily use distutils "--formats=tar, gztar, bztar" on all systems In-Reply-To: <1200950920.27.0.810221024065.issue1886@psf.upfronthosting.co.za> Message-ID: <1280243584.07.0.0939757853381.issue1886@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: -> tarek nosy: +merwok, tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 17:19:52 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 27 Jul 2010 15:19:52 +0000 Subject: [issue5544] test_fileio fails on windows MSVC Assertion In-Reply-To: <1237824452.26.0.278609096502.issue5544@psf.upfronthosting.co.za> Message-ID: <1280243992.6.0.389063176179.issue5544@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 17:48:04 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 27 Jul 2010 15:48:04 +0000 Subject: [issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1280245684.75.0.896503091061.issue9299@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If I understand, this makes the change minimal: exist_ok means that if *name* already exists as a directory with the specified permissions, then do not raise an error. OK with me. Make sure doc and doc string say something like that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 18:02:46 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 16:02:46 +0000 Subject: [issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1280246566.1.0.304060168614.issue9299@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > if *name* already exists as a directory with the specified > permissions, then do not raise an error. AFAICT, the code in the patch does not check permissions of the existing path(s) or even whether it is a directory or not. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 18:08:34 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 27 Jul 2010 16:08:34 +0000 Subject: [issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1280246914.61.0.567841827933.issue9299@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Yes, Arfrever brought that up and the question now is whether and how to revise it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 18:11:16 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 27 Jul 2010 16:11:16 +0000 Subject: [issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1280247076.02.0.560023578952.issue9299@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: 'mkdir -p' prints error when target exists and is non-directory: $ cd /tmp $ touch file $ mkdir -p file mkdir: cannot create directory `file': File exists ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 19:07:18 2010 From: report at bugs.python.org (Greg Brockman) Date: Tue, 27 Jul 2010 17:07:18 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1280250438.35.0.39828780963.issue9205@psf.upfronthosting.co.za> Greg Brockman added the comment: Thanks for the comment. It's good to know what constraints we have to deal with. > we can not, however, change the API. Does this include adding optional arguments? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 19:29:36 2010 From: report at bugs.python.org (jeff) Date: Tue, 27 Jul 2010 17:29:36 +0000 Subject: [issue3874] documentation bug: HTMLParser needs to document unknown_decl In-Reply-To: <1276813832.54.0.751318282558.issue3874@psf.upfronthosting.co.za> Message-ID: jeff added the comment: On Thu, Jun 17, 2010 at 3:30 PM, Terry J. Reedy wrote: > In order for the doc maintainers to add an entry, someone knowledgeable must write it. Your paragraph of explanation is a start, but more editing is needed. > > Looking at dir(html.parser.HTMLParser) and help(...), I see that there are several public internal methods. Some have doc strings that show up with help(), some do not. I thing all should. Some are defined on HTMLParser and some inherited from the undocumented (I believe) _markupbase.ParserBase. > > I see that there are also several (completely undocumented except fir dir()) private ('_xyz') internal methods. This implies to me that the public internal methods were made public rather than private because there might be reason to override them. If so, perhaps there should be a new subsection on public internal methods to explain what is what with them. What do you think? Document just one, some, or all? Terry, I'm looking at the HTMLParser code, and I only see unknown_decl as a method in there that is: a) not marked as internal or doing a lot, b) not documented. There are a number of methods which should probably be refactored to be _methodname rather than methodname, but that's beyond the scope of this report. HTMLParser.unknown_decl(data)? Method called when an unrecognized SGML declaration is read by the parser. The data parameter will be the entire contents of the declaration inside the markup. It is sometimes useful to be be overridden by a derived class; the base class implementation throws an HTMLParseError. There may be other undocumented methods showing up, but if so they're part of a parent class. Thanks, Jeff ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 20:14:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 18:14:32 +0000 Subject: [issue5109] array.array constructor very slow when passed an array object. In-Reply-To: <1233318806.98.0.166527784762.issue5109@psf.upfronthosting.co.za> Message-ID: <1280254472.45.0.592277505312.issue5109@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am replacing issue5109.diff with an updated version (white space only changes). Does anyone object to this change or need more time to review? ---------- components: +Extension Modules -Library (Lib) resolution: -> accepted stage: patch review -> commit review versions: +Python 3.2 Added file: http://bugs.python.org/file18220/issue5109.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 20:14:38 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 18:14:38 +0000 Subject: [issue5109] array.array constructor very slow when passed an array object. In-Reply-To: <1233318806.98.0.166527784762.issue5109@psf.upfronthosting.co.za> Message-ID: <1280254478.39.0.42302069138.issue5109@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17157/issue5109.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 20:24:10 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 18:24:10 +0000 Subject: [issue1170] shlex have problems with parsing unicode In-Reply-To: <1190045833.27.0.172281845017.issue1170@psf.upfronthosting.co.za> Message-ID: <1280255050.85.0.490040202757.issue1170@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Fernando, Is this 2.7 only problem? In 3.2 >>> list(shlex.shlex('ab')) ['ab'] and bytes are not supported. >> list(shlex.shlex(b'ab')) Traceback (most recent call last): .. AttributeError: 'bytes' object has no attribute 'read' It is debatable whether either is a bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 20:26:53 2010 From: report at bugs.python.org (Fernando Perez) Date: Tue, 27 Jul 2010 18:26:53 +0000 Subject: [issue1170] shlex have problems with parsing unicode In-Reply-To: <1190045833.27.0.172281845017.issue1170@psf.upfronthosting.co.za> Message-ID: <1280255213.08.0.964222158358.issue1170@psf.upfronthosting.co.za> Fernando Perez added the comment: Yes, sorry that I failed to mention the example I gave applies only to 2.x, not to 3.x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 20:29:43 2010 From: report at bugs.python.org (Anthony Long) Date: Tue, 27 Jul 2010 18:29:43 +0000 Subject: [issue9391] Allow docstrings on dicts and named tuples outside of functions or classes. In-Reply-To: <1280255383.56.0.833674044306.issue9391@psf.upfronthosting.co.za> Message-ID: <1280255383.56.0.833674044306.issue9391@psf.upfronthosting.co.za> New submission from Anthony Long : I would like to add docstrings to dicts and named tuples. Dicts can be used to hold many different kinds of information, and docstrings would help to shed light on what the dict does to others. Named tuples also should have docstrings, since they can also include information which can be explained it great detail within docstrings. ---------- components: Interpreter Core messages: 111711 nosy: antlong priority: normal severity: normal status: open title: Allow docstrings on dicts and named tuples outside of functions or classes. type: feature request versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 20:35:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 18:35:18 +0000 Subject: [issue9391] Allow docstrings on dicts and named tuples outside of functions or classes. In-Reply-To: <1280255383.56.0.833674044306.issue9391@psf.upfronthosting.co.za> Message-ID: <1280255718.6.0.141326591671.issue9391@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: -1 on dicts You can simply subclass from dict to add docs. I think you can add docs to named tuples even without subclassing, but I need to check. ---------- nosy: +belopolsky versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 20:44:17 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 18:44:17 +0000 Subject: [issue9391] Allow docstrings on dicts and named tuples outside of functions or classes. In-Reply-To: <1280255383.56.0.833674044306.issue9391@psf.upfronthosting.co.za> Message-ID: <1280256257.65.0.927737060498.issue9391@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Indeed, namedtuple auto-generates a doc-string and does not provide a way to customize it. It sounds reasonable to add a doc argument to namedtuple() function that would control __doc__ of the result. I am +0 on that. ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 20:44:42 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 27 Jul 2010 18:44:42 +0000 Subject: [issue3874] documentation bug: HTMLParser needs to document unknown_decl In-Reply-To: <1221515609.61.0.396859142368.issue3874@psf.upfronthosting.co.za> Message-ID: <1280256282.26.0.62167644202.issue3874@psf.upfronthosting.co.za> Terry J. Reedy added the comment: OK, your recommendation is to add one entry with the text suggested in the message. Given the name, the text seems reasonable. I will leave it to a doc person to format and apply. ---------- keywords: +patch stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 20:46:52 2010 From: report at bugs.python.org (Ron Adam) Date: Tue, 27 Jul 2010 18:46:52 +0000 Subject: [issue7330] PyUnicode_FromFormat segfault In-Reply-To: <1258314153.95.0.978747695294.issue7330@psf.upfronthosting.co.za> Message-ID: <1280256412.1.0.545280602567.issue7330@psf.upfronthosting.co.za> Changes by Ron Adam : ---------- nosy: +ron_adam title: PyUnicode_FromFormat segfault when using widths. -> PyUnicode_FromFormat segfault _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 20:48:23 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 27 Jul 2010 18:48:23 +0000 Subject: [issue9391] Allow docstrings on dicts and named tuples outside of functions or classes. In-Reply-To: <1280255383.56.0.833674044306.issue9391@psf.upfronthosting.co.za> Message-ID: <1280256503.29.0.374870803038.issue9391@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm also -1 on dicts -- just use a second dict to hold docstings. Can you elaborate on your proposal for named tuples? Keep in mind that the API is already somewhat complex and should not be expanded lightly. Also, the whole point of named tuples is to allow you to assign attribute names that are self-documenting (otherwise, you would just use t[0], t[1], etc). So, I'm not sure what the benefit would be for overriding the existing, auto-generated docstring which already gives some useful information (i.e. the position index of the attribute). ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 20:52:46 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 18:52:46 +0000 Subject: [issue1170] shlex have problems with parsing unicode In-Reply-To: <1280255213.08.0.964222158358.issue1170@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Tue, Jul 27, 2010 at 2:26 PM, Fernando Perez wrote: .. > Yes, sorry that I failed to mention the example I gave applies only to 2.x, not to 3.x. Why do you expect shlex to work with unicode in 2.x? The documentation clearly says that the argument should be a string. Supporting unicode is not an unreasonable RFE, but won't be considered for 2.x anymore. What's your take on accepting bytes in 3.x? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 21:02:38 2010 From: report at bugs.python.org (Fernando Perez) Date: Tue, 27 Jul 2010 19:02:38 +0000 Subject: [issue1170] shlex have problems with parsing unicode In-Reply-To: <1190045833.27.0.172281845017.issue1170@psf.upfronthosting.co.za> Message-ID: <1280257358.95.0.310518352035.issue1170@psf.upfronthosting.co.za> Fernando Perez added the comment: On Tue, Jul 27, 2010 at 11:52, Alexander Belopolsky wrote: > Why do you expect shlex to work with unicode in 2.x? =A0The > documentation clearly says that the argument should be a string. > Supporting unicode is not an unreasonable RFE, but won't be considered > for 2.x anymore. Well, I didn't make the original report, just provided a short, illustrative example :) It's easy enough to work around the issue for 2.x that I don't care too much about it, so I have no problem with 2.x staying as it is. > What's your take on accepting bytes in 3.x? Mmh... Not too sure. I'd think about it from the perspective of what possible sources of input could produce raw bytes, that would be reasonable use cases for shlex. Is it common in 3.x to read a file in bytes mode? If so, then it might be a good reason to have shlex parse bytes as well, since I can imagine reading inputs from files to be parsed via shlex. But take my opinion on 3.x with a big grain of salt, I have very little experience with it as of yet. Cheers, f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 21:04:20 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 27 Jul 2010 19:04:20 +0000 Subject: [issue1170] shlex have problems with parsing unicode In-Reply-To: <1190045833.27.0.172281845017.issue1170@psf.upfronthosting.co.za> Message-ID: <1280257460.01.0.106285591675.issue1170@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 on get shlex to work better with Unicode. The core concepts of this module are general purpose and applicable to all kinds of text. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 21:07:15 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 19:07:15 +0000 Subject: [issue1170] shlex have problems with parsing unicode In-Reply-To: <1280257460.01.0.106285591675.issue1170@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Tue, Jul 27, 2010 at 3:04 PM, Raymond Hettinger wrote: > > Raymond Hettinger added the comment: > > +1 on get shlex to work better with Unicode. In 2.7.x? It more or less works in 3.x already. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 21:35:37 2010 From: report at bugs.python.org (Anthony Foglia) Date: Tue, 27 Jul 2010 19:35:37 +0000 Subject: [issue9391] Allow docstrings on dicts and named tuples outside of functions or classes. In-Reply-To: <1280255383.56.0.833674044306.issue9391@psf.upfronthosting.co.za> Message-ID: <1280259337.25.0.777007800543.issue9391@psf.upfronthosting.co.za> Anthony Foglia added the comment: I could see adding a doc parameter to the collections.namedtuple. So that --- >>> Point = collections.namedtuple("Point", ("x", "y"), doc="My point class") >>> Point.__doc__ My point class --- (Or it could keep the currently created docstring and append the new doc after an empty line.) --- >>> Point = collections.namedtuple("Point", ("x", "y"), doc="My point class") >>> Point.__doc__ Point(x, y) My point class --- That being said, I can't think of a strong use case. If you care enough to add a docstring, you're probably making a type used repeatedly in the code. In that case, you can just use the verbose parameter and paste the definition into your code. I'm still in favor of it, simply because it would be a nice parameter to have, but I don't think it's important. ---------- nosy: +afoglia _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 21:51:30 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 27 Jul 2010 19:51:30 +0000 Subject: [issue9392] 2.7 framework install doesn't create 2to3-2.7 In-Reply-To: <1280260290.87.0.060778319608.issue9392@psf.upfronthosting.co.za> Message-ID: <1280260290.87.0.060778319608.issue9392@psf.upfronthosting.co.za> New submission from Ronald Oussoren : Framework installs ensure that all tools and scripts are installed using versioned names (as well as the regular names) to make it easier to use multiple versions of python side by side. The 2.7 tree fails to create a versioned name of the 2to3 tool (while 2.6, 3.1 and 3.2 do) I have a patch and will commit that once I've tested it. ---------- assignee: ronaldoussoren components: Macintosh messages: 111721 nosy: ronaldoussoren priority: normal severity: normal status: open title: 2.7 framework install doesn't create 2to3-2.7 versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 21:56:15 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 27 Jul 2010 19:56:15 +0000 Subject: [issue9391] Allow docstrings on dicts and named tuples outside of functions or classes. In-Reply-To: <1280255383.56.0.833674044306.issue9391@psf.upfronthosting.co.za> Message-ID: <1280260575.24.0.444617955864.issue9391@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for the idea and quick reply. In view of the discussion, I'm going to reject the feature request. The trade-off in added API complexity isn't worth the benefit especially given that subclassing already provides an option: class Point(namedtuple('Point', 'x y z')): """Planet location with Sun as center point and x-axis passing through Alpha Centauri and distance measured in light seconds""" ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 22:14:42 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 27 Jul 2010 20:14:42 +0000 Subject: [issue5136] Deprecating (and removing) "globalcall", "merge" and "globaleval" In-Reply-To: <1233623088.62.0.412008570682.issue5136@psf.upfronthosting.co.za> Message-ID: <1280261682.98.0.0676904678132.issue5136@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is it still possible to get this into 3.2 and have them remove in 3.3? ---------- type: -> feature request versions: +Python 3.2 -Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 22:19:12 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 27 Jul 2010 20:19:12 +0000 Subject: [issue4849] instantiating and populating xml.dom.minidom.Element is cumbersome In-Reply-To: <1231182515.38.0.572857860756.issue4849@psf.upfronthosting.co.za> Message-ID: <1280261952.43.0.116961745314.issue4849@psf.upfronthosting.co.za> Mark Lawrence added the comment: I think this could be sneaked into 3.2 if needed, but is it more work than the benefits actually deliver in the real world? ---------- stage: -> needs patch type: behavior -> feature request versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 22:31:09 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 27 Jul 2010 20:31:09 +0000 Subject: [issue1479626] Uninstall does not clean registry Message-ID: <1280262669.72.0.796731467588.issue1479626@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could one of our windows gurus coment on this please. ---------- nosy: +brian.curtin, tim.golden versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 22:35:03 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 27 Jul 2010 20:35:03 +0000 Subject: [issue1778410] removeTest() method patch for unittest.TestSuite Message-ID: <1280262903.01.0.189611846712.issue1778410@psf.upfronthosting.co.za> Mark Lawrence added the comment: As nobody has responded to msg53044 or msg108206 I'll close this unless there are any objections. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 22:38:07 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 27 Jul 2010 20:38:07 +0000 Subject: [issue1776674] glob.glob inconsistent Message-ID: <1280263087.53.0.364876417102.issue1776674@psf.upfronthosting.co.za> Mark Lawrence added the comment: As no response to msg108627 I'll close this unless there are any objections. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 22:45:19 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 27 Jul 2010 20:45:19 +0000 Subject: [issue1776674] glob.glob inconsistent Message-ID: <1280263519.73.0.767098162546.issue1776674@psf.upfronthosting.co.za> ?ric Araujo added the comment: Some bugs take a long time to get fixed. I agree that three years is not a good score, but this really needs a test in order to get closed or fixed, so I?m reopening. Maybe the OP or you could add a test? :) ---------- nosy: +merwok status: pending -> open versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 22:48:11 2010 From: report at bugs.python.org (Florent Xicluna) Date: Tue, 27 Jul 2010 20:48:11 +0000 Subject: [issue7825] test_threadsignals leaks references In-Reply-To: <1264981703.5.0.296078231343.issue7825@psf.upfronthosting.co.za> Message-ID: <1280263691.63.0.833046599943.issue7825@psf.upfronthosting.co.za> Florent Xicluna added the comment: I did not commit the patch because I'm not sure it is the right approach. I need someone else to comment on this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 22:54:12 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 27 Jul 2010 20:54:12 +0000 Subject: [issue3966] Win32ErrorTests from test_os.py In-Reply-To: <1222367750.46.0.164641457334.issue3966@psf.upfronthosting.co.za> Message-ID: <1280264052.76.0.893052945583.issue3966@psf.upfronthosting.co.za> Mark Lawrence added the comment: Already fixed in 2.7, 3.1 and 3.2. ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 22:58:47 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 27 Jul 2010 20:58:47 +0000 Subject: [issue3966] Win32ErrorTests from test_os.py In-Reply-To: <1222367750.46.0.164641457334.issue3966@psf.upfronthosting.co.za> Message-ID: <1280264327.33.0.414837134867.issue3966@psf.upfronthosting.co.za> ?ric Araujo added the comment: Nice catch Roumen. Mark, can you tell which revisions the bug was fixed in? (writing ?rNNN? or ?rev NNN? will generate appropriate links) Thanks. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 23:01:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 27 Jul 2010 21:01:16 +0000 Subject: [issue1778410] removeTest() method patch for unittest.TestSuite Message-ID: <1280264476.89.0.365230627596.issue1778410@psf.upfronthosting.co.za> ?ric Araujo added the comment: Michael, can you say if the feature request is accepted or rejected? ---------- nosy: +merwok stage: unit test needed -> status: pending -> open versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 23:28:30 2010 From: report at bugs.python.org (Florent Xicluna) Date: Tue, 27 Jul 2010 21:28:30 +0000 Subject: [issue4770] binascii module, inconsistent behavior: some functions accept unicode string input In-Reply-To: <1230573653.7.0.91596129114.issue4770@psf.upfronthosting.co.za> Message-ID: <1280266110.24.0.747838698125.issue4770@psf.upfronthosting.co.za> Florent Xicluna added the comment: Fixed with r83182. ---------- assignee: -> flox resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jul 27 23:47:51 2010 From: report at bugs.python.org (Florent Xicluna) Date: Tue, 27 Jul 2010 21:47:51 +0000 Subject: [issue8966] ctypes: remove implicit conversion between unicode and bytes In-Reply-To: <1276211007.74.0.406425558952.issue8966@psf.upfronthosting.co.za> Message-ID: <1280267271.8.0.0644079846029.issue8966@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 00:10:51 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 27 Jul 2010 22:10:51 +0000 Subject: [issue9294] Dead code in Objects/object.c In-Reply-To: <1279464944.67.0.616745975029.issue9294@psf.upfronthosting.co.za> Message-ID: <1280268651.6.0.506129067785.issue9294@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you! The patch was committed in r83184 (py3k) and r83185 (3.1). ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 00:12:32 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 27 Jul 2010 22:12:32 +0000 Subject: [issue9378] Make python -m pickle do something useful In-Reply-To: <1280085155.28.0.122928002341.issue9378@psf.upfronthosting.co.za> Message-ID: <1280268752.44.0.722742052874.issue9378@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I haven't tested, but it looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 00:16:14 2010 From: report at bugs.python.org (Florent Xicluna) Date: Tue, 27 Jul 2010 22:16:14 +0000 Subject: [issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before) In-Reply-To: <1279530588.62.0.226192140376.issue9301@psf.upfronthosting.co.za> Message-ID: <1280268974.5.0.843750111318.issue9301@psf.upfronthosting.co.za> Florent Xicluna added the comment: For 3.2, there's some other corner cases which are not covered by the patch. Example: >>> unquote(()) >>> unquote({}) See attached patch. ---------- keywords: +patch stage: committed/rejected -> commit review status: closed -> open versions: +Python 3.2 -Python 2.7 Added file: http://bugs.python.org/file18221/issue9301_unquote.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 00:20:41 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 27 Jul 2010 22:20:41 +0000 Subject: [issue9246] os.getcwd() hardcodes max path len In-Reply-To: <1279023059.26.0.245683093399.issue9246@psf.upfronthosting.co.za> Message-ID: <1280269241.07.0.128996533604.issue9246@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It's not ok to call PyMem_* functions when the GIL is released. You should only release the GIL around the call to the system getcwd(). > I suppose that Python has a faster memory allocator, or that it has > better checks when compiled with pydebug? In this case it doesn't really make a difference, since all allocations larger than 256 bytes are delegated to the system allocator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 00:24:26 2010 From: report at bugs.python.org (Mark Lawrence) Date: Tue, 27 Jul 2010 22:24:26 +0000 Subject: [issue3966] Win32ErrorTests from test_os.py In-Reply-To: <1222367750.46.0.164641457334.issue3966@psf.upfronthosting.co.za> Message-ID: <1280269466.54.0.929053041657.issue3966@psf.upfronthosting.co.za> Mark Lawrence added the comment: ?ric please see R69364. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 00:28:35 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 27 Jul 2010 22:28:35 +0000 Subject: [issue3966] Win32ErrorTests from test_os.py In-Reply-To: <1222367750.46.0.164641457334.issue3966@psf.upfronthosting.co.za> Message-ID: <1280269715.32.0.808423194948.issue3966@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks. I trust you that the other branches are fixed too; in future messages on other bugs reports, kindly include all revisions involved. I?ve learned that Roundup does not recognize an upper-case R (have I already said I hate implicit markup?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 00:29:44 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 27 Jul 2010 22:29:44 +0000 Subject: [issue9354] file_wrapper fails to provide getsockopt() In-Reply-To: <1279895608.81.0.80539572871.issue9354@psf.upfronthosting.co.za> Message-ID: <1280269784.46.0.460990000014.issue9354@psf.upfronthosting.co.za> Changes by ?ukasz Langa : Removed file: http://bugs.python.org/file18149/issue9354.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 00:30:16 2010 From: report at bugs.python.org (Michael Foord) Date: Tue, 27 Jul 2010 22:30:16 +0000 Subject: [issue1778410] removeTest() method patch for unittest.TestSuite Message-ID: <1280269816.36.0.801739402084.issue1778410@psf.upfronthosting.co.za> Michael Foord added the comment: I'm sympathetic to the feature request. I think that the way tests identify themselves will change (improve) to accommodate the new extension machinery. I would like to leave this feature request open for the moment and revisit it again once the extension machinery is in place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 00:32:20 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Tue, 27 Jul 2010 22:32:20 +0000 Subject: [issue9354] file_wrapper fails to provide getsockopt() In-Reply-To: <1279895608.81.0.80539572871.issue9354@psf.upfronthosting.co.za> Message-ID: <1280269940.05.0.587387589318.issue9354@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Patch updated to conform with the new test layout by Ezio Melotti. Implementation now also doesn't use assertions but regular exceptions. ---------- Added file: http://bugs.python.org/file18222/issue9354.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 00:35:43 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 27 Jul 2010 22:35:43 +0000 Subject: [issue9354] file_wrapper fails to provide getsockopt() In-Reply-To: <1279895608.81.0.80539572871.issue9354@psf.upfronthosting.co.za> Message-ID: <1280270143.3.0.503240459573.issue9354@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good to me. ---------- nosy: +merwok stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 00:35:44 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 27 Jul 2010 22:35:44 +0000 Subject: [issue9172] zipfile.extractall always raises an OSError after successfully unzipping all files In-Reply-To: <1278355031.26.0.155948134842.issue9172@psf.upfronthosting.co.za> Message-ID: <1280270144.3.0.178153256492.issue9172@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +amaury.forgeotdarc, ezio.melotti versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 00:35:53 2010 From: report at bugs.python.org (Leonhard Vogt) Date: Tue, 27 Jul 2010 22:35:53 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280270153.12.0.196762395729.issue7447@psf.upfronthosting.co.za> Leonhard Vogt added the comment: another patch: - moved string case to first position, i think it's the most important. - reworded (shortened) list case. - wrapped for <80 caracter lines. still using itertools.itertools.chain.from_iterable as mentioned in previous message. I missed georgs use of ~ in the link, but i think its clearer to mention the full name of the function anyway. ---------- Added file: http://bugs.python.org/file18223/functions.rst.patch4.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 00:43:14 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 27 Jul 2010 22:43:14 +0000 Subject: [issue7825] test_threadsignals leaks references In-Reply-To: <1264981703.5.0.296078231343.issue7825@psf.upfronthosting.co.za> Message-ID: <1280270594.23.0.0481482627219.issue7825@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I haven't seen test_threadsignals leaking, either on 3.1 or 3.2. Was it a transient problem? Note that if you want for test-specific threads to end, you can use the reap_threads() utility from the test.support module. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 00:47:32 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 27 Jul 2010 22:47:32 +0000 Subject: [issue6213] Incremental encoder incompatibility between 2.x and py3k In-Reply-To: <1244233063.22.0.634170589597.issue6213@psf.upfronthosting.co.za> Message-ID: <1280270852.44.0.0690877002427.issue6213@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch looks ok to me (I suppose you have tested it). ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 00:51:28 2010 From: report at bugs.python.org (Florent Xicluna) Date: Tue, 27 Jul 2010 22:51:28 +0000 Subject: [issue7825] test_threadsignals leaks references In-Reply-To: <1264981703.5.0.296078231343.issue7825@psf.upfronthosting.co.za> Message-ID: <1280271088.62.0.366154359532.issue7825@psf.upfronthosting.co.za> Florent Xicluna added the comment: Now it's fixed for 2.7 with r83187. (thanks for the hint, Antoine) No issue on 3.x, AFAICT. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 00:57:31 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 22:57:31 +0000 Subject: [issue9378] Make python -m pickle do something useful In-Reply-To: <1280085155.28.0.122928002341.issue9378@psf.upfronthosting.co.za> Message-ID: <1280271451.23.0.96241831422.issue9378@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- resolution: -> accepted stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 01:03:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 23:03:20 +0000 Subject: [issue9378] Make python -m pickle do something useful In-Reply-To: <1280085155.28.0.122928002341.issue9378@psf.upfronthosting.co.za> Message-ID: <1280271800.27.0.168079104808.issue9378@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in r83188. ---------- stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 01:24:16 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 27 Jul 2010 23:24:16 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280273056.63.0.668447797006.issue7447@psf.upfronthosting.co.za> Ezio Melotti added the comment: You could also use start=0 in the signature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 01:34:16 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 27 Jul 2010 23:34:16 +0000 Subject: [issue7962] Demo and Tools need to be tested and pruned In-Reply-To: <1266531589.82.0.915519058153.issue7962@psf.upfronthosting.co.za> Message-ID: <1280273656.3.0.672413203706.issue7962@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It looks like turtle was not the best example for msg111682 because it is already in Lib and python -m turtle runs demo. I am not sure what the relationship between Demo/turtle and the turtle module is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 02:22:42 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 00:22:42 +0000 Subject: [issue8966] ctypes: remove implicit conversion between unicode and bytes In-Reply-To: <1276211007.74.0.406425558952.issue8966@psf.upfronthosting.co.za> Message-ID: <1280276562.73.0.492875434723.issue8966@psf.upfronthosting.co.za> STINNER Victor added the comment: I commited both patches to 3.2, but I splitted them in a different way: - r83191 "fixes" tests (remove implicit conversion) - r83195 removes the implicit conversion in ctypes So it's easier to review the commits and revert the second commit. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 02:32:34 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 28 Jul 2010 00:32:34 +0000 Subject: [issue1170] shlex have problems with parsing unicode In-Reply-To: <1190045833.27.0.172281845017.issue1170@psf.upfronthosting.co.za> Message-ID: <1280277154.88.0.519578746344.issue1170@psf.upfronthosting.co.za> R. David Murray added the comment: Alexander: the "more or less" is on the "less" side when dealing with non-ASCII letters, I think. See my msg109292 and your own followups. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 02:39:23 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 28 Jul 2010 00:39:23 +0000 Subject: [issue9389] Traceback: Exception Shows Code that's On-Disk (Not in memory) In-Reply-To: <1280205161.63.0.842402205651.issue9389@psf.upfronthosting.co.za> Message-ID: <1280277563.38.0.809659458028.issue9389@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, this is the way it works. There is no copy of the lines kept in memory, the only lines that can be displayed in the traceback are the ones currently on disk. Although your speaking about a "script" is a bit confusing: if you are running a script from the command line, then the update to the source file should be noticed and the code reinterpreted. I'm guessing you aren't running a standalone script, but are running and editing something out of an interpreter session that doesn't restart. If this is correct then my statement above applies. If not, you can give more details, but I doubt that there is a real python bug here so I'm closing the issue. It can always be reopened if it turns out I'm wrong. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 02:41:43 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 00:41:43 +0000 Subject: [issue8991] PyArg_Parse*() functions: reject discontinious buffers In-Reply-To: <1276461457.35.0.826008906861.issue8991@psf.upfronthosting.co.za> Message-ID: <1280277703.16.0.610178144938.issue8991@psf.upfronthosting.co.za> STINNER Victor added the comment: Commited to 3.2 (r83197). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 02:53:03 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 00:53:03 +0000 Subject: [issue8776] Bytes version of sys.argv In-Reply-To: <1274357456.02.0.0768864678422.issue8776@psf.upfronthosting.co.za> Message-ID: <1280278383.58.0.34070022385.issue8776@psf.upfronthosting.co.za> STINNER Victor added the comment: "no byte-oriented representation of the command line is readily available." Why not using the following recipe? encoding = locale.getpreferredencoding() sys.argvb = [arg.decode(encoding, 'surrogateescape') for arg in argv] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 02:55:49 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 28 Jul 2010 00:55:49 +0000 Subject: [issue1170] shlex have problems with parsing unicode In-Reply-To: <1190045833.27.0.172281845017.issue1170@psf.upfronthosting.co.za> Message-ID: <1280278549.18.0.998360829775.issue1170@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: David, What do you think about attached patch? Would that be a change in the "more" direction? ---------- Added file: http://bugs.python.org/file18224/issue1170.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 03:02:24 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 28 Jul 2010 01:02:24 +0000 Subject: [issue1170] shlex have problems with parsing unicode In-Reply-To: <1190045833.27.0.172281845017.issue1170@psf.upfronthosting.co.za> Message-ID: <1280278944.74.0.676761924418.issue1170@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am adding MvL to nosy. Martin, I believe you are the ultimate authority on how to tokenize a unicode stream. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 03:21:05 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 01:21:05 +0000 Subject: [issue8776] Bytes version of sys.argv In-Reply-To: <1274357456.02.0.0768864678422.issue8776@psf.upfronthosting.co.za> Message-ID: <1280280065.85.0.751131245432.issue8776@psf.upfronthosting.co.za> STINNER Victor added the comment: You should read .encode(), not .decode() :-/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 03:29:24 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 01:29:24 +0000 Subject: [issue8725] Python3: use ASCII for the file system encoding on initfsencoding() failure In-Reply-To: <1273927146.76.0.292282765786.issue8725@psf.upfronthosting.co.za> Message-ID: <1280280564.32.0.169855888774.issue8725@psf.upfronthosting.co.za> STINNER Victor added the comment: I tried the patch on my import_unicode branch and it doesn't work if the locale encoding is not ASCII (as the current code doesn't work if the locale encoding is not UTF-8, #8611). If Py_FileSystemUnicodeEncoding is NULL: PyUnicode_EncodeFSDefault() should use mbcstowcs() and PyUnicode_DecodeFSDefault() should use wcstombcs(). They may reuse _Py_wchar2char() and _Py_char2wchar(). "ascii" should be used in initfsencoding(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 03:32:25 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 01:32:25 +0000 Subject: [issue3299] Direct calls to PyObject_Del/PyObject_DEL are broken for --with-pydebug In-Reply-To: <1215354044.0.0.987178228996.issue3299@psf.upfronthosting.co.za> Message-ID: <1280280745.89.0.588373415936.issue3299@psf.upfronthosting.co.za> STINNER Victor added the comment: I will open new issues for the two remaining patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 03:45:23 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 01:45:23 +0000 Subject: [issue6213] Incremental encoder incompatibility between 2.x and py3k In-Reply-To: <1244233063.22.0.634170589597.issue6213@psf.upfronthosting.co.za> Message-ID: <1280281523.79.0.763781091418.issue6213@psf.upfronthosting.co.za> STINNER Victor added the comment: > The patch looks ok to me Ok, commited to 2.7 (r83198). > (I suppose you have tested it) I ran test_io which does test the incremental encoders. -- I'm not brave enough to commit it to 2.6 (test_io in 2.6 doesn't use incremental encoders). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 03:53:05 2010 From: report at bugs.python.org (Guy) Date: Wed, 28 Jul 2010 01:53:05 +0000 Subject: [issue9389] Traceback: Exception Shows Code that's On-Disk (Not in memory) In-Reply-To: <1280205161.63.0.842402205651.issue9389@psf.upfronthosting.co.za> Message-ID: <1280281985.31.0.125325524157.issue9389@psf.upfronthosting.co.za> Guy added the comment: I was running a script that I was editing, and, after making changes, the code wasn't reinterpreted, but listed the line that the "error" occured on (I had corrected the error on the file that was on disk, but yet, Python didn't reinterpret the code). "I'm guessing you aren't running a standalone script, but are running and editing something out of an interpreter session that doesn't restart" - do you mean that it's assumed I will restart the session after a change to the code? Judging by the data the traceback shows, wouldn't the results of the traceback/exception be misleading, citing a line of Python code on disk that was interpreted differently in memory? ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 03:59:07 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 01:59:07 +0000 Subject: [issue6213] Incremental encoder incompatibility between 2.x and py3k In-Reply-To: <1244233063.22.0.634170589597.issue6213@psf.upfronthosting.co.za> Message-ID: <1280282347.78.0.422155137203.issue6213@psf.upfronthosting.co.za> STINNER Victor added the comment: > I'm not brave enough to commit it to 2.6 > (test_io in 2.6 doesn't use incremental encoders) Oh, I just remembered that I choosed to fix this issue to be able to backport #5006 to 2.6 :-) So r83199 is the incremental encoder fix for 2.6, and r83200 is the BOM fix for the io library. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 04:00:04 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 02:00:04 +0000 Subject: [issue5006] Duplicate UTF-16 BOM if a file is open in append mode In-Reply-To: <1232407475.88.0.821271875363.issue5006@psf.upfronthosting.co.za> Message-ID: <1280282404.97.0.320222370083.issue5006@psf.upfronthosting.co.za> STINNER Victor added the comment: I fixed #6213 in 2.6 and 2.7, and so it's now possible to backport this fix to 2.6 => r83200 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 04:05:20 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 02:05:20 +0000 Subject: [issue9246] os.getcwd() hardcodes max path len In-Reply-To: <1279023059.26.0.245683093399.issue9246@psf.upfronthosting.co.za> Message-ID: <1280282720.34.0.0991420338417.issue9246@psf.upfronthosting.co.za> STINNER Victor added the comment: New version of the patch avoiding PyMem_*() functions to avoid a possible race condition (issue with the GIL). ---------- Added file: http://bugs.python.org/file18225/os_getcwd_buffer-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 04:05:26 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 02:05:26 +0000 Subject: [issue9246] os.getcwd() hardcodes max path len In-Reply-To: <1279023059.26.0.245683093399.issue9246@psf.upfronthosting.co.za> Message-ID: <1280282726.67.0.522047124648.issue9246@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file18169/os_getcwd_buffer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 04:16:54 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 02:16:54 +0000 Subject: [issue1813] Codec lookup failing under turkish locale In-Reply-To: <1200150013.57.0.828744211276.issue1813@psf.upfronthosting.co.za> Message-ID: <1280283414.82.0.778755034223.issue1813@psf.upfronthosting.co.za> STINNER Victor added the comment: There is also a locale normalization function in unicodeobject.c: normalize_encoding(). This function uses "if (ISUPPER(*e)) *l++ = TOLOWER(*e++);" which uses the Python, *locale-independent*, implementation of ctype. We should maybe use the ISUPPER / TOLOWER in codecs.c. Anyway, a function should be fixed, but I don't know which one :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 04:44:44 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 02:44:44 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <1280082784.57.0.628810673592.issue9377@psf.upfronthosting.co.za> Message-ID: <1280285084.45.0.881472146417.issue9377@psf.upfronthosting.co.za> STINNER Victor added the comment: I like the idea of using the PEP 383 for hostnames, but I don't understand the relation with IDNA (maybe because I don't know this encoding). +this leaves IDNA ASCII-compatible encodings in ASCII +form, but converts any non-ASCII bytes in the hostname to the Unicode +lone surrogate codes U+DC80...U+DCFF. What is an "IDNA ASCII-compatible encoding"? -- ascii-surrogateescape.diff: - I don't like unicode_from_hostname() name: "decode_hostname()" would be better. - It doesn't patch the doc and so cannot be applied alone. It doesn't matter, it's better to apply both patches at the same time. But thanks to have splitted them, it's easier to review them :-) try-surrogateescape-first.diff: - hostname_to_bytes() should be called "encode_hostname()" - if (!PyErr_ExceptionMatches(PyExc_UnicodeError)): you should catch UnicodeEncodeError here - "if this is not possible, :exc:`UnicodeError` is raised.": is it an UnicodeEncodeError? - use PyUnicode_AsEncodedString() instead of PyUnicode_AsEncodedObject(): it's faster for ASCII and ensure that the result is a bytes object (so you don't need to re-check the type) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 05:28:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 28 Jul 2010 03:28:20 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280287700.53.0.79849624902.issue9315@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a patch, issue9315-trace-fix.diff, that fixes a py3k bug exposed by issue9315.1-py3k.patch tests. One of the 3.x changes that caused the failure was that frames now have a __doc__ attribute and cannot be distinguished from functions. I replaced the hasattr(f, "__doc__") with hasattr(f, "__annotations__"), but I wonder if it would be better to use something like isinstance(f, types.FunctionType) there. Eli, in order to test the trace module more thoroughly, you need to add generators, list and set comprehensions and instance, class, and static methods to your fake module and test tracing of their execution. ---------- Added file: http://bugs.python.org/file18226/issue9315-trace-fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 05:32:50 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 28 Jul 2010 03:32:50 +0000 Subject: [issue9389] Traceback: Exception Shows Code that's On-Disk (Not in memory) In-Reply-To: <1280205161.63.0.842402205651.issue9389@psf.upfronthosting.co.za> Message-ID: <1280287970.57.0.0409838448702.issue9389@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, when you change the code on disk, you must restart the Python interpreter in order for it to "see" those changes. And as I said, the source code is never held in memory, so the only source code the traceback can show is what is on disk. This is just how Python works, it is not a bug. To learn more about this, you should ask questions on the python-list mailing list. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 05:42:31 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 28 Jul 2010 03:42:31 +0000 Subject: [issue8776] Bytes version of sys.argv In-Reply-To: <1274357456.02.0.0768864678422.issue8776@psf.upfronthosting.co.za> Message-ID: <1280288551.19.0.0269637285276.issue8776@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 06:06:42 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 28 Jul 2010 04:06:42 +0000 Subject: [issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before) In-Reply-To: <1279530588.62.0.226192140376.issue9301@psf.upfronthosting.co.za> Message-ID: <1280290002.63.0.432939495715.issue9301@psf.upfronthosting.co.za> Ezio Melotti added the comment: There are a couple of things that I don't like in the patch: 1) raising a TypeError with a proper message seems better than raising an AttributeError (maybe check if not isinstance(string, (str, bytes)): raise TypeError(...)?); 2) from the snippet I see in the patch, ISTM that unquote_to_bytes accepts both bytes and strings and returns always bytes but unquote might return both bytes and strings (I'm not aware of the design decisions behind these API, but this looks at least inconsistent and maybe wrong (shouldn't it only accept one type?)). ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 06:09:14 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 28 Jul 2010 04:09:14 +0000 Subject: [issue7330] PyUnicode_FromFormat segfault In-Reply-To: <1258314153.95.0.978747695294.issue7330@psf.upfronthosting.co.za> Message-ID: <1280290154.64.0.672164860676.issue7330@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 07:54:47 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 28 Jul 2010 05:54:47 +0000 Subject: [issue8776] Bytes version of sys.argv In-Reply-To: <1274357456.02.0.0768864678422.issue8776@psf.upfronthosting.co.za> Message-ID: <1280296487.76.0.499936759628.issue8776@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Using that approach would work on POSIX systems. Another problem I see is synchronizing the two. If some function strips arguments from sys.argv (because it has completed processing), sys.argvb would still keep the arguments. Of course, this could be fixed by having sys.argvb be a dynamic list (i.e. a sequence object) instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 08:50:08 2010 From: report at bugs.python.org (Florent Xicluna) Date: Wed, 28 Jul 2010 06:50:08 +0000 Subject: [issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before) In-Reply-To: <1279530588.62.0.226192140376.issue9301@psf.upfronthosting.co.za> Message-ID: <1280299808.04.0.736795967921.issue9301@psf.upfronthosting.co.za> Florent Xicluna added the comment: 1/ The AttributeError on unquote() is backward compatible with 2.6, 2.7 and 3.1. (issue 9301 is about backward compatibility) 2/ All the quote*/unquote* functions accept both str and bytes (except quote_from_bytes). I don't find a strong reason to change this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 08:52:55 2010 From: report at bugs.python.org (Ray.Allen) Date: Wed, 28 Jul 2010 06:52:55 +0000 Subject: [issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1280299975.37.0.312813958562.issue9299@psf.upfronthosting.co.za> Ray.Allen added the comment: I updated the patch. Now the patch: suppress the OSError if and only if the target directory with the same mode as we specified already exists. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 10:07:08 2010 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 28 Jul 2010 08:07:08 +0000 Subject: [issue7198] csv.writer In-Reply-To: <1256422121.38.0.499052368843.issue7198@psf.upfronthosting.co.za> Message-ID: <1280304428.84.0.077765483536.issue7198@psf.upfronthosting.co.za> Skip Montanaro added the comment: Can you provide me with a concrete example which fails for you? I don't have ready access to a Windows machine with Python on it but should be able to arrange something at work, however before going through the exercise of spending admin time to install Python I would like to look at code which fails for you first. ---------- assignee: -> skip.montanaro status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 10:21:03 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 28 Jul 2010 08:21:03 +0000 Subject: [issue9354] file_wrapper fails to provide getsockopt() In-Reply-To: <1279895608.81.0.80539572871.issue9354@psf.upfronthosting.co.za> Message-ID: <1280305263.49.0.335251745255.issue9354@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied in r83201. Thanks! ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 10:32:15 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 28 Jul 2010 08:32:15 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1280305935.58.0.565140716393.issue1682942@psf.upfronthosting.co.za> Georg Brandl added the comment: Looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 10:45:28 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 28 Jul 2010 08:45:28 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: Message-ID: anatoly techtonik added the comment: >> Why not to ship it in Python by default? > > Because it is under GPL? pyreadline is under BSD. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 10:50:57 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 28 Jul 2010 08:50:57 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: <1280177325.41.0.954101652287.issue9362@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: On Mon, Jul 26, 2010 at 11:48 PM, Mark Lawrence wrote: > > This to me is getting stupid. ?Let's make a decision and move on, there are far more pressing issues that need attention. Do you think that getting `readline` module to run on Windows is stupid? I think it is stupid that IPython ships pyreadline to fill the gap on Windows - it should be done in Python distribution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 10:53:38 2010 From: report at bugs.python.org (Tim Golden) Date: Wed, 28 Jul 2010 08:53:38 +0000 Subject: [issue9362] Make exit/quit hint more novice friendly In-Reply-To: Message-ID: <4C4FF00D.9060203@timgolden.me.uk> Tim Golden added the comment: Not necessarily; pyreadline takes over from the standard console functionality on Windows in order to emulate a more Unix-ish approach. I prefer the Windows default. There's nothing to stop someone downloading and installing pyreadline as a third-party package on Windows ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 11:10:43 2010 From: report at bugs.python.org (wjm251) Date: Wed, 28 Jul 2010 09:10:43 +0000 Subject: [issue9393] shelve.open/bsddb.hashopen raise Exception'No such file or directory'for "Chinese path" In-Reply-To: <1280308243.23.0.510970772038.issue9393@psf.upfronthosting.co.za> Message-ID: <1280308243.23.0.510970772038.issue9393@psf.upfronthosting.co.za> New submission from wjm251 : Windows XP Simple Chinese Version in python2.5,Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 I have a directory "D:\???????" my code is as follows: #-------------------------------------- temppath = u"D:\\???????\\a" import shelve cache = shelve.open(temppath, 'c') #-------------------------------------- when use temppath.encode("utf-8"),it works, but in python2.6,temppath can works properly but I got a Error with such traceback Traceback (most recent call last): File "D:\eclipse_workspace\pytest\src\test.py", line 5, in cache = shelve.open(temppath, 'c') File "D:\eclipse_workspace\omstarv5r6\linksvn\src\UNPPython\pywindows\Lib\shelve.py", line 225, in open return DbfilenameShelf(filename, flag, protocol, writeback) File "D:\eclipse_workspace\omstarv5r6\linksvn\src\UNPPython\pywindows\Lib\shelve.py", line 209, in __init__ Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback) File "D:\eclipse_workspace\omstarv5r6\linksvn\src\UNPPython\pywindows\Lib\anydbm.py", line 83, in open return mod.open(file, flag, mode) File "D:\eclipse_workspace\omstarv5r6\linksvn\src\UNPPython\pywindows\Lib\dbhash.py", line 16, in open return bsddb.hashopen(file, flag, mode) File "D:\eclipse_workspace\omstarv5r6\linksvn\src\UNPPython\pywindows\Lib\bsddb\__init__.py", line 310, in hashopen d.open(file, db.DB_HASH, flags, mode) bsddb.db.DBNoSuchFileError: (2, 'No such file or directory') ---------- components: Library (Lib) messages: 111779 nosy: wjm251 priority: normal severity: normal status: open title: shelve.open/bsddb.hashopen raise Exception'No such file or directory'for "Chinese path" versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 11:16:49 2010 From: report at bugs.python.org (wjm251) Date: Wed, 28 Jul 2010 09:16:49 +0000 Subject: [issue9394] shelve.open/bsddb.hashopen raise bsddb.db.DBNoSuchFileError: (2, 'No such file or directory') with Chinese Path In-Reply-To: <1280308609.85.0.47516967523.issue9394@psf.upfronthosting.co.za> Message-ID: <1280308609.85.0.47516967523.issue9394@psf.upfronthosting.co.za> New submission from wjm251 : Windows XP Simple Chinese Version in python2.5,Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 I have a directory "D:\???????" my code is as follows: #-------------------------------------- temppath = u"D:\\???????\\a" import shelve cache = shelve.open(temppath, 'c') #-------------------------------------- when use temppath.encode("utf-8"),it works, but in python2.6,temppath can works properly but I got a Error with such traceback Traceback (most recent call last): File "D:\eclipse_workspace\pytest\src\test.py", line 5, in cache = shelve.open(temppath, 'c') File "D:\eclipse_workspace\omstarv5r6\linksvn\src\UNPPython\pywindows\Lib\shelve.py", line 225, in open return DbfilenameShelf(filename, flag, protocol, writeback) File "D:\eclipse_workspace\omstarv5r6\linksvn\src\UNPPython\pywindows\Lib\shelve.py", line 209, in __init__ Shelf.__init__(self, anydbm.open(filename, flag), protocol, writeback) File "D:\eclipse_workspace\omstarv5r6\linksvn\src\UNPPython\pywindows\Lib\anydbm.py", line 83, in open return mod.open(file, flag, mode) File "D:\eclipse_workspace\omstarv5r6\linksvn\src\UNPPython\pywindows\Lib\dbhash.py", line 16, in open return bsddb.hashopen(file, flag, mode) File "D:\eclipse_workspace\omstarv5r6\linksvn\src\UNPPython\pywindows\Lib\bsddb\__init__.py", line 310, in hashopen d.open(file, db.DB_HASH, flags, mode) bsddb.db.DBNoSuchFileError: (2, 'No such file or directory') ---------- components: Library (Lib) messages: 111780 nosy: wjm251 priority: normal severity: normal status: open title: shelve.open/bsddb.hashopen raise bsddb.db.DBNoSuchFileError: (2, 'No such file or directory') with Chinese Path type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 11:28:42 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Jul 2010 09:28:42 +0000 Subject: [issue9394] shelve.open/bsddb.hashopen raise bsddb.db.DBNoSuchFileError: (2, 'No such file or directory') with Chinese Path In-Reply-To: <1280308609.85.0.47516967523.issue9394@psf.upfronthosting.co.za> Message-ID: <1280309322.84.0.570617871233.issue9394@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> shelve.open/bsddb.hashopen raise Exception'No such file or directory'for "Chinese path" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 11:30:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Jul 2010 09:30:16 +0000 Subject: [issue9393] shelve.open/bsddb.hashopen exception with unicode paths In-Reply-To: <1280308243.23.0.510970772038.issue9393@psf.upfronthosting.co.za> Message-ID: <1280309416.46.0.713418960783.issue9393@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +haypo title: shelve.open/bsddb.hashopen raise Exception'No such file or directory'for "Chinese path" -> shelve.open/bsddb.hashopen exception with unicode paths type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 11:33:44 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Jul 2010 09:33:44 +0000 Subject: [issue9386] Bad indentation in urllib import fixer with multiple imports In-Reply-To: <1280165305.89.0.706403927201.issue9386@psf.upfronthosting.co.za> Message-ID: <1280309624.35.0.0665520891933.issue9386@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +benjamin.peterson, merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 12:06:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Jul 2010 10:06:16 +0000 Subject: [issue818201] distutils: clean does not use build_base option from build Message-ID: <1280311576.08.0.659763237165.issue818201@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: -> tarek nosy: +merwok stage: -> unit test needed title: distutils: clean -b ignored; set_undefined_options doesn't -> distutils: clean does not use build_base option from build type: -> behavior versions: -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 12:07:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Jul 2010 10:07:15 +0000 Subject: [issue809846] distutils/bdistwin32 doesn't clean up RO files properly Message-ID: <1280311635.67.0.40355474972.issue809846@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: -> tarek nosy: +merwok stage: -> unit test needed type: -> behavior versions: -Python 2.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 12:09:32 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Jul 2010 10:09:32 +0000 Subject: [issue9395] clean does not remove all temp files In-Reply-To: <1280311771.86.0.556150594835.issue9395@psf.upfronthosting.co.za> Message-ID: <1280311771.86.0.556150594835.issue9395@psf.upfronthosting.co.za> New submission from ?ric Araujo : The clean command does not delete all build artifacts. ---------- assignee: tarek components: Distutils, Distutils2 messages: 111781 nosy: exarkun, merwok, tarek priority: normal severity: normal stage: unit test needed status: open title: clean does not remove all temp files type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 12:18:37 2010 From: report at bugs.python.org (Florent Xicluna) Date: Wed, 28 Jul 2010 10:18:37 +0000 Subject: [issue5006] Duplicate UTF-16 BOM if a file is open in append mode In-Reply-To: <1232407475.88.0.821271875363.issue5006@psf.upfronthosting.co.za> Message-ID: <1280312317.97.0.57962221622.issue5006@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 12:26:17 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Jul 2010 10:26:17 +0000 Subject: [issue5412] extend configparser to support [] syntax In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1280312777.3.0.581594022258.issue5412@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?d find more natural to have cp['spam'] return the section (as a dict) and cp['spam']['ham'] return the value. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 12:27:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Jul 2010 10:27:07 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1280312827.66.0.481879313995.issue1682942@psf.upfronthosting.co.za> ?ric Araujo added the comment: I made some minor remarks on rietveld, it seems they?re saved but no email has come here. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 12:28:52 2010 From: report at bugs.python.org (C. E. Ball) Date: Wed, 28 Jul 2010 10:28:52 +0000 Subject: [issue989712] Support using Tk without a mainloop Message-ID: <1280312932.78.0.781555087881.issue989712@psf.upfronthosting.co.za> Changes by C. E. Ball : ---------- nosy: +ceball _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 12:50:47 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Jul 2010 10:50:47 +0000 Subject: [issue5136] Deprecating (and removing) "globalcall", "merge" and "globaleval" In-Reply-To: <1233623088.62.0.412008570682.issue5136@psf.upfronthosting.co.za> Message-ID: <1280314247.14.0.640242522784.issue5136@psf.upfronthosting.co.za> ?ric Araujo added the comment: Guilherme, I suggest you ask about that on pydev and/or idle-dev, or just commit the addition of PendingDeprecationWarnings and wait for reactions. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 12:53:23 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Jul 2010 10:53:23 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1280314403.04.0.816004675554.issue1682942@psf.upfronthosting.co.za> ?ric Araujo added the comment: Ah, the tracker does not know the address I use for Google, sorry. My comments are visible on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 12:55:11 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 28 Jul 2010 10:55:11 +0000 Subject: [issue5412] extend configparser to support [] syntax In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1280314511.39.0.685328130957.issue5412@psf.upfronthosting.co.za> ?ukasz Langa added the comment: ?ric, first thing: forget about the current patch because it's very much incomplete. Second thing, while I normally would agree with you about the ['section']['key'] idea, in this case the current syntax has following advantages: - we can implement a cohesive mapping protocol that extends to get(), del, in, etc. For now get() seems somewhat similar to what dictionaries give you and I would build on that (adding a `default` attribute would be another thing). - manipulation on the internal structures is much simpler when we have a single key like that. Having config['name'] return the section would make us create another proxy object just to support mutating keys in the section. I can see arguments for and against this approach but overall, it looks nice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 13:03:58 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Jul 2010 11:03:58 +0000 Subject: [issue7198] Extraneous newlines with csv.writer on Windows In-Reply-To: <1256422121.38.0.499052368843.issue7198@psf.upfronthosting.co.za> Message-ID: <1280315038.03.0.498909974264.issue7198@psf.upfronthosting.co.za> ?ric Araujo added the comment: Bob, can you give us some code to reproduce the problem, in the form or a unit test or even just a regular function? It will help confirm the bug and fix it. ---------- nosy: +merwok stage: -> unit test needed title: csv.writer -> Extraneous newlines with csv.writer on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 13:08:23 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 28 Jul 2010 11:08:23 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1280315303.19.0.610508161413.issue1682942@psf.upfronthosting.co.za> Changes by ?ukasz Langa : Removed file: http://bugs.python.org/file18219/issue1682942.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 13:14:25 2010 From: report at bugs.python.org (Ray.Allen) Date: Wed, 28 Jul 2010 11:14:25 +0000 Subject: [issue9386] Bad indentation in urllib import fixer with multiple imports In-Reply-To: <1280165305.89.0.706403927201.issue9386@psf.upfronthosting.co.za> Message-ID: <1280315665.86.0.597776535006.issue9386@psf.upfronthosting.co.za> Ray.Allen added the comment: I guess it's the problem with lib2to3/fixes/fix_urllib.py. Indentation is not taken into consideration when fix "import". Fix it with indentation taken into consideration maybe a little complex, but here is a simple and ugly fix: when one import statement was transformed to two or more statement, use semicolon(';') instead of '\n' as separator, between many import statements. In this case, the """ def fun(): from urllib import urlopen, urlencode """ is transformed in to: """ def fun(): from urllib.request import urlopen;from urllib.parse import urlencode """ It will takes time to work out a better fix. ---------- nosy: +ysj.ray Added file: http://bugs.python.org/file18227/lib2to3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 13:15:26 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Wed, 28 Jul 2010 11:15:26 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1280315726.51.0.0673668069373.issue1682942@psf.upfronthosting.co.za> ?ukasz Langa added the comment: New patch after review by ?ric Araujo. The difference between the last one and the current is cosmetic: --- Lib/configparser.py 2010-07-27 11:36:51.000000000 +0200 +++ Lib/configparser.py.2 2010-07-28 13:05:39.000000000 +0200 @@ -117,3 +117,2 @@ import re -import sre_parse import sys @@ -140,2 +139,3 @@ BaseException.""" + return self.__message @@ -145,2 +145,3 @@ BaseException.""" + self.__message = value @@ -301,2 +302,3 @@ """ + if section.lower() == "default": @@ -338,2 +340,3 @@ """ + if isinstance(filenames, str): @@ -358,4 +361,4 @@ used. - """ + if filename is None: @@ -419,2 +422,3 @@ """Check for the existence of a given option in a given section.""" + if not section or section == DEFAULTSECT: @@ -431,2 +435,3 @@ """Set an option.""" + if not section or section == DEFAULTSECT: @@ -444,2 +449,3 @@ between keys and values are surrounded by spaces.""" + if space_around_delimiters: @@ -456,2 +462,3 @@ """Remove an option.""" + if not section or section == DEFAULTSECT: @@ -471,2 +478,3 @@ """Remove a file section.""" + existed = section in self._sections @@ -529,2 +537,3 @@ """ + cursect = None # None, or a dictionary @@ -657,2 +666,3 @@ """ + d = self._defaults.copy() @@ -690,2 +700,3 @@ """ + d = self._defaults.copy() @@ -789,2 +800,3 @@ """Set an option. Extend ConfigParser.set: check for string values.""" + # The only legal non-string value if we allow valueless Some remarks on ?ric's review: - thanks for reviewing the patch, however you did review an outdated version - comment_prefixes are by all means prefixes. Collins dictionary: "prefix, n. - 2. something coming or placed before". Other reviewers didn't pose the current name as inapt - other remarks corrected in the current patch ---------- Added file: http://bugs.python.org/file18228/issue1682942.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 13:27:12 2010 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 28 Jul 2010 11:27:12 +0000 Subject: [issue9396] Standardise (and publish?) cache handling in standard library In-Reply-To: <1280316432.08.0.674221936967.issue9396@psf.upfronthosting.co.za> Message-ID: <1280316432.08.0.674221936967.issue9396@psf.upfronthosting.co.za> New submission from Nick Coghlan : The standard library has several cache implementations (e.g. in re, fnmatch and ElementTree) with different cache size limiting strategies. These should be standardised and possibly even exposed for general use. Refer to python-dev discussion: http://mail.python.org/pipermail/python-dev/2010-July/102473.html ---------- components: Library (Lib) messages: 111790 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: Standardise (and publish?) cache handling in standard library type: feature request versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 13:32:13 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Jul 2010 11:32:13 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1280316733.53.0.916042089032.issue1682942@psf.upfronthosting.co.za> ?ric Araujo added the comment: I advised putting a blankline between the first line of a docstring and the rest of it, not between the docstring and the body of the function. Re. prefix, Wordnet is more precise than Collins here: ?an affix that is added in front of the word?. A prefix is not just a sequence of characters, it?s a morpheme (building block for word, if you want). So prefix is a wrong name in the docstring of str.startswith, since e.g. ?pyt? is not a prefix, whereas ?out? is, but str.startswith works with any sequence, not only something that is a prefix. > Other reviewers didn't pose the current name as inapt They?re not linguists. Not saying this is a good or bad thing. :) Using linguistics terms to speak of computer languages is often a bad thing, but in this case I?d like to avoid using prefix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 13:46:55 2010 From: report at bugs.python.org (Bob Cannon) Date: Wed, 28 Jul 2010 11:46:55 +0000 Subject: [issue7198] Extraneous newlines with csv.writer on Windows In-Reply-To: <1280315038.03.0.498909974264.issue7198@psf.upfronthosting.co.za> Message-ID: <4C5018AC.3000907@neqn.net> Bob Cannon added the comment: Eric, This issue was resolved for me by Skip Montanaro's response less than an hour after I posted it. I didn't understand why a text file had to be binary, but I no longer had a problem with extraneous. In looking back at my message 94441, I think that it was ambiguous and that I should have made it clear that I no longer had a problem. Perhaps in my ignorance as a newbie I didn't close the issue properly. I don't know that I can reproduce the problem any more. I think that I was writing snippets of code to try to isolate the problem and when I used Skip's solution I changed the program and deleted the test code. Please let me know what I can do to help you now. Bob ?ric Araujo wrote: > ?ric Araujo added the comment: > > Bob, can you give us some code to reproduce the problem, in the form or a unit test or even just a regular function? It will help confirm the bug and fix it. > > ---------- > nosy: +merwok > stage: -> unit test needed > title: csv.writer -> Extraneous newlines with csv.writer on Windows > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 14:14:35 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Jul 2010 12:14:35 +0000 Subject: [issue7198] Extraneous newlines with csv.writer on Windows In-Reply-To: <1256422121.38.0.499052368843.issue7198@psf.upfronthosting.co.za> Message-ID: <1280319275.88.0.402604272656.issue7198@psf.upfronthosting.co.za> ?ric Araujo added the comment: If the documentation is not clear enough about requiring binary, it is a doc bug. (P.S. Please strip unneeded quotes. Thanks) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 14:18:22 2010 From: report at bugs.python.org (Ray.Allen) Date: Wed, 28 Jul 2010 12:18:22 +0000 Subject: [issue9386] Bad indentation in urllib import fixer with multiple imports In-Reply-To: <1280165305.89.0.706403927201.issue9386@psf.upfronthosting.co.za> Message-ID: <1280319502.76.0.18624159057.issue9386@psf.upfronthosting.co.za> Ray.Allen added the comment: When one import statement is split to two or more, we encounter this problem: the indentation of the import statements except the first one is unknown, and is difficult to fix this problem, since a import maybe in a multi-statement line, like: 'a=1;import sys'. I wonder if there is way to fix this problem perfectly. Maybe we could just put all the resulting import statements into one single multi-statement line, joined by ';', as my patch specified. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 14:26:12 2010 From: report at bugs.python.org (wjm251) Date: Wed, 28 Jul 2010 12:26:12 +0000 Subject: [issue9393] shelve.open/bsddb.hashopen exception with unicode paths In-Reply-To: <1280308243.23.0.510970772038.issue9393@psf.upfronthosting.co.za> Message-ID: <1280319972.27.0.537943076786.issue9393@psf.upfronthosting.co.za> wjm251 added the comment: I think it is supposed that unicode paths and GBK encoded str objects will be ok in Windows. But only UTF-8 encoded str can ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 14:30:26 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 28 Jul 2010 12:30:26 +0000 Subject: [issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1280320226.03.0.441478811956.issue9299@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: You haven't attached the new patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 14:41:54 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 12:41:54 +0000 Subject: [issue9393] shelve.open/bsddb.hashopen exception with unicode paths In-Reply-To: <1280308243.23.0.510970772038.issue9393@psf.upfronthosting.co.za> Message-ID: <1280320914.0.0.089463648141.issue9393@psf.upfronthosting.co.za> STINNER Victor added the comment: shelve uses anydbm which uses gdbm, dbm or bsddbm. Attached patch fixes gdbm and dbm (replace "s" format by "et" with Py_FileSystemDefaultEncoding). bsddbm is harder to fix: bsdhashopen(), bsdbtopen() and bsdrnopen() have to be fixed, and they accept None for the filename ("z" format). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 14:42:27 2010 From: report at bugs.python.org (Ray.Allen) Date: Wed, 28 Jul 2010 12:42:27 +0000 Subject: [issue9299] os.makedirs(): Add a keyword argument to suppress "File exists" exception In-Reply-To: <1279529255.89.0.917982060428.issue9299@psf.upfronthosting.co.za> Message-ID: <1280320947.42.0.412442522759.issue9299@psf.upfronthosting.co.za> Ray.Allen added the comment: Oh, sorry, here is the patch. ---------- Added file: http://bugs.python.org/file18229/mkdir.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 14:42:30 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 12:42:30 +0000 Subject: [issue9393] shelve.open/bsddb.hashopen exception with unicode paths In-Reply-To: <1280308243.23.0.510970772038.issue9393@psf.upfronthosting.co.za> Message-ID: <1280320950.69.0.438981730457.issue9393@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- keywords: +patch Added file: http://bugs.python.org/file18230/dbm_open_unicode-27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 14:43:38 2010 From: report at bugs.python.org (Ray.Allen) Date: Wed, 28 Jul 2010 12:43:38 +0000 Subject: [issue5412] extend configparser to support [] syntax In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1280321018.58.0.962416524016.issue5412@psf.upfronthosting.co.za> Ray.Allen added the comment: lukasz, > - manipulation on the internal structures is much simpler when we have a single key like that. Having config['name'] return the section would make us create another proxy object just to support mutating keys in the section. I'm afraid this could not be a good reason against the config['section']['key'] style. Since implementing this in python is not too difficult. For the more readability this style brings than config['section', 'key'], I think it's worthy. ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 14:45:02 2010 From: report at bugs.python.org (Michael Foord) Date: Wed, 28 Jul 2010 12:45:02 +0000 Subject: [issue5412] extend configparser to support [] syntax In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1280321102.07.0.221618955364.issue5412@psf.upfronthosting.co.za> Michael Foord added the comment: As in ConfigParser you are always accessing a section and value I'm happy with tuple indexing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 15:11:33 2010 From: report at bugs.python.org (wjm251) Date: Wed, 28 Jul 2010 13:11:33 +0000 Subject: [issue9393] shelve.open/bsddb.hashopen exception with unicode paths In-Reply-To: <1280308243.23.0.510970772038.issue9393@psf.upfronthosting.co.za> Message-ID: <1280322693.02.0.212883687285.issue9393@psf.upfronthosting.co.za> wjm251 added the comment: sorry I donot know exactly your meaning, what does these mean: "s" format by "et " , "z" format and I'm not familiar with the C/C++ do you mean that I can use the attached patch to complie a new Python dll? but it seams that in My PC the shelve module always uses bsddbm automaticly, can you explains more clearly? thank you very much sincerely ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 15:11:40 2010 From: report at bugs.python.org (Ray.Allen) Date: Wed, 28 Jul 2010 13:11:40 +0000 Subject: [issue7330] PyUnicode_FromFormat segfault In-Reply-To: <1258314153.95.0.978747695294.issue7330@psf.upfronthosting.co.za> Message-ID: <1280322700.64.0.489091395657.issue7330@psf.upfronthosting.co.za> Ray.Allen added the comment: I feel it's not proper to allow the width restrict on types %S, %R, %A. These types correspond to PyObject_Str(), PyObject_Repr, PyObject_ASCII() respectively, the results of them are usually a complete string representation of a object. If you put a width restriction on the string, it's likely that the result string is intercepted and is of no complete meaning. If you really want to put a width restriction on the result, you can use %s instead, with one or two more lines to get the corresponding char* from the object. ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 15:14:25 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 28 Jul 2010 13:14:25 +0000 Subject: [issue1682942] ConfigParser support for alt delimiters Message-ID: <1280322865.88.0.226065419139.issue1682942@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed an extensively edited patch in r83202. Thanks all! ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 15:30:46 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 28 Jul 2010 13:30:46 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280323846.62.0.302466367033.issue9315@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Alexander, it looks like you broke all the 2.7 buildbots. Could you take a look, please? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 15:37:25 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 28 Jul 2010 13:37:25 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1280323846.62.0.302466367033.issue9315@psf.upfronthosting.co.za> Message-ID: <9D1E574E-37A6-48EE-B2BD-AF94F300253D@gmail.com> Alexander Belopolsky added the comment: I am on a train. Can take a look in about an hour, but I did not commit anything related to this issue recently. On Jul 28, 2010, at 9:30 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Alexander, it looks like you broke all the 2.7 buildbots. Could you > take a look, please? > > ---------- > nosy: +pitrou > > _______________________________________ > Python tracker > > _______________________________________ ---------- nosy: +Alexander.Belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 15:39:49 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 28 Jul 2010 13:39:49 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280324389.19.0.734344154603.issue9315@psf.upfronthosting.co.za> Antoine Pitrou added the comment: test test_sys_setprofile crashed -- : cannot import name support Traceback (most recent call last): File "./Lib/test/regrtest.py", line 863, in runtest_inner File "/home/buildbot/slave/py-build/2.7.norwitz-amd64/build/Lib/test/test_sys_setprofile.py", line 5, in from test import support ImportError: cannot import name support test test_sys_settrace crashed -- : unqualified exec is not allowed in function 'test_jump_to_firstlineno' it contains a nested function with free variables (test_sys_settrace.py, line 777) Traceback (most recent call last): File "./Lib/test/regrtest.py", line 863, in runtest_inner SyntaxError: unqualified exec is not allowed in function 'test_jump_to_firstlineno' it contains a nested function with free variables (test_sys_settrace.py, line 777) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 15:40:43 2010 From: report at bugs.python.org (Peter) Date: Wed, 28 Jul 2010 13:40: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: <1280324443.1.0.494519649979.issue7490@psf.upfronthosting.co.za> Peter added the comment: I take it the IGNORE_EXCEPTION_DETAIL should ignore the module name fix will not be applied to Python 3.1.x? Is there a separate bug to enhance 2to3 to turn IGNORE_EXCEPTION_DETAIL on? ---------- nosy: +maubp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 15:44:55 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 28 Jul 2010 13:44:55 +0000 Subject: [issue7330] PyUnicode_FromFormat segfault In-Reply-To: <1280322700.64.0.489091395657.issue7330@psf.upfronthosting.co.za> Message-ID: <4C503454.2030801@egenix.com> Marc-Andre Lemburg added the comment: Ray.Allen wrote: > > Ray.Allen added the comment: > > I feel it's not proper to allow the width restrict on types %S, %R, %A. These types correspond to PyObject_Str(), PyObject_Repr, PyObject_ASCII() respectively, the results of them are usually a complete string representation of a object. If you put a width restriction on the string, it's likely that the result string is intercepted and is of no complete meaning. If you really want to put a width restriction on the result, you can use %s instead, with one or two more lines to get the corresponding char* from the object. I agree with that, but don't feel strongly about not allowing this use case. If it's easy to support, why not have it ? Otherwise, I'd be +1 on adding a check and raise an error in case a width modifier is used with these markers. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 15:46:07 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 13:46:07 +0000 Subject: [issue9393] shelve.open/bsddb.hashopen exception with unicode paths In-Reply-To: <1280308243.23.0.510970772038.issue9393@psf.upfronthosting.co.za> Message-ID: <1280324767.37.0.280365662522.issue9393@psf.upfronthosting.co.za> STINNER Victor added the comment: Same patch for Python 3.2. ---------- Added file: http://bugs.python.org/file18231/dbm_open_unicode-32.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 15:53:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 28 Jul 2010 13:53:59 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1280324389.19.0.734344154603.issue9315@psf.upfronthosting.co.za> Message-ID: <9B647936-248E-4F43-A8C6-EF3BA14042D4@gmail.com> Alexander Belopolsky added the comment: Yep, this looks like me. Will fix shortly. Feel free to revert my change if it stops you. On Jul 28, 2010, at 9:39 AM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > test test_sys_setprofile crashed -- : > cannot import name support > Traceback (most recent call last): > File "./Lib/test/regrtest.py", line 863, in runtest_inner > File "/home/buildbot/slave/py-build/2.7.norwitz-amd64/build/Lib/ > test/test_sys_setprofile.py", line 5, in > from test import support > ImportError: cannot import name support > > test test_sys_settrace crashed -- : > unqualified exec is not allowed in function > 'test_jump_to_firstlineno' it contains a nested function with free > variables (test_sys_settrace.py, line 777) > Traceback (most recent call last): > File "./Lib/test/regrtest.py", line 863, in runtest_inner > SyntaxError: unqualified exec is not allowed in function > 'test_jump_to_firstlineno' it contains a nested function with free > variables (test_sys_settrace.py, line 777) > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 15:55:00 2010 From: report at bugs.python.org (Peter) Date: Wed, 28 Jul 2010 13:55:00 +0000 Subject: [issue9217] 2to3 crashes with some doctests In-Reply-To: <1278790070.07.0.615684286831.issue9217@psf.upfronthosting.co.za> Message-ID: <1280325301.0.0.0596245149099.issue9217@psf.upfronthosting.co.za> Changes by Peter : ---------- nosy: +maubp _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 15:55:06 2010 From: report at bugs.python.org (Peter) Date: Wed, 28 Jul 2010 13:55:06 +0000 Subject: [issue9217] 2to3 doctests In-Reply-To: <1278790070.07.0.615684286831.issue9217@psf.upfronthosting.co.za> Message-ID: <1280325306.5.0.845560096479.issue9217@psf.upfronthosting.co.za> Changes by Peter : ---------- title: 2to3 crashes with some doctests -> 2to3 doctests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 15:56:21 2010 From: report at bugs.python.org (Peter) Date: Wed, 28 Jul 2010 13:56:21 +0000 Subject: [issue9217] 2to3 crashes with some doctests In-Reply-To: <1278790070.07.0.615684286831.issue9217@psf.upfronthosting.co.za> Message-ID: <1280325381.68.0.444430854728.issue9217@psf.upfronthosting.co.za> Peter added the comment: Reverted accidental title change - had keyboard focus on the page not the address bar I think. Sorry! ---------- title: 2to3 doctests -> 2to3 crashes with some doctests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 16:07:45 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 28 Jul 2010 14:07:45 +0000 Subject: [issue9393] shelve.open/bsddb.hashopen exception with unicode paths In-Reply-To: <1280308243.23.0.510970772038.issue9393@psf.upfronthosting.co.za> Message-ID: <1280326065.76.0.145549931866.issue9393@psf.upfronthosting.co.za> R. David Murray added the comment: Victor's comments were addressed to the python development community and concern python internals. Given that only bsddb exists on windows by default, his patches unfortunately don't do you any good. I'm adding jcea as nosy in case he wants to/can deal with the problem in bsddb. ---------- nosy: +jcea, r.david.murray stage: -> unit test needed versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 16:08:29 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 14:08:29 +0000 Subject: [issue9397] Remove references to the missing dbm.bsd module In-Reply-To: <1280326109.56.0.0484206700812.issue9397@psf.upfronthosting.co.za> Message-ID: <1280326109.56.0.0484206700812.issue9397@psf.upfronthosting.co.za> New submission from STINNER Victor : dbm doc tells that there is a dbm.bsd module, but no, there is not. The third party module, pybsddb (or "bsddb3"), is installed as "bsddb3". Python3 dbm module was created by #2881 (r63662). Some references to dbm.bsd were removed by r72711, but not all. ---------- components: Library (Lib) messages: 111813 nosy: georg.brandl, haypo priority: normal severity: normal status: open title: Remove references to the missing dbm.bsd module versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 16:10:43 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 14:10:43 +0000 Subject: [issue9393] shelve.open/bsddb.hashopen exception with unicode paths In-Reply-To: <1280308243.23.0.510970772038.issue9393@psf.upfronthosting.co.za> Message-ID: <1280326243.67.0.338528140493.issue9393@psf.upfronthosting.co.za> STINNER Victor added the comment: It looks like bsddb (dbm.bsd) module doesn't exist anymore in Python3: see issue #9397. It's now maintained in the third party module pybsddb. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 16:40:43 2010 From: report at bugs.python.org (Ray.Allen) Date: Wed, 28 Jul 2010 14:40:43 +0000 Subject: [issue9172] zipfile.extractall always raises an OSError after successfully unzipping all files In-Reply-To: <1278355031.26.0.155948134842.issue9172@psf.upfronthosting.co.za> Message-ID: <1280328043.15.0.0358936429342.issue9172@psf.upfronthosting.co.za> Ray.Allen added the comment: I didn't see this problem in py2.7 and py3k on debian linux. Is this windows specific or this bug has been fixed since py2.7? ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 16:43:28 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 28 Jul 2010 14:43:28 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280328208.48.0.200601355213.issue9315@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > test test_sys_setprofile crashed ... Fixed in r83204 - r83206. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 16:47:58 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 14:47:58 +0000 Subject: [issue9393] shelve.open/bsddb.hashopen exception with unicode paths In-Reply-To: <1280308243.23.0.510970772038.issue9393@psf.upfronthosting.co.za> Message-ID: <1280328478.46.0.133416997202.issue9393@psf.upfronthosting.co.za> STINNER Victor added the comment: New patch for bsddb module: create parse_filename() function, based on Python3 PyUnicode_FSConverter() but it accepts None. I didn't tested the patch because I'm unable to compile the module. It looks like it should use db_185.h instead of db.h, and link to another library, but configure or setup.py doesn't know it. ---------- Added file: http://bugs.python.org/file18232/bsddb_unicode_filename-27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 16:50:46 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 14:50:46 +0000 Subject: [issue8776] Bytes version of sys.argv In-Reply-To: <1274357456.02.0.0768864678422.issue8776@psf.upfronthosting.co.za> Message-ID: <1280328646.6.0.169230278841.issue8776@psf.upfronthosting.co.za> STINNER Victor added the comment: > Using that approach would work on POSIX systems. As os.environb, I think that sys.argv should not exist on Windows. > Another problem I see is synchronizing the two os.environ and os.environb are synchronized. It would be possible to do the same with sys.argv and sys.argvb. The implement would be simplier because it's just a list, not a dict. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 16:54:29 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 28 Jul 2010 14:54:29 +0000 Subject: [issue8776] Bytes version of sys.argv In-Reply-To: <1280328646.6.0.169230278841.issue8776@psf.upfronthosting.co.za> Message-ID: <4C5044A1.9000907@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> Using that approach would work on POSIX systems. > > As os.environb, I think that sys.argv should not exist on Windows. > >> Another problem I see is synchronizing the two > > os.environ and os.environb are synchronized. It would be possible to do the same with sys.argv and sys.argvb. The implement would be simplier because it's just a list, not a dict. +1 on adding sys.argvb for systems that use char* in main(). ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 16:59:26 2010 From: report at bugs.python.org (Eric Smith) Date: Wed, 28 Jul 2010 14:59:26 +0000 Subject: [issue7330] PyUnicode_FromFormat segfault In-Reply-To: <1258314153.95.0.978747695294.issue7330@psf.upfronthosting.co.za> Message-ID: <1280329166.85.0.638205088977.issue7330@psf.upfronthosting.co.za> Eric Smith added the comment: I think under the "we're all consenting adults" doctrine that it should be allowed. If you really want that behavior, why force the char*/%s dance at each call site when it's easy enough to do it in one place? I don't think anyone supplying a width would really be surprised that it would truncate the result and possibly break round-tripping through repr. Besides, it's allowed in pure python code: >>> '%.5r' % object() ' _______________________________________ From report at bugs.python.org Wed Jul 28 17:00:20 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Jul 2010 15:00:20 +0000 Subject: [issue5412] extend configparser to support mapping access(__*item__) In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1280329220.6.0.857517809653.issue5412@psf.upfronthosting.co.za> ?ric Araujo added the comment: Note that the two versions are not exclusive: We can look for an item if a tuple is given and look for a section if it?s a string. Maybe confusing. > - we can implement a cohesive mapping protocol that extends to get(), > del, in, etc. For now get() seems somewhat similar to what > dictionaries give you We have the same problem in distutils2 with a class that supports some mapping operations but has an incompatible get method. Luckily we can still break compat there. The winning argument in my opinion is user convenience, not moderate implementation issues. Is is generally useful that config parsers and sections behave like mutable mappings? Then add the methods with the behavior I proposed. Are there compatibility problems and not much incentive? Then do it your way, and add another mechanism for my wished use. It looks like we have to go for the latter. > - manipulation on the internal structures is much simpler when we > have a single key like that. Having config['name'] return the section > would make us create another proxy object just to support mutating > keys in the section. Yeah, dict/DictMixin subclasses that implement checking and conversion wouldn?t be hard to write, but maybe it?s not worth it and we just need a method to convert the config parser to a dict (already easy with sections: dict(cp.items(section)) So if every other config parser supports cp['section', 'key'], I?m +1. I can get a real dict for a section, and I?ll open another report to request methods update and asdict methods for RawConfigParser. ---------- title: extend configparser to support [] syntax -> extend configparser to support mapping access(__*item__) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 17:02:44 2010 From: report at bugs.python.org (Michael Foord) Date: Wed, 28 Jul 2010 15:02:44 +0000 Subject: [issue5412] extend configparser to support mapping access(__*item__) In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1280329364.46.0.626525676338.issue5412@psf.upfronthosting.co.za> Michael Foord added the comment: > The winning argument in my opinion is user convenience Well yes, for me too - as the user will always be operating on (section, key) pairs the extra level of indirection seems pointless. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 17:04:02 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 28 Jul 2010 15:04:02 +0000 Subject: [issue9398] Unify sys.settrace and sys.setprofile tests In-Reply-To: <1280329442.24.0.0145405625071.issue9398@psf.upfronthosting.co.za> Message-ID: <1280329442.24.0.0145405625071.issue9398@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Th sys.settrace and sys.setprofile functions have the same interface an very similar purpose. The difference is in the types of events that get reported. However the tests for these functions are implemented separately and cover different sets of scenarios. As proposed in python-dev thread, "Does trace modules have a unit test?" [1], this RFE proposes to """ Create tracetester helper file with abstract test cases made from the union of test_sys_settrace and test_sys_setprofile test cases and replace the concrete test cases in test_sys_set* with subclasses that define setmethod, getmethod and expected_output. """ [1] http://mail.python.org/pipermail/python-dev/2010-July/102308.html See also issue 9315. ---------- assignee: belopolsky components: Tests messages: 111823 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: Unify sys.settrace and sys.setprofile tests type: feature request versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 17:06:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 28 Jul 2010 15:06:18 +0000 Subject: [issue9398] Unify sys.settrace and sys.setprofile tests In-Reply-To: <1280329442.24.0.0145405625071.issue9398@psf.upfronthosting.co.za> Message-ID: <1280329578.98.0.687597473513.issue9398@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +eli.bendersky, ncoghlan, tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 17:10:41 2010 From: report at bugs.python.org (Dennis Malcorps) Date: Wed, 28 Jul 2010 15:10:41 +0000 Subject: [issue9399] Provide a 'print' action for argparse In-Reply-To: <1280329840.94.0.288179215378.issue9399@psf.upfronthosting.co.za> Message-ID: <1280329840.94.0.288179215378.issue9399@psf.upfronthosting.co.za> New submission from Dennis Malcorps : Currently argparse has a 'version' action which can be triggered by user defined options which prints out a custom string. parser.add_argument("--version", action="version", version="test 1.2.3") Since the 'version' action can be added multiple times, it can be used to output different kinds of information, like the program's license. parser.add_argument("--license", action="version", version="This file is licensed under GPL.... [a huge amount of text]") The only drawback is that linebreaks are substituted with a normal space. So I propose a 'print' action (perhaps as a replacement for 'version'?) which respects whitespace characters. parser.add_argument("--version", action="print", message="test 1.2.3") parser.add_argument("--license", action="print", message="This file is licensed under GPL.... [a huge amount of text, now properly formatted!]") parser.add_argument("--insult-me", action="print", message="You sick *peep* , *peep* yourself in *peep*") Currently, the only solution is to create a custom action which is IMHO a bit overkill for just printing a simple string to stdout. ---------- components: Library (Lib) messages: 111824 nosy: travistouchdown priority: normal severity: normal status: open title: Provide a 'print' action for argparse type: feature request versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 17:44:39 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 28 Jul 2010 15:44:39 +0000 Subject: [issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure) In-Reply-To: <1264198934.84.0.705718671648.issue7759@psf.upfronthosting.co.za> Message-ID: <1280331879.06.0.889143391184.issue7759@psf.upfronthosting.co.za> Mark Lawrence added the comment: Since mhlib has gone from py3k is there any interest in applying this to 2.6 or 2.7, given that there's been no response to msg98232? ---------- components: +Library (Lib) nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 17:51:59 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 28 Jul 2010 15:51:59 +0000 Subject: [issue7615] unicode_escape codec does not escape quotes In-Reply-To: <1262316507.32.0.63969926675.issue7615@psf.upfronthosting.co.za> Message-ID: <1280332319.73.0.153760799051.issue7615@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could we please have some responses to msg98327 as there are some very positive comments there. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 18:03:47 2010 From: report at bugs.python.org (Nikolaus Rath) Date: Wed, 28 Jul 2010 16:03:47 +0000 Subject: [issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions In-Reply-To: <1280333027.17.0.112361474517.issue9400@psf.upfronthosting.co.za> Message-ID: <1280333027.17.0.112361474517.issue9400@psf.upfronthosting.co.za> New submission from Nikolaus Rath : The attached test program calls apply_async with a function that will raise CalledProcessError. However, when result.get() is called, it raises a TypeError and the program hangs: $ ./bug.py ERROR:root:ops Traceback (most recent call last): File "./bug.py", line 19, in run_with dW1 = run_dcon() File "./bug.py", line 26, in run_dcon subprocess.check_call(['dcon'], stdout=fh, stderr=fh) File "/usr/lib/python2.6/subprocess.py", line 498, in check_call raise CalledProcessError(retcode, cmd) CalledProcessError: Command '['dcon']' returned non-zero exit status 127 Exception in thread Thread-2: Traceback (most recent call last): File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner self.run() File "/usr/lib/python2.6/threading.py", line 484, in run self.__target(*self.__args, **self.__kwargs) File "/usr/lib/python2.6/multiprocessing/pool.py", line 259, in _handle_results task = get() TypeError: ('__init__() takes exactly 3 arguments (1 given)', , ()) ---------- components: Library (Lib) files: bug.py messages: 111827 nosy: Nikratio priority: normal severity: normal status: open title: multiprocessing.pool.AsyncResult.get() messes up exceptions type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file18233/bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 18:05:40 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 28 Jul 2010 16:05:40 +0000 Subject: [issue7325] tempfile.mkdtemp() does not return absolute pathname when dir is specified In-Reply-To: <1258226856.45.0.72736645389.issue7325@psf.upfronthosting.co.za> Message-ID: <1280333140.59.0.0706323580063.issue7325@psf.upfronthosting.co.za> Mark Lawrence added the comment: Tried this on windows against 2.7 don't see why it can't go forward. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 18:13:47 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 28 Jul 2010 16:13:47 +0000 Subject: [issue5362] Add configure option to disable Py3k warnings In-Reply-To: <1235516116.64.0.427185955219.issue5362@psf.upfronthosting.co.za> Message-ID: <1280333627.79.0.243579786999.issue5362@psf.upfronthosting.co.za> Mark Lawrence added the comment: Both msg98465 and msg98466 agree that this should not be a configuration variable. I think a new patch is needed which follows the suggested solutions from the two messages given. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 18:26:51 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 28 Jul 2010 16:26:51 +0000 Subject: [issue5077] 2to3 fixer for the removal of operator functions In-Reply-To: <1233036818.57.0.126807970128.issue5077@psf.upfronthosting.co.za> Message-ID: <1280334411.4.0.0439207507003.issue5077@psf.upfronthosting.co.za> Mark Lawrence added the comment: I see too many changes with tortoisesvn to make sense of this. Could someone with more experience please take a look, thanks. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 18:37:57 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 28 Jul 2010 16:37:57 +0000 Subject: [issue6325] robotparser doesn't handle URL's with query strings In-Reply-To: <1245731150.83.0.504271486523.issue6325@psf.upfronthosting.co.za> Message-ID: <1280335077.96.0.779122103695.issue6325@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I modified the patch slightly (so that it takes care of path, query, params and fragments). Fixed in r83209,r83210 and r83211. I also think that we need to move the robotparser to allow regexs in the allow and disallow patterns. ( Shall open an issue in the tracker, if it is not already present). ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 18:46:43 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 28 Jul 2010 16:46:43 +0000 Subject: [issue9105] pickle security note should be more prominent In-Reply-To: <1277745956.4.0.951690442784.issue9105@psf.upfronthosting.co.za> Message-ID: <1280335603.35.0.400022613152.issue9105@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 19:19:38 2010 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 28 Jul 2010 17:19:38 +0000 Subject: [issue7198] Extraneous newlines with csv.writer on Windows In-Reply-To: <1256422121.38.0.499052368843.issue7198@psf.upfronthosting.co.za> Message-ID: <1280337578.31.0.063561994913.issue7198@psf.upfronthosting.co.za> Skip Montanaro added the comment: I got access to Python 2.6.5 on Windows and ran this simple example: Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. **************************************************************** Personal firewall software may warn about the connection IDLE makes to its subprocess using this computer's internal loopback interface. This connection is not visible on any external interface and no data is sent to or received from the Internet. **************************************************************** IDLE 2.6.5 >>> f = open("H:sample.csv", "wb") >>> import csv >>> writer = csv.writer(f) >>> writer.writerow([1,2,3]) >>> writer.writerow(['a', 'b', 'c']) >>> del writer >>> f.close() >>> I then looked at the CSV file which it generated. Looked find to me. Each of the two rows was terminated by a single CRLF pair. Then I repeated the "test", opening the file in text mode: >>> f = open("H:sample2.csv", "w") >>> writer = csv.writer(f) >>> writer.writerow([1,2,3]) >>> writer.writerow(['a', 'b', 'c']) >>> del writer >>> f.close() >>> That output does indeed terminate each line with CRCRLF and when viewed in a spreadsheet program such as OpenOffice Calc (probably Excel as well), displays a blank line between the 123 row and the abc row. I've removed the "unit test needed" attribute from the ticket as there is a test_writerows test case in the Python test suite. Also closing again and marking invalid. If you still believe there is actually a problem, feel free to reopen this issue, but also please send me (skip at pobox.com) a short example and the erroneous output it produces for you (attach your two files - don't just embed them in your mail msg). ---------- resolution: -> invalid stage: unit test needed -> status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 19:56:57 2010 From: report at bugs.python.org (Michael Gilbert) Date: Wed, 28 Jul 2010 17:56:57 +0000 Subject: [issue9401] automatically try forward operations when reverse operations are NotImplemented In-Reply-To: <1280339816.95.0.28348031653.issue9401@psf.upfronthosting.co.za> Message-ID: <1280339816.95.0.28348031653.issue9401@psf.upfronthosting.co.za> New submission from Michael Gilbert : in order to make overrides simpler, and more obvious to average developers, it would be very useful to automatically call the forward operations (e.g. __mul__) when the reverse operations (e.g. __rmul__) are NotImplemented. i spent quite a bit of time trying to discover why x*3 worked (where x is a class that i created with a __mul__ method); whereas 3*x wouldn't. this feature would really help since in most applications the same behavior is expected from forward and reverse operations. for now, i am content with doing this manually, but it would be nice if it were automated. all of my reverse operations just do: def __rmul__( self , other ): return self.__mul__( other ) where i manually check the type of other in the forward operation, and then handle it appropriately. thanks for considering this. best wishes, mike ---------- components: Interpreter Core messages: 111833 nosy: Michael.Gilbert priority: normal severity: normal status: open title: automatically try forward operations when reverse operations are NotImplemented type: feature request versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 19:59:28 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 28 Jul 2010 17:59:28 +0000 Subject: [issue9183] Intern UTC timezone In-Reply-To: <1278453353.29.0.0260229757511.issue9183@psf.upfronthosting.co.za> Message-ID: <1280339968.2.0.767907651061.issue9183@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Updated issue9183a.diff patch combines C and Python code changes since datetime.py is now in stdlib. Does anyone want to review before it goes in? ---------- components: +Library (Lib) resolution: -> accepted Added file: http://bugs.python.org/file18234/issue9183a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 20:01:25 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 28 Jul 2010 18:01:25 +0000 Subject: [issue9183] Intern UTC timezone In-Reply-To: <1278453353.29.0.0260229757511.issue9183@psf.upfronthosting.co.za> Message-ID: <1280340085.56.0.0567306693038.issue9183@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 20:01:38 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 28 Jul 2010 18:01:38 +0000 Subject: [issue9051] Improve pickle format for aware datetime instances In-Reply-To: <1277151308.95.0.331220838487.issue9051@psf.upfronthosting.co.za> Message-ID: <1280340098.49.0.485024471897.issue9051@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- dependencies: +Intern UTC timezone _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 20:35:58 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 28 Jul 2010 18:35:58 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280342158.25.0.779030181628.issue7447@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am puzzled that the fake name 'itertools.itertools.chain.from_iterable' works better than the real name 'itertools.chain.from_iterable'. Some bug in the tool chain? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 20:47:59 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 28 Jul 2010 18:47:59 +0000 Subject: [issue7615] unicode_escape codec does not escape quotes In-Reply-To: <1280332319.73.0.153760799051.issue7615@psf.upfronthosting.co.za> Message-ID: <4C507B5A.4050004@egenix.com> Marc-Andre Lemburg added the comment: Mark Lawrence wrote: > > Mark Lawrence added the comment: > > Could we please have some responses to msg98327 as there are some very positive comments there. A patch implementing the suggestions would be even better :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 21:13:00 2010 From: report at bugs.python.org (Jerry Seutter) Date: Wed, 28 Jul 2010 19:13:00 +0000 Subject: [issue8911] regrtest.main should have a test skipping argument In-Reply-To: <1275794606.83.0.993053669818.issue8911@psf.upfronthosting.co.za> Message-ID: <1280344380.49.0.98878893788.issue8911@psf.upfronthosting.co.za> Jerry Seutter added the comment: Hi Brett (and others) I'm thinking of making the following changes: 1. In Lib/test/regrtest.py, move command line parsing out of main() into a function called parse_command_line() 2. parse_command_line() will parse command line settings and store them in a dictionary that can be passed in as **kwargs to main(). 3. The "exclude" parameter that main takes in will be modified to take a list. This list contains a list of tests to be skipped. 4. Update importlib/test/regrtest.py to call main() without doing sys.argv[] hacking. 5. The command line interface will remain unchanged. If regrtest.py is called without the --exclude flag, the tests supplied on the command line will be interpreted as the tests to run. If --exclude is supplied, the tests on the command line will be interpreted as the tests to _not_ run. 6. Switch regrtest.py to use argparse instead of optparse. Do these look reasonable? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 22:24:15 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 28 Jul 2010 20:24:15 +0000 Subject: [issue5680] Command-line arguments when running in IDLE In-Reply-To: <1238798556.38.0.28468201552.issue5680@psf.upfronthosting.co.za> Message-ID: <1280348655.32.0.280018854712.issue5680@psf.upfronthosting.co.za> Mark Lawrence added the comment: Putting tjr and tal on nosy list cos it's IDLE. Apologies if I've got it wrong. ---------- nosy: +BreamoreBoy, taleinat, tjreedy versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 22:30:34 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 28 Jul 2010 20:30:34 +0000 Subject: [issue7877] Iterators over _winreg EnumKey and EnumValue results In-Reply-To: <1265578300.82.0.0744515010877.issue7877@psf.upfronthosting.co.za> Message-ID: <1280349034.48.0.631378677675.issue7877@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Brian: @Tim: just a gentle nudge in the ribs in case this has slipped under the radar. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 22:34:10 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 28 Jul 2010 20:34:10 +0000 Subject: [issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC In-Reply-To: <1237348531.28.0.513167073983.issue5504@psf.upfronthosting.co.za> Message-ID: <1280349250.61.0.638659871441.issue5504@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could someone with linux experience please review the patch. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 22:40:16 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 28 Jul 2010 20:40:16 +0000 Subject: [issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC In-Reply-To: <1237348531.28.0.513167073983.issue5504@psf.upfronthosting.co.za> Message-ID: <1280349616.82.0.348295628491.issue5504@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever title: ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC -> ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 22:41:44 2010 From: report at bugs.python.org (Mark Lawrence) Date: Wed, 28 Jul 2010 20:41:44 +0000 Subject: [issue5223] infinite recursion in PyErr_WriteUnraisable In-Reply-To: <1234412915.77.0.527314714811.issue5223@psf.upfronthosting.co.za> Message-ID: <1280349704.7.0.66158057121.issue5223@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could the experts who have previously commented please advise as to whether this issue should be open, closed or whatever. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 22:42:40 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Wed, 28 Jul 2010 20:42:40 +0000 Subject: [issue9385] _ctypes module uses 'rwx' mmap() calls In-Reply-To: <1280163756.22.0.278914543931.issue9385@psf.upfronthosting.co.za> Message-ID: <1280349760.73.0.74174604965.issue9385@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: Does the patch from issue #5504 work for you? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 22:48:03 2010 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 28 Jul 2010 20:48:03 +0000 Subject: [issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC In-Reply-To: <1237348531.28.0.513167073983.issue5504@psf.upfronthosting.co.za> Message-ID: <1280350083.94.0.409310408378.issue5504@psf.upfronthosting.co.za> Dave Malcolm added the comment: FWIW, the patch for this that I'm currently applying to Fedora's python 2.7 rpms can be seen at: http://cvs.fedoraproject.org/viewvc/devel/python/python-2.7rc1-ctypes-noexecmem.patch?revision=1.1&content-type=text%2Fplain&view=co It doesn't contain the rebase of libffi (since we use the system copy of libffi in our builds), but otherwise I believe that it's essentially equivalent to: http://bugs.python.org/file13897/issue5504-linux.patch albeit rebased to 2.7, taking into account the whitespace cleanup changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 22:48:11 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 20:48:11 +0000 Subject: [issue9246] os.getcwd() hardcodes max path len In-Reply-To: <1279023059.26.0.245683093399.issue9246@psf.upfronthosting.co.za> Message-ID: <1280350091.15.0.0272403370444.issue9246@psf.upfronthosting.co.za> STINNER Victor added the comment: Antoine asked me why not using a buffer of MAX_PATH+1 (instead of a dynamic buffer size). I don't know, I just copied/pasted the code from Python2. Extract of getcwd() manpage: Note that on some systems, PATH_MAX may not be a compile-time constant; furthermore, its value may depend on the file system, see pathconf(3). It's maybe to support strange OS like Hurd :-) (Hurd has no hardcoded limits). Most of the time, the first realloc() should be enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 22:53:48 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 20:53:48 +0000 Subject: [issue9402] pyexpat: replace PyObject_DEL() by Py_DECREF() to fix a crash in pydebug mode In-Reply-To: <1280350428.05.0.23614798147.issue9402@psf.upfronthosting.co.za> Message-ID: <1280350428.05.0.23614798147.issue9402@psf.upfronthosting.co.za> New submission from STINNER Victor : PyObject_DEL() should not be used to destroy an object because it will break the linked list of allocated objects using in pydebug mode to detect bugs. pyexpat should use Py_DECREF() instead of PyObject_DEL() to destroy an object. Attached patch fixes that. See #3299 for the whole story. ---------- components: Library (Lib) files: pyexpat_py_decref.patch keywords: patch messages: 111845 nosy: haypo priority: normal severity: normal status: open title: pyexpat: replace PyObject_DEL() by Py_DECREF() to fix a crash in pydebug mode versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file18235/pyexpat_py_decref.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 22:58:25 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 20:58:25 +0000 Subject: [issue9403] cElementTree: replace PyObject_DEL() by Py_DECREF() to fix a crash in pydebug mode In-Reply-To: <1280350705.3.0.213499722891.issue9403@psf.upfronthosting.co.za> Message-ID: <1280350705.3.0.213499722891.issue9403@psf.upfronthosting.co.za> New submission from STINNER Victor : PyObject_DEL() should not be used to destroy an object because it will break the linked list of allocated objects, list used in pydebug mode to detect bugs. cElementTree should use Py_DECREF() instead of PyObject_DEL() to destroy an objects. Attached patch fixes that: * Replace PyObject_Del() by Py_DECREF() * Catch element_new_extra() errors * parser dealloc: replace Py_DECREF() by Py_XDECREF() because the pointer may be NULL (error in the constructor) * set all parser attributes to NULL at the beginning of the constructor to be able to call safetly the destructor * element_new(): define tag, text, tail attributes before calling element_new_extra() to be able to call the destructor * raise a MemoryError on element_new_extra() failure. element_new() didn't raise any error on element_new_extra() failure. Other functions just forget to catch element_new_extra() error. See #3299 for the whole story. ---------- components: Library (Lib) files: celementtree_py_decref.patch keywords: patch messages: 111846 nosy: haypo priority: normal severity: normal status: open title: cElementTree: replace PyObject_DEL() by Py_DECREF() to fix a crash in pydebug mode versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file18236/celementtree_py_decref.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 22:59:22 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 20:59:22 +0000 Subject: [issue3299] Direct calls to PyObject_Del/PyObject_DEL are broken for --with-pydebug In-Reply-To: <1215354044.0.0.987178228996.issue3299@psf.upfronthosting.co.za> Message-ID: <1280350762.23.0.223702701584.issue3299@psf.upfronthosting.co.za> STINNER Victor added the comment: > I will open new issues for the two remaining patches. Done: #9402 for pyexpat and #9403 for cElementTree. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 23:00:52 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 28 Jul 2010 21:00:52 +0000 Subject: [issue9246] os.getcwd() hardcodes max path len In-Reply-To: <1279023059.26.0.245683093399.issue9246@psf.upfronthosting.co.za> Message-ID: <1280350852.12.0.711428127091.issue9246@psf.upfronthosting.co.za> Stefan Krah added the comment: For 2.x, unlimited path lengths were apparently introduced in issue 2722. This strategy does not work on Solaris and OpenBSD (issue 9185). FreeBSD also seems to support arbitrarily long paths. I would be somewhat surprised though if anyone used them in practice. APUE (second edition) uses PATH_MAX if it's available in limits.h. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 23:26:09 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 21:26:09 +0000 Subject: [issue9283] buggy repr for os.environ In-Reply-To: <1279364859.98.0.0796685002752.issue9283@psf.upfronthosting.co.za> Message-ID: <1280352369.93.0.757076884912.issue9283@psf.upfronthosting.co.za> STINNER Victor added the comment: Fixed in 3.2 (r83214 + r83215). Other versions are not concerned. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 23:28:00 2010 From: report at bugs.python.org (Chris Leaf) Date: Wed, 28 Jul 2010 21:28:00 +0000 Subject: [issue9404] IDLE won't launch on XP In-Reply-To: <1280352480.94.0.617351160567.issue9404@psf.upfronthosting.co.za> Message-ID: <1280352480.94.0.617351160567.issue9404@psf.upfronthosting.co.za> New submission from Chris Leaf : I have been using IDLE on my previous laptop and it was working well although I have to say I'm still very new to python. I've read around about the issue and can't find any solution I can use. I can run the IDLE GUI through the python command line version by saying "import idle" but it generates a bunch of error lines (copied the command prompt): >>> import idle Traceback (most recent call last): File "", line 1, in File "c:\python31\lib\idlelib\idle.py", line 11, in idlelib.PyShell.main() File "c:\python31\lib\idlelib\PyShell.py", line 1388, in main shell = flist.open_shell() File "c:\python31\lib\idlelib\PyShell.py", line 277, in open_shell self.pyshell = PyShell(self) File "c:\python31\lib\idlelib\PyShell.py", line 813, in __init__ OutputWindow.__init__(self, flist, None, None) File "c:\python31\lib\idlelib\OutputWindow.py", line 16, in __init__ EditorWindow.__init__(self, *args) File "c:\python31\lib\idlelib\EditorWindow.py", line 261, in __init__ self.update_recent_files_list() File "c:\python31\lib\idlelib\EditorWindow.py", line 779, in update_recent_fil es_list rf_file = open(self.recent_files_path, 'w') IOError: [Errno 13] Permission denied: 'C:\\Documents and Settings\\\\.idle rc\\recent-files.lst' I have tried to use Explorer to reach the files and I get a permission error (the same occurs when trying to reach with the command prompt). I have tried to change the read only nature of this folder and it automatically reverts after the attribute is set. Also the folder is empty according to explorer. I have tried running it with my firewall disabled. I am running 32bit XP on a lenovo T510 with 3.1.2 python installed Thanks in advance! ---------- components: IDLE messages: 111850 nosy: Chris.Leaf priority: normal severity: normal status: open title: IDLE won't launch on XP type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 23:30:35 2010 From: report at bugs.python.org (mike bayer) Date: Wed, 28 Jul 2010 21:30:35 +0000 Subject: [issue9405] crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage In-Reply-To: <1280352635.35.0.910645426575.issue9405@psf.upfronthosting.co.za> Message-ID: <1280352635.35.0.910645426575.issue9405@psf.upfronthosting.co.za> New submission from mike bayer : I'm not optimistic that this will be reproducible elsewhere. I get a silent failure with 2.6 and a crash dialog with 2.7 with the following script. All elements are necessary, although the "pkg_resources" import may be arbitrary, and reproduces if it comes from the latest setuptools or if it comes from Distribute. I've attached the crash report generated by OSX in the event that someone knows how to interpret it. The script fails for me every time, though not for other people I've had test. import pkg_resources import urllib import multiprocessing def sub(): print "about to call getproxies !" urllib.getproxies() print "getproxies has completed !" process = multiprocessing.Process(target=sub) process.start() print "hi!" process.join() Process: Python [79964] Path: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: ??? (???) Code Type: X86 (Native) Parent Process: Python [79963] Date/Time: 2010-07-28 17:24:19.281 -0400 OS Version: Mac OS X 10.6.4 (10F569) Report Version: 6 Interval Since Last Report: 1137309 sec Crashes Since Last Report: 87 Per-App Crashes Since Last Report: 86 Anonymous UUID: 848E03B6-EF61-45EA-9BB7-BF9E584CC670 Exception Type: EXC_BAD_ACCESS (SIGBUS) Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000104 Crashed Thread: 0 Dispatch queue: CFMachPort Thread 0 Crashed: Dispatch queue: CFMachPort 0 libSystem.B.dylib 0x94419bdd _dispatch_wakeup + 91 1 libSystem.B.dylib 0x9454a1f2 _dispatch_queue_push_list_slow + 37 2 libSystem.B.dylib 0x94419c22 _dispatch_wakeup + 160 3 libSystem.B.dylib 0x944196e6 _dispatch_source_create2 + 194 4 libSystem.B.dylib 0x94419278 dispatch_source_timer_create_f + 286 5 libSystem.B.dylib 0x94419158 dispatch_source_timer_create + 81 6 com.apple.CoreFoundation 0x92fde72a ___CFMachPortCreateWithPort2_block_invoke_1 + 762 7 libSystem.B.dylib 0x944190c3 dispatch_barrier_sync_f + 78 8 libSystem.B.dylib 0x94418f9d dispatch_sync + 48 9 com.apple.CoreFoundation 0x92fde350 _CFMachPortCreateWithPort2 + 272 10 com.apple.CoreFoundation 0x92fe5e1c CFMachPortCreate + 204 11 com.apple.CoreFoundation 0x92fe5c39 _CFXNotificationCenterCreate + 281 12 com.apple.CoreFoundation 0x92fe5ad6 _CFXNotificationGetHostCenter + 86 13 com.apple.CoreFoundation 0x92feb432 __CFXPreferencesGetSourceForTriplet + 354 14 com.apple.CoreFoundation 0x92fea6ad __CFXPreferencesGetSearchListForBundleID + 205 15 com.apple.CoreFoundation 0x92fea555 CFPreferencesCopyAppValue + 53 16 com.apple.SystemConfiguration 0x90fc7348 SCDynamicStoreCopyProxies + 44 17 _scproxy.so 0x00746e31 get_proxies + 33 18 org.python.python 0x000ca2b3 PyEval_EvalFrameEx + 20419 19 org.python.python 0x000cbc88 PyEval_EvalFrameEx + 27032 20 org.python.python 0x000cbc88 PyEval_EvalFrameEx + 27032 21 org.python.python 0x000cc4ba PyEval_EvalCodeEx + 2042 22 org.python.python 0x00041ca2 function_call + 162 23 org.python.python 0x0000f375 PyObject_Call + 85 24 org.python.python 0x000c7d5b PyEval_EvalFrameEx + 10859 25 org.python.python 0x000cbc88 PyEval_EvalFrameEx + 27032 26 org.python.python 0x000cbc88 PyEval_EvalFrameEx + 27032 27 org.python.python 0x000cc4ba PyEval_EvalCodeEx + 2042 28 org.python.python 0x00041ca2 function_call + 162 29 org.python.python 0x0000f375 PyObject_Call + 85 30 org.python.python 0x00021c66 instancemethod_call + 422 31 org.python.python 0x0000f375 PyObject_Call + 85 32 org.python.python 0x0007c8a7 slot_tp_init + 87 33 org.python.python 0x0007b2d0 type_call + 176 34 org.python.python 0x0000f375 PyObject_Call + 85 35 org.python.python 0x000c8ad6 PyEval_EvalFrameEx + 14310 36 org.python.python 0x000cbc88 PyEval_EvalFrameEx + 27032 37 org.python.python 0x000cc4ba PyEval_EvalCodeEx + 2042 38 org.python.python 0x000cc647 PyEval_EvalCode + 87 39 org.python.python 0x000f0ae8 PyRun_FileExFlags + 168 40 org.python.python 0x000f1a23 PyRun_SimpleFileExFlags + 867 41 org.python.python 0x0010a42b Py_Main + 3163 42 org.python.python 0x00001f82 0x1000 + 3970 43 org.python.python 0x00001ea9 0x1000 + 3753 Thread 0 crashed with X86 Thread State (32-bit): eax: 0xa04c511c ebx: 0xa04c50f4 ecx: 0x00000001 edx: 0x00000100 edi: 0x003011e0 esi: 0x003011d0 ebp: 0xbfffd5e8 esp: 0xbfffd5c0 ss: 0x0000001f efl: 0x00010206 eip: 0x94419bdd cs: 0x00000017 ds: 0x0000001f es: 0x0000001f fs: 0x00000000 gs: 0x00000037 cr2: 0x00000104 Binary Images: 0x1000 - 0x1ff5 +org.python.python 2.7.0 (2.7.0) /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python 0x5000 - 0x142fe3 +org.python.python 2.7.0, (c) 2004-2008 Python Software Foundation. (2.7.0) <2815ECAD-BE96-97DE-C757-303EB571862B> /Library/Frameworks/Python.framework/Versions/2.7/Python 0x2e1000 - 0x2f2ffd +zlib.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/zlib.so 0x2f7000 - 0x2f8fff +time.so ??? (???) <36AF5C9C-9495-3868-8A5A-4706C959F102> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/time.so 0x561000 - 0x564fff +strop.so ??? (???) <255B3A81-AAF1-B616-41BC-C7B31DC15E8E> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/strop.so 0x56a000 - 0x56affd +gestalt.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/gestalt.so 0x56e000 - 0x56fffe +MacOS.so ??? (???) <5E7E7E83-F983-3B58-053C-3114B498F8E3> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/MacOS.so 0x5b4000 - 0x5bbff7 +_socket.so ??? (???) <6FFA1EB1-7D65-C514-22D2-20B663BC031D> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_socket.so 0x5c4000 - 0x5c4ff3 +_functools.so ??? (???) <16603A15-F05E-ABA0-1AC4-86CD702988ED> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_functools.so 0x5c8000 - 0x5cbff7 +_ssl.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_ssl.so 0x5d1000 - 0x5f7fff libssl.0.9.7.dylib 0.9.7 (compatibility 0.9.7) <73B10885-F9AF-5B9D-A91C-D96869959EA5> /usr/lib/libssl.0.9.7.dylib 0x606000 - 0x6bbfe7 libcrypto.0.9.7.dylib 0.9.7 (compatibility 0.9.7) <2E52683A-7E8E-68D5-5AC6-09962C37CB98> /usr/lib/libcrypto.0.9.7.dylib 0x701000 - 0x702ff2 +cStringIO.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cStringIO.so 0x707000 - 0x70aff3 +_collections.so ??? (???) <99610C80-5BDE-9B42-326E-C84573CF9ACC> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_collections.so 0x710000 - 0x713ff7 +operator.so ??? (???) <286CBCF9-86C0-F84F-659C-F3EE95C7D4E1> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so 0x71a000 - 0x71fff6 +itertools.so ??? (???) <47DA9FDB-A82B-FE94-1445-207EF0CF75B0> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/itertools.so 0x728000 - 0x728ff5 +_bisect.so ??? (???) <0E86828B-074D-1E3B-4E6D-0871A2C3C65E> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_bisect.so 0x72c000 - 0x72dff9 +_heapq.so ??? (???) <6C69EE01-CD6B-5092-B0DD-8DBE3FAACB50> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_heapq.so 0x732000 - 0x735fff +_struct.so ??? (???) <0770C896-2971-B7E4-99F6-ECC9506E3A18> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_struct.so 0x73c000 - 0x741fff +binascii.so ??? (???) <0ABB3540-FABB-FCB4-98FE-9997110E0713> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/binascii.so 0x746000 - 0x746ff0 +_scproxy.so ??? (???) <8181FFBE-17E2-C16E-4DF3-4C692A430C22> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_scproxy.so 0x78a000 - 0x78aff5 +_weakref.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_weakref.so 0x78e000 - 0x790fff +_multiprocessing.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_multiprocessing.so 0x795000 - 0x7a3fff +cPickle.so ??? (???) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/cPickle.so 0x8fe00000 - 0x8fe4162b dyld 132.1 (???) /usr/lib/dyld 0x90003000 - 0x90104fe7 libxml2.2.dylib 10.3.0 (compatibility 10.0.0) /usr/lib/libxml2.2.dylib 0x90105000 - 0x901bbffb libFontParser.dylib ??? (???) <067DC1A2-764B-41EA-B07E-4205472749B7> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib 0x909b5000 - 0x909b8ff7 libCoreVMClient.dylib ??? (???) <420D9D10-B00E-202D-AA98-026996AB97DD> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib 0x909b9000 - 0x909dafe7 com.apple.opencl 12.1 (12.1) /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL 0x90a53000 - 0x90a99ff7 libauto.dylib ??? (???) <0898A4A1-28BC-5337-EE17-D55C74F975F4> /usr/lib/libauto.dylib 0x90a9a000 - 0x90ab2ff7 com.apple.CFOpenDirectory 10.6 (10.6) <1537FB4F-C112-5D12-1E5D-3B1002A4038F> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory 0x90ab3000 - 0x90b2efe7 com.apple.audio.CoreAudio 3.2.2 (3.2.2) <51D0E2DC-B15F-AF6C-70D8-026DDAD4E2A5> /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x90b6a000 - 0x90b6aff7 com.apple.ApplicationServices 38 (38) <8012B504-3D83-BFBB-DA65-065E061CFE03> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices 0x90b6b000 - 0x90baffe7 com.apple.Metadata 10.6.3 (507.10) <630494FA-3BB3-EDD3-E10B-8DAAF4831E26> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata 0x90bf7000 - 0x90db1fe3 com.apple.ImageIO.framework 3.0.3 (3.0.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/ImageIO 0x90db2000 - 0x90dc3ff7 com.apple.LangAnalysis 1.6.6 (1.6.6) <97511CC7-FE23-5AC3-2EE2-B5479FAEB316> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis 0x90f5a000 - 0x90f5eff7 IOSurface ??? (???) <66E11D8E-CF4B-EFD0-37F9-20177C647021> /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface 0x90fb9000 - 0x90ff6ff7 com.apple.SystemConfiguration 1.10.2 (1.10.2) <398BB007-41FD-1A30-26D8-CB86ED5E467E> /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration 0x90ff7000 - 0x91061fe7 libstdc++.6.dylib 7.9.0 (compatibility 7.0.0) <411D87F4-B7E1-44EB-F201-F8B4F9227213> /usr/lib/libstdc++.6.dylib 0x91062000 - 0x91084fef com.apple.DirectoryService.Framework 3.6 (621.3) /System/Library/Frameworks/DirectoryService.framework/Versions/A/DirectoryService 0x91085000 - 0x91088ffb com.apple.help 1.3.1 (41) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help 0x910c8000 - 0x91123ff7 com.apple.framework.IOKit 2.0 (???) /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x91124000 - 0x911fffe7 com.apple.DesktopServices 1.5.7 (1.5.7) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv 0x91233000 - 0x91294fe7 com.apple.CoreText 3.1.0 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/CoreText 0x91295000 - 0x912a3ff7 com.apple.opengl 1.6.8 (1.6.8) /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x912bd000 - 0x9135afe3 com.apple.LaunchServices 362.1 (362.1) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices 0x9137b000 - 0x913b3ff7 libcups.2.dylib 2.8.0 (compatibility 2.0.0) <76C02F5C-98FD-BD64-B5FB-C698FB76EA25> /usr/lib/libcups.2.dylib 0x913bb000 - 0x913bdff7 com.apple.securityhi 4.0 (36638) <38D36D4D-C798-6ACE-5FA8-5C001993AD6B> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI 0x913be000 - 0x913d2ffb com.apple.speech.synthesis.framework 3.10.35 (3.10.35) <0DBE17D5-17A2-8A0E-8572-5A78408B41C9> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x913d3000 - 0x9146bfe7 edu.mit.Kerberos 6.5.10 (6.5.10) <8B83AFF3-C074-E47C-4BD0-4546EED0D1BC> /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x9146c000 - 0x914eeffb SecurityFoundation ??? (???) <3670AE8B-06DA-C447-EB14-79423DB9C474> /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation 0x9151b000 - 0x915c8fe7 libobjc.A.dylib 227.0.0 (compatibility 1.0.0) <22CD62D4-9E7D-C31A-F585-FCEF1FE4C39A> /usr/lib/libobjc.A.dylib 0x91673000 - 0x918e3ffb com.apple.Foundation 6.6.3 (751.29) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x918e4000 - 0x91915ff7 libGLImage.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib 0x91916000 - 0x9193cfff com.apple.DictionaryServices 1.1.1 (1.1.1) <00C1B034-5AE7-996C-CDD3-5A21DA1DBAC9> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices 0x91974000 - 0x91993ff7 com.apple.CoreVideo 1.6.1 (45.5) <2FB7F93F-39C8-6ACE-EDFD-C843965842CD> /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x91994000 - 0x91998ff7 libGIF.dylib ??? (???) <3ECD4D2C-40FE-E9A0-A2D2-E36D1C00D3A8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x91999000 - 0x919abff7 com.apple.MultitouchSupport.framework 204.13 (204.13) /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport 0x91af8000 - 0x91b0dfff com.apple.ImageCapture 6.0 (6.0) <0E86F45E-E656-9015-7AD4-A2C5F8D8A2FA> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture 0x91b0e000 - 0x91b18fe7 com.apple.audio.SoundManager 3.9.3 (3.9.3) <5F494955-7290-2D91-DA94-44B590191771> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CarbonSound.framework/Versions/A/CarbonSound 0x928bc000 - 0x92975fe7 libsqlite3.dylib 9.6.0 (compatibility 9.0.0) <16CEF8E8-8C9A-94CD-EF5D-05477844C005> /usr/lib/libsqlite3.dylib 0x92a89000 - 0x92e9fff7 libBLAS.dylib 219.0.0 (compatibility 1.0.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 0x92fa5000 - 0x9311ffe3 com.apple.CoreFoundation 6.6.3 (550.29) <00373783-3744-F47D-2191-BEEA658F0C3D> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x9314a000 - 0x9314aff7 com.apple.CoreServices 44 (44) /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x932ac000 - 0x932b0ff7 libGFXShared.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib 0x932b1000 - 0x932c1ff7 libsasl2.2.dylib 3.15.0 (compatibility 3.0.0) /usr/lib/libsasl2.2.dylib 0x932c2000 - 0x932d6fe7 libbsm.0.dylib ??? (???) <821E415B-6C42-D359-78FF-E892792F8C52> /usr/lib/libbsm.0.dylib 0x932e3000 - 0x932e3ff7 com.apple.Accelerate 1.6 (Accelerate 1.6) /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x932e4000 - 0x932e7fe7 libmathCommon.A.dylib 315.0.0 (compatibility 1.0.0) <1622A54F-1A98-2CBE-B6A4-2122981A500E> /usr/lib/system/libmathCommon.A.dylib 0x932f0000 - 0x93614fef com.apple.HIToolbox 1.6.3 (???) <0A5F56E2-9AF3-728D-70AE-429522AEAD8A> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 0x93657000 - 0x93721fef com.apple.CoreServices.OSServices 357 (357) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices 0x93822000 - 0x93864ff7 libvDSP.dylib 268.0.1 (compatibility 1.0.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib 0x93865000 - 0x9386aff7 com.apple.OpenDirectory 10.6 (10.6) <92582807-E8F3-3DD9-EB42-4195CFB754A1> /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory 0x9386b000 - 0x93977ff7 libGLProgrammability.dylib ??? (???) <23AB2443-1DB3-3BFE-38A6-11F0BE453989> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLProgrammability.dylib 0x93978000 - 0x93978ff7 com.apple.vecLib 3.6 (vecLib 3.6) <7362077A-890F-3AEF-A8AB-22247B10E106> /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x939ae000 - 0x93a56ffb com.apple.QD 3.35 (???) <37854644-864D-A3F2-7116-89F2F28E1CA4> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD 0x93b06000 - 0x93b6affb com.apple.htmlrendering 72 (1.1.4) <4D451A35-FAB6-1288-71F6-F24A4B6E2371> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HTMLRendering.framework/Versions/A/HTMLRendering 0x93be7000 - 0x93c97ff3 com.apple.ColorSync 4.6.3 (4.6.3) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync 0x93cbf000 - 0x93ccdfe7 libz.1.dylib 1.2.3 (compatibility 1.0.0) <3CE8AA79-F077-F1B0-A039-9103A4A02E92> /usr/lib/libz.1.dylib 0x93d1f000 - 0x93d9ffeb com.apple.SearchKit 1.3.0 (1.3.0) <2F5DE102-A203-7905-7D12-FCBCF17BAEF8> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit 0x94287000 - 0x942a3fe3 com.apple.openscripting 1.3.1 (???) <480D41B6-F98E-8E21-CA3C-4CA6A9752D3D> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting 0x943ea000 - 0x943ebff7 com.apple.audio.units.AudioUnit 1.6.3 (1.6.3) /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x943ec000 - 0x943f3ff3 com.apple.print.framework.Print 6.1 (237.1) <9758733E-7FBB-29CF-04F3-0D6D6B4C6A78> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print 0x943f4000 - 0x9459afeb libSystem.B.dylib 125.2.0 (compatibility 1.0.0) <3441F338-2218-6D36-3F95-3A16FBF6713D> /usr/lib/libSystem.B.dylib 0x9459b000 - 0x945deff7 com.apple.NavigationServices 3.5.4 (182) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/NavigationServices.framework/Versions/A/NavigationServices 0x94610000 - 0x94612ff7 libRadiance.dylib ??? (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x94949000 - 0x94992fe7 libTIFF.dylib ??? (???) <9CFF48CC-4852-4D06-17AC-3C947C824159> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x94a96000 - 0x94cf9fef com.apple.security 6.1.1 (37594) <8AE73F5F-936C-80F6-B05B-A50C3082569C> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x94cfa000 - 0x94d47feb com.apple.DirectoryService.PasswordServerFramework 6.0 (6.0) /System/Library/PrivateFrameworks/PasswordServer.framework/Versions/A/PasswordServer 0x94d48000 - 0x94d68fe7 libresolv.9.dylib 41.0.0 (compatibility 1.0.0) <751955F3-21FB-A03A-4E92-1F3D4EFB8C5B> /usr/lib/libresolv.9.dylib 0x94d69000 - 0x94dacff7 libGLU.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib 0x95a9b000 - 0x95aa5ffb com.apple.speech.recognition.framework 3.11.1 (3.11.1) <6E3481DF-645E-6095-0CD7-9BEBEC2ED9D1> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition 0x95adf000 - 0x95b12ff7 com.apple.AE 496.4 (496.4) <582F5E9D-1B8E-6D03-EBB8-AA85F66253E2> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE 0x95b53000 - 0x95be5fe3 com.apple.print.framework.PrintCore 6.2 (312.5) <2A8801E6-6D9F-68F5-947D-A1D68BE4F876> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore 0x95be6000 - 0x95be6ff7 com.apple.Carbon 150 (152) <9252D5F2-462D-2C15-80F3-109644D6F704> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x95c29000 - 0x95d06ff7 com.apple.vImage 4.0 (4.0) <64597E4B-F144-DBB3-F428-0EC3D9A1219E> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage 0x95d07000 - 0x95d12ff7 libGL.dylib ??? (???) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x95d13000 - 0x95d37ff7 libJPEG.dylib ??? (???) <5CE96981-6B2A-D15B-4A17-E7BD329095B6> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x95e37000 - 0x9619fff7 com.apple.QuartzCore 1.6.2 (227.22) <4288F0D2-0C87-F054-C372-8764B44DE024> /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x966a7000 - 0x966a8ff7 com.apple.TrustEvaluationAgent 1.1 (1) <07E7D892-5054-23A8-7144-3F19D3BFD48F> /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent 0x966dc000 - 0x966e2fff com.apple.CommonPanels 1.2.4 (91) <2438AF5D-067B-B9FD-1248-2C9987F360BA> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels 0x96a03000 - 0x96aacff7 com.apple.CFNetwork 454.9.7 (454.9.7) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CFNetwork.framework/Versions/A/CFNetwork 0x96aad000 - 0x96b5bff3 com.apple.ink.framework 1.3.3 (107) <0AFEBD7C-D83C-7847-C075-9B427505F7F0> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink 0x97aae000 - 0x97abaff7 libkxld.dylib ??? (???) <322A4B52-8305-3081-6B74-813C3A87A56D> /usr/lib/system/libkxld.dylib 0x97abb000 - 0x97ac4ff7 com.apple.DiskArbitration 2.3 (2.3) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration 0x97ade000 - 0x97b22ff3 com.apple.coreui 2 (114) /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x97b23000 - 0x97e43feb com.apple.CoreServices.CarbonCore 861.13 (861.13) <52803668-3669-36BD-57DD-078FBA835081> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore 0x97e44000 - 0x98279ff7 libLAPACK.dylib 219.0.0 (compatibility 1.0.0) <5E2D2283-57DE-9A49-1DB0-CD027FEFA6C2> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib 0x9827a000 - 0x983a6fff com.apple.audio.toolbox.AudioToolbox 1.6.3 (1.6.3) /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x9852e000 - 0x98620ff7 libcrypto.0.9.8.dylib 0.9.8 (compatibility 0.9.8) /usr/lib/libcrypto.0.9.8.dylib 0x98854000 - 0x988a5ff7 com.apple.HIServices 1.8.0 (???) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices 0x989e2000 - 0x989efff7 com.apple.NetFS 3.2.1 (3.2.1) /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS 0x98a64000 - 0x98be6fe7 libicucore.A.dylib 40.0.0 (compatibility 1.0.0) <2314BD12-0821-75BB-F3BC-98D324CFD30A> /usr/lib/libicucore.A.dylib 0x98be7000 - 0x98c56ff7 libvMisc.dylib 268.0.1 (compatibility 1.0.0) <5C3D7DA5-29EB-A745-E32B-26DBF547D532> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib 0x98c57000 - 0x98cf2ff7 com.apple.ApplicationServices.ATS 4.3 (???) <7ECA252B-5F67-2816-A4F0-73E1DC833728> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS 0x98cf3000 - 0x994e2557 com.apple.CoreGraphics 1.543.50 (???) <74533178-5C90-0F54-1B06-2E1C5251ED5D> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics 0x99501000 - 0x99501ff7 com.apple.Accelerate.vecLib 3.6 (vecLib 3.6) <1DEC639C-173D-F808-DE0D-4070CC6F5BC7> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib 0x996a9000 - 0x996c4ff7 libPng.dylib ??? (???) <36A3D75E-5178-4358-7F02-444E276D61AD> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x998cc000 - 0x998f4ff7 libxslt.1.dylib 3.24.0 (compatibility 3.0.0) <769EF4B2-C1AD-73D5-AAAD-1564DAEA77AF> /usr/lib/libxslt.1.dylib 0x998f5000 - 0x99945ff7 com.apple.framework.familycontrols 2.0.1 (2010) /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/FamilyControls 0xffff0000 - 0xffff1fff libSystem.B.dylib ??? (???) <3441F338-2218-6D36-3F95-3A16FBF6713D> /usr/lib/libSystem.B.dylib Model: MacBookPro6,2, BootROM MBP61.0057.B09, 2 processors, Intel Core i7, 2.66 GHz, 8 GB, SMC 1.58f16 Graphics: NVIDIA GeForce GT 330M, NVIDIA GeForce GT 330M, PCIe, 512 MB Graphics: Intel HD Graphics, Intel HD Graphics, Built-In, 288 MB Memory Module: global_name AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x93), Broadcom BCM43xx 1.0 (5.10.131.16.1) Bluetooth: Version 2.3.3f8, 2 service, 12 devices, 1 incoming serial ports Network Service: AirPort, AirPort, en1 Serial ATA Device: Hitachi HTS545050B9SA02, 465.76 GB Serial ATA Device: MATSHITADVD-R UJ-898 USB Device: Hub, 0x0424 (SMSC), 0x2514, 0xfa100000 USB Device: Apple Internal Keyboard / Trackpad, 0x05ac (Apple Inc.), 0x0236, 0xfa120000 USB Device: BRCM2070 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0xfa110000 USB Device: Bluetooth USB Host Controller, 0x05ac (Apple Inc.), 0x8218, 0xfa113000 USB Device: Internal Memory Card Reader, 0x05ac (Apple Inc.), 0x8403, 0xfa130000 USB Device: Hub, 0x0424 (SMSC), 0x2514, 0xfd100000 USB Device: Built-in iSight, 0x05ac (Apple Inc.), 0x8507, 0xfd110000 USB Device: IR Receiver, 0x05ac (Apple Inc.), 0x8242, 0xfd120000 ---------- assignee: ronaldoussoren components: Macintosh messages: 111851 nosy: ronaldoussoren, zzzeek priority: normal severity: normal status: open title: crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage type: crash versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 23:31:08 2010 From: report at bugs.python.org (James Tatum) Date: Wed, 28 Jul 2010 21:31:08 +0000 Subject: [issue9406] ConfigParser exceptions do not subclass StandardError In-Reply-To: <1280352667.98.0.230915344385.issue9406@psf.upfronthosting.co.za> Message-ID: <1280352667.98.0.230915344385.issue9406@psf.upfronthosting.co.za> New submission from James Tatum : ConfigParser defines a number of exception classes which all ultimately derive from ConfigParser.Error. ConfigParser.Error, however, only derives from Exception. These should all derive from StandardError. ---------- components: Library (Lib) files: ConfigParser.StandardError.patch keywords: patch messages: 111852 nosy: jtatum priority: normal severity: normal status: open title: ConfigParser exceptions do not subclass StandardError versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file18237/ConfigParser.StandardError.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 23:39:26 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 28 Jul 2010 21:39:26 +0000 Subject: [issue9404] IDLE won't launch on XP In-Reply-To: <1280352480.94.0.617351160567.issue9404@psf.upfronthosting.co.za> Message-ID: <4C50A38A.6030303@v.loewis.de> Martin v. L?wis added the comment: > I have tried to use Explorer to reach the files and I get a > permission error (the same occurs when trying to reach with the > command prompt). I have tried to change the read only nature of this > folder and it automatically reverts after the attribute is set. Also > the folder is empty according to explorer. I have tried running it > with my firewall disabled. As a work-around, remove the hidden flag from the idlerc folder and all of its files. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 23:43:34 2010 From: report at bugs.python.org (Chris Leaf) Date: Wed, 28 Jul 2010 21:43:34 +0000 Subject: [issue9404] IDLE won't launch on XP In-Reply-To: <1280352480.94.0.617351160567.issue9404@psf.upfronthosting.co.za> Message-ID: <1280353414.11.0.35780186181.issue9404@psf.upfronthosting.co.za> Chris Leaf added the comment: Also the IDLE that I do manage to get open really doesn't work correctly, more errors appear on the command line console as I try to do things like close the IDLE window. So that doesn't serve as a useful tool either ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 23:44:26 2010 From: report at bugs.python.org (James Tatum) Date: Wed, 28 Jul 2010 21:44:26 +0000 Subject: [issue9406] ConfigParser exceptions do not subclass StandardError In-Reply-To: <1280352667.98.0.230915344385.issue9406@psf.upfronthosting.co.za> Message-ID: <1280353466.33.0.604822444192.issue9406@psf.upfronthosting.co.za> Changes by James Tatum : Removed file: http://bugs.python.org/file18237/ConfigParser.StandardError.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 23:44:40 2010 From: report at bugs.python.org (James Tatum) Date: Wed, 28 Jul 2010 21:44:40 +0000 Subject: [issue9406] ConfigParser exceptions do not subclass StandardError In-Reply-To: <1280352667.98.0.230915344385.issue9406@psf.upfronthosting.co.za> Message-ID: <1280353480.89.0.879070087538.issue9406@psf.upfronthosting.co.za> Changes by James Tatum : Added file: http://bugs.python.org/file18238/ConfigParser.StandardError.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 23:45:37 2010 From: report at bugs.python.org (James Tatum) Date: Wed, 28 Jul 2010 21:45:37 +0000 Subject: [issue9406] ConfigParser exceptions do not subclass StandardError In-Reply-To: <1280352667.98.0.230915344385.issue9406@psf.upfronthosting.co.za> Message-ID: <1280353537.03.0.947523472035.issue9406@psf.upfronthosting.co.za> Changes by James Tatum : Removed file: http://bugs.python.org/file18238/ConfigParser.StandardError.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 23:45:46 2010 From: report at bugs.python.org (James Tatum) Date: Wed, 28 Jul 2010 21:45:46 +0000 Subject: [issue9406] ConfigParser exceptions do not subclass StandardError In-Reply-To: <1280352667.98.0.230915344385.issue9406@psf.upfronthosting.co.za> Message-ID: <1280353546.65.0.139749053094.issue9406@psf.upfronthosting.co.za> Changes by James Tatum : Added file: http://bugs.python.org/file18239/ConfigParser.StandardError.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 23:46:46 2010 From: report at bugs.python.org (Chris Leaf) Date: Wed, 28 Jul 2010 21:46:46 +0000 Subject: [issue9404] IDLE won't launch on XP In-Reply-To: <1280352480.94.0.617351160567.issue9404@psf.upfronthosting.co.za> Message-ID: <1280353606.82.0.599575310255.issue9404@psf.upfronthosting.co.za> Chris Leaf added the comment: I can clear the attributes from the properties window of the folder but if I remove them both it will automatically reset it back to Read Only every time i close the properties window. I can get it to be hidden but I can't make it permanently available. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 23:49:34 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 28 Jul 2010 21:49:34 +0000 Subject: [issue9404] IDLE won't launch on XP In-Reply-To: <1280353606.82.0.599575310255.issue9404@psf.upfronthosting.co.za> Message-ID: <4C50A5E7.5000902@v.loewis.de> Martin v. L?wis added the comment: > I can clear the attributes from the properties window of the folder > but if I remove them both it will automatically reset it back to Read > Only every time i close the properties window. I can get it to be > hidden but I can't make it permanently available. I'm not talking about the read-only attribute. It's alright that you can't clear it - Windows doesn't support that, and it's not a problem at all. I'm talking about the "hidden" attribute. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 23:50:41 2010 From: report at bugs.python.org (w31rd0) Date: Wed, 28 Jul 2010 21:50:41 +0000 Subject: [issue9405] crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage In-Reply-To: <1280352635.35.0.910645426575.issue9405@psf.upfronthosting.co.za> Message-ID: <1280353841.74.0.948554204274.issue9405@psf.upfronthosting.co.za> w31rd0 added the comment: I get crash dialog with both 2.6 and 2.7 (both installed from macports) under Mac OS X 10.6.4. ---------- nosy: +w31rd0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jul 28 23:53:59 2010 From: report at bugs.python.org (Chris Leaf) Date: Wed, 28 Jul 2010 21:53:59 +0000 Subject: [issue9404] IDLE won't launch on XP In-Reply-To: <1280352480.94.0.617351160567.issue9404@psf.upfronthosting.co.za> Message-ID: <1280354039.18.0.660924556639.issue9404@psf.upfronthosting.co.za> Chris Leaf added the comment: The hidden field is not filled in, here's a screenshot of the attributes options ---------- Added file: http://bugs.python.org/file18240/Attributes.JPG _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 00:08:09 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 28 Jul 2010 22:08:09 +0000 Subject: [issue9404] IDLE won't launch on XP In-Reply-To: <4C50A9ED.8050007@v.loewis.de> Message-ID: <4C50AA46.5070503@v.loewis.de> Martin v. L?wis added the comment: > Ok. Remove the entire .idlerc folder, then. Before doing that (if you still can) try something else. Go *into* the .idlerc folder, and remove the hidden flag from all individual files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 00:12:24 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 28 Jul 2010 22:12:24 +0000 Subject: [issue9406] ConfigParser exceptions do not subclass StandardError In-Reply-To: <1280352667.98.0.230915344385.issue9406@psf.upfronthosting.co.za> Message-ID: <1280355144.6.0.73258827605.issue9406@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thank you for your interest in contributing. In this case, since StandardError is actually deprecated (and removed in 3.x), this change has to be rejected. ---------- nosy: +merwok resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 00:15:20 2010 From: report at bugs.python.org (Chris Leaf) Date: Wed, 28 Jul 2010 22:15:20 +0000 Subject: [issue9404] IDLE won't launch on XP In-Reply-To: <1280352480.94.0.617351160567.issue9404@psf.upfronthosting.co.za> Message-ID: <1280355320.63.0.580585621827.issue9404@psf.upfronthosting.co.za> Chris Leaf added the comment: Upon trying to delete I'm prompted with an error: Access is denied. Make sure the disc is not full or write-protected and that the file is currently not in use. My disc isn't full and I cannot find anything accessing it (and the folder is empty so...) Is there a way around this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 00:16:03 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 28 Jul 2010 22:16:03 +0000 Subject: [issue9404] IDLE won't launch on XP In-Reply-To: <1280352480.94.0.617351160567.issue9404@psf.upfronthosting.co.za> Message-ID: <1280355363.38.0.799618963451.issue9404@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The folder is not empty. Configure Explorer so that it displays hidden files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 00:16:23 2010 From: report at bugs.python.org (Chris Leaf) Date: Wed, 28 Jul 2010 22:16:23 +0000 Subject: [issue9404] IDLE won't launch on XP In-Reply-To: <1280352480.94.0.617351160567.issue9404@psf.upfronthosting.co.za> Message-ID: <1280355383.73.0.960182530327.issue9404@psf.upfronthosting.co.za> Chris Leaf added the comment: I also cannot get into the folder itself. "Access Denied" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 00:25:27 2010 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 28 Jul 2010 22:25:27 +0000 Subject: [issue7490] IGNORE_EXCEPTION_DETAIL should ignore the module name In-Reply-To: <1280324443.1.0.494519649979.issue7490@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: On Wed, Jul 28, 2010 at 11:40 PM, Peter wrote: > > Peter added the comment: > > I take it the IGNORE_EXCEPTION_DETAIL should ignore the module name > fix will not be applied to Python 3.1.x? Correct (it's a new feature rather than a bug fix) > Is there a separate bug to enhance 2to3 to turn IGNORE_EXCEPTION_DETAIL > on? That would be a separate request, but I'm not sure it is even feasible (doctests live inside strings, so I believe 2to3 has trouble fixing them - otherwise we would just get it to handle the exception renaming directly). Feel free to post an RFE though - the 2to3 folks can take a look at it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 00:49:27 2010 From: report at bugs.python.org (Andrew Wu) Date: Wed, 28 Jul 2010 22:49:27 +0000 Subject: [issue9407] ConfigParser documentation does not mention ConfigParser.Error as base exception class for ConfigParser exceptions In-Reply-To: <1280357367.5.0.752576251051.issue9407@psf.upfronthosting.co.za> Message-ID: <1280357367.5.0.752576251051.issue9407@psf.upfronthosting.co.za> New submission from Andrew Wu : * Reference bug http://bugs.python.org/issue9406 * Reference documentation at http://docs.python.org/library/configparser.html The docs list all the specific errors to look out for, but does not mention the base exception class for ConfigParser errors (ConfigParser.Error). It may be useful to mention it to show the exception heirarchy as well as in the case a user may want to catch all ConfigParser errors generally. ---------- assignee: docs at python components: Documentation messages: 111866 nosy: docs at python, pekkle priority: normal severity: normal status: open title: ConfigParser documentation does not mention ConfigParser.Error as base exception class for ConfigParser exceptions type: feature request versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 00:58:04 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 22:58:04 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1280357884.17.0.668768771209.issue3873@psf.upfronthosting.co.za> STINNER Victor added the comment: New version of my patch: - add "used" attribute to UnpicklerBuffer structure: disable the read buffer for not seekable file and for protocol 0 (at the first call to unpickle_readline) - check if PyObject_GetAttrString(file, "seek") is NULL or not - unpickle_readline() flushs also the buffer - add a new patch specific to the read buffer: ensure that unpickler doesn't eat data at the end of the file test_pickle pass without any error. Disable read buffer at the first call to unpickle_readline() because unpickle_readline() have to flush the buffer. I will be very difficult to optimize protocol 0, but I hope that nobody uses it nowadays. =========== Benchmark with [0]*10**6, Python compiled with pydebug. Without the patch ----------------- Protocol 0: - dump: 598.0 ms - load (seekable=False): 3337.3 ms - load (seekable=True): 3309.6 ms Protocol 1: - dump: 217.8 ms - load (seekable=False): 864.2 ms - load (seekable=True): 873.3 ms Protocol 2: - dump: 226.5 ms - load (seekable=False): 867.8 ms - load (seekable=True): 854.6 ms With the patch -------------- Protocol 0 - dump: 615.5 ms - load (seekable=False): 3201.3 ms - load (seekable=True): 3223.4 ms Protocol 1 - dump: 219.8 ms - load (seekable=False): 942.1 ms - load (seekable=True): 175.2 ms Protocol 2 - dump: 221.1 ms - load (seekable=False): 943.9 ms - load (seekable=True): 175.5 ms ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 00:59:53 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 22:59:53 +0000 Subject: [issue3130] In some UCS4 builds, sizeof(Py_UNICODE) could end up being more than 4. In-Reply-To: <1213695549.9.0.858416360908.issue3130@psf.upfronthosting.co.za> Message-ID: <1280357993.36.0.241364819228.issue3130@psf.upfronthosting.co.za> STINNER Victor added the comment: This issue has no patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 01:02:27 2010 From: report at bugs.python.org (Chris Leaf) Date: Wed, 28 Jul 2010 23:02:27 +0000 Subject: [issue9404] IDLE won't launch on XP In-Reply-To: <1280352480.94.0.617351160567.issue9404@psf.upfronthosting.co.za> Message-ID: <1280358147.73.0.752706905506.issue9404@psf.upfronthosting.co.za> Chris Leaf added the comment: The problem is that I can do nothing to the folder at all ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 01:10:33 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 23:10:33 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1280358633.49.0.0132905391353.issue3873@psf.upfronthosting.co.za> STINNER Victor added the comment: Same benchmark with Python 2.6.5+, so without the patch, but compiled with maximum compiler optimization (whereas pydebug means no optimization): Protocol 0 - dump: 517.3 ms - load: 876.6 ms <= because of the new I/O library, python3 is much slower Protocol 1 - dump: 141.8 ms - load: 255.2 ms <= with my patch, python3 is 1.5x faster Protocol 2 - dump: 142.7 ms - load: 262.1 ms <= with my patch, python3 is 1.5x faster It would be better to redo all tests with the same compiler options, but the most important point is that Python3 is *faster* than Python2 with my patch ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 01:11:20 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 23:11:20 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1280358680.82.0.00274138330591.issue3873@psf.upfronthosting.co.za> STINNER Victor added the comment: bench_pickle.py: script used to produce last benchmarks. ---------- Added file: http://bugs.python.org/file18241/bench_pickle.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 01:25:34 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 23:25:34 +0000 Subject: [issue8990] array constructor and array.fromstring should accept bytearray. In-Reply-To: <1276458174.59.0.784735349158.issue8990@psf.upfronthosting.co.za> Message-ID: <1280359534.22.0.167402199454.issue8990@psf.upfronthosting.co.za> STINNER Victor added the comment: I prefer the second solution (add to/frombytes, deprecate to/fromstring) because I prefer the new method names and it keeps backward compatibility (until we choose to remove the old methods, which should be in Python 3.3). About the patch (tofrombytes.diff). You should use PyErr_WarnEx() result: if it is not nul (eg. if the user choosed to raise exceptions on warnings), you have to exit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 01:27:41 2010 From: report at bugs.python.org (Ned Deily) Date: Wed, 28 Jul 2010 23:27:41 +0000 Subject: [issue9405] crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage In-Reply-To: <1280352635.35.0.910645426575.issue9405@psf.upfronthosting.co.za> Message-ID: <1280359661.74.0.944376908452.issue9405@psf.upfronthosting.co.za> Ned Deily added the comment: There have been similar problems reported in the past when subprocesses cause OS X CoreFoundation interfaces to be first called from the subprocess and not the main process. A quick workaround is to make a call from the main process. In this case, adding a call to urllib.getproxies() before calling Process appears to fix the problem for me. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 01:41:25 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 28 Jul 2010 23:41:25 +0000 Subject: [issue6538] MatchObject is not a hyperlink in the 're' module documentation In-Reply-To: <1248215363.5.0.63292386695.issue6538@psf.upfronthosting.co.za> Message-ID: <1280360485.6.0.372635603438.issue6538@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I believe these patches are wrong, at least in part, and should be reverted. 1.The re module no longer has either a class RegexObject or a class MatchObject. (They are now _sre.SRE_Pattern and _sre.SRE_Match.) So the previous reference to them as anonymous "Compiled regular expression objects" and "Match objects" (lower case 'objects') was correct, certainly more correct that marking the fake names as real code. In other words. 'MatchObject' should be removed, not hyperlinked. This issue came up today on python-list when someone tried "help(re.MatchObject)" and got a module attribute error. I was about to open a new issue when I discovered this one. I recommend changing the re.match entry from "return a corresponding MatchObject instance." to "return a match object" (which is what the current doc string says) and removing all the misleading RegexObject and MatchObject fake-class method prefixes, The prefixes are present in 2.6 and already removed in 2.7. I think they should also be removed from the 3.x docs. (Unless, of course, re is changed to add/reinstate those names, which could only happen in 3.2.) 2. I believe it is the policy that the 3.x docs 'start fresh' with 3.0. Ancient back-compatibility notes like "(Incompatibility note: in the original Python 1.5 release, if the tuple was one element long, a string would be returned instead. In later versions (from 1.5.1 on), a singleton tuple is returned in such cases.)" were intentionally, not accidentally, removed in 3.0. So I think it a mistake to put revert the removal and that the reversion should be reverted. 3. This is more of a question. I have noticed that optional parameters with defaults are sometimes bracketed and sometimes not. Since the brackets are redundant, I prefer without as less cluttered and so I question the addition in the 3.2 patch. But is there a definitive current doc style guide? In any case, removing the default value while changing 'group=0' to '[group]' seems wrong. ---------- assignee: brian.curtin -> christian.heimes nosy: +christian.heimes, tjreedy resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 01:49:52 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 28 Jul 2010 23:49:52 +0000 Subject: [issue9408] curses: Link against libncursesw instead of libncurses In-Reply-To: <1280360992.02.0.384889308435.issue9408@psf.upfronthosting.co.za> Message-ID: <1280360992.02.0.384889308435.issue9408@psf.upfronthosting.co.za> New submission from STINNER Victor : Because of #7384, Python3 now links _curses.so to ncurses library (bytes version) instead of ncursesw library (unicode version) if readline is linked to ncurses. I'm using Linux (Debian Sid). On Linux, Python3 should maybe only link to the unicode version, because the bytes version has many issues with unicode and lacks many functions. See also: - #1428494: "Prefer linking against ncursesw over ncurses library" (so I consider this issue as a regression). - #4787 (reuse the nosy list from #7384) ---------- components: Library (Lib), Unicode messages: 111875 nosy: Arfrever, akuchling, asmodai, haypo, mark.dickinson, r.david.murray, rpetrov, skrah priority: normal severity: normal status: open title: curses: Link against libncursesw instead of libncurses versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 01:54:49 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 28 Jul 2010 23:54:49 +0000 Subject: [issue6538] MatchObject is not a hyperlink in the 're' module documentation In-Reply-To: <1248215363.5.0.63292386695.issue6538@psf.upfronthosting.co.za> Message-ID: <1280361289.94.0.374604157227.issue6538@psf.upfronthosting.co.za> Brian Curtin added the comment: I'm guessing assigning to Christian was accidental - taking it back for myself. ---------- assignee: christian.heimes -> brian.curtin priority: low -> normal stage: committed/rejected -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 02:45:06 2010 From: report at bugs.python.org (mike bayer) Date: Thu, 29 Jul 2010 00:45:06 +0000 Subject: [issue9405] crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage In-Reply-To: <1280352635.35.0.910645426575.issue9405@psf.upfronthosting.co.za> Message-ID: <1280364306.36.0.967071243458.issue9405@psf.upfronthosting.co.za> mike bayer added the comment: right...so I would propose the function calls in question emit a warning or something when called in a child process. this would save lots of people many hours of grief. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 03:00:03 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 29 Jul 2010 01:00:03 +0000 Subject: [issue8603] Create a bytes version of os.environ and getenvb() In-Reply-To: <1272876986.0.0.50581565866.issue8603@psf.upfronthosting.co.za> Message-ID: <1280365203.17.0.366428906412.issue8603@psf.upfronthosting.co.za> Ezio Melotti added the comment: FWIW os.environb is missing from os.__all__. ---------- stage: -> committed/rejected type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 03:05:54 2010 From: report at bugs.python.org (Ned Deily) Date: Thu, 29 Jul 2010 01:05:54 +0000 Subject: [issue9405] crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage In-Reply-To: <1280352635.35.0.910645426575.issue9405@psf.upfronthosting.co.za> Message-ID: <1280365554.59.0.790744148316.issue9405@psf.upfronthosting.co.za> Ned Deily added the comment: There should be a way to provide a permanent fix to avoid the problem; that will take more investigation. This was just a workaround suggestion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 03:08:27 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 29 Jul 2010 01:08:27 +0000 Subject: [issue8603] Create a bytes version of os.environ and getenvb() In-Reply-To: <1272876986.0.0.50581565866.issue8603@psf.upfronthosting.co.za> Message-ID: <1280365707.71.0.0176269867884.issue8603@psf.upfronthosting.co.za> Ezio Melotti added the comment: A quick search[0] also shows that environ.data is used by several projects. Changing it from str to bytes will most likely break these programs, so I'm not sure it's a good idea. Also, if I understand correctly, on Windows os.environ.data still contains str, so it's inconsistent with other systems. IMHO os.environ.data should contain str, whereas os.environb.data bytes. If they must share the same data I would prefer them to be both str. [0]: http://www.google.com/codesearch?q=lang%3Apython+environ.data&hl=en ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 03:24:07 2010 From: report at bugs.python.org (Hugo Lopes Tavares) Date: Thu, 29 Jul 2010 01:24:07 +0000 Subject: [issue9409] doctest in python2.7 can't handle non-ascii characters In-Reply-To: <1280366647.79.0.277931146737.issue9409@psf.upfronthosting.co.za> Message-ID: <1280366647.79.0.277931146737.issue9409@psf.upfronthosting.co.za> New submission from Hugo Lopes Tavares : When trying to run my test suite I had a problem with python2.7. My suite ran 100% in Python2.4, Python2.5, Python2.6 and Python3.2a0, so I thought it would be a kind of doctest flaw. Taking a look at the code, there is the following in doctest.py:1331: source = example.source.encode('ascii', 'backslashreplace') The problem is that my doctest file had non-ascii files and I got trouble. hugo at hugo-laptop:~/issue$ python2.7 example.py non-ascii.txt Doctest: non-ascii.txt ... ok ascii.txt Doctest: ascii.txt ... ERROR ====================================================================== ERROR: ascii.txt Doctest: ascii.txt ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.7/doctest.py", line 2148, in runTest test, out=new.write, clear_globs=False) File "/usr/local/lib/python2.7/doctest.py", line 1382, in run return self.__run(test, compileflags, out) File "/usr/local/lib/python2.7/doctest.py", line 1272, in __run got += _exception_traceback(exc_info) File "/usr/local/lib/python2.7/doctest.py", line 244, in _exception_traceback traceback.print_exception(exc_type, exc_val, exc_tb, file=excout) File "/usr/local/lib/python2.7/traceback.py", line 125, in print_exception print_tb(tb, limit, file) File "/usr/local/lib/python2.7/traceback.py", line 69, in print_tb line = linecache.getline(filename, lineno, f.f_globals) File "/usr/local/lib/python2.7/linecache.py", line 14, in getline lines = getlines(filename, module_globals) File "/usr/local/lib/python2.7/doctest.py", line 1331, in __patched_linecache_getlines source = example.source.encode('ascii', 'backslashreplace') UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 19: ordinal not in range(128) ---------------------------------------------------------------------- Ran 2 tests in 0.006s FAILED (errors=1) hugo at hugo-laptop:~/issue$ Taking an inner look at doctest.py in python2.6 and python2.7 I realized there is another inconsistency with filenames in both (I was lucky to try at first a filename that doesn't match the regex): __LINECACHE_FILENAME_RE = re.compile(r'[\w\.]+)' r'\[(?P\d+)\]>$') Well, is the file name, but filenames are not only composed of alphanums and dots. Maybe it should be slightly different, like: __LINECACHE_FILENAME_RE = re.compile(r'.+?)' r'\[(?P\d+)\]>$', re.UNICODE) Because we can have several kinds of names. But it is not the top of the iceberg, anyaway. To solve my problem, I propose moving back that first snippet to how it was in python2.6. The diff would be: --- /usr/local/lib/python2.7/doctest.py 2010-07-28 22:07:01.272234398 -0300 +++ doctest.py 2010-07-28 22:20:42.000000000 -0300 @@ -1328,8 +1328,7 @@ m = self.__LINECACHE_FILENAME_RE.match(filename) if m and m.group('name') == self.test.name: example = self.test.examples[int(m.group('examplenum'))] - source = example.source.encode('ascii', 'backslashreplace') - return source.splitlines(True) + return example.source.splitlines(True) else: return self.save_linecache_getlines(filename, module_globals) ---------- files: ascii.txt messages: 111881 nosy: hugo priority: normal severity: normal status: open title: doctest in python2.7 can't handle non-ascii characters type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file18242/ascii.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 03:24:59 2010 From: report at bugs.python.org (Hugo Lopes Tavares) Date: Thu, 29 Jul 2010 01:24:59 +0000 Subject: [issue9409] doctest in python2.7 can't handle non-ascii characters In-Reply-To: <1280366647.79.0.277931146737.issue9409@psf.upfronthosting.co.za> Message-ID: <1280366699.16.0.515914490442.issue9409@psf.upfronthosting.co.za> Changes by Hugo Lopes Tavares : Added file: http://bugs.python.org/file18243/non-ascii.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 03:25:20 2010 From: report at bugs.python.org (Hugo Lopes Tavares) Date: Thu, 29 Jul 2010 01:25:20 +0000 Subject: [issue9409] doctest in python2.7 can't handle non-ascii characters In-Reply-To: <1280366647.79.0.277931146737.issue9409@psf.upfronthosting.co.za> Message-ID: <1280366720.56.0.581480526958.issue9409@psf.upfronthosting.co.za> Changes by Hugo Lopes Tavares : Added file: http://bugs.python.org/file18244/example.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 03:32:05 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 29 Jul 2010 01:32:05 +0000 Subject: [issue9409] doctest in python2.7 can't handle non-ascii characters In-Reply-To: <1280366647.79.0.277931146737.issue9409@psf.upfronthosting.co.za> Message-ID: <1280367125.54.0.491150105954.issue9409@psf.upfronthosting.co.za> Ezio Melotti added the comment: This change has been introduced in r79307 (see #7667). The error seems to be raised because example.source is not unicode so it gets decoded implicitly before getting encoded with ascii+backslashreplace. I don't know if example.source is always supposed to be str or if the type might be different in some situations. ---------- components: +Library (Lib), Tests, Unicode nosy: +ezio.melotti, flox stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 03:41:02 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 29 Jul 2010 01:41:02 +0000 Subject: [issue6538] MatchObject is not a hyperlink in the 're' module documentation In-Reply-To: <1248215363.5.0.63292386695.issue6538@psf.upfronthosting.co.za> Message-ID: <1280367662.68.0.561053608671.issue6538@psf.upfronthosting.co.za> Brian Curtin added the comment: How does this patch look? It changes RegexObject to _sre.SRE_Pattern and MatchObject to _sre.SRE_Match. Additionally, references are used to link to those classes generically as "match objects" or "compiled regular expressions" rather than the fake classes used before. ---------- stage: -> patch review Added file: http://bugs.python.org/file18245/issue6538_corrections.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 04:03:51 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 29 Jul 2010 02:03:51 +0000 Subject: [issue6538] MatchObject is not a hyperlink in the 're' module documentation In-Reply-To: <1248215363.5.0.63292386695.issue6538@psf.upfronthosting.co.za> Message-ID: <1280369031.39.0.799627865978.issue6538@psf.upfronthosting.co.za> Ezio Melotti added the comment: The patch looks good to me, but I'm not sure if it's a good idea to use _sre.SRE_*. I think these are implementation details and even if they should be mentioned somewhere, they "clutter" the doc IMHO. > 2. I believe it is the policy that the 3.x docs 'start fresh' with 3.0. Yes, they should be removed. > 3. [...] In any case, removing the default value while changing 'group=0' to '[group]' seems wrong. If it's possible to specify a default value the [] should be avoided. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 04:24:15 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 29 Jul 2010 02:24:15 +0000 Subject: [issue6538] MatchObject is not a hyperlink in the 're' module documentation In-Reply-To: <1248215363.5.0.63292386695.issue6538@psf.upfronthosting.co.za> Message-ID: <1280370255.99.0.896728363426.issue6538@psf.upfronthosting.co.za> Brian Curtin added the comment: I didn't actually want to use _sre.SRE_* but I'm not exactly sure how to hide it. It's more correct that way, but it takes this issue the wrong direction by exposing it. I think it should be denoted as a class but with a generic name, if that's even possible. It would actually be nice if the lines "class _sre.*" were just invisible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 04:43:17 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 29 Jul 2010 02:43:17 +0000 Subject: [issue9399] Provide a 'print' action for argparse In-Reply-To: <1280329840.94.0.288179215378.issue9399@psf.upfronthosting.co.za> Message-ID: <1280371397.72.0.244509538882.issue9399@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +bethard versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 04:45:04 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 29 Jul 2010 02:45:04 +0000 Subject: [issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions In-Reply-To: <1280333027.17.0.112361474517.issue9400@psf.upfronthosting.co.za> Message-ID: <1280371504.35.0.537648078078.issue9400@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +jnoller stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 05:22:01 2010 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 29 Jul 2010 03:22:01 +0000 Subject: [issue3173] external strftime for Python? In-Reply-To: <1214189093.82.0.548435251403.issue3173@psf.upfronthosting.co.za> Message-ID: <1280373721.14.0.946393265172.issue3173@psf.upfronthosting.co.za> Guido van Rossum added the comment: What about the licensing? That look like the BSD license *with* advertising clause... ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 05:33:09 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 29 Jul 2010 03:33:09 +0000 Subject: [issue9406] ConfigParser exceptions do not subclass StandardError In-Reply-To: <1280352667.98.0.230915344385.issue9406@psf.upfronthosting.co.za> Message-ID: <1280374389.52.0.203012833856.issue9406@psf.upfronthosting.co.za> R. David Murray added the comment: It would have been invalid in any case, since ConfigParser.Error is not a built in exception. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 05:43:54 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 29 Jul 2010 03:43:54 +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: <1280375034.78.0.933131835746.issue7490@psf.upfronthosting.co.za> R. David Murray added the comment: 2to3 can convert doctests, it just can't convert the *output* portion of doctests. because they are arbitrary strings and not syntactically valid Python code. Since turning on this flag would require recognizing something in the output portion of the doctest (which 2to3 doesn't handle), it can't be turned on by 2to3. On the other hand, it seems like it wouldn't be too hard to write a special purpose script to handle this specific case...since I don't know 2to3, I don't know how hard it would be to integrate such a special purpose script. (I do remember Benjamin saying 2to3 really ought to have a plugin system...so my guess is the answer is "not too easy"). In any case, as Nick said, that would be a separate RFE, and will likely get nowhere without someone volunteering to write the script/patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 05:50:30 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 29 Jul 2010 03:50:30 +0000 Subject: [issue9407] ConfigParser documentation does not mention ConfigParser.Error as base exception class for ConfigParser exceptions In-Reply-To: <1280357367.5.0.752576251051.issue9407@psf.upfronthosting.co.za> Message-ID: <1280375430.88.0.69704066425.issue9407@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 05:55:21 2010 From: report at bugs.python.org (Ray.Allen) Date: Thu, 29 Jul 2010 03:55:21 +0000 Subject: [issue231540] threads and profiler don't work together Message-ID: <1280375721.53.0.521181741583.issue231540@psf.upfronthosting.co.za> Ray.Allen added the comment: I don't think this problem still exists now. In the current implementation, there is no "sys_tracefunc" and "sys_profilefunc" in PyThreadState, but "c_profilefunc", "c_profileobj", "c_tracefunc", "c_traceobj" instead. When creating a new thread, the "c_profilefunc" and "c_tracefunc" are inherited from main thread, and the profile function is thread specific, it only collect profile statistic of the executing functions in its own thread, that is, each thread can profile its own executing. I'd change the example as follows: def child(): def yo(): for j in range(5): print(j) profile.runctx('yo()', globals(), locals()) def go(): threading.Thread(target=child).start() time.sleep(1) profile.runctx('go()', globals(), locals()) This will output two profile statistics, one is for main thread, another is for child thread: child(). So if you want to profile a child thread, just call profile.run() in child thread. So I don't think this is a problem. ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 05:58:13 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 29 Jul 2010 03:58:13 +0000 Subject: [issue6538] MatchObject is not a hyperlink in the 're' module documentation In-Reply-To: <1248215363.5.0.63292386695.issue6538@psf.upfronthosting.co.za> Message-ID: <1280375893.24.0.961013923746.issue6538@psf.upfronthosting.co.za> R. David Murray added the comment: Please note that my original suggestion was to make them *section* links (:ref:s). As Terry says, they are not real classes and should not be marked up as such. Nor should the internal class names be exposed. Terry: [] notation is 2.x, they should all be gone (with the possible exception of a few C functions) in the 3.x docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 06:02:29 2010 From: report at bugs.python.org (Ray.Allen) Date: Thu, 29 Jul 2010 04:02:29 +0000 Subject: [issue5412] extend configparser to support mapping access(__*item__) In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1280376149.94.0.167040149072.issue5412@psf.upfronthosting.co.za> Ray.Allen added the comment: > Note that the two versions are not exclusive: We can look for an item if a tuple is given and look for a section if it?s a string. Maybe confusing. +1. I think this is a good idea. Getting a section and Getting a key-value are both very common operations when parsing "ini" config file. Both operations should be supported conveniently. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 07:48:18 2010 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 29 Jul 2010 05:48:18 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1280382498.64.0.913973348516.issue3873@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Victor, have you tried using peek() instead of seek()? I mentioned this previously in msg85780. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 07:53:22 2010 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 29 Jul 2010 05:53:22 +0000 Subject: [issue5077] 2to3 fixer for the removal of operator functions In-Reply-To: <1233036818.57.0.126807970128.issue5077@psf.upfronthosting.co.za> Message-ID: <1280382802.68.0.0290699122293.issue5077@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: The patch look great. Can you update your patch to make it work against the version of 2to3 in the sandbox (http://svn.python.org/sandbox/trunk/2to3)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 08:08:09 2010 From: report at bugs.python.org (Ray.Allen) Date: Thu, 29 Jul 2010 06:08:09 +0000 Subject: [issue7330] PyUnicode_FromFormat segfault In-Reply-To: <1258314153.95.0.978747695294.issue7330@psf.upfronthosting.co.za> Message-ID: <1280383689.41.0.797458494299.issue7330@psf.upfronthosting.co.za> Ray.Allen added the comment: You can write "%20s" as a argument for PyUnicode_FromFormat(), but it has no effect. The width and precision modifiers are not intended to apply to string formating(%s, %S, %R, %A), only apply to integer(%d, %u, %i, %x). Though you can write "%20s", but you cannot write "%20S", "%20R" and "%20A". There can be several fixes: 1. make the presence of width and precision modifiers of %s, %S, %R, %A raise an Exception, like ValueError, instead of segment fault. 2. make the presence of width and precision modifiers of %s, %S, %R, %A have no effect, just like current %s. 3. make the presence of width and precision modifiers of %s, %S, %R, %A do have correct effect, like %r and %s in string formatting in python code. Thanks to Eric's ideas. Now I'm sure I prefer the last fix. I will work out a patch for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 08:26:08 2010 From: report at bugs.python.org (Alexandre Vassalotti) Date: Thu, 29 Jul 2010 06:26:08 +0000 Subject: [issue9410] Add Unladden Swallow's optimizations to Python 3's pickle. In-Reply-To: <1280384767.75.0.12386540434.issue9410@psf.upfronthosting.co.za> Message-ID: <1280384767.75.0.12386540434.issue9410@psf.upfronthosting.co.za> New submission from Alexandre Vassalotti : This is a big patch. Please review at http://codereview.appspot.com/1694050/show This patch adds the most interesting optimizations from Unladen Swallow to Python 3's pickle. The core of the patch already been reviewed by Antoine and me (http://codereview.appspot.com/33070/show). One of the last issue remaining the unbounded size of the internal buffer. This shouldn't be a big issue for most uses of pickle, since the size of a pickle is often several times smaller than the object hierarchy that created it. I still hope to fix this in a following patch. The patch also include additional cleanups to the Pdata structure. The changes felt natural to make along with the other changes from Unladen Swallow. IIRC, these changes yield an additional 1-3% speedup. ---------- assignee: alexandre.vassalotti components: Extension Modules files: pickle_optimizations.diff keywords: patch messages: 111895 nosy: alexandre.vassalotti, belopolsky, collinwinter, haypo, pitrou priority: normal severity: normal stage: patch review status: open title: Add Unladden Swallow's optimizations to Python 3's pickle. type: performance versions: Python 3.2 Added file: http://bugs.python.org/file18246/pickle_optimizations.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 09:51:34 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 29 Jul 2010 07:51:34 +0000 Subject: [issue9405] crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage In-Reply-To: <1280352635.35.0.910645426575.issue9405@psf.upfronthosting.co.za> Message-ID: <1280389894.19.0.246911340208.issue9405@psf.upfronthosting.co.za> Ronald Oussoren added the comment: mike: the crash is a bug and I will try to find a solution for it. A number of Apple APIs have issues with being called in child processes created with fork without calling exec. This sucks big time. ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 09:56:24 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 29 Jul 2010 07:56:24 +0000 Subject: [issue8603] Create a bytes version of os.environ and getenvb() In-Reply-To: <1280365707.71.0.0176269867884.issue8603@psf.upfronthosting.co.za> Message-ID: <4C513424.2090300@egenix.com> Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > A quick search[0] also shows that environ.data is used by several projects. Changing it from str to bytes will most likely break these programs, so I'm not sure it's a good idea. > Also, if I understand correctly, on Windows os.environ.data still contains str, so it's inconsistent with other systems. > IMHO os.environ.data should contain str, whereas os.environb.data bytes. If they must share the same data I would prefer them to be both str. > > [0]: http://www.google.com/codesearch?q=lang%3Apython+environ.data&hl=en Direct use of os.environ.data is not permitted as it is not a documented feature, so I wouldn't worry about this. The few uses you found are easy to fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 10:06:29 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 29 Jul 2010 08:06:29 +0000 Subject: [issue9405] crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage In-Reply-To: <1280352635.35.0.910645426575.issue9405@psf.upfronthosting.co.za> Message-ID: <1280390789.98.0.012328883051.issue9405@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Interestingly enough I don't get the crash in a copy of 2.7, but do get the crash in a copy of 2.6. The former was build on 10.6, the later on 10.5. Both 3.1 and 3.2 crash reliably for me (after porting the script to py3k) /usr/bin/python doesn't crash, but that's because it doesn't get proxy information from the system. ---------- versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 10:08:21 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 29 Jul 2010 08:08:21 +0000 Subject: [issue9411] configparser doesn't support specifying encoding in read() In-Reply-To: <1280390900.93.0.0125296662028.issue9411@psf.upfronthosting.co.za> Message-ID: <1280390900.93.0.0125296662028.issue9411@psf.upfronthosting.co.za> New submission from ?ukasz Langa : By default, configparser classes simply `open()` and `read()` files specified in the list passed to `.read()`. This means these calls use the default platform-specific encoding and this is prone to breakage. An existing solution is to use `readfp()` and pass files one by one to it, handling opening them with a specific encoding manually. This is needlessly complex as it increases the amount of boilerplate needed. Please find attached a patch where I've added an `encoding=` argument to the `read()` method. By default it chooses `sys.getdefaultencoding()` so the behaviour is backwards compatible. We might consider switching that to 'UTF-8' but there are many INI files from the Windows land encoded in Windows specific codepages. Anyway, the currently proposed implementation is compatible and enables specifying an `encoding` explicitly. The patch includes a new unit test and some minor fixes for behaviour exposed by this test. ---------- files: cfgparser.3 messages: 111899 nosy: brian.curtin, ezio.melotti, georg.brandl, lukasz.langa, michael.foord priority: normal severity: normal status: open title: configparser doesn't support specifying encoding in read() Added file: http://bugs.python.org/file18247/cfgparser.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 10:10:12 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 29 Jul 2010 08:10:12 +0000 Subject: [issue9411] configparser doesn't support specifying encoding in read() In-Reply-To: <1280390900.93.0.0125296662028.issue9411@psf.upfronthosting.co.za> Message-ID: <1280391012.41.0.461042304376.issue9411@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Patch included. ---------- components: +Library (Lib) keywords: +patch type: -> feature request versions: +Python 3.2 Added file: http://bugs.python.org/file18248/issue9411.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 11:02:32 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 29 Jul 2010 09:02:32 +0000 Subject: [issue9412] test_smtpd leaks references In-Reply-To: <1280394152.03.0.913816495774.issue9412@psf.upfronthosting.co.za> Message-ID: <1280394152.03.0.913816495774.issue9412@psf.upfronthosting.co.za> New submission from Antoine Pitrou : See http://mail.python.org/pipermail/python-checkins/2010-July/095648.html test_smtpd leaked [25, 25, 25] references, sum=75 ---------- assignee: richard components: Library (Lib) messages: 111901 nosy: giampaolo.rodola, pitrou, richard priority: high severity: normal status: open title: test_smtpd leaks references type: resource usage versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 11:18:46 2010 From: report at bugs.python.org (=?utf-8?q?Teemu_Rytk=C3=B6nen?=) Date: Thu, 29 Jul 2010 09:18:46 +0000 Subject: [issue9172] zipfile.extractall always raises an OSError after successfully unzipping all files In-Reply-To: <1278355031.26.0.155948134842.issue9172@psf.upfronthosting.co.za> Message-ID: <1280395126.5.0.967638378954.issue9172@psf.upfronthosting.co.za> Teemu Rytk?nen added the comment: Hi! I haven't tested this in linux or with python 2.7 so can't say for sure.. However I would assume that the main issue is with the zipdate it self (So does it have those empty directories, which at least winzip creates) and then about how does the os.mkdir act with when trying to create already existing folder. Did you try it with the example_1.zip, which has those folders described in the zip centralrecord?? Should I also try it out with linux? -Teemu ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 11:28:30 2010 From: report at bugs.python.org (Michael Foord) Date: Thu, 29 Jul 2010 09:28:30 +0000 Subject: [issue9411] configparser doesn't support specifying encoding in read() In-Reply-To: <1280390900.93.0.0125296662028.issue9411@psf.upfronthosting.co.za> Message-ID: <1280395710.72.0.155128078965.issue9411@psf.upfronthosting.co.za> Michael Foord added the comment: Seems good to me (the feature - and also the patch after a cursory read through). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 11:41:08 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 29 Jul 2010 09:41:08 +0000 Subject: [issue9410] Add Unladden Swallow's optimizations to Python 3's pickle. In-Reply-To: <1280384767.75.0.12386540434.issue9410@psf.upfronthosting.co.za> Message-ID: <1280396463.3175.24.camel@localhost.localdomain> Antoine Pitrou added the comment: Le jeudi 29 juillet 2010 ? 06:26 +0000, Alexandre Vassalotti a ?crit : > New submission from Alexandre Vassalotti : > > This is a big patch. Please review at > http://codereview.appspot.com/1694050/show > > This patch adds the most interesting optimizations from Unladen > Swallow to Python 3's pickle. > > The core of the patch already been reviewed by Antoine and me > (http://codereview.appspot.com/33070/show). One of the last issue > remaining the unbounded size of the internal buffer. This shouldn't be > a big issue for most uses of pickle, since the size of a pickle is > often several times smaller than the object hierarchy that created it. > I still hope to fix this in a following patch. I still think this should be fixed in this patch, especially since it will also change benchmark numbers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 11:55:40 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 29 Jul 2010 09:55:40 +0000 Subject: [issue9405] crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage In-Reply-To: <1280352635.35.0.910645426575.issue9405@psf.upfronthosting.co.za> Message-ID: <1280397340.15.0.438078815748.issue9405@psf.upfronthosting.co.za> Ronald Oussoren added the comment: explains the issue that Ned mentions, I'm not sure yet if this crash is related to that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 12:00:24 2010 From: report at bugs.python.org (Ray.Allen) Date: Thu, 29 Jul 2010 10:00:24 +0000 Subject: [issue9172] zipfile.extractall always raises an OSError after successfully unzipping all files In-Reply-To: <1278355031.26.0.155948134842.issue9172@psf.upfronthosting.co.za> Message-ID: <1280397624.31.0.0028473375125.issue9172@psf.upfronthosting.co.za> Ray.Allen added the comment: I found that this issue is duplicate with issue6050. And the bug has been fixed since 2.6.3. So this issue should be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 12:10:21 2010 From: report at bugs.python.org (Eric Smith) Date: Thu, 29 Jul 2010 10:10:21 +0000 Subject: [issue9411] configparser doesn't support specifying encoding in read() In-Reply-To: <1280390900.93.0.0125296662028.issue9411@psf.upfronthosting.co.za> Message-ID: <1280398221.73.0.520837798452.issue9411@psf.upfronthosting.co.za> Eric Smith added the comment: The feature request seems reasonable to me, too. I don't recall if sys.getdefaultencoding() can change while a program is running. If so, you might want to change: def read(self, filenames, encoding=sys.getdefaultencoding()): to: def read(self, filenames, encoding=None): if encoding is None: encoding=sys.getdefaultencoding() Also, what if the files have different encodings? The patch seems to include 2 features: the encoding change and a comment parsing change. You should separate that into two patches. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 12:55:21 2010 From: report at bugs.python.org (me myself) Date: Thu, 29 Jul 2010 10:55:21 +0000 Subject: [issue9413] asyncore.close_all() should call x.handle_close() instead of x.close() In-Reply-To: <1280400921.75.0.874188585283.issue9413@psf.upfronthosting.co.za> Message-ID: <1280400921.75.0.874188585283.issue9413@psf.upfronthosting.co.za> New submission from me myself : Title says it all. ---------- messages: 111908 nosy: me.myself priority: normal severity: normal status: open title: asyncore.close_all() should call x.handle_close() instead of x.close() type: behavior versions: Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 13:03:09 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 29 Jul 2010 11:03:09 +0000 Subject: [issue9413] asyncore.close_all() should call x.handle_close() instead of x.close() In-Reply-To: <1280400921.75.0.874188585283.issue9413@psf.upfronthosting.co.za> Message-ID: <1280401389.84.0.521948528349.issue9413@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +giampaolo.rodola versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 13:09:19 2010 From: report at bugs.python.org (gnuthor) Date: Thu, 29 Jul 2010 11:09:19 +0000 Subject: [issue9414] infinite loop with specific regexp In-Reply-To: <1280401758.9.0.252357713623.issue9414@psf.upfronthosting.co.za> Message-ID: <1280401758.9.0.252357713623.issue9414@psf.upfronthosting.co.za> New submission from gnuthor : The follow code hangs on vanilla compile python 2.7 on Ubuntu 10.04 x86_64 and all other versions of Python that I could find (i386/x86_64, 2.6.5/2.5.2/2.2): >>> import re >>> regex = re.compile(r'^((?:\.\d+)+|(?:\.?\w+(?:\-*\w+)+)+)\.(\d*?)$') >>> match = regex.match('lldpLocChassisIdSubtype') the regex is taken from file client.py of libsnmp-python ( version 5.4.2.1 ~dfsg0ubuntu1-0ubuntu2.1 in Ubuntu 10.04 ) libsnmp-python ( 5.4.1~dfsg-12 in Debian Lenny) contains a previous version of this regex which does not produce an infinite loop >>> regex = re.compile(r'^((?:\.\d+)+|(?:\.?\w+(?:\-*\w+)+)+)\.?(.*)$') >>> match = regex.match('lldpLocChassisIdSubtype') >>> print match <_sre.SRE_Match object at 0x7f5d2abebc68> Perl 5.10.1 can run both of the regular expressions without problems $ perl -e '$x="lldpLocChassisIdSubtype"; print "$1" if $x =~ m/^((?:\.\d+)+|(?:\.?\w+(?:\-*\w+)+)+)\.(\d*?)$/;' $ perl -e '$x="lldpLocChassisIdSubtype"; print "$1" if $x =~ m/^((?:\.\d+)+|(?:\.?\w+(?:\-*\w+)+)+)\.?(.*)$/;' lldpLocChassisIdSubtype I realise that these two regular expression might not particularly sensible and are certainly not equivalent semantically, but they are syntactically correct, as far as I can tell, and do not contain back references etc. and thus the matching process should be able to always terminate. ---------- components: Regular Expressions messages: 111909 nosy: gnuthor priority: normal severity: normal status: open title: infinite loop with specific regexp type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 13:10:57 2010 From: report at bugs.python.org (Skip Montanaro) Date: Thu, 29 Jul 2010 11:10:57 +0000 Subject: [issue7198] Extraneous newlines with csv.writer on Windows In-Reply-To: <1280319275.88.0.402604272656.issue7198@psf.upfronthosting.co.za> Message-ID: <19537.24977.664894.186812@montanaro.dyndns.org> Skip Montanaro added the comment: > If the documentation is not clear enough about requiring binary, it is > a doc bug. The documentation for both csv.reader and csv.writer state (this is from the Python 2.7 version): If *csvfile* is a file object, it must be opened with the 'b' flag on platforms where that makes a difference. I suppose we could be explicit and mention Windows here, but the wording is quite clear. There is really no harm in always opening the file in binary mode, and I do that myself even though I only program on Unix or Mac platforms where it's safe to open the file in text mode. This all changed in Python 3. There, the choice of line ending is up to the programmer, so file objects for use by the csv module are opened with newline='' and when writing CSV data the writer object takes complete control of proper line termination according to the programmer's stated choice of lineterminator. Skip ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 13:33:40 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 29 Jul 2010 11:33:40 +0000 Subject: [issue9415] SSL issues on "Ubuntu i386" buildbots In-Reply-To: <1280403219.86.0.90888491207.issue9415@psf.upfronthosting.co.za> Message-ID: <1280403219.86.0.90888491207.issue9415@psf.upfronthosting.co.za> New submission from Antoine Pitrou : The buildslaves "i386 Ubuntu" have been exhibiting some strange behaviour for some time now: ====================================================================== ERROR: test_protocol_sslv2 (test.test_ssl.ThreadedTests) Connecting to an SSLv2 server with various client options ---------------------------------------------------------------------- Traceback (most recent call last): File "/scratch/pybot-buildarea/2.7.klose-ubuntu-i386/build/Lib/test/test_ssl.py", line 879, in test_protocol_sslv2 try_protocol_combo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv2, True) File "/scratch/pybot-buildarea/2.7.klose-ubuntu-i386/build/Lib/test/test_ssl.py", line 751, in try_protocol_combo ciphers="ALL", chatty=False) File "/scratch/pybot-buildarea/2.7.klose-ubuntu-i386/build/Lib/test/test_ssl.py", line 703, in server_params_test s.connect((HOST, server.port)) File "/scratch/pybot-buildarea/2.7.klose-ubuntu-i386/build/Lib/ssl.py", line 295, in connect self.ca_certs, self.ciphers) SSLError: _ssl.c:312: Invalid SSL protocol variant specified. (http://www.python.org/dev/buildbot/builders/i386%20Ubuntu%202.7/builds/78/steps/test/logs/stdio) ====================================================================== ERROR: test_constructor (test.test_ssl.ContextTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/scratch/pybot-buildarea/3.x.klose-ubuntu-i386/build/Lib/test/test_ssl.py", line 179, in test_constructor ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv2) File "/scratch/pybot-buildarea/3.x.klose-ubuntu-i386/build/Lib/ssl.py", line 96, in __new__ return _SSLContext.__new__(cls, protocol) ssl.SSLError: failed to allocate SSL context (http://www.python.org/dev/buildbot/builders/i386%20Ubuntu%203.x/builds/1689/steps/test/logs/stdio) Matthias, can you give us more information about the system setup on these buildbots? It seems its OpenSSL library refuses to allocate any SSL context for the SSL v2 protocol. Is it some kind of patch added by the Ubuntu OpenSSL maintainers in order to disable SSLv2 entirely? ---------- components: Tests messages: 111911 nosy: doko, pitrou priority: normal severity: normal status: open title: SSL issues on "Ubuntu i386" buildbots versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 13:43:16 2010 From: report at bugs.python.org (Richard Jones) Date: Thu, 29 Jul 2010 11:43:16 +0000 Subject: [issue9412] test_smtpd leaks references In-Reply-To: <1280394152.03.0.913816495774.issue9412@psf.upfronthosting.co.za> Message-ID: <1280403796.12.0.419872376282.issue9412@psf.upfronthosting.co.za> Richard Jones added the comment: That's odd. I didn't run the refcount tests because I was only adding Python code. I'll look into compiling a debug build and running the tests locally with a view to tracking down the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 13:50:49 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 11:50:49 +0000 Subject: [issue6538] MatchObject is not a hyperlink in the 're' module documentation In-Reply-To: <1248215363.5.0.63292386695.issue6538@psf.upfronthosting.co.za> Message-ID: <1280404249.25.0.157884782884.issue6538@psf.upfronthosting.co.za> Georg Brandl added the comment: Should be fixed now in r83218. I've removed the "class" directives, and put generic class name substitutes "regex" and "pattern" in the method descriptions, like we do for "contextmanager.__enter__". I've also removed the compatibility info, and removed [] style arguments where feasible. ---------- assignee: brian.curtin -> georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 13:53:40 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 29 Jul 2010 11:53:40 +0000 Subject: [issue9412] test_smtpd leaks references In-Reply-To: <1280403796.12.0.419872376282.issue9412@psf.upfronthosting.co.za> Message-ID: <1280404416.3175.34.camel@localhost.localdomain> Antoine Pitrou added the comment: > That's odd. I didn't run the refcount tests because I was only adding > Python code. That's not odd. A reference leak can indicate that some objects hang in memory permanently rather than being cleaned up after the test run. Looking at the code you added, DummyServer.messages will slowly accumulate more and more Python objects as the tests get run several times. (it's not necessarily the only cause of the refleak, though) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 14:12:10 2010 From: report at bugs.python.org (Jesse Noller) Date: Thu, 29 Jul 2010 12:12:10 +0000 Subject: [issue9205] Parent process hanging in multiprocessing if children terminate unexpectedly In-Reply-To: <1278619251.36.0.833806205056.issue9205@psf.upfronthosting.co.za> Message-ID: <1280405530.32.0.154434897119.issue9205@psf.upfronthosting.co.za> Jesse Noller added the comment: (sorry, I thought I had replied to your comment when I hadn't!) I think we can get away with a new optional kwarg. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 14:18:09 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 12:18:09 +0000 Subject: [issue9411] configparser doesn't support specifying encoding in read() In-Reply-To: <1280390900.93.0.0125296662028.issue9411@psf.upfronthosting.co.za> Message-ID: <1280405889.68.0.992982586999.issue9411@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied in r83220. The **kwds change for some methods should be done separately. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 15:14:20 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 29 Jul 2010 13:14:20 +0000 Subject: [issue9405] crash when calling urllib.getproxies() under OSX with subprocess / particular memory usage In-Reply-To: <1280352635.35.0.910645426575.issue9405@psf.upfronthosting.co.za> Message-ID: <1280409260.48.0.552853796461.issue9405@psf.upfronthosting.co.za> Ronald Oussoren added the comment: This seems to be a minimal program to reproduce the problem: import sys import os import platform platform.mac_ver() if sys.version_info[0] == 2: import urllib else: import urllib.request if os.fork() == 0: print ("about to call getproxies !") if sys.version_info[0] == 2: print (urllib.getproxies()) else: print (urllib.request.getproxies()) print ("getproxies has completed !") else: os.wait() The call to platform.mac_ver is essential, without that call the problem goed away. This explains why my 2.7 build doesn't crash: I've committed a patch at the EuroPython sprints that replaces the platform.mac_ver implementation by one that reads the OSX version from an XML file instead of calling low-level Apple APIs, and those lowlevel APIs somehow cause the breakage (see also issue #7895) This means that the problem should go away in the next release for all branches. mike: are you able to test if the problem goes away when you build python from source using a subversion checkout? Note that this doesn't mean that the underlying problem is gone, you'll probably still run into problems when the main program is a GUI program that using multiprocessing to start work in the background. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 15:18:47 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 29 Jul 2010 13:18:47 +0000 Subject: [issue9392] 2.7 framework install doesn't create 2to3-2.7 In-Reply-To: <1280260290.87.0.060778319608.issue9392@psf.upfronthosting.co.za> Message-ID: <1280409527.32.0.42357290737.issue9392@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Fixed in r83221 ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 15:20:22 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 13:20:22 +0000 Subject: [issue9412] test_smtpd leaks references In-Reply-To: <1280394152.03.0.913816495774.issue9412@psf.upfronthosting.co.za> Message-ID: <1280409622.28.0.715735933464.issue9412@psf.upfronthosting.co.za> Georg Brandl added the comment: The culprit was indeed DummyServer.messages. Fixed in r83222. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 15:28:03 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 13:28:03 +0000 Subject: [issue9414] infinite loop with specific regexp In-Reply-To: <1280401758.9.0.252357713623.issue9414@psf.upfronthosting.co.za> Message-ID: <1280410083.1.0.608168546602.issue9414@psf.upfronthosting.co.za> Georg Brandl added the comment: This is very probably a duplicate of #1662581. When testing both your regexes with the new engine from #2636, the match is not found/found instantaneously. ---------- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> the re module can perform poorly: O(2**n) versus O(n**2) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 15:29:15 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 13:29:15 +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: <1280410155.33.0.83791298658.issue2636@psf.upfronthosting.co.za> Georg Brandl added the comment: Wishlist item: could you give the regex and match classes nicer names, so that they can be referenced as `regex.Pattern` (or `regex.Regex`) and `regex.Match`? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 15:39:02 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 13:39:02 +0000 Subject: [issue3874] documentation bug: HTMLParser needs to document unknown_decl In-Reply-To: <1221515609.61.0.396859142368.issue3874@psf.upfronthosting.co.za> Message-ID: <1280410742.08.0.0960663989485.issue3874@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied with some tweaks in r83223. Thanks Jeff and Terry! ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 15:41:16 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 29 Jul 2010 13:41:16 +0000 Subject: [issue9416] complex formatting incorrectly omits a negative zero real part In-Reply-To: <1280410876.49.0.963700796596.issue9416@psf.upfronthosting.co.za> Message-ID: <1280410876.49.0.963700796596.issue9416@psf.upfronthosting.co.za> New submission from Mark Dickinson : >>> format(complex(-0.0, 2.0), '.10') # expected '(-0+2j)' '(+2j)' >>> format(complex(-0.0, 2.0), '') # gives expected result '(-0+2j)' ---------- assignee: mark.dickinson messages: 111923 nosy: eric.smith, mark.dickinson priority: normal severity: normal stage: unit test needed status: open title: complex formatting incorrectly omits a negative zero real part type: behavior versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 15:41:29 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 29 Jul 2010 13:41:29 +0000 Subject: [issue3874] documentation bug: HTMLParser needs to document unknown_decl In-Reply-To: <1221515609.61.0.396859142368.issue3874@psf.upfronthosting.co.za> Message-ID: <1280410889.32.0.0971331176141.issue3874@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- stage: needs patch -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 15:47:32 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 13:47:32 +0000 Subject: [issue9399] Provide a 'print' action for argparse In-Reply-To: <1280329840.94.0.288179215378.issue9399@psf.upfronthosting.co.za> Message-ID: <1280411252.0.0.124045038871.issue9399@psf.upfronthosting.co.za> Georg Brandl added the comment: Sounds like a good addition to me. ---------- assignee: -> bethard nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 15:50:53 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 13:50:53 +0000 Subject: [issue965065] document docs.python.org in PEP-101 Message-ID: <1280411453.35.0.76145071954.issue965065@psf.upfronthosting.co.za> Georg Brandl added the comment: Yes, the current wording in the PEP should be sufficient. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 15:51:08 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 29 Jul 2010 13:51:08 +0000 Subject: [issue9416] complex formatting incorrectly omits a negative zero real part In-Reply-To: <1280410876.49.0.963700796596.issue9416@psf.upfronthosting.co.za> Message-ID: <1280411468.9.0.0395855091535.issue9416@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- components: +Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 15:52:41 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 13:52:41 +0000 Subject: [issue3964] quiet the freeze makefile In-Reply-To: <1222356648.66.0.370920569039.issue3964@psf.upfronthosting.co.za> Message-ID: <1280411561.15.0.284921157596.issue3964@psf.upfronthosting.co.za> Georg Brandl added the comment: Isn't the usual way to use "make -s" if you don't want echoed commands? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 15:53:42 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 13:53:42 +0000 Subject: [issue5945] PyMapping_Check returns 1 for lists In-Reply-To: <1241560036.33.0.817766851688.issue5945@psf.upfronthosting.co.za> Message-ID: <1280411622.96.0.921548227118.issue5945@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: georg.brandl -> priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 15:58:22 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 13:58:22 +0000 Subject: [issue8077] cgi handling of POSTed files is broken In-Reply-To: <1267839820.97.0.586792235494.issue8077@psf.upfronthosting.co.za> Message-ID: <1280411902.15.0.936123979358.issue8077@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: georg.brandl -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:01:04 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 29 Jul 2010 14:01:04 +0000 Subject: [issue9172] zipfile.extractall always raises an OSError after successfully unzipping all files In-Reply-To: <1278355031.26.0.155948134842.issue9172@psf.upfronthosting.co.za> Message-ID: <1280412064.57.0.906629272929.issue9172@psf.upfronthosting.co.za> Mark Lawrence added the comment: Closed as duplicate of issue6050. ---------- nosy: +BreamoreBoy resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:02:39 2010 From: report at bugs.python.org (=?utf-8?q?Christian_H=C3=B6ltje?=) Date: Thu, 29 Jul 2010 14:02:39 +0000 Subject: [issue3964] quiet the freeze makefile In-Reply-To: <1222356648.66.0.370920569039.issue3964@psf.upfronthosting.co.za> Message-ID: <1280412159.99.0.0992112156703.issue3964@psf.upfronthosting.co.za> Christian H?ltje added the comment: Isn't 'make -s' a GNU make-ism? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:02:41 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 14:02:41 +0000 Subject: [issue745002] <> in attrs in sgmllib not handled Message-ID: <1280412161.42.0.611567148009.issue745002@psf.upfronthosting.co.za> Georg Brandl added the comment: Setting #1504333 which has a patch as superseder. ---------- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> sgmllib should allow angle brackets in quoted values _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:09:24 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 29 Jul 2010 14:09:24 +0000 Subject: [issue9337] Make float.__str__ behave identically to float.__repr__ In-Reply-To: <1279881060.45.0.501412515152.issue9337@psf.upfronthosting.co.za> Message-ID: <1280412564.39.0.162542287542.issue9337@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch. The floating-point part of the tutorial still needs work. ---------- keywords: +patch Added file: http://bugs.python.org/file18249/issue9337.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:13:51 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 14:13:51 +0000 Subject: [issue3964] quiet the freeze makefile In-Reply-To: <1222356648.66.0.370920569039.issue3964@psf.upfronthosting.co.za> Message-ID: <1280412831.56.0.702277570252.issue3964@psf.upfronthosting.co.za> Georg Brandl added the comment: Well, at least -s is mentioned in my POSIX make(1p) manpage, and I found it in an online version of the OpenBSD manpages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:16:47 2010 From: report at bugs.python.org (Ray.Allen) Date: Thu, 29 Jul 2010 14:16:47 +0000 Subject: [issue9407] ConfigParser documentation does not mention ConfigParser.Error as base exception class for ConfigParser exceptions In-Reply-To: <1280357367.5.0.752576251051.issue9407@psf.upfronthosting.co.za> Message-ID: <1280413007.32.0.479194957446.issue9407@psf.upfronthosting.co.za> Ray.Allen added the comment: "It may be useful to mention it to show the exception heirarchy as well as in the case a user may want to catch all ConfigParser errors generally." +1. I provide a patch for this. ---------- keywords: +patch nosy: +ysj.ray Added file: http://bugs.python.org/file18250/issue9407.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:17:22 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 14:17:22 +0000 Subject: [issue1090076] Defaults in ConfigParser.get overrides section values Message-ID: <1280413042.23.0.0559489607619.issue1090076@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed doc patch similar to Raghuram's in r83226. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:17:58 2010 From: report at bugs.python.org (Ray.Allen) Date: Thu, 29 Jul 2010 14:17:58 +0000 Subject: [issue9407] ConfigParser documentation does not mention ConfigParser.Error as base exception class for ConfigParser exceptions In-Reply-To: <1280357367.5.0.752576251051.issue9407@psf.upfronthosting.co.za> Message-ID: <1280413078.59.0.09978591847.issue9407@psf.upfronthosting.co.za> Changes by Ray.Allen : ---------- versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:19:08 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 29 Jul 2010 14:19:08 +0000 Subject: [issue9337] Make float.__str__ behave identically to float.__repr__ In-Reply-To: <1279881060.45.0.501412515152.issue9337@psf.upfronthosting.co.za> Message-ID: <1280413148.35.0.940869610178.issue9337@psf.upfronthosting.co.za> Mark Dickinson added the comment: A couple of notes on the patch: - the test_unicodedata failure was a result of computing a checksum involving str(numeric_value_of_character) for fraction characters like 1/6 and 2/3. I've changed the test to use '{.12g}'.format(numeric_value) instead, and updated the checksum. - the patch changes the result of format(x, ''), so that it continues to match str(x) when x is a float or complex instance. So when there's no typecode and no precision given, float formatting behaves like repr/str; when there's no typecode but a precision *is* given, float formatting behaves like 'g' formatting, but always ensures at least one digit after the point for a result in non-scientific format (as before). This change involves some slightly messy logic in formatter.h (which now needs to pass type 'r' to PyOS_double_to_string in this case); there may be a better way to write this code. Eric, if you have a chance to look at the formatter.h changes, I'd appreciate your comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:19:46 2010 From: report at bugs.python.org (Andrea Corbellini) Date: Thu, 29 Jul 2010 14:19:46 +0000 Subject: [issue9417] Declaring a class creates circular references In-Reply-To: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> Message-ID: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> New submission from Andrea Corbellini : Creating a class (either using the 'class' statement or using type()) creates a circular reference. I've attached a script that simply demonstrates this. The problem is caused by the fact that MyClass.__dict__['__dict__'].__objclass__ is MyClass. Although most of the times classes are never deleted when the interpreted exits, some programs (like the popular Django framework) create temporary classes. And this is a pain because you can't disable the garbage collector. ---------- components: Interpreter Core files: test.py messages: 111935 nosy: candrea priority: normal severity: normal status: open title: Declaring a class creates circular references type: resource usage 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/file18251/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:26:22 2010 From: report at bugs.python.org (Steven Bethard) Date: Thu, 29 Jul 2010 14:26:22 +0000 Subject: [issue9399] Provide a 'print' action for argparse In-Reply-To: <1280329840.94.0.288179215378.issue9399@psf.upfronthosting.co.za> Message-ID: <1280413582.25.0.895622677823.issue9399@psf.upfronthosting.co.za> Steven Bethard added the comment: Should this print to stdout or stderr? I wonder if the API should allow either, and instead look like: parser.add_argument('--license', action='write', message='...', file=sys.stdout) Where sys.stdout would be the default for the file= argument. The action would then just literally call file.write(message), so the behavior would be pretty easy to explain. Of course, at that point it makes me wonder if maybe it wouldn't just be better to have an easy way to have some arbitrary function called without having to subclass Action, e.g.: parser.add_argument('--license', action='call', callable=lambda: sys.stdout.write(message)) Basically this would be a shorthand for subclassing Action when you don't need any information about the command line. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:27:33 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 29 Jul 2010 14:27:33 +0000 Subject: [issue9413] asyncore.close_all() should call x.handle_close() instead of x.close() In-Reply-To: <1280400921.75.0.874188585283.issue9413@psf.upfronthosting.co.za> Message-ID: <1280413653.0.0.121834779363.issue9413@psf.upfronthosting.co.za> R. David Murray added the comment: No it doesn't. Why do you think this change should be made? What bug does it produce in it's current form? Can you provide a unit test demonstrating the buggy behavior? ---------- nosy: +r.david.murray stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:32:36 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 14:32:36 +0000 Subject: [issue9407] ConfigParser documentation does not mention ConfigParser.Error as base exception class for ConfigParser exceptions In-Reply-To: <1280357367.5.0.752576251051.issue9407@psf.upfronthosting.co.za> Message-ID: <1280413956.04.0.74586139147.issue9407@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied in r83229. Thanks! ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:37:55 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 14:37:55 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280414275.35.0.118467847105.issue7447@psf.upfronthosting.co.za> Georg Brandl added the comment: from_iterable() was marked up wrongly in the itertools docs; this is fixed now in r83230. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:40:46 2010 From: report at bugs.python.org (Chris Leaf) Date: Thu, 29 Jul 2010 14:40:46 +0000 Subject: [issue9404] IDLE won't launch on XP In-Reply-To: <1280352480.94.0.617351160567.issue9404@psf.upfronthosting.co.za> Message-ID: <1280414446.33.0.717277526101.issue9404@psf.upfronthosting.co.za> Chris Leaf added the comment: Sorry but I still cannot get it to work because the folder remains inaccessible to me and immutable. Is there any way around this problem? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:42:54 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 14:42:54 +0000 Subject: [issue9401] automatically try forward operations when reverse operations are NotImplemented In-Reply-To: <1280339816.95.0.28348031653.issue9401@psf.upfronthosting.co.za> Message-ID: <1280414574.96.0.221139710292.issue9401@psf.upfronthosting.co.za> Georg Brandl added the comment: This might work for (normally) commutative operations like multiplication and addition, but what about those like subtraction? If the interpreter uses the non-reversed method automatically, it has to apply semantics, but the semantics depend on the type and cannot be guessed by the interpreter. Also, even for normally commutative operations some type may want to behave non-commutative. With this in mind, this cannot be implemented without major headaches both for the implementation and backwards compatibility. ---------- nosy: +georg.brandl resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:46:20 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 14:46:20 +0000 Subject: [issue9397] Remove references to the missing dbm.bsd module In-Reply-To: <1280326109.56.0.0484206700812.issue9397@psf.upfronthosting.co.za> Message-ID: <1280414780.21.0.526590688476.issue9397@psf.upfronthosting.co.za> Georg Brandl added the comment: Removed in r83231, thanks. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 00:06:40 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 28 Jul 2010 22:06:40 +0000 Subject: [issue9404] IDLE won't launch on XP In-Reply-To: <1280354039.18.0.660924556639.issue9404@psf.upfronthosting.co.za> Message-ID: <4C50A9ED.8050007@v.loewis.de> Martin v. L?wis added the comment: > The hidden field is not filled in, here's a screenshot of the attributes options Ok. Remove the entire .idlerc folder, then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:49:21 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 14:49:21 +0000 Subject: [issue9388] locale documentation describes non-existing ERA_YEAR constant In-Reply-To: <1280203756.3.0.102200795898.issue9388@psf.upfronthosting.co.za> Message-ID: <1280414961.67.0.699241823484.issue9388@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r83232. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:50:08 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 14:50:08 +0000 Subject: [issue9386] Bad indentation in urllib import fixer with multiple imports In-Reply-To: <1280165305.89.0.706403927201.issue9386@psf.upfronthosting.co.za> Message-ID: <1280415008.25.0.42869627155.issue9386@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:50:43 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 29 Jul 2010 14:50:43 +0000 Subject: [issue9416] complex formatting incorrectly omits a negative zero real part In-Reply-To: <1280410876.49.0.963700796596.issue9416@psf.upfronthosting.co.za> Message-ID: <1280415043.06.0.645404663604.issue9416@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here are some tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:51:07 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 29 Jul 2010 14:51:07 +0000 Subject: [issue9416] complex formatting incorrectly omits a negative zero real part In-Reply-To: <1280410876.49.0.963700796596.issue9416@psf.upfronthosting.co.za> Message-ID: <1280415067.89.0.0617890732618.issue9416@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- keywords: +patch Added file: http://bugs.python.org/file18252/issue9416_tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:53:31 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 29 Jul 2010 14:53:31 +0000 Subject: [issue9417] Declaring a class creates circular references In-Reply-To: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> Message-ID: <1280415211.13.0.956731494904.issue9417@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Is there a reason why you want to disable the cyclic garbage collector? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 16:53:52 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 29 Jul 2010 14:53:52 +0000 Subject: [issue9417] Declaring a class creates circular references In-Reply-To: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> Message-ID: <1280415232.19.0.807417229073.issue9417@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 17:03:02 2010 From: report at bugs.python.org (Ray.Allen) Date: Thu, 29 Jul 2010 15:03:02 +0000 Subject: [issue9417] Declaring a class creates circular references In-Reply-To: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> Message-ID: <1280415782.95.0.300048114685.issue9417@psf.upfronthosting.co.za> Ray.Allen added the comment: This should not be a problem, I think. We cannot avoid such a circular reference. I believe the main reason of the circular reference is in MyClass.__mro__, this is a list and contains a reference to MyClass. You can add "__slots__ = []" to MyClass's class body to avoid __dict__(the one you mentioned) and another member which contains two more references to MyClass, but the __mro__ still contains the last reference to MyClass. ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 17:07:49 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 29 Jul 2010 15:07:49 +0000 Subject: [issue7855] Add test cases for ctypes/winreg for issues found in IronPython In-Reply-To: <1265311030.9.0.277359551887.issue7855@psf.upfronthosting.co.za> Message-ID: <1280416069.67.0.522245591696.issue7855@psf.upfronthosting.co.za> Mark Lawrence added the comment: Gentle poke in ribs can this be committed por favor? ---------- nosy: +BreamoreBoy versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 17:21:39 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 15:21:39 +0000 Subject: [issue9418] Move _formatter_* methods from string type into _string module In-Reply-To: <1280416899.1.0.0890176421306.issue9418@psf.upfronthosting.co.za> Message-ID: <1280416899.1.0.0890176421306.issue9418@psf.upfronthosting.co.za> New submission from Georg Brandl : Currently, the string type has two single-underscore methods, _formatter_parser and _formatter_field_name_split, that expose details of the new string formatting implementation to Python, so that it can be used by the string.Formatter class. This patch removes these methods and puts them into their own "_string" module. ---------- assignee: eric.smith components: Extension Modules, Library (Lib) files: add_string_module.diff keywords: patch messages: 111948 nosy: eric.smith, georg.brandl priority: normal severity: normal stage: patch review status: open title: Move _formatter_* methods from string type into _string module type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file18253/add_string_module.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 17:22:23 2010 From: report at bugs.python.org (Dennis Malcorps) Date: Thu, 29 Jul 2010 15:22:23 +0000 Subject: [issue9399] Provide a 'print' action for argparse In-Reply-To: <1280329840.94.0.288179215378.issue9399@psf.upfronthosting.co.za> Message-ID: <1280416943.47.0.138607185468.issue9399@psf.upfronthosting.co.za> Dennis Malcorps added the comment: > parser.add_argument('--license', action='write', message='...', file=sys.stdout) The ability to redirect the output would be a nice addition. > parser.add_argument('--license', action='call', callable=lambda: sys.stdout.write(message)) optparse already has a 'callable' action, I had the impression it was left out of argparse on purpose, even tough I couldn't imagine why... Either way is fine for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 17:23:11 2010 From: report at bugs.python.org (Andrea Corbellini) Date: Thu, 29 Jul 2010 15:23:11 +0000 Subject: [issue9417] Declaring a class creates circular references In-Reply-To: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> Message-ID: <1280416991.32.0.0453801426135.issue9417@psf.upfronthosting.co.za> Andrea Corbellini added the comment: Disabling the GC can increase performances (although not significantly). But this bug is the cause of other problems too: what if the metaclass contains a __del__() method? An another issue that I've found is that debugging is harder. I always try to avoid to create ref cycles in my code, also if my objects are collectable. In this way, I'm sure that I'll always be able to add a __del__ method in the future without problems. However, I can't easily check ref cycles without manually inspecting `gc.garbage`. And also, specifying DEBUG_SAVEALL will put all the deleted classes and their attributes in the garbage, which makes debugging *very* hard in case of a leaking program. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 17:25:06 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 15:25:06 +0000 Subject: [issue9417] Declaring a class creates circular references In-Reply-To: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> Message-ID: <1280417106.9.0.927705229294.issue9417@psf.upfronthosting.co.za> Georg Brandl added the comment: I couldn't imagine why a metaclass would want to have a __del__ method... ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 17:31:48 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 15:31:48 +0000 Subject: [issue1581182] Definition of a "character" is wrong Message-ID: <1280417508.26.0.11155491423.issue1581182@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: georg.brandl -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 17:37:11 2010 From: report at bugs.python.org (Ron Adam) Date: Thu, 29 Jul 2010 15:37:11 +0000 Subject: [issue9319] segfault when searching modules with help() In-Reply-To: <1279693765.46.0.777254335316.issue9319@psf.upfronthosting.co.za> Message-ID: <1280417831.58.0.237064631971.issue9319@psf.upfronthosting.co.za> Ron Adam added the comment: The error happens when Null is passed to strlen in (unicodeobject.c, line 860) Passing NULL to a string format function is probably in the category of don't do that. Stefans solution of checking for NULL before calling PyErr_Format looks to me to be correct. As he notes, the same technique is used in another place. It might be good to add a note somewhere not to pass NULL to C string format functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 17:37:59 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 29 Jul 2010 15:37:59 +0000 Subject: [issue9416] complex formatting incorrectly omits a negative zero real part In-Reply-To: <1280410876.49.0.963700796596.issue9416@psf.upfronthosting.co.za> Message-ID: <1280417879.33.0.938233548559.issue9416@psf.upfronthosting.co.za> Mark Dickinson added the comment: And here's a fix (includes the earlier tests, along with some fixes to the tests themselves). ---------- stage: unit test needed -> patch review Added file: http://bugs.python.org/file18254/issue9416.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 17:53:03 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 29 Jul 2010 15:53:03 +0000 Subject: [issue3173] external strftime for Python? In-Reply-To: <1280373721.14.0.946393265172.issue3173@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Wed, Jul 28, 2010 at 11:22 PM, Guido van Rossum wrote: .. > What about the licensing? That look like the BSD license *with* > advertising clause... > I am not a lawyer and I am not intimately familiar with PSF policies, but this license does not look too dissimilar to the profile module license: # Permission to use, copy, modify, and distribute this Python software # and its associated documentation for any purpose (subject to the # restriction in the following sentence) without fee is hereby granted, # provided that the above copyright notice appears in all copies, and # that both that copyright notice and this permission notice appear in # supporting documentation, ... Actually, I wonder if pydoc profile is technically in violation of the InfoSeek license. More likely, however, is that the license text in the source file is not authoritative and PSF has a more permissive license to this code. Skip, can you clarify where the strftime code in your patch came from? In your first post you said that it came from Tcl, so it may have ActiveState copyright on at least portions of it. On the other hand, unless strftime code is already published under an acceptable license, I think rewriting this code from scratch would be easier than tracking down the owners and asking them to contribute it to python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 17:54:17 2010 From: report at bugs.python.org (Andrea Corbellini) Date: Thu, 29 Jul 2010 15:54:17 +0000 Subject: [issue9417] Declaring a class creates circular references In-Reply-To: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> Message-ID: <1280418857.65.0.673688225127.issue9417@psf.upfronthosting.co.za> Andrea Corbellini added the comment: Having a __del__ inside a metaclass is strange, I know... but probably there are situations where you need to do so. Why shouldn't a developer be able to add a __del__ to a metaclass without creating uncollectable objects? I don't think this behavior is by design. Also, doing random contributions to various projects I've seen many odd things. However I don't think that the bug tracker is the right place to discuss development practices. A bug that causes problems in unusual situations is still a bug. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 18:02:05 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 16:02:05 +0000 Subject: [issue6522] docs for unittest.expectedFailure do not syntactically show it's a decorator In-Reply-To: <1248052510.55.0.186681984589.issue6522@psf.upfronthosting.co.za> Message-ID: <1280419325.76.0.0534989971405.issue6522@psf.upfronthosting.co.za> Georg Brandl added the comment: Done in r83234. Thanks for the suggestion! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 18:04:44 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 16:04:44 +0000 Subject: [issue9417] Declaring a class creates circular references In-Reply-To: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> Message-ID: <1280419484.11.0.090175243123.issue9417@psf.upfronthosting.co.za> Georg Brandl added the comment: Whether this is a bug is not clear. Sometimes it's just impossible not to create cycles, and classes may just be one instance of that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 18:12:55 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 29 Jul 2010 16:12:55 +0000 Subject: [issue9410] Add Unladden Swallow's optimizations to Python 3's pickle. In-Reply-To: <1280384767.75.0.12386540434.issue9410@psf.upfronthosting.co.za> Message-ID: <1280419975.5.0.756203733812.issue9410@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: For those not familiar with Unladen Swallow, can you describe what the "most interesting optimizations" are? Maybe there is an Unladen Swallow document you can point to. Would any of these optimizations apply to python implementation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 18:17:17 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 29 Jul 2010 16:17:17 +0000 Subject: [issue9417] Declaring a class creates circular references In-Reply-To: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> Message-ID: <1280420237.93.0.113181867087.issue9417@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +krisvale _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 18:28:19 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 29 Jul 2010 16:28:19 +0000 Subject: [issue9397] Remove references to the missing dbm.bsd module In-Reply-To: <1280326109.56.0.0484206700812.issue9397@psf.upfronthosting.co.za> Message-ID: <1280420899.3.0.0501124156511.issue9397@psf.upfronthosting.co.za> STINNER Victor added the comment: > Removed in r83231, thanks. I commited also r83235 to remove references in the source code. The last reference is the following comment, but I don't know how to fix it: # some dbm emulations based on Berkeley DB generate a .db file # some do not, but they should be caught by the bsd checks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 18:31:59 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 29 Jul 2010 16:31:59 +0000 Subject: [issue9410] Add Unladden Swallow's optimizations to Python 3's pickle. In-Reply-To: <1280384767.75.0.12386540434.issue9410@psf.upfronthosting.co.za> Message-ID: <1280421119.86.0.68026891295.issue9410@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm working on #3873 to add a read buffer (fixed size, 4096 bytes) to the unpickler. It's 6 to 8 times faster with the read buffer: but this patch is mainly to avoid the overhead introduced by the new I/O library (in Python2, unpickler was faster because it doesn't need to call Python functions to read some bytes). Is this feature included in this big patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 18:32:55 2010 From: report at bugs.python.org (Andrea Corbellini) Date: Thu, 29 Jul 2010 16:32:55 +0000 Subject: [issue9417] Declaring a class creates circular references In-Reply-To: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> Message-ID: <1280421175.79.0.0974523388682.issue9417@psf.upfronthosting.co.za> Andrea Corbellini added the comment: This is an unwanted an unexpected behavior, so this is a bug by definition. If it's not easy to fix, it's a different matter. However here's a proposed solution: * for the __mro__: instead of using a tuple, use a new object that inherits from it. This new object should use weak reference for the first item and should return the real object (if available) only in __getitem__(). * __objclass__ can should become a property based on weak references. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 18:35:31 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 29 Jul 2010 16:35:31 +0000 Subject: [issue6050] zipfile: Extracting a directory that already exists generates an OSError In-Reply-To: <1242622904.12.0.492765760798.issue6050@psf.upfronthosting.co.za> Message-ID: <1280421331.38.0.666847176722.issue6050@psf.upfronthosting.co.za> Ezio Melotti added the comment: #9172 has been closed as duplicate of this. ---------- nosy: +ezio.melotti stage: -> committed/rejected type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 18:36:50 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 29 Jul 2010 16:36:50 +0000 Subject: [issue9417] Declaring a class creates circular references In-Reply-To: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> Message-ID: <1280421410.12.0.862897499797.issue9417@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This was discussed in issue1545463 which was deemed not to be worth fixing. The particular bug described in issue1545463 would also be fixed by the still open issue812369. So yes, there are cases where these cycles are a problem even with gc. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 18:38:52 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 29 Jul 2010 16:38:52 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1280421532.17.0.222094686679.issue3873@psf.upfronthosting.co.za> STINNER Victor added the comment: > Victor, have you tried using peek() instead of seek()? > I mentioned this previously in msg85780. In a file encoded in protocol 0, backward seek are needed to each call to unpickler_readline... and this function is called to read a number, a boolean, etc. (to read most, or all, data values). I choosed to disable the read buffer because it's slower with it. For protocol 1 and 2, there is only *one* seek at the end (but a lot of read: file size / 4096). So I don't think that it does really matter to use peek or seek. seek() is more natural (for me) and frequent than peek(), so I prefer to keep seek(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 18:46:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 29 Jul 2010 16:46:20 +0000 Subject: [issue3873] Unpickling is really slow In-Reply-To: <1221496652.57.0.686468497967.issue3873@psf.upfronthosting.co.za> Message-ID: <1280421980.85.0.671026467122.issue3873@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 18:52:58 2010 From: report at bugs.python.org (Andrea Corbellini) Date: Thu, 29 Jul 2010 16:52:58 +0000 Subject: [issue812369] module shutdown procedure based on GC Message-ID: <1280422378.01.0.218890022066.issue812369@psf.upfronthosting.co.za> Changes by Andrea Corbellini : ---------- nosy: +candrea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 18:56:34 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 29 Jul 2010 16:56:34 +0000 Subject: [issue9416] complex formatting incorrectly omits a negative zero real part In-Reply-To: <1280410876.49.0.963700796596.issue9416@psf.upfronthosting.co.za> Message-ID: <1280422594.99.0.461005674967.issue9416@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I wonder if complex addition/subtraction should preserve -0.0 when it is added to a purely imaginary number. I.e., >>> -0.0+1j (-0+1j) ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 18:57:56 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 16:57:56 +0000 Subject: [issue9417] Declaring a class creates circular references In-Reply-To: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> Message-ID: <1280422676.21.0.649697037819.issue9417@psf.upfronthosting.co.za> Georg Brandl added the comment: This is not so easy: the __mro__ tuple, as its name says, is used internally for method resolution, or finding attributes on the type's bases. __objclass__ is used whenever the descriptor is accessed. These operations are involved in every method call. If you want this to go somewhere, you will have to produce a patch and demonstrate that the slowdown does not unsuitably impact performance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 19:00:34 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 17:00:34 +0000 Subject: [issue1195571] simple callback system for Py_FatalError Message-ID: <1280422834.63.0.410773631701.issue1195571@psf.upfronthosting.co.za> Georg Brandl added the comment: Amaury, any interest in getting this committed for 3.2? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 19:03:53 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 17:03:53 +0000 Subject: [issue6480] code.runsource() parsing bug In-Reply-To: <1247548798.14.0.468793071466.issue6480@psf.upfronthosting.co.za> Message-ID: <1280423033.38.0.169200145189.issue6480@psf.upfronthosting.co.za> Georg Brandl added the comment: code.runsource() uses the "single" start symbol by default, which will parse only a single statement. Only your second snippet is a single statement, while the others are two statements. ---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 19:06:32 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 17:06:32 +0000 Subject: [issue6504] infinite recursion from calling builtins.open() In-Reply-To: <1247844969.58.0.287534577391.issue6504@psf.upfronthosting.co.za> Message-ID: <1280423192.39.0.520612839166.issue6504@psf.upfronthosting.co.za> Georg Brandl added the comment: Cannot reproduce with current 3.2 trunk, closing. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 19:07:02 2010 From: report at bugs.python.org (=?utf-8?q?Peter_H=C3=A4ring?=) Date: Thu, 29 Jul 2010 17:07:02 +0000 Subject: [issue9419] RUNSHARED needs LDFLAGS In-Reply-To: <1280423222.23.0.51081739049.issue9419@psf.upfronthosting.co.za> Message-ID: <1280423222.23.0.51081739049.issue9419@psf.upfronthosting.co.za> New submission from Peter H?ring : test_distutils fails with 2.7 on a shared build (at least if building outside the source tree), 2.6 versions work. The reason for this is, that the test tries to link and doesn't find libpython-2.7.so.1. A solution (or workaround) is to add LDFLAGS=-L`pwd` to the variable RUNSHARED, as I did in the attached file for SUNOS and GNU/Linux etc. Other systems probably need some similar patch. ---------- components: Build files: Python-2.7-RUNSHARED.patch keywords: patch messages: 111970 nosy: phaering priority: normal severity: normal status: open title: RUNSHARED needs LDFLAGS type: compile error versions: Python 2.7 Added file: http://bugs.python.org/file18255/Python-2.7-RUNSHARED.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 19:07:29 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 17:07:29 +0000 Subject: [issue6612] 'import site' fails when called from an unlinked directory In-Reply-To: <1249034007.06.0.695800326888.issue6612@psf.upfronthosting.co.za> Message-ID: <1280423249.29.0.473453270056.issue6612@psf.upfronthosting.co.za> Georg Brandl added the comment: I'm quite sure nobody will want to do anything about it... ---------- nosy: +georg.brandl status: open -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 19:11:46 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 29 Jul 2010 17:11:46 +0000 Subject: [issue8603] Create a bytes version of os.environ and getenvb() In-Reply-To: <1280365707.71.0.0176269867884.issue8603@psf.upfronthosting.co.za> Message-ID: <201007291911.37571.victor.stinner@haypocalc.com> STINNER Victor added the comment: Le jeudi 29 juillet 2010 03:08:27, Ezio Melotti a ?crit : > A quick search[0] also shows that environ.data is used by several projects. _Environ is a wrapper on data: call putenv() when a value is changed and unputenv() when a value is removed. Since os.environb, it does also convert key and value types. So .data should not be used directly. It looks like a common usage of .data is to get get to "a real dict" (and not "an user dict"). I think that os.environ.data or os.environ.data.copy() can be replaced by dict(os.environ) is that case. > Changing it from str to bytes will most likely break these programs, I'm not sure of that. It looks (in the search result) that os.environ.data is just stored and passed to a function, but not used as a dictionary to get a value (well, I'm not sure because it's hard to say with just 3 lines of the program). In that case, it doesn't matter if the dictionary contains byte or unicode strings. Eg. zope2instance: old_env = os.environ.data.copy() ... os.environ.data = old_env It does still work with bytes. > so I'm not sure it's a good idea Yes, it's not a good idea to use .data :-) This attribute should be protected, not public (even if it is not documented). > IMHO os.environ.data should contain str, whereas os.environb.data > bytes. data is shared between os.environ and os.environb, because data is the solution to synchronize both dictionaries. > If they must share the same data I would prefer them to be both > str. No, data should use the native type: bytes on UNIX and BSD, str on Windows. -- If you still consider that the change on .data as a bug, I think that the fix is to remove .data (mark it as protected: environ.data => environ._data). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 19:14:18 2010 From: report at bugs.python.org (Chris Leaf) Date: Thu, 29 Jul 2010 17:14:18 +0000 Subject: [issue9404] IDLE won't launch on XP In-Reply-To: <1280352480.94.0.617351160567.issue9404@psf.upfronthosting.co.za> Message-ID: <1280423658.61.0.338399832663.issue9404@psf.upfronthosting.co.za> Chris Leaf added the comment: I solved the problem myself by editing the EditorWindow.py file where it sets self.recent_files_path by setting it to a different file location (I created a file in my Python31 directory named recent-files.lst and then set the recent_files_path to the absolute path to this file I made). This seems to be working so far and works like a complete work around the .idlerc folder issue. Will report if this doesn't work out later ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 19:16:26 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 17:16:26 +0000 Subject: [issue6630] string.Template custom pattern not working In-Reply-To: <1249282061.67.0.26692722483.issue6630@psf.upfronthosting.co.za> Message-ID: <1280423786.7.0.268926750845.issue6630@psf.upfronthosting.co.za> Georg Brandl added the comment: Added in r83236. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 19:17:59 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 17:17:59 +0000 Subject: [issue6535] optparse required field for Options In-Reply-To: <1248204469.91.0.747237681609.issue6535@psf.upfronthosting.co.za> Message-ID: <1280423879.37.0.681772165663.issue6535@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't think optparse will get this update -- new features should go into argparse instead. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 19:20:32 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 29 Jul 2010 17:20:32 +0000 Subject: [issue8603] Create a bytes version of os.environ and getenvb() In-Reply-To: <1280365203.17.0.366428906412.issue8603@psf.upfronthosting.co.za> Message-ID: <201007291919.55334.victor.stinner@haypocalc.com> STINNER Victor added the comment: Le jeudi 29 juillet 2010 03:00:03, Ezio Melotti a ?crit : > FWIW os.environb is missing from os.__all__. Fixed by r83237 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 19:24:52 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 29 Jul 2010 17:24:52 +0000 Subject: [issue9404] IDLE won't launch on XP In-Reply-To: <1280352480.94.0.617351160567.issue9404@psf.upfronthosting.co.za> Message-ID: <1280424292.63.0.557515337134.issue9404@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Sorry, I'm busy with other stuff and won't be able to look into this for another week or so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 19:26:21 2010 From: report at bugs.python.org (=?utf-8?q?Peter_H=C3=A4ring?=) Date: Thu, 29 Jul 2010 17:26:21 +0000 Subject: [issue9420] gdbm with /usr/include/ndbm.h In-Reply-To: <1280424380.77.0.379026276123.issue9420@psf.upfronthosting.co.za> Message-ID: <1280424380.77.0.379026276123.issue9420@psf.upfronthosting.co.za> New submission from Peter H?ring : There are systems out there, wich don't have ndbm, but gdbm and ndbm.h directly in the include-path (usually /usr/include), not in the subdirectory i.e. gdbm. setup.py at the moment assumes, that there is ndbm on the system, if there is ndbm.h in the include path. If it doesn't find libndbm, it continues to try to use ndbm without library, which doesn't work. BLFS (http://www.linuxfromscratch.org/blfs/view/svn/general/python.html) fills in the gdbm and gdbm-compat library, which works, but is wrong, because we really use gdbm and not ndbm. The right way is to start with the library change and then look for the header file, as it is in the proposed patch for setup.py ---------- components: Build files: Python-2.7-gdbm.patch keywords: patch messages: 111978 nosy: phaering priority: normal severity: normal status: open title: gdbm with /usr/include/ndbm.h versions: Python 2.7 Added file: http://bugs.python.org/file18256/Python-2.7-gdbm.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 19:43:33 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 17:43:33 +0000 Subject: [issue1710703] zipfile.ZipFile behavior inconsistent. Message-ID: <1280425413.19.0.480187671752.issue1710703@psf.upfronthosting.co.za> Georg Brandl added the comment: Alan, I've updated the patch for current 3.2 trunk, see attached, but the new test now fails. Can you find out why? ---------- nosy: +georg.brandl versions: +Python 3.2 -Python 2.7 Added file: http://bugs.python.org/file18257/zipfile_empty.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 19:47:05 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 17:47:05 +0000 Subject: [issue6156] Error compiling valid regex In-Reply-To: <1243787162.44.0.999226480683.issue6156@psf.upfronthosting.co.za> Message-ID: <1280425625.84.0.346023028808.issue6156@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing in favor of #2636, which allows this regex to be compiled. ---------- resolution: -> out of date status: open -> closed superseder: -> Regexp 2.7 (modifications to current re 2.2.2) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 19:55:13 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 17:55:13 +0000 Subject: [issue4108] robotparser.py fail when more than one User-Agent: * is present In-Reply-To: <1223818892.29.0.704490324988.issue4108@psf.upfronthosting.co.za> Message-ID: <1280426113.1.0.7313119933.issue4108@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the patch, fixed in r83238. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 19:57:09 2010 From: report at bugs.python.org (=?utf-8?q?Peter_H=C3=A4ring?=) Date: Thu, 29 Jul 2010 17:57:09 +0000 Subject: [issue9420] gdbm with /usr/include/ndbm.h In-Reply-To: <1280424380.77.0.379026276123.issue9420@psf.upfronthosting.co.za> Message-ID: <1280426229.19.0.0567461168234.issue9420@psf.upfronthosting.co.za> Changes by Peter H?ring : ---------- type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 20:00:37 2010 From: report at bugs.python.org (Leonhard Vogt) Date: Thu, 29 Jul 2010 18:00:37 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280426437.98.0.0752136863887.issue7447@psf.upfronthosting.co.za> Changes by Leonhard Vogt : Removed file: http://bugs.python.org/file18223/functions.rst.patch4.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 20:11:16 2010 From: report at bugs.python.org (Leonhard Vogt) Date: Thu, 29 Jul 2010 18:11:16 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280427076.39.0.199393410154.issue7447@psf.upfronthosting.co.za> Leonhard Vogt added the comment: Thank you Georg, I updated the patch Ezio, wouldn't start=0 in the signature imply that sum accepted a keyword argument? I read "Documenting Python" (4.3) but am not sure about the distinction of default values or keyword arbuments. >>> sum([1,2,3], start=4) Traceback (most recent call last): File "", line 1, in TypeError: sum() takes no keyword arguments ---------- Added file: http://bugs.python.org/file18258/functions.rst.patch5.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 20:13:25 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 29 Jul 2010 18:13:25 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280427205.22.0.978405853963.issue7447@psf.upfronthosting.co.za> ?ukasz Langa added the comment: The oldest interfaces tend to have quirks like that. Similar issue: #9379. Won't be changed as well. I'm thinking of a better docstring though. ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 20:28:01 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 29 Jul 2010 18:28:01 +0000 Subject: [issue9416] complex formatting incorrectly omits a negative zero real part In-Reply-To: <1280410876.49.0.963700796596.issue9416@psf.upfronthosting.co.za> Message-ID: <1280428081.91.0.39224846147.issue9416@psf.upfronthosting.co.za> Mark Dickinson added the comment: Well, that's a separate issue, so should have its own feature request. The main difficulty is that Python has no notion of a 'pure imaginary' type: one would have to implement such a type to get this behaviour. C99 defines the _Imaginary types for exactly this reason. Unfortunately, that part of the specification is optional, and almost no-one has implemented it. (Sun might be an exception.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 20:28:21 2010 From: report at bugs.python.org (David Watson) Date: Thu, 29 Jul 2010 18:28:21 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <1280082784.57.0.628810673592.issue9377@psf.upfronthosting.co.za> Message-ID: <1280428101.51.0.889708401133.issue9377@psf.upfronthosting.co.za> David Watson added the comment: "Leaving IDNA ASCII-compatible encodings in ASCII form" is just preserving the existing behaviour (not doing IDNA decoding). See http://tools.ietf.org/html/rfc3490 and the docs for codecs -> encodings.idna ("xn--lzg" in the example is the ASCII-compatible encoding of "?", so if you look up that IP address, "xn--lzg" is returned with or without the patch). I'll look into your other comments. In the meantime, I've got one more patch, as the decoding of the nodename field in os.uname() also needs to be changed to match the other hostname-returning functions. This patch changes it to ASCII/surrogateescape, with the usual PEP 383 decoding for the other fields. ---------- Added file: http://bugs.python.org/file18259/uname-surrogateescape.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 20:32:49 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 29 Jul 2010 18:32:49 +0000 Subject: [issue9421] configparser.ConfigParser's getint, getboolean and getfloat don't accept `vars` In-Reply-To: <1280428369.21.0.84678458473.issue9421@psf.upfronthosting.co.za> Message-ID: <1280428369.21.0.84678458473.issue9421@psf.upfronthosting.co.za> New submission from ?ukasz Langa : ConfigParser (and in effect SafeConfigParser) accept `vars` in the `get()` method so one can override values from the section, merge data from different sources or simply state some required keys for interpolation. `getint()`, `getfloat()` and `getboolean()` don't accept this argument and this is the reason for this issue: for all getters to present a consistent interface. There is a small design question here however. We have an inheritance model in configparser that goes like this: RawConfigParser -> ConfigParser -> SafeConfigParser ConfigParser redefines `get()` for the purposes of interpolation but doesn't touch the other getters. It's good because in terms of implementation, they are just `type()` decoration over `get()` where type is `int`, `float` or `bool`. The obvious solution would be to add **kwargs to these getters so that regardless of the implementation of the actual `get()`, all possible values are being passed to it. We can then comment in the docstring that for possible values of **kwargs, the user should check the interface of `get()`. Is that good enough? Other ideas? PS. I have a patch for the proposed design, will attach if there's consensus. ---------- components: Library (Lib) messages: 111986 nosy: georg.brandl, lukasz.langa, michael.foord, pitrou priority: normal severity: normal status: open title: configparser.ConfigParser's getint, getboolean and getfloat don't accept `vars` type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 20:53:37 2010 From: report at bugs.python.org (Drake Dowsett) Date: Thu, 29 Jul 2010 18:53:37 +0000 Subject: [issue9355] argparse add_mutually_exclusive_group more than once has incorrectly formatted help In-Reply-To: <1279895728.08.0.860550350605.issue9355@psf.upfronthosting.co.za> Message-ID: <1280429617.46.0.24524808885.issue9355@psf.upfronthosting.co.za> Drake Dowsett added the comment: Problem is `inserts' dictionary is overwriting previous closing bracket, so checking for existing value and then appending if found. ---------- keywords: +patch nosy: +ddowsett versions: +Python 2.6 Added file: http://bugs.python.org/file18260/argparse.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 21:20:31 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 29 Jul 2010 19:20:31 +0000 Subject: [issue5262] PythonLauncher considered harmfull In-Reply-To: <1234638505.38.0.029039550018.issue5262@psf.upfronthosting.co.za> Message-ID: <1280431231.83.0.820887562665.issue5262@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Kevin: what's your opinion on changing PythonLauncher to check if it is the default action for opening python files and warning about that? What about refusing to run when Python Launcher is the default action for python files? Users would still be able to run python files from the Finder by using the "Open with" menu, or by selecting Python Launcher through the Get Info dialog. This would seriously reduce the risks w.r.t. accidentally running python scripts. (Removing 2.7 because it is too late to change 2.7 behavior) ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 21:22:40 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 29 Jul 2010 19:22:40 +0000 Subject: [issue9417] Declaring a class creates circular references In-Reply-To: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> Message-ID: <1280431360.44.0.323489546664.issue9417@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Interesting. Here is a case for disabling GC: We intentionally disable GC in Eve-online, because of the unpredictable lag spikes it produces. In a server application with gigabytes of python objects, GC can cause hickups of some seconds, which is unacceptable when trying to keep the latency low. We were considering using Django for our backend web framework once. Good that we didn't, since it would have leaked. We do try to keep our code free from circular references, and occasionally run single GC passes on our test cluster to weed out any that may have formed accidentally (gc.garbage with DEBUG_LEAKS) IMHO, python should try to be as free from these as possible, although it is admittedly not always easy (see recursive closures, issue 7464) An alternative, is to do something like the minidom module does: Provide a "unlink" method (or similar) to manually nerf objects before forgetting them. Perhaps this could be standardized with an unlink keyword and a __unlink__ special method? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 21:35:36 2010 From: report at bugs.python.org (Daniel Urban) Date: Thu, 29 Jul 2010 19:35:36 +0000 Subject: [issue9214] Most Set methods of KeysView and ItemsView do not work right In-Reply-To: <1278703905.18.0.125671722438.issue9214@psf.upfronthosting.co.za> Message-ID: <1280432136.13.0.857812062429.issue9214@psf.upfronthosting.co.za> Daniel Urban added the comment: The patch applies cleanly to the py3k branch (r83238). The unittests pass. The code looks good to me (it does exactly what was described as the solution). There are some trailing whitespace on some lines, that will need to be deleted. ---------- nosy: +durban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 21:35:37 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 29 Jul 2010 19:35:37 +0000 Subject: [issue901727] extra_path kwarg to setup() undocumented Message-ID: <1280432137.23.0.540269896118.issue901727@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've attached a documentation patch for this (for py3k) ---------- keywords: +needs review, patch Added file: http://bugs.python.org/file18261/apiref.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 21:43:31 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 29 Jul 2010 19:43:31 +0000 Subject: [issue5154] OSX broken poll testing doesn't work In-Reply-To: <1233786742.9.0.12404457396.issue5154@psf.upfronthosting.co.za> Message-ID: <1280432611.42.0.613732761331.issue5154@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Time to try to get this going again... What exactly is wrong with poll on OSX? Both the configure test and the runtime test for poll behavior work as designed. According to the first message there are other problems with poll on OSX, but without a clear description of what is wrong and how to reproduce this it will be impossible to do anything about it. As noted in msg83156 Apple removes socket.poll from their builds because poll(3) doesn't work for all types of file descriptors (in particular not for devices), and I don't know if that is a serious enough problem to disable socket.poll in our builds as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 22:17:28 2010 From: report at bugs.python.org (James Y Knight) Date: Thu, 29 Jul 2010 20:17:28 +0000 Subject: [issue5154] OSX broken poll testing doesn't work In-Reply-To: <1233786742.9.0.12404457396.issue5154@psf.upfronthosting.co.za> Message-ID: <1280434648.4.0.599265452009.issue5154@psf.upfronthosting.co.za> James Y Knight added the comment: The reason it's a problem is because a "device" is everything other than a socket, pipe, slave-side of tty, or file. That is, /dev/null, /dev/zero, /dev/tty, psuedo-tty masters from openpty (e.g. for running subprocesses), etc. I find it quite amazing that this is still broken after so long. Would it really be that hard for them to unify the select() and poll() code in the kernel? Sigh. BTW, this same issue also affects kqueue. But I'd say that Apple's utter failure in writing a working kernel is not really enough reason to disable the poll call for Python. If people want to use it only for the kinds of files that it works for, I don't see why python should prevent that. Note that in the distant past, poll on OSX was *severely* broken, as it was a userspace wrapper over select(). In those days, disabling it was certainly the right thing to do. ---------- nosy: +foom _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 22:31:38 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 29 Jul 2010 20:31:38 +0000 Subject: [issue4841] io's close() not handling errors correctly In-Reply-To: <1231151389.71.0.297079127324.issue4841@psf.upfronthosting.co.za> Message-ID: <1280435498.91.0.0573655309825.issue4841@psf.upfronthosting.co.za> Mark Lawrence added the comment: Might as well close as nobody appears interested. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 22:33:35 2010 From: report at bugs.python.org (Winston451) Date: Thu, 29 Jul 2010 20:33:35 +0000 Subject: [issue9422] Memory leak when reinitializing a Struct object In-Reply-To: <1280435615.43.0.80003916996.issue9422@psf.upfronthosting.co.za> Message-ID: <1280435615.43.0.80003916996.issue9422@psf.upfronthosting.co.za> New submission from Winston451 : The s_init function of the _struct.c file does not free the s_codes field before storing a new address into it. So when a Struct object is reinitialized the memory block pointed to by s_codes is lost. The file attached with the bug report shows a code which reproduce the problem. ---------- components: Library (Lib) files: leak.py messages: 111995 nosy: Winston451 priority: normal severity: normal status: open title: Memory leak when reinitializing a Struct object type: resource usage versions: Python 2.6 Added file: http://bugs.python.org/file18262/leak.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 22:34:23 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 29 Jul 2010 20:34:23 +0000 Subject: [issue2744] Fix test_cProfile In-Reply-To: <1209770110.61.0.304892387875.issue2744@psf.upfronthosting.co.za> Message-ID: <1280435663.7.0.785820831782.issue2744@psf.upfronthosting.co.za> Mark Lawrence added the comment: Nobody has responded to msg109475 so I'll close unless there are any objections. ---------- priority: high -> normal status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 22:37:02 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 29 Jul 2010 20:37:02 +0000 Subject: [issue4724] setting f_exc_traceback aborts in debug builds In-Reply-To: <1229966419.5.0.164799717047.issue4724@psf.upfronthosting.co.za> Message-ID: <1280435822.06.0.0797833352852.issue4724@psf.upfronthosting.co.za> Mark Lawrence added the comment: As no response to msg109476 I'll close unless anyone objects. ---------- priority: high -> normal status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 22:39:02 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 29 Jul 2010 20:39:02 +0000 Subject: [issue3401] wsgiref can't handle unicode environments In-Reply-To: <1216338814.66.0.0698084133409.issue3401@psf.upfronthosting.co.za> Message-ID: <1280435942.45.0.517313996031.issue3401@psf.upfronthosting.co.za> Mark Lawrence added the comment: As nobody has responded to msg109622 I'll close unless anyone objects. ---------- priority: high -> normal status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 22:39:30 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 29 Jul 2010 20:39:30 +0000 Subject: [issue2744] Fix test_cProfile In-Reply-To: <1209770110.61.0.304892387875.issue2744@psf.upfronthosting.co.za> Message-ID: <1280435970.08.0.763000844805.issue2744@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I'll close unless there are any objections. Yes, I object! :) If there's still a bug present, it seems inappropriate to close this issue. So as a first step, someone needs to look at this closely to determine whether there *is* still a problem that needs fixing. (It's not clear to me at the moment whether that's true.) ---------- nosy: +mark.dickinson status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 22:39:46 2010 From: report at bugs.python.org (Radoslaw Madej) Date: Thu, 29 Jul 2010 20:39:46 +0000 Subject: [issue9385] _ctypes module uses 'rwx' mmap() calls In-Reply-To: <1280163756.22.0.278914543931.issue9385@psf.upfronthosting.co.za> Message-ID: <1280435986.72.0.857182056005.issue9385@psf.upfronthosting.co.za> Radoslaw Madej added the comment: Arfrever, do you mean this patch? http://bugs.python.org/file13897/issue5504-linux.patch It does not cleanly apply to Gentoo's 2.6.5-r3 ebuild, neither it does apply to 2.6.5, 2.7 or 3.2.1 releases from the Python website. Which python release/branch should it work with? Output below: Python-2.6.5 # patch -p0 < ../issue5504-linux.patch patching file setup.py Hunk #1 succeeded at 1744 (offset 23 lines). patching file Modules/_ctypes/malloc_closure.c Reversed (or previously applied) patch detected! Assume -R? [n] n Apply anyway? [n] y Hunk #1 FAILED at 1. File Modules/_ctypes/malloc_closure.c is not empty after patch, as expected 1 out of 1 hunk FAILED -- saving rejects to file Modules/_ctypes/malloc_closure.c.rej patching file Modules/_ctypes/_ctypes.c Hunk #1 succeeded at 3443 (offset 3 lines). patching file Modules/_ctypes/libffi/fficonfig.py.in patching file Modules/_ctypes/libffi/src/closures.c patching file Modules/_ctypes/libffi/src/dlmalloc.c patching file Modules/_ctypes/ctypes.h patching file Modules/_ctypes/callbacks.c Hunk #1 FAILED at 21. Hunk #3 FAILED at 403. Hunk #4 succeeded at 451 (offset 1 line). 2 out of 4 hunks FAILED -- saving rejects to file Modules/_ctypes/callbacks.c.rej src # cd Python-2.7 Python-2.7 # patch -p0 < ../issue5504-linux.patch patching file setup.py Hunk #1 succeeded at 1865 (offset 144 lines). patching file Modules/_ctypes/malloc_closure.c Reversed (or previously applied) patch detected! Assume -R? [n] Apply anyway? [n] y Hunk #1 FAILED at 1. File Modules/_ctypes/malloc_closure.c is not empty after patch, as expected 1 out of 1 hunk FAILED -- saving rejects to file Modules/_ctypes/malloc_closure.c.rej patching file Modules/_ctypes/_ctypes.c Hunk #1 FAILED at 3440. 1 out of 1 hunk FAILED -- saving rejects to file Modules/_ctypes/_ctypes.c.rej patching file Modules/_ctypes/libffi/fficonfig.py.in patching file Modules/_ctypes/libffi/src/closures.c patching file Modules/_ctypes/libffi/src/dlmalloc.c patching file Modules/_ctypes/ctypes.h Hunk #1 FAILED at 95. 1 out of 1 hunk FAILED -- saving rejects to file Modules/_ctypes/ctypes.h.rej patching file Modules/_ctypes/callbacks.c Hunk #1 FAILED at 21. Hunk #2 FAILED at 373. Hunk #3 FAILED at 403. Hunk #4 FAILED at 450. 4 out of 4 hunks FAILED -- saving rejects to file Modules/_ctypes/callbacks.c.rej Python-2.7 # cd .. src # cd Python-3.1.2 Python-3.1.2 # patch -p0 < ../issue5504-linux.patch patching file setup.py Hunk #1 succeeded at 1513 (offset -208 lines). patching file Modules/_ctypes/malloc_closure.c Reversed (or previously applied) patch detected! Assume -R? [n] y patching file Modules/_ctypes/_ctypes.c Hunk #1 succeeded at 3367 (offset -73 lines). patching file Modules/_ctypes/libffi/fficonfig.py.in patching file Modules/_ctypes/libffi/src/closures.c patching file Modules/_ctypes/libffi/src/dlmalloc.c patching file Modules/_ctypes/ctypes.h Hunk #1 succeeded at 54 (offset -41 lines). patching file Modules/_ctypes/callbacks.c Hunk #1 FAILED at 21. Hunk #2 succeeded at 370 (offset -3 lines). Hunk #3 succeeded at 401 with fuzz 2 (offset -2 lines). Hunk #4 succeeded at 448 (offset -2 lines). 1 out of 4 hunks FAILED -- saving rejects to file Modules/_ctypes/callbacks.c.rej ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 22:41:42 2010 From: report at bugs.python.org (Mark Lawrence) Date: Thu, 29 Jul 2010 20:41:42 +0000 Subject: [issue5437] Singleton MemoryError can hold traceback data and locals indefinitely In-Reply-To: <1236475192.44.0.322213447469.issue5437@psf.upfronthosting.co.za> Message-ID: <1280436102.67.0.323117124879.issue5437@psf.upfronthosting.co.za> Mark Lawrence added the comment: Changing priority as nobody appears to have lost any sleep over this issue. ---------- priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 22:47:08 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 29 Jul 2010 20:47:08 +0000 Subject: [issue9422] Memory leak when reinitializing a Struct object In-Reply-To: <1280435615.43.0.80003916996.issue9422@psf.upfronthosting.co.za> Message-ID: <1280436428.71.0.650740759081.issue9422@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for the report! I'll look into this. Do you happen to have a patch available, or an interest in writing one? ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 22:47:18 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 29 Jul 2010 20:47:18 +0000 Subject: [issue9422] Memory leak when reinitializing a Struct object In-Reply-To: <1280435615.43.0.80003916996.issue9422@psf.upfronthosting.co.za> Message-ID: <1280436438.83.0.548534884741.issue9422@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 22:48:44 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 29 Jul 2010 20:48:44 +0000 Subject: [issue9422] Memory leak when reinitializing a Struct object In-Reply-To: <1280435615.43.0.80003916996.issue9422@psf.upfronthosting.co.za> Message-ID: <1280436524.89.0.495714794214.issue9422@psf.upfronthosting.co.za> Mark Dickinson added the comment: Add versions. ---------- stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 22:57:56 2010 From: report at bugs.python.org (Ron Adam) Date: Thu, 29 Jul 2010 20:57:56 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1280437076.09.0.125879824218.issue2001@psf.upfronthosting.co.za> Changes by Ron Adam : Removed file: http://bugs.python.org/file18160/pydoc_server.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 22:58:03 2010 From: report at bugs.python.org (Ron Adam) Date: Thu, 29 Jul 2010 20:58:03 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1280437083.32.0.16537237877.issue2001@psf.upfronthosting.co.za> Changes by Ron Adam : Removed file: http://bugs.python.org/file18163/pydoc_server2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 23:00:36 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 29 Jul 2010 21:00:36 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280437236.14.0.418402707267.issue7447@psf.upfronthosting.co.za> Terry J. Reedy added the comment: For Python functions, all arguments can be keyword arguments. For many builtins, none can be (and maybe there should be a note to that effect at the top of the built-in functions chapter). 'Param = default' merely means that the parameter has a default argument and it is therefore optional to provide one. It says nothing about whether the argument can be identified by the parameter name or only by position. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 23:01:02 2010 From: report at bugs.python.org (Winston451) Date: Thu, 29 Jul 2010 21:01:02 +0000 Subject: [issue9422] Memory leak when reinitializing a Struct object In-Reply-To: <1280435615.43.0.80003916996.issue9422@psf.upfronthosting.co.za> Message-ID: <1280437262.64.0.170433929145.issue9422@psf.upfronthosting.co.za> Winston451 added the comment: Hi Mark, I added a patch in the file list that should correct the bug. ---------- keywords: +patch Added file: http://bugs.python.org/file18263/leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 23:03:14 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 29 Jul 2010 21:03:14 +0000 Subject: [issue9422] Memory leak when reinitializing a Struct object In-Reply-To: <1280435615.43.0.80003916996.issue9422@psf.upfronthosting.co.za> Message-ID: <1280437394.21.0.829052765338.issue9422@psf.upfronthosting.co.za> Mark Dickinson added the comment: Great! Thank you. I wonder whether the weakreflist field needs to be cleared similarly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 23:06:06 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Thu, 29 Jul 2010 21:06:06 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1280437236.14.0.418402707267.issue7447@psf.upfronthosting.co.za> Message-ID: <79F9CE4C-280D-41F6-A9E8-D5E946C6C85F@langa.pl> ?ukasz Langa added the comment: > For Python functions, all arguments can be keyword arguments. For many builtins, none can be (and maybe there should be a note to that effect at the top of the built-in functions chapter). +1 Many Python users don't really grasp how builtins are different from regular functions. A note of this kind would be most helpful. Should I provide a patch for Doc/ ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 23:09:33 2010 From: report at bugs.python.org (Ron Adam) Date: Thu, 29 Jul 2010 21:09:33 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1280437773.12.0.56797892051.issue2001@psf.upfronthosting.co.za> Ron Adam added the comment: Link to the discussion on the python-dev new group. Subject: [isssue 2001] Pydoc enhancement patch questions http://permalink.gmane.org/gmane.comp.python.devel/115474 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 23:12:38 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 29 Jul 2010 21:12:38 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1280437958.5.0.379067591541.issue7447@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Please do. This issue comes up often enough on python-list. Make it a separate doc issue, which will be auto-assigned to docs at python and add me as nosy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 23:23:28 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 21:23:28 +0000 Subject: [issue1773632] Remove references to _xmlrpclib from xmlrpclib.py Message-ID: <1280438608.6.0.598161121795.issue1773632@psf.upfronthosting.co.za> Georg Brandl added the comment: Same here. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 23:28:10 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 29 Jul 2010 21:28:10 +0000 Subject: [issue9366] Reference leak for local new style class In-Reply-To: <1279964801.22.0.925376306196.issue9366@psf.upfronthosting.co.za> Message-ID: <1280438890.48.0.25625859828.issue9366@psf.upfronthosting.co.za> Georg Brandl added the comment: This is caused by the fact that new-style classes create reference cycles. Try calling the cyclic garbage collector using gc.collect() after the function call, and the leaked references will vanish again. ---------- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> Declaring a class creates circular references _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 23:29:17 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 29 Jul 2010 21:29:17 +0000 Subject: [issue3401] wsgiref can't handle unicode environments In-Reply-To: <1216338814.66.0.0698084133409.issue3401@psf.upfronthosting.co.za> Message-ID: <1280438957.27.0.0923502848078.issue3401@psf.upfronthosting.co.za> Brian Curtin added the comment: Unless this is confirmed to have been fixed, it should not be closed. ---------- nosy: +brian.curtin status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 23:29:34 2010 From: report at bugs.python.org (Winston451) Date: Thu, 29 Jul 2010 21:29:34 +0000 Subject: [issue9422] Memory leak when reinitializing a Struct object In-Reply-To: <1280435615.43.0.80003916996.issue9422@psf.upfronthosting.co.za> Message-ID: <1280438974.02.0.584406869226.issue9422@psf.upfronthosting.co.za> Winston451 added the comment: I don't think that the weakreflist should be cleared. After all the object is just reinitialized not destructed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 23:46:43 2010 From: report at bugs.python.org (W. Trevor King) Date: Thu, 29 Jul 2010 21:46:43 +0000 Subject: [issue6612] 'import site' fails when called from an unlinked directory In-Reply-To: <1249034007.06.0.695800326888.issue6612@psf.upfronthosting.co.za> Message-ID: <1280440003.07.0.146185334027.issue6612@psf.upfronthosting.co.za> W. Trevor King added the comment: I just fixed it myself ;). As I said before, not really a big deal, but it was an easy fix. I've attached a patch, or you can merge my hg branch f python-trunk at http://www.physics.drexel.edu/~wking/code/hg/hgwebdir.cgi/python/ ---------- keywords: +patch versions: +Python 2.6, Python 2.7 Added file: http://bugs.python.org/file18264/issue6612.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jul 29 23:48:50 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 29 Jul 2010 21:48:50 +0000 Subject: [issue9422] Memory leak when reinitializing a Struct object In-Reply-To: <1280435615.43.0.80003916996.issue9422@psf.upfronthosting.co.za> Message-ID: <1280440130.3.0.484806084684.issue9422@psf.upfronthosting.co.za> Mark Dickinson added the comment: Yes, you're right of course. Fixed in r83239 (py3k), r83240 (release31-maint), r83241 (release27-maint) and r83242 (release26-maint). Thanks! BTW, just out of curiosity: I don't think I've ever seen anyone re-initialize a struct.Struct object before. What's the reason for doing this instead of creating a new one? ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 00:05:55 2010 From: report at bugs.python.org (Winston451) Date: Thu, 29 Jul 2010 22:05:55 +0000 Subject: [issue9422] Memory leak when reinitializing a Struct object In-Reply-To: <1280435615.43.0.80003916996.issue9422@psf.upfronthosting.co.za> Message-ID: <1280441155.0.0.483453065587.issue9422@psf.upfronthosting.co.za> Winston451 added the comment: I was just looking at the code of the struct when i saw this problem. Personnally I have never had to reinitialize a Struct object but Python allows it so... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 00:18:51 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 29 Jul 2010 22:18:51 +0000 Subject: [issue4377] tokenize.detect_encoding() and Mac newline In-Reply-To: <1227270739.29.0.218620905737.issue4377@psf.upfronthosting.co.za> Message-ID: <1280441931.53.0.980084655072.issue4377@psf.upfronthosting.co.za> STINNER Victor added the comment: Well, it looks like nobody cares (including me), so I close this issue. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 00:25:13 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 29 Jul 2010 22:25:13 +0000 Subject: [issue8129] Wrong arguments in sqlite3.connect() documentation In-Reply-To: <1268450021.57.0.736036682608.issue8129@psf.upfronthosting.co.za> Message-ID: <1280442313.07.0.370963244765.issue8129@psf.upfronthosting.co.za> STINNER Victor added the comment: I was trying to fix but, but... oh! Georg fixed that 2 weeks ago (r82763). Thank you! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 00:26:25 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 29 Jul 2010 22:26:25 +0000 Subject: [issue8242] Improve support of PEP 383 (surrogates) in Python3: meta-issue In-Reply-To: <1269652357.44.0.254995855854.issue8242@psf.upfronthosting.co.za> Message-ID: <1280442385.14.0.353111858728.issue8242@psf.upfronthosting.co.za> STINNER Victor added the comment: I created a new svn branch for my work on import in unicode. I will open a new issue and so I close this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 00:27:46 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 29 Jul 2010 22:27:46 +0000 Subject: [issue8242] Improve support of PEP 383 (surrogates) in Python3: meta-issue In-Reply-To: <1269652357.44.0.254995855854.issue8242@psf.upfronthosting.co.za> Message-ID: <1280442466.53.0.382103391035.issue8242@psf.upfronthosting.co.za> STINNER Victor added the comment: Remove dependency on #6697 to be able to close this issue. ---------- dependencies: -Check that _PyUnicode_AsString() result is not NULL resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 00:56:41 2010 From: report at bugs.python.org (Roumen Petrov) Date: Thu, 29 Jul 2010 22:56:41 +0000 Subject: [issue9419] RUNSHARED needs LDFLAGS In-Reply-To: <1280423222.23.0.51081739049.issue9419@psf.upfronthosting.co.za> Message-ID: <1280444201.13.0.796961923886.issue9419@psf.upfronthosting.co.za> Changes by Roumen Petrov : ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 01:00:53 2010 From: report at bugs.python.org (Winston451) Date: Thu, 29 Jul 2010 23:00:53 +0000 Subject: [issue9422] Memory leak when reinitializing a Struct object In-Reply-To: <1280435615.43.0.80003916996.issue9422@psf.upfronthosting.co.za> Message-ID: <1280444453.27.0.562652595036.issue9422@psf.upfronthosting.co.za> Winston451 added the comment: BTW, I am really amazed by your reactivity. I submitted a bug report at 22:33 and one hour later it's fixed. It's really great! Keep up the good work! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 01:09:08 2010 From: report at bugs.python.org (Lyle Ross) Date: Thu, 29 Jul 2010 23:09:08 +0000 Subject: [issue9423] Error in urllib2.do_open(self, http_class, req) In-Reply-To: <1280444947.69.0.433745373781.issue9423@psf.upfronthosting.co.za> Message-ID: <1280444947.69.0.433745373781.issue9423@psf.upfronthosting.co.za> New submission from Lyle Ross : W:\Production Apps\PyLib>python ProxyHTTPConnection.py W:\Production Apps\PyLib>set path=C:\Python26;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\ Wbem;;C:\Program Files\RSA Security\RSA Authentication Agent\Agenthost Autoreg Utility;C:\WINDOWS\system32\Win dowsPowerShell\v1.0;C:\WINDOWS\system32\WindowsPowerShell\v1.0;C:\Program Files\TortoiseSVN\bin;W:\cmd;C:\Pyth on26;C:\Program Files\Java\jdk1.6.0_20\bin;W:\Programs\nmake15;W:\Programs\GnuPG;C:\Cygwin\bin W:\Production Apps\PyLib>python.exe -u ProxyHTTPConnection.py Enter ProxyHTTPConnection :: __main__ call opener = urllib2.build_opener( ConnectHTTPHandler( proxy = thunderchild.bronze.us-cert.gov ), ConnectHT TPSHandler( proxy = thunderchild.bronze.us-cert.gov ) ) Enter ConnectHTTPHandler :: __init__ call urllib2.HTTPHandler.__init__ Exit ConnectHTTPHandler :: __init__ Enter ConnectHTTPSHandler :: __init__ call urllib2.HTTPSHandler.__init__ Exit ConnectHTTPSHandler :: __init__ call urllib2.install_opener( opener ) call req = urllib2.Request( url = https://portal.cymru.com/export/darknet_top10src_24h.txt ) call req.set_proxy( thunderchild.bronze.us-cert.gov, https ) f = call urllib2.urlopen( req ) Enter ConnectHTTPSHandler :: do_open call req.set_proxy( thunderchild.bronze.us-cert.gov, 'https' ) rc = call urllib2.HTTPSHandler.do_open( self, ProxyHTTPSConnection, req ) Traceback (most recent call last): File "ProxyHTTPConnection.py", line 243, in f = urllib2.urlopen( req ) File "C:\Python26\lib\urllib2.py", line 126, in urlopen return _opener.open(url, data, timeout) File "C:\Python26\lib\urllib2.py", line 391, in open response = self._open(req, data) File "C:\Python26\lib\urllib2.py", line 409, in _open '_open', req) File "C:\Python26\lib\urllib2.py", line 369, in _call_chain result = func(*args) File "C:\Python26\lib\urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "ProxyHTTPConnection.py", line 204, in do_open rc = urllib2.HTTPSHandler.do_open( self, ProxyHTTPSConnection, req ) File "C:\Python26\lib\urllib2.py", line 1107, in do_open h = http_class(host, timeout=req.timeout) # will parse host:port TypeError: __init__() got an unexpected keyword argument 'timeout' Exit ProxyHTTPConnection :: __main__ W:\Production Apps\PyLib> NOTE: the proxy server used in this test is behind our firewall. You must change the proxy server if you attempt to replicate this test in your system. ---------- components: Library (Lib) files: ProxyHTTPConnection.py messages: 112022 nosy: lyle.ross priority: normal severity: normal status: open title: Error in urllib2.do_open(self, http_class, req) type: compile error versions: Python 2.6 Added file: http://bugs.python.org/file18265/ProxyHTTPConnection.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 01:39:24 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 29 Jul 2010 23:39:24 +0000 Subject: [issue4724] setting f_exc_traceback aborts in debug builds In-Reply-To: <1229966419.5.0.164799717047.issue4724@psf.upfronthosting.co.za> Message-ID: <1280446764.9.0.714804391607.issue4724@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Lack of response is not an appropriate reason to close. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 01:44:01 2010 From: report at bugs.python.org (Michael Foord) Date: Thu, 29 Jul 2010 23:44:01 +0000 Subject: [issue4724] setting f_exc_traceback aborts in debug builds In-Reply-To: <1229966419.5.0.164799717047.issue4724@psf.upfronthosting.co.za> Message-ID: <1280447041.27.0.400869377237.issue4724@psf.upfronthosting.co.za> Michael Foord added the comment: Yup, still active: $ ./python.exe Python 2.7.0+ (release27-maint:83247, Jul 30 2010, 00:41:50) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sys [35067 refs] >>> sys._getframe(0).f_exc_traceback = 23 Assertion failed: (tstate->frame->f_exc_traceback == NULL), function PyEval_EvalFrameEx, file Python/ceval.c, line 2998. Abort trap ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 02:05:52 2010 From: report at bugs.python.org (Michael Foord) Date: Fri, 30 Jul 2010 00:05:52 +0000 Subject: [issue9424] deprecate unittest.TestCase.assertEquals In-Reply-To: <1280448352.86.0.380978086896.issue9424@psf.upfronthosting.co.za> Message-ID: <1280448352.86.0.380978086896.issue9424@psf.upfronthosting.co.za> New submission from Michael Foord : Now that deprecations are silent by default it would be much less intrusive to deprecate unittest.TestCase.assertEqual We have a persistent issue in the Python test suite of developers using assertEquals when we have standardised on assertEqual. In regrtest we could patch TestCase.assertEquals to raise a (hopefully helpful) error. That'll stop the blighters! ---------- assignee: ezio.melotti messages: 112025 nosy: ezio.melotti, michael.foord priority: normal severity: normal status: open title: deprecate unittest.TestCase.assertEquals versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 02:13:34 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 30 Jul 2010 00:13:34 +0000 Subject: [issue9425] Rewrite import machinery to work with unicode paths In-Reply-To: <1280448814.73.0.312881779361.issue9425@psf.upfronthosting.co.za> Message-ID: <1280448814.73.0.312881779361.issue9425@psf.upfronthosting.co.za> New submission from STINNER Victor : Python (2 and 3) is unable to load a module installed in a directory containing characters not encodable to the locale encoding. And Python doesn't work if it's installed in non-ASCII directory on Windows or with a locale encoding different than UTF-8. On Windows, the locale encoding is "mbcs", which is a small charset, unable to mix different languages, whereas the file system is fully unicode compatible (it uses UTF-16). Python should work with unicode strings (wchar_t*, Py_UNICODE* or PyUnicodeObject) instead of byte strings (char* or PyBytesObject), especially while loading a Python module. It's not an easy task because it requires to change a lot of code, especially in Python/import.c. I am working on this topic since some months and I have now a working patch. It's now possible to run Python from the source tree containing a non-ASCII character in C locale (ASCII encoding). Except just a minor bug in test_gdb, all tests of the test suite pass. I posted the whole patch on Rietveld for a review: http://codereview.appspot.com/1874048 The patch is huge because it fixes different things: a) import machinery (import.c, getpath.c, importdl.c, ...) b) many error handlers using filenames (compile.c, errors.c, _warnings.c, sysmodule.c, ...) c) functions using filenames, especially Python full path: log the filename (eg. Lib/distutils/file_util.py), filename written to a program output (eg. Lib/platform.py) d) tests (Lib/test/test_*.py) (b), (c) and (d) can be fixed before/without (a). But (a) requires other parts to work correctly. If it's not possible to review the patch, I can try to split it in smaller parts. -- Related issues: #3080: Full unicode import system #4352: imp.find_module() fails with a UnicodeDecodeError when called with non-ASCII search paths #8611: Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX) #8988: import + coding = failure (3.1.2/win32) -- See also my email sent to python-dev for more information: http://mail.python.org/pipermail/python-dev/2010-July/101619.html ---------- components: Interpreter Core, Unicode messages: 112026 nosy: haypo priority: normal severity: normal status: open title: Rewrite import machinery to work with unicode paths versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 02:18:17 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 30 Jul 2010 00:18:17 +0000 Subject: [issue9425] Rewrite import machinery to work with unicode paths In-Reply-To: <1280448814.73.0.312881779361.issue9425@psf.upfronthosting.co.za> Message-ID: <1280449097.6.0.309809454024.issue9425@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I forgot to say that I created an svn branch including my work: import_unicode. http://svn.python.org/view/python/branches/import_unicode/ You can try it if you prefer svn to an huge patch. I created a branch so you can follow my work commit by commit using svn history. -- The patch is not completly done. There are still remaining FIXMEs. Some FIXME are not bugs, but improvments. The most important FIXME is to restore the support of bytes path in sys.path. I removed it temporary, because it was easier for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 02:20:35 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 30 Jul 2010 00:20:35 +0000 Subject: [issue3080] Full unicode import system In-Reply-To: <1213208697.49.0.984990811807.issue3080@psf.upfronthosting.co.za> Message-ID: <1280449235.31.0.870778275945.issue3080@psf.upfronthosting.co.za> STINNER Victor added the comment: I posted a patch: #9425. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 02:21:49 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 30 Jul 2010 00:21:49 +0000 Subject: [issue8988] import + coding = failure (3.1.2/win32) In-Reply-To: <1276426235.15.0.873898512927.issue8988@psf.upfronthosting.co.za> Message-ID: <1280449309.9.0.516206712388.issue8988@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote a patch on import machinery to support unicode characters: see #9425. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 02:22:44 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 30 Jul 2010 00:22:44 +0000 Subject: [issue4352] imp.find_module() fails with a UnicodeDecodeError when called with non-ASCII search paths In-Reply-To: <1227071866.1.0.995372704707.issue4352@psf.upfronthosting.co.za> Message-ID: <1280449364.39.0.93058401671.issue4352@psf.upfronthosting.co.za> STINNER Victor added the comment: I wrote a patch to fix this issue, see #9425. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 02:23:57 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 30 Jul 2010 00:23:57 +0000 Subject: [issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX) In-Reply-To: <1272979850.31.0.0455265952928.issue8611@psf.upfronthosting.co.za> Message-ID: <1280449437.82.0.872715393697.issue8611@psf.upfronthosting.co.za> STINNER Victor added the comment: I posted a patch to fix this issue: see #9425. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 02:42:13 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 30 Jul 2010 00:42:13 +0000 Subject: [issue9425] Rewrite import machinery to work with unicode paths In-Reply-To: <1280448814.73.0.312881779361.issue9425@psf.upfronthosting.co.za> Message-ID: <1280450533.31.0.683493697543.issue9425@psf.upfronthosting.co.za> Ezio Melotti added the comment: I wrote a few minor comments on codereview. The patch should also include more tests. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 02:45:09 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 30 Jul 2010 00:45:09 +0000 Subject: [issue9423] Error in urllib2.do_open(self, http_class, req) In-Reply-To: <1280444947.69.0.433745373781.issue9423@psf.upfronthosting.co.za> Message-ID: <1280450709.42.0.142703373463.issue9423@psf.upfronthosting.co.za> Senthil Kumaran added the comment: urllib2 currently supports the HTTPS over Proxy, you might want to use that Handler (HTTPSProxyHandler) instead of using the recipe that you attached. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 02:49:58 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 30 Jul 2010 00:49:58 +0000 Subject: [issue8988] import + coding = failure (3.1.2/win32) In-Reply-To: <1276426235.15.0.873898512927.issue8988@psf.upfronthosting.co.za> Message-ID: <1280450998.49.0.11068073594.issue8988@psf.upfronthosting.co.za> STINNER Victor added the comment: I tested pybug-import-coding.zip on Windows with my import_unicode branch (see #9425): it works correctly, whereas it fails with py3k (Python 3.2). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 03:03:46 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 30 Jul 2010 01:03:46 +0000 Subject: [issue9425] Rewrite import machinery to work with unicode paths In-Reply-To: <1280448814.73.0.312881779361.issue9425@psf.upfronthosting.co.za> Message-ID: <1280451826.97.0.545084433995.issue9425@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 03:11:04 2010 From: report at bugs.python.org (Kevin Walzer) Date: Fri, 30 Jul 2010 01:11:04 +0000 Subject: [issue5262] PythonLauncher considered harmfull In-Reply-To: <1234638505.38.0.029039550018.issue5262@psf.upfronthosting.co.za> Message-ID: <1280452264.07.0.237381265148.issue5262@psf.upfronthosting.co.za> Kevin Walzer added the comment: Ronald, I'd vote for warning if it's the default action. Would your other proposed change require users to set PythonLauncher as the opening app for each Python file, or would there be a way to manually set it as the default from Finder or elsewhere? Kevin ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 03:31:08 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 30 Jul 2010 01:31:08 +0000 Subject: [issue8591] update mkpkg to latest coding standards In-Reply-To: <1272727331.63.0.427295643421.issue8591@psf.upfronthosting.co.za> Message-ID: <1280453468.27.0.35532416262.issue8591@psf.upfronthosting.co.za> ?ric Araujo added the comment: I have six changesets that make progressive improvements on cosmetic things, so that the code gets more readable. You can start with http://bitbucket.org/Merwok/distutils2-killsetup/changeset/5e2906cabeab and follow the parent links. The other changes you made include changing the config file (+1, except with a simpler ?mkpkg? section name), touching up the input/print code, and improving the helper methods (e.g. using codecs.open, using a simple string template instead of a lot of file.write). I had an illumination: We shouldn?t code input/print things but use the cmd module. That will be my next move, then I?ll look at your other code improvements (they will be a bit hard to spot, since your diff basically rewrites every line so I can?t easily see the changes made inside one function, but I?ll manage). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 03:57:03 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 30 Jul 2010 01:57:03 +0000 Subject: [issue8591] update mkpkg to latest coding standards In-Reply-To: <1272727331.63.0.427295643421.issue8591@psf.upfronthosting.co.za> Message-ID: <1280455023.08.0.623709704666.issue8591@psf.upfronthosting.co.za> ?ric Araujo added the comment: After speaking with a Montreal-Python hacker about my use case and reading the PyMOTW page for cmd, I think that using raw_input and print is actually the way to go. We don?t want the user to enter commands, just to answer questions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 04:23:46 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 30 Jul 2010 02:23:46 +0000 Subject: [issue9425] Rewrite import machinery to work with unicode paths In-Reply-To: <1280448814.73.0.312881779361.issue9425@psf.upfronthosting.co.za> Message-ID: <1280456626.36.0.495367781548.issue9425@psf.upfronthosting.co.za> STINNER Victor added the comment: > The patch should also include more tests. Which kind of test? Run the test suite in a non-ASCII directory with encoding different than utf-8 is enough. If the patch is accepted, the solution is maybe a specific buildbot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 05:25:21 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 30 Jul 2010 03:25:21 +0000 Subject: [issue9425] Rewrite import machinery to work with unicode paths In-Reply-To: <1280448814.73.0.312881779361.issue9425@psf.upfronthosting.co.za> Message-ID: <1280460321.06.0.615450284551.issue9425@psf.upfronthosting.co.za> STINNER Victor added the comment: Another important TODO: use weak references for the code objects list. -- I tested my patch on Windows. I fixes #8988 because non-ASCII characters are now correctly decoded with mbcs and not UTF-8. But it doesn't work with characters not encodable to mbcs. It looks like there are some remaining code using byte string. I fixed some of them in import_unicode branch, but it's not enough. It is not easy to investigate because Visual Studio refuse to compile the project if the project directory contains a character not encodable to mbcs. And it is unable to debug python if the project directory is renamed after the compilation. I will maybe retry with Cygwin or with the old school "printf" method. It looks like few Windows applications support characters not encodable to mbcs (locale encoding): MinGW and WinSCP do neither support such characters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 07:56:05 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 30 Jul 2010 05:56:05 +0000 Subject: [issue5262] PythonLauncher considered harmfull In-Reply-To: <1280452264.07.0.237381265148.issue5262@psf.upfronthosting.co.za> Message-ID: <824AA2E4-A4A7-4113-B8FB-8293442A8497@mac.com> Ronald Oussoren added the comment: > Would your other proposed change require users to set PythonLauncher as the opening app for each Python file, or would there be a way to manually set it as the default from Finder or elsewhere? I would no longer be possible to set PythonLauncher as the default action for Python files, because doing that is a clear security risk. Ronald ---------- Added file: http://bugs.python.org/file18266/smime.p7s _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3567 bytes Desc: not available URL: From report at bugs.python.org Fri Jul 30 08:38:54 2010 From: report at bugs.python.org (Ray.Allen) Date: Fri, 30 Jul 2010 06:38:54 +0000 Subject: [issue7330] PyUnicode_FromFormat segfault In-Reply-To: <1258314153.95.0.978747695294.issue7330@psf.upfronthosting.co.za> Message-ID: <1280471934.49.0.213418055621.issue7330@psf.upfronthosting.co.za> Ray.Allen added the comment: Is this really worthy to fix? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 08:54:04 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 30 Jul 2010 06:54:04 +0000 Subject: [issue9399] Provide a 'print' action for argparse In-Reply-To: <1280329840.94.0.288179215378.issue9399@psf.upfronthosting.co.za> Message-ID: <1280472844.99.0.841079198435.issue9399@psf.upfronthosting.co.za> Steven Bethard added the comment: The equivalent to optparse callback is basically to define __call__ in a subclass of Action. Pretty much the same amount of work because they both have complicated parameters. The "callable" I (not fully confidently) proposed would just be a shorthand for defining __call__ in a subclass of Action when you don't care about any of the other command line info. I guess, without further use cases for "callable" and given that you can subclass Action for other use cases, let's just do the action='write' version. Feel free to supply a patch, or I will when I get some time for argparse again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 08:56:10 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 06:56:10 +0000 Subject: [issue6612] 'import site' fails when called from an unlinked directory In-Reply-To: <1249034007.06.0.695800326888.issue6612@psf.upfronthosting.co.za> Message-ID: <1280472970.12.0.485352766146.issue6612@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks! Reopening. ---------- components: +Library (Lib) stage: -> patch review status: languishing -> open type: -> behavior versions: +Python 3.1, Python 3.2 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 09:16:51 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 07:16:51 +0000 Subject: [issue4179] pdb: Allow the "list" command to return to the currently debugged line In-Reply-To: <1224709654.06.0.420157536807.issue4179@psf.upfronthosting.co.za> Message-ID: <1280474211.29.0.00439336363115.issue4179@psf.upfronthosting.co.za> Georg Brandl added the comment: Implemented in r83260. Thanks for the patch! ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 09:21:34 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 07:21:34 +0000 Subject: [issue9230] pdb.Pdb.checkline() throws AttributeError if called before starting a debug session In-Reply-To: <1278906990.65.0.476539166106.issue9230@psf.upfronthosting.co.za> Message-ID: <1280474494.61.0.35705238905.issue9230@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r83261. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 09:58:29 2010 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 30 Jul 2010 07:58:29 +0000 Subject: [issue9214] Most Set methods of KeysView and ItemsView do not work right In-Reply-To: <1278703905.18.0.125671722438.issue9214@psf.upfronthosting.co.za> Message-ID: <1280476709.73.0.732265250993.issue9214@psf.upfronthosting.co.za> Eli Bendersky added the comment: Attaching an updated patch, with the trailing whitespace removed. Hope it's more acceptable now. P.S. Please let me know how to detect such issues in future patches. ---------- Added file: http://bugs.python.org/file18267/issue9214.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 10:30:10 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 08:30:10 +0000 Subject: [issue1437051] "continue" in .pdbrc has no effect Message-ID: <1280478610.58.0.771750803716.issue1437051@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the patience, this is now fixed in r83262. I also added a -c option so that you can give the "continue" on the command line, not put it in the .pdbrc file. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 10:34:16 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 30 Jul 2010 08:34:16 +0000 Subject: [issue9426] Explicitly state lack of support for keyword arguments in builtin functions In-Reply-To: <1280478856.92.0.712905377204.issue9426@psf.upfronthosting.co.za> Message-ID: <1280478856.92.0.712905377204.issue9426@psf.upfronthosting.co.za> New submission from ?ukasz Langa : Currently it's somewhat surprising that while the documentation often states the default values for certain builtins, invoking the builtin with keyword arguments as described in the documentation does not work. Original discussion: #7447 I'm going through all builtins to see how the keyword arg support looks and I'm going to present a patch for Doc/library/builtins.rst that explicitly states that builtins don't support this kind of invocation. Expect a patch later today. ---------- assignee: docs at python components: Documentation messages: 112048 nosy: docs at python, lukasz.langa, tjreedy priority: normal severity: normal status: open title: Explicitly state lack of support for keyword arguments in builtin functions versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 10:47:40 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 08:47:40 +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: <1280479660.23.0.357497242187.issue7964@psf.upfronthosting.co.za> Georg Brandl added the comment: This is fixed in py3k trunk by other means; exec() now accepts bytestrings with "unusual" newlines. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 10:55:01 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 08:55:01 +0000 Subject: [issue8015] pdb "commands" command throws you into postmortem if you enter an empty command In-Reply-To: <1267034004.05.0.0859913514816.issue8015@psf.upfronthosting.co.za> Message-ID: <1280480101.11.0.187091175774.issue8015@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r83265. Thanks! ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 11:09:17 2010 From: report at bugs.python.org (Ray.Allen) Date: Fri, 30 Jul 2010 09:09:17 +0000 Subject: [issue9417] Declaring a class creates circular references In-Reply-To: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> Message-ID: <1280480957.6.0.278737763531.issue9417@psf.upfronthosting.co.za> Ray.Allen added the comment: > However here's a proposed solution: * for the __mro__: instead of using a tuple, use a new object that inherits from it. This new object should use weak reference for the first item and should return the real object (if available) only in __getitem__(). * __objclass__ can should become a property based on weak references. I'm afraid doing so could cause some public C API change. For example, the PyDescr_TYPE, if we implemented all the Descriptor object's d_type(that is the __objclass__ of all types of descriptors) based on weakref, we could have all the callers who call the descriptor functions to check weather the weak-referented class object has gone away. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 11:14:46 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 09:14:46 +0000 Subject: [issue1472251] pdb 'run' crashes when the it's first argument is non-string Message-ID: <1280481286.93.0.914208218389.issue1472251@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in trunk r83266; file objects are no longer allowed for exec(), therefore I dropped mentions of that. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 11:19:26 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 09:19:26 +0000 Subject: [issue7539] unicode exceptions terminate pdb.pm() loop In-Reply-To: <1261137339.47.0.500431932871.issue7539@psf.upfronthosting.co.za> Message-ID: <1280481566.32.0.632499891856.issue7539@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, applied to 2.7 branch in r83267. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 11:23:39 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 09:23:39 +0000 Subject: [issue8048] doctest assumes sys.displayhook hasn't been touched In-Reply-To: <1267604255.42.0.0975325931502.issue8048@psf.upfronthosting.co.za> Message-ID: <1280481819.2.0.700496509038.issue8048@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, applied to 3k in r83268. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 11:25:06 2010 From: report at bugs.python.org (Andrea Colangelo) Date: Fri, 30 Jul 2010 09:25:06 +0000 Subject: [issue9417] Declaring a class creates circular references In-Reply-To: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> Message-ID: <1280481906.95.0.167169049487.issue9417@psf.upfronthosting.co.za> Andrea Colangelo added the comment: I can confirm this bug should be addressed some way. On my high-traffic server, keeping GC enabled causes performance issues due to this bug, and disabling it causes an out-of-memory within hours. ---------- nosy: +warp10 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 11:30:37 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 09:30:37 +0000 Subject: [issue4938] Pdb cannot access doctest source in postmortem In-Reply-To: <1231887344.64.0.130142534031.issue4938@psf.upfronthosting.co.za> Message-ID: <1280482237.77.0.260513055441.issue4938@psf.upfronthosting.co.za> Georg Brandl added the comment: I think this is just too complicated to implement in a sane way. doctest+pdb is just a bit too hacky to be fully supported. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 11:43:11 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 09:43:11 +0000 Subject: [issue6719] pdb messes up when debugging an non-ascii program In-Reply-To: <1250527811.0.0.14372124674.issue6719@psf.upfronthosting.co.za> Message-ID: <1280482991.84.0.870565843553.issue6719@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, applied in r83269. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 12:00:22 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 10:00:22 +0000 Subject: [issue5727] doctest pdb readline broken In-Reply-To: <1239276305.19.0.526867750163.issue5727@psf.upfronthosting.co.za> Message-ID: <1280484022.01.0.840126814266.issue5727@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r83271. I think the first patch's approach is better, since it does not affect pdb, only doctest's adaption of pdb. Consequently, I couldn't use the test case; thanks anyway for that! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 12:16:39 2010 From: report at bugs.python.org (Ray.Allen) Date: Fri, 30 Jul 2010 10:16:39 +0000 Subject: [issue9417] Declaring a class creates circular references In-Reply-To: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> Message-ID: <1280484999.76.0.347626965472.issue9417@psf.upfronthosting.co.za> Ray.Allen added the comment: Is this due to your adopting of Django? Are there other guys who using Django suffer the same problem? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 12:29:46 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 10:29:46 +0000 Subject: [issue5294] pdb "break" command messes up "continue" In-Reply-To: <1234871505.48.0.0380268951532.issue5294@psf.upfronthosting.co.za> Message-ID: <1280485786.52.0.361951635411.issue5294@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r83272 with a slightly different patch. Thanks very much for the report! ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 12:46:54 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 30 Jul 2010 10:46:54 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1280486814.01.0.194873628138.issue5135@psf.upfronthosting.co.za> Nick Coghlan added the comment: A couple more relevant links. I brought this issue up in the context of a JSON serialisation discussion on python-ideas: http://mail.python.org/pipermail/python-ideas/2010-July/007854.html Andrey Popp mentioned his pure Python generic functions library in that thread: http://pypi.python.org/pypi/generic ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 13:09:59 2010 From: report at bugs.python.org (Thomas Guettler) Date: Fri, 30 Jul 2010 11:09:59 +0000 Subject: [issue1553375] Add traceback.print_full_exception() Message-ID: <1280488199.52.0.354846304002.issue1553375@psf.upfronthosting.co.za> Changes by Thomas Guettler : ---------- nosy: +guettli _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 13:14:05 2010 From: report at bugs.python.org (Thomas Guettler) Date: Fri, 30 Jul 2010 11:14:05 +0000 Subject: [issue1553375] Add traceback.print_full_exception() Message-ID: <1280488445.43.0.116282086487.issue1553375@psf.upfronthosting.co.za> Thomas Guettler added the comment: It would be very nice if logging.info('...', exc_info=True) shows the calling/upper frames, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 13:25:48 2010 From: report at bugs.python.org (Thomas Guettler) Date: Fri, 30 Jul 2010 11:25:48 +0000 Subject: [issue9427] logging.error('...', exc_info=True) should display upper frames, too In-Reply-To: <1280489148.4.0.967800282636.issue9427@psf.upfronthosting.co.za> Message-ID: <1280489148.4.0.967800282636.issue9427@psf.upfronthosting.co.za> New submission from Thomas Guettler : logging.error('...', exc_info=True) only displays the frames downward. But I often need the upper frames, to debug a problem. This example shows, that you don't see the "upper" frame in the stactrace. But that's information is important.
import logging

def foo():
    try:
        raise Exception()
    except Exception, exc:
        logging.error('Exception occured: %s' % exc, exc_info=True)

def upper():
    foo()
upper()
===> python tmp/t.py
ERROR:root:Exception occured: 
Traceback (most recent call last):
  File "tmp/t.py", line 6, in foo
    raise Exception()
Exception
---------- components: Library (Lib) messages: 112063 nosy: guettli priority: normal severity: normal status: open title: logging.error('...', exc_info=True) should display upper frames, too versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 13:27:23 2010 From: report at bugs.python.org (Thomas Guettler) Date: Fri, 30 Jul 2010 11:27:23 +0000 Subject: [issue9427] logging.error('...', exc_info=True) should display upper frames, too In-Reply-To: <1280489148.4.0.967800282636.issue9427@psf.upfronthosting.co.za> Message-ID: <1280489243.39.0.484107586857.issue9427@psf.upfronthosting.co.za> Thomas Guettler added the comment: Related: #1553375 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 13:27:55 2010 From: report at bugs.python.org (Thomas Guettler) Date: Fri, 30 Jul 2010 11:27:55 +0000 Subject: [issue1553375] Add traceback.print_full_exception() Message-ID: <1280489275.74.0.474720831678.issue1553375@psf.upfronthosting.co.za> Thomas Guettler added the comment: Related #9427 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 13:31:24 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 11:31:24 +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: <1280489484.1.0.611044176554.issue3143@psf.upfronthosting.co.za> Georg Brandl added the comment: Now used in trunk docs, r83274. ---------- resolution: remind -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 13:34:08 2010 From: report at bugs.python.org (Thomas Guettler) Date: Fri, 30 Jul 2010 11:34:08 +0000 Subject: [issue9427] logging.error('...', exc_info=True) should display upper frames, too In-Reply-To: <1280489148.4.0.967800282636.issue9427@psf.upfronthosting.co.za> Message-ID: <1280489648.04.0.585287025686.issue9427@psf.upfronthosting.co.za> Thomas Guettler added the comment: I tested it only on python 2.6. Can someone please look at more reset versions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 13:35:15 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 30 Jul 2010 11:35:15 +0000 Subject: [issue8797] urllib2 basicauth broken in 2.6.5: RuntimeError: maximum recursion depth exceeded in cmp In-Reply-To: <1274665334.09.0.561782804312.issue8797@psf.upfronthosting.co.za> Message-ID: <1280489715.34.0.420987647901.issue8797@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: committed/rejected -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 13:56:44 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 30 Jul 2010 11:56:44 +0000 Subject: [issue9426] Explicitly state lack of support for keyword arguments in builtin functions In-Reply-To: <1280478856.92.0.712905377204.issue9426@psf.upfronthosting.co.za> Message-ID: <1280491004.71.0.48657072365.issue9426@psf.upfronthosting.co.za> ?ric Araujo added the comment: Is this a duplicate of #8350? ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 14:01:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 30 Jul 2010 12:01:06 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1280491266.94.0.494397753587.issue5135@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 14:01:55 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 12:01:55 +0000 Subject: [issue809887] Improve pdb breakpoint feedback Message-ID: <1280491315.73.0.146406295896.issue809887@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the patch; I've committed a modified and extended version in r83275. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 14:19:18 2010 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 30 Jul 2010 12:19:18 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280492358.07.0.153973201152.issue9315@psf.upfronthosting.co.za> Eli Bendersky added the comment: Some more unit tests show that a problem with method names exists in Lib/trace.py even in 2.7 (and probably earlier). When tracing an instance method with `runfunc`, its name is reported as follows: ClassName'>.method_name Instead of: ClassName.method_name Alexander, the part of your fix to trace.py in the file_module_function_of method fixes this problem. It should be applied to 2.7 as well, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 14:41:33 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 30 Jul 2010 12:41:33 +0000 Subject: [issue8350] os.mkdir doc comment is incorrect In-Reply-To: <1270764159.26.0.287104770145.issue8350@psf.upfronthosting.co.za> Message-ID: <1280493693.13.0.55142909616.issue8350@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Closing as invalid would not be wise because using named arguments as keywords is in Python taken for granted. Cases that are exceptions from this rule should be explicitly noted as to avoid confusion, especially for less experienced programmers. Similar case for builtins: #9426 ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 14:42:42 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 30 Jul 2010 12:42:42 +0000 Subject: [issue9426] Explicitly state lack of support for keyword arguments in builtin functions In-Reply-To: <1280478856.92.0.712905377204.issue9426@psf.upfronthosting.co.za> Message-ID: <1280493762.19.0.605457372717.issue9426@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Same problem, different context. Here we have an already accepted idea (from #7447) to extend the documentation by providing an explicit explanation that named arguments in builtins are usually positional only, contrary to the intuition. I've already commented in #8350 that I believe documentation should include a note that one cannot use specific arguments as keywords. Both issues cover different parts of documentation so they're not duplicates. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 14:52:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 30 Jul 2010 12:52:25 +0000 Subject: [issue9426] Explicitly state lack of support for keyword arguments in builtin functions In-Reply-To: <1280478856.92.0.712905377204.issue9426@psf.upfronthosting.co.za> Message-ID: <1280494345.44.0.958902000972.issue9426@psf.upfronthosting.co.za> ?ric Araujo added the comment: The title of #8350 is outdated. The discussion has shifted from one specific function to the general doc problem. Since it contains references and opinions, I think it supersedes this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 15:15:03 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 30 Jul 2010 13:15:03 +0000 Subject: [issue9426] Explicitly state lack of support for keyword arguments in builtin functions In-Reply-To: <1280478856.92.0.712905377204.issue9426@psf.upfronthosting.co.za> Message-ID: <1280495703.14.0.6548023451.issue9426@psf.upfronthosting.co.za> Eric Smith added the comment: I agree this should be closed and moved to #8350. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 15:19:53 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 30 Jul 2010 13:19:53 +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: <1280495993.48.0.411378140092.issue7964@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Is it still worthwhile to add the test to the suite to catch a regression? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 15:24:18 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 30 Jul 2010 13:24:18 +0000 Subject: [issue4841] io's close() not handling errors correctly In-Reply-To: <1231151389.71.0.297079127324.issue4841@psf.upfronthosting.co.za> Message-ID: <1280496258.28.0.639119275303.issue4841@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 15:32:12 2010 From: report at bugs.python.org (Dennis Malcorps) Date: Fri, 30 Jul 2010 13:32:12 +0000 Subject: [issue9399] Provide a 'print' action for argparse In-Reply-To: <1280329840.94.0.288179215378.issue9399@psf.upfronthosting.co.za> Message-ID: <1280496732.2.0.98292485516.issue9399@psf.upfronthosting.co.za> Dennis Malcorps added the comment: Here is a patch that adds a 'write' action to argparse. Usage example: >>> parser = argparse.ArgumentParser() >>> parser.add_argument("--license", action="write", message="This file\nis licensed under \t GPL") >>> parser.parse_args(['--license']) This file is licensed under GPL A linebreak will be added after the message. The Output can be redirected with the optional 'file=' argument (it defaults to sys.stdout) The parser will then exit. This is my first patch ever written, so don't be too harsh if it's utter garbage^^ ---------- keywords: +patch Added file: http://bugs.python.org/file18268/argparse.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 15:36:43 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 30 Jul 2010 13:36:43 +0000 Subject: [issue9426] Explicitly state lack of support for keyword arguments in builtin functions In-Reply-To: <1280478856.92.0.712905377204.issue9426@psf.upfronthosting.co.za> Message-ID: <1280497003.13.0.983484571861.issue9426@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Let's do this then :) Superseded by: #8350 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 15:37:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 30 Jul 2010 13:37:15 +0000 Subject: [issue9426] Explicitly state lack of support for keyword arguments in builtin functions In-Reply-To: <1280478856.92.0.712905377204.issue9426@psf.upfronthosting.co.za> Message-ID: <1280497035.69.0.1299308384.issue9426@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> duplicate stage: -> committed/rejected superseder: -> os.mkdir doc comment is incorrect _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 15:38:10 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 30 Jul 2010 13:38:10 +0000 Subject: [issue8350] Explicitly state lack of support for keyword arguments in built-in functions In-Reply-To: <1270764159.26.0.287104770145.issue8350@psf.upfronthosting.co.za> Message-ID: <1280497090.9.0.852704559299.issue8350@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> accepted stage: -> needs patch title: os.mkdir doc comment is incorrect -> Explicitly state lack of support for keyword arguments in built-in functions type: -> behavior versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 15:38:34 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 30 Jul 2010 13:38:34 +0000 Subject: [issue8350] Document lack of support for keyword arguments in C functions In-Reply-To: <1270764159.26.0.287104770145.issue8350@psf.upfronthosting.co.za> Message-ID: <1280497114.81.0.597863471369.issue8350@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- title: Explicitly state lack of support for keyword arguments in built-in functions -> Document lack of support for keyword arguments in C functions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 15:39:48 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 30 Jul 2010 13:39:48 +0000 Subject: [issue8350] Document lack of support for keyword arguments in C functions In-Reply-To: <1270764159.26.0.287104770145.issue8350@psf.upfronthosting.co.za> Message-ID: <1280497188.19.0.548113130237.issue8350@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Currently it's somewhat surprising that while the documentation often states the default values for certain builtins, invoking the builtin with keyword arguments as described in the documentation does not work. Original discussion: #7447 I'm going through all builtins to see how the keyword arg support looks and I'm going to present a patch for Doc/library/builtins.rst that explicitly states that builtins don't support this kind of invocation. Expect a patch for that case later today. As for `os` et al, the discussion goes on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 15:43:13 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 30 Jul 2010 13:43:13 +0000 Subject: [issue8350] Document lack of support for keyword arguments in C functions In-Reply-To: <1270764159.26.0.287104770145.issue8350@psf.upfronthosting.co.za> Message-ID: <1280497393.54.0.665115376762.issue8350@psf.upfronthosting.co.za> ?ric Araujo added the comment: You could copy this notice from reference/expressions#calls: ?An implementation may provide built-in functions whose positional parameters do not have names, even if they are ?named? for the purpose of documentation, and which therefore cannot be supplied by keyword.? An addition to documenting/rest or documenting/markup would be useful too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 15:46:13 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 30 Jul 2010 13:46:13 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1280492358.07.0.153973201152.issue9315@psf.upfronthosting.co.za> Message-ID: <5D6FEB8F-DF56-470C-9D09-73400E85C0C7@gmail.com> Alexander Belopolsky added the comment: Eli, Thanks a lot for your continuing effort. I would like to check in your work before any further enhancement. Please find a reasonable stop point and post a commit ready patch preferably with a news file entry describing the bug that is fixed. Note that test additions don't get a NEWS entry - I'll describe those in the checking log entry. Unless you think 2.7 backport is tricky, please post only py3k patch. I'll merge the changes. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 15:51:09 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 30 Jul 2010 13:51:09 +0000 Subject: [issue8350] Document lack of support for keyword arguments in C functions In-Reply-To: <1270764159.26.0.287104770145.issue8350@psf.upfronthosting.co.za> Message-ID: <1280497869.47.0.0692967878248.issue8350@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 16:16:52 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 14:16:52 +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: <1280499412.23.0.429135521664.issue7964@psf.upfronthosting.co.za> Georg Brandl added the comment: Yes, you're right. Committed in r83283. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 16:20:23 2010 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 30 Jul 2010 14:20:23 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280499623.22.0.921203188996.issue9315@psf.upfronthosting.co.za> Eli Bendersky added the comment: Attaching new patch. This patch is for 2.7 (as you suggested earlier, since it's easy to forward-port to py3k with 2to3) and affects Misc/NEWS, Lib/trace.py and Lib/test/test_trace.py (which is added). In Lib/trace.py: - Fixed the problem with class names (taken from Alexander's patch for py3k) when tracing methods. Documented this change in Misc/NEWS. Note that I did not include the __annotations__ change because I wasn't sure how it applies to 2.x Lib/test/test_trace.py: Added new unit-testing file for the trace module. Changes since the last patch: - Implemented the changes suggested by Alexander (a few more nitpicks) in http://bugs.python.org/issue9315#msg111592, except changing fake* to test* because I thought test* in this context is confusing with the main purpose of the code (testing), and fake* conveys the meaning pretty well. - Added tests for tracing instance methods (not yet class methods or static methods because the semantics of tracing these aren't 100% clear to me yet), and for generators and list comprehensions. ---------- Added file: http://bugs.python.org/file18269/issue9315.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 16:39:09 2010 From: report at bugs.python.org (Matthias Klose) Date: Fri, 30 Jul 2010 14:39:09 +0000 Subject: [issue9415] SSL issues on "Ubuntu i386" buildbots In-Reply-To: <1280403219.86.0.90888491207.issue9415@psf.upfronthosting.co.za> Message-ID: <1280500749.98.0.962216004536.issue9415@psf.upfronthosting.co.za> Matthias Klose added the comment: see https://lists.ubuntu.com/archives/ubuntu-devel/2010-July/031010.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 16:47:43 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 30 Jul 2010 14:47:43 +0000 Subject: [issue9415] SSL issues on "Ubuntu i386" buildbots In-Reply-To: <1280500749.98.0.962216004536.issue9415@psf.upfronthosting.co.za> Message-ID: <1280501257.3167.3.camel@localhost.localdomain> Antoine Pitrou added the comment: > see https://lists.ubuntu.com/archives/ubuntu-devel/2010-July/031010.html Why are they doing that? SSLv2 ciphers are disabled by default anyway (in newer OpenSSL versions, that is). If Ubuntu is adding hacks to the libraries they're packaging, I'm not willing to add a workaround to the test suite in order for the tests to pass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 17:14:33 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 30 Jul 2010 15:14:33 +0000 Subject: [issue9325] Add an option to pdb/trace/profile to run library module as a script In-Reply-To: <1279743902.96.0.66207849175.issue9325@psf.upfronthosting.co.za> Message-ID: <1280502873.55.0.0865216652048.issue9325@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 17:20:17 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 30 Jul 2010 15:20:17 +0000 Subject: [issue9428] profile.py bug with the main file being profiled In-Reply-To: <1280503217.79.0.150148716747.issue9428@psf.upfronthosting.co.za> Message-ID: <1280503217.79.0.150148716747.issue9428@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Attached patch, profile-run.diff, fixes the same bug as in issue9323, only in the profile rather than the trace module. Even though the affected code is small, it may be a good idea to share it between the trace and profile modules as well as unify command line interfaces. See also issue9325. ---------- assignee: belopolsky components: Library (Lib) files: profile-run.diff keywords: easy, patch messages: 112085 nosy: belopolsky priority: normal severity: normal stage: patch review status: open title: profile.py bug with the main file being profiled type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file18270/profile-run.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 18:00:55 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 16:00:55 +0000 Subject: [issue1503502] Pdb doesn't call flush on its stdout file descriptor Message-ID: <1280505655.22.0.869341134542.issue1503502@psf.upfronthosting.co.za> Georg Brandl added the comment: This has been implemented in the course of r83286. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 18:14:51 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 16:14:51 +0000 Subject: [issue6246] Python debugger ignores exception if instructed to return from generator In-Reply-To: <1244502401.73.0.647401575179.issue6246@psf.upfronthosting.co.za> Message-ID: <1280506491.6.0.136695815613.issue6246@psf.upfronthosting.co.za> Georg Brandl added the comment: This is no special behavior with generators. If you remove the "yield" statement, you will get similar output with the exception bubbling up the stack. ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 18:49:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 30 Jul 2010 16:49:23 +0000 Subject: [issue9264] trace.py documentation is incomplete In-Reply-To: <1279167085.71.0.92983376648.issue9264@psf.upfronthosting.co.za> Message-ID: <1280508563.91.0.783754033975.issue9264@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 19:27:39 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 30 Jul 2010 17:27:39 +0000 Subject: [issue9337] Make float.__str__ behave identically to float.__repr__ In-Reply-To: <1279881060.45.0.501412515152.issue9337@psf.upfronthosting.co.za> Message-ID: <1280510859.84.0.0996916259805.issue9337@psf.upfronthosting.co.za> Mark Dickinson added the comment: Alexander Belopolsky pointed out another nice aspect of this change: after the change, let 'numerictype' be any of int, float, complex, Decimal or Fraction, and let 'x' be an instance of numerictype. Then numerictype(str(x)) recovers x exactly. See also additional discussion at: http://mail.python.org/pipermail/python-dev/2010-July/102515.html The consensus (so far) seems to be in favour of this change. I'll leave it a few more days in case people haven't seen the python-dev thread yet, and then assuming that there's no dissent I'll commit. ---------- stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 19:29:46 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 30 Jul 2010 17:29:46 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280510986.95.0.652139088495.issue9315@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Eli, Did you attach a wrong file? New issue9315.1.patch looks the same as old issue9315.1.patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 19:36:39 2010 From: report at bugs.python.org (Ron Adam) Date: Fri, 30 Jul 2010 17:36:39 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1280511399.02.0.185350764712.issue2001@psf.upfronthosting.co.za> Ron Adam added the comment: New diff file. Removed the '-g' option and added a '-b' option. Using the '-g' option will now bring up pydoc options help. Added a simple server command prompt with 'b' and 'q' choices to open a browser and quit the server. Allow the '-p' option to be use along with the '-b' option. Catch the error when the port is already in use and print a nice error instead of a traceback with an exception. The port number now defaults to port 0 and uses a random unused port. Changed the name of the server to better describe what it does to http._text_server_thread.py. Used a leading underscore on the name to indicate it is a private module and give it time to mature a bit more before making it public. Rewrote the _text_server_thread.py example in its __doc__ string so it passes a doctest. ---------- Added file: http://bugs.python.org/file18271/pydoc_server4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 19:38:51 2010 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 30 Jul 2010 17:38:51 +0000 Subject: [issue9410] Add Unladden Swallow's optimizations to Python 3's pickle. In-Reply-To: <1280384767.75.0.12386540434.issue9410@psf.upfronthosting.co.za> Message-ID: <1280511531.5.0.129125700996.issue9410@psf.upfronthosting.co.za> Skip Montanaro added the comment: Look around the issues. I'm pretty sure I worked on the unbounded size issue at one point. Skip ---------- nosy: +skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 19:41:30 2010 From: report at bugs.python.org (Lyle Ross) Date: Fri, 30 Jul 2010 17:41:30 +0000 Subject: [issue9423] Error in urllib2.do_open(self, http_class, req) In-Reply-To: <1280450709.42.0.142703373463.issue9423@psf.upfronthosting.co.za> Message-ID: Lyle Ross added the comment: Thanks for the tip, Kumaran. I'll try it. Lyle Ross Office: 735G Email: lyle.ross at us-cert.gov Ofc Phone: 703.235.5221 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 19:42:31 2010 From: report at bugs.python.org (Ron Adam) Date: Fri, 30 Jul 2010 17:42:31 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1280511751.2.0.862322035819.issue2001@psf.upfronthosting.co.za> Ron Adam added the comment: I also put in a temporary fix to skip the test file that was causing it to crash when doing a search. It's marked as such and can be removed once the bug is fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 20:11:46 2010 From: report at bugs.python.org (David Watson) Date: Fri, 30 Jul 2010 18:11:46 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <1280082784.57.0.628810673592.issue9377@psf.upfronthosting.co.za> Message-ID: <1280513506.25.0.428915442604.issue9377@psf.upfronthosting.co.za> David Watson added the comment: OK, here are new versions of the original patches. I've tweaked the docs to make clear that ASCII-compatible encodings actually *are* ASCII, and point to an explanation as soon as they're mentioned. You're right that PyUnicode_AsEncodedString() is the preferable interface for the argument converter (I think I got PyUnicode_AsEncodedObject() from an old version of PyUnicode_FSConverter() :/), but for the ASCII step I've just short-circuited it and used PyUnicode_EncodeASCII() directly, since the converter has already checked that the object is of Unicode type. For the IDNA step, PyUnicode_AsEncodedString() should result in a less confusing error message if the codec returns some non-bytes object one day. However, the PyBytes_Check isn't to check up on the codec, but to check for a bytes argument, which the converter also supports. For that reason, I think encode_hostname would be a misleading name, but I've renamed it hostname_converter after the example of PyUnicode_FSConverter, and renamed unicode_from_hostname to decode_hostname. I've also made the converter check for UnicodeEncodeError in the ASCII step, but the end result really is UnicodeError if the IDNA step fails, because the "idna" codec does not use UnicodeEncodeError or UnicodeDecodeError. Complain about that if you wish :) I think the example I gave in the previous comment was also confusing, so just to be clear... In /etc/hosts (in UTF-8 encoding): 127.0.0.2 ? 127.0.0.3 xn--lzg Without patches: >>> from socket import * >>> getnameinfo(("127.0.0.3", 0), 0) ('xn--lzg', '0') >>> getnameinfo(("127.0.0.2", 0), 0) ('?', '0') >>> getaddrinfo(*_) [(2, 1, 6, '', ('127.0.0.3', 0)), (2, 2, 17, '', ('127.0.0.3', 0)), (2, 3, 0, '', ('127.0.0.3', 0))] >>> '?'.encode("idna") b'xn--lzg' With patches: >>> from socket import * >>> getnameinfo(("127.0.0.3", 0), 0) ('xn--lzg', '0') >>> getnameinfo(("127.0.0.2", 0), 0) ('\udce2\udc82\udcac', '0') >>> getaddrinfo(*_) [(2, 1, 6, '', ('127.0.0.2', 0)), (2, 2, 17, '', ('127.0.0.2', 0)), (2, 3, 0, '', ('127.0.0.2', 0))] >>> '\udce2\udc82\udcac'.encode("idna") Traceback (most recent call last): File "", line 1, in File "/home/david/python-patches/python-3/Lib/encodings/idna.py", line 167, in encode result.extend(ToASCII(label)) File "/home/david/python-patches/python-3/Lib/encodings/idna.py", line 76, in ToASCII label = nameprep(label) File "/home/david/python-patches/python-3/Lib/encodings/idna.py", line 38, in nameprep raise UnicodeError("Invalid character %r" % c) UnicodeError: Invalid character '\udce2' The exception at the end demonstrates why surrogateescape strings don't get confused with IDNs. ---------- Added file: http://bugs.python.org/file18272/ascii-surrogateescape-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 20:14:44 2010 From: report at bugs.python.org (David Watson) Date: Fri, 30 Jul 2010 18:14:44 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <1280082784.57.0.628810673592.issue9377@psf.upfronthosting.co.za> Message-ID: <1280513684.25.0.482968204287.issue9377@psf.upfronthosting.co.za> Changes by David Watson : Added file: http://bugs.python.org/file18273/try-surrogateescape-first-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 20:19:15 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 30 Jul 2010 18:19:15 +0000 Subject: [issue9429] 2to3 does not rename test.test_support to test.support In-Reply-To: <1280513955.81.0.17259447489.issue9429@psf.upfronthosting.co.za> Message-ID: <1280513955.81.0.17259447489.issue9429@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Even though test.support is an internal module, it is helpful to have a 2to3 fixer for the 'test_support' to 'support' rename. My naive attempt to add a fix (see patch pasted below), worked for "from test import test_support" but not for "import test.test_support. Index: Lib/lib2to3/fixes/fix_imports.py =================================================================== --- Lib/lib2to3/fixes/fix_imports.py (revision 83283) +++ Lib/lib2to3/fixes/fix_imports.py (working copy) @@ -55,6 +55,7 @@ 'UserList' : 'collections', 'urlparse' : 'urllib.parse', 'robotparser' : 'urllib.robotparser', + 'test.test_support' : 'test.support', } Index: Lib/lib2to3/fixes/fix_renames.py =================================================================== --- Lib/lib2to3/fixes/fix_renames.py (revision 83283) +++ Lib/lib2to3/fixes/fix_renames.py (working copy) @@ -11,6 +11,7 @@ from ..fixer_util import Name, attr_chain MAPPING = {"sys": {"maxint" : "maxsize"}, + "test": {"test_support": "support"}, } LOOKUP = {} ---------- components: 2to3 (2.x to 3.0 conversion tool) messages: 112095 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: 2to3 does not rename test.test_support to test.support type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 20:57:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 30 Jul 2010 18:57:56 +0000 Subject: [issue9430] Document str() and repr() of timedelta. In-Reply-To: <1280516276.66.0.738062201536.issue9430@psf.upfronthosting.co.za> Message-ID: <1280516276.66.0.738062201536.issue9430@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Attaching a tentative patch. I think it is better to document these as operations rather than special methods. It may need to be clarified that "-2 days, 0:00:22" is timedelta(-2, 22) rather than -timedelta(2, 22), but I cannot come up with anything short enough for the ops table. Maybe this should be done in a footnote. ---------- assignee: docs at python components: Documentation files: datetime.rst.diff keywords: easy, patch messages: 112096 nosy: belopolsky, docs at python priority: normal severity: normal status: open title: Document str() and repr() of timedelta. versions: Python 3.2 Added file: http://bugs.python.org/file18274/datetime.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 21:00:07 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 30 Jul 2010 19:00:07 +0000 Subject: [issue9430] Document str() and repr() of timedelta. In-Reply-To: <1280516276.66.0.738062201536.issue9430@psf.upfronthosting.co.za> Message-ID: <1280516407.52.0.853808601437.issue9430@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 21:18:48 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 30 Jul 2010 19:18:48 +0000 Subject: [issue9430] Document str() and repr() of timedelta. In-Reply-To: <1280516276.66.0.738062201536.issue9430@psf.upfronthosting.co.za> Message-ID: <1280517528.4.0.192776590442.issue9430@psf.upfronthosting.co.za> Ezio Melotti added the comment: Adding a footnote with an example sounds like a good idea. There's an odd number of square brackets in the str(t) description. ---------- nosy: +ezio.melotti stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 21:22:17 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 30 Jul 2010 19:22:17 +0000 Subject: [issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before) In-Reply-To: <1279530588.62.0.226192140376.issue9301@psf.upfronthosting.co.za> Message-ID: <1280517737.36.0.895042114496.issue9301@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Flox, agree to your patch on checking for unquote({}) and unquote(()). AttributeError on unquote(None) was a mistake in previous releases and it was not intentional. We stand at a chance of correcting that when we are explicitly raising an Exception. Perhaps in another bug report to explicitly track it. Ezio: It was conscious design decision to support both bytes and string for these functions. I think, discussed in issue3300 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 21:28:21 2010 From: report at bugs.python.org (George Boutsioukis) Date: Fri, 30 Jul 2010 19:28:21 +0000 Subject: [issue9431] 2to3 reapplies fix_dict In-Reply-To: <1280518101.61.0.560600920548.issue9431@psf.upfronthosting.co.za> Message-ID: <1280518101.61.0.560600920548.issue9431@psf.upfronthosting.co.za> New submission from George Boutsioukis : This only happens on somewhat complex files, I haven't been able yet to isolate the source of this but here goes: For django trunk, running 2to3 on django/contrib/admin/options.py yields the following: @@ -282,7 +282,7 @@ if self.declared_fieldsets: return self.declared_fieldsets form = self.get_form(request, obj) - fields = [..].keys() + list([...]) + fields = list(list([...]keys())) + list([...]) instead of + fields = list([...].keys()) + etc. and there are a couple of more instances in the same file. However running 2to3 on the single line above, out of the file gives the correct result. This is only an issue with the fix_dict fixer. ---------- components: 2to3 (2.x to 3.0 conversion tool) messages: 112099 nosy: gboutsioukis priority: normal severity: normal status: open title: 2to3 reapplies fix_dict type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 21:31:44 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 30 Jul 2010 19:31:44 +0000 Subject: [issue9432] unquote(None) raises AttributeError - Instead of TypeError In-Reply-To: <1280518304.67.0.979148690814.issue9432@psf.upfronthosting.co.za> Message-ID: <1280518304.67.0.979148690814.issue9432@psf.upfronthosting.co.za> New submission from Senthil Kumaran : >>> from urllib.parse import unquote >>> unquote(None) Traceback (most recent call last): File "", line 1, in File "/home/senthil/python/release31-maint/Lib/urllib/parse.py", line 331, in unquote res = string.split('%') AttributeError: 'NoneType' object has no attribute 'split' As obvious, the AttributeError above is not an Intentional one and is a mistake. TypeError is correct. Opening this issue subsequent to the discussion in msg12098 ---------- assignee: orsenthil messages: 112100 nosy: orsenthil priority: normal severity: normal status: open title: unquote(None) raises AttributeError - Instead of TypeError type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 21:35:39 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 30 Jul 2010 19:35:39 +0000 Subject: [issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before) In-Reply-To: <1279530588.62.0.226192140376.issue9301@psf.upfronthosting.co.za> Message-ID: <1280518539.3.0.924147030383.issue9301@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in revision 83294. Opened Issue9432 just to track that change in Exception behavior. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 21:37:53 2010 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 30 Jul 2010 19:37:53 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280518673.57.0.781663456901.issue9315@psf.upfronthosting.co.za> Eli Bendersky added the comment: Ouch, sorry.... Here it is (issue9315.1.patch) ---------- Added file: http://bugs.python.org/file18275/issue9315.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 21:38:09 2010 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 30 Jul 2010 19:38:09 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280518689.59.0.759442622229.issue9315@psf.upfronthosting.co.za> Changes by Eli Bendersky : Removed file: http://bugs.python.org/file18269/issue9315.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 21:41:19 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 30 Jul 2010 19:41:19 +0000 Subject: [issue9432] unquote(None) raises AttributeError - Instead of TypeError In-Reply-To: <1280518304.67.0.979148690814.issue9432@psf.upfronthosting.co.za> Message-ID: <1280518879.78.0.42915450952.issue9432@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The previous hyperlink should have been: Issue9301 Fixed in revision 83294. As this a change in Exception value, I am not sure, if backport is a good idea. If someone find change this breaks their existing setup, please comment here. ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 21:46:43 2010 From: report at bugs.python.org (Eli Bendersky) Date: Fri, 30 Jul 2010 19:46:43 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280519203.16.0.103657641977.issue9315@psf.upfronthosting.co.za> Eli Bendersky added the comment: [I wish I could edit/delete my older messages] I've attached a new file, named issue9315.2.patch, with the updated patch. I usually add a numeric prefix before the .patch ending to distinguish consecutive versions of the same patch, and in this case I just submitted the wrong file. The new one should be correct, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 22:59:07 2010 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Fri, 30 Jul 2010 20:59:07 +0000 Subject: [issue5412] extend configparser to support mapping access(__*item__) In-Reply-To: <1236093276.38.0.814047349626.issue5412@psf.upfronthosting.co.za> Message-ID: <1280523547.57.0.0644434468754.issue5412@psf.upfronthosting.co.za> ?ukasz Langa added the comment: OK, please find attached a preliminary patch for the functionality. This patch is complete in terms of implementation with one significant ommision, __setitem__ on the parser (adding a section), which needs further discussion. Because of the development state for this functionality, the patch includes some comments that are meant to aid reviewers and the developer (me). They are obviously not supposed to be included in the final patch. There is neither any ReST documentation and only the BasicTest was ported to check for the mapping behaviour as well at the moment. All of these will be corrected once there is agreement upon the interface and its implementation. The mapping interface implementation is using the parser['section']['value'] notation that seems to be more popular amongst the developers. The alternative implementation presented in the first patch shall not be included because "There should be preferably only one obvious way to do it". Implementing both approaches in a consistent manner would be needlessly tricky and would bloat the code, the tests and the documentation. I believe it's not worth it. The mapping interface implementation enables getting parser['section'] which returns a mutable view on the section. This means that: - the values are not copied but they are taken from the original parser on demand - the values mutated using this view are mutated in the original parser The implementation is using the existing high-level API so that subclassing the original interface makes the mappings work as expected as well. This has the drawback of having potentially weak performance (especially __len__ and __iter__ on a section). One difference is the explicit lack of support for the `__name__` special key. This is because the existing behaviour of `__name__` is very inconsistent and supporting it would only lead to problems. Details here: http://mail.python.org/pipermail/python-dev/2010-July/102556.html The mapping interface was implemented so that it behaves as close to an actual dictionary as possible. The existing differences are: - all sections do include DEFAULTSECT values as well -- these values cannot be deleted from the section (because technically they are not there). If they are overriden in the section, deleting causes the default value to be visible again. Trying to delete a default value causes a KeyError -- because of this reason, .clear() on a section does not leave the section empty - trying to delete the DEFAULTSECT throws ValueError - the mapping interface is complete thanks to using the MutableMapping ABC. However, there are two methods in the old API that hide the dictionary interface: -- .get() - this one is unsolvable even when we get to implementing default= for it because invoking as .get('string1', 'string2') would be ambiguous. This difference shall be explicitly documented in the docs. -- .items() - this one could potentially be solvable by providing a special case when no arguments are passed. The problem is with existing subclasses (possibly 3rd party) which override this method without handling this case. I'm still on the fence whether to include a special case here. As for adding a section with the mapping protocol access, I like the current behaviour used for instance in ConfigObj is good for us. They use something like: parser['section'] = {'key1': 'value', 'key2': 'value'} This should overwrite existing sections as well. If no-one objects, I'll implement this behaviour as well. ---------- Added file: http://bugs.python.org/file18276/issue5412.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jul 30 23:42:21 2010 From: report at bugs.python.org (Matthias Klose) Date: Fri, 30 Jul 2010 21:42:21 +0000 Subject: [issue7567] Messed up terminal after calling curses.initscr() twice. In-Reply-To: <1261532778.06.0.257601342471.issue7567@psf.upfronthosting.co.za> Message-ID: <1280526141.76.0.931814299672.issue7567@psf.upfronthosting.co.za> Matthias Klose added the comment: committed in r83306 (2.7) and r83307 (3.2); verified that the behaviour in offlineimap (reported in http://bugs.debian.org/586433 is fixed). will apply it to 2.6 and 3.1 after a few days. ---------- resolution: -> fixed status: open -> pending versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 00:21:45 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 22:21:45 +0000 Subject: [issue7245] better Ctrl-C support in pdb (program can be resumed) (issue216067) In-Reply-To: <1257017877.16.0.972733875092.issue7245@psf.upfronthosting.co.za> Message-ID: <1280528505.76.0.895395628094.issue7245@psf.upfronthosting.co.za> Georg Brandl added the comment: I committed the "commands" part of the patch in r83308. For the SIGINT part, I'm concerned that the SIGINT handler is set in the Pdb constructor, since it's a processwide setting I think it should a) be set only before sys.settrace() and b) be restored appropriately when debugging is finished. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 00:30:12 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 30 Jul 2010 22:30:12 +0000 Subject: [issue7245] better Ctrl-C support in pdb (program can be resumed) (issue216067) In-Reply-To: <1257017877.16.0.972733875092.issue7245@psf.upfronthosting.co.za> Message-ID: <1280529012.3.0.370288476835.issue7245@psf.upfronthosting.co.za> Georg Brandl added the comment: Adding the rest of the patch adapted for py3k trunk as of today. ---------- keywords: +patch Added file: http://bugs.python.org/file18277/pdb-keyboardinterrupt.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 02:24:12 2010 From: report at bugs.python.org (Danielle Dows) Date: Sat, 31 Jul 2010 00:24:12 +0000 Subject: [issue9227] can't import Tkinter / use IDLE after installing Python 2.7 on Mac OS X In-Reply-To: <1278883906.89.0.545374403914.issue9227@psf.upfronthosting.co.za> Message-ID: <1280535852.86.0.205075665855.issue9227@psf.upfronthosting.co.za> Danielle Dows added the comment: I upgraded my working python from 2.5.1 (original install) to 2.7 (for macosx10.5) and got this: ** IDLE can't import Tkinter. Your Python may not be configured for Tk. ** I tried installing the applications, with no change. I tried the macosx10.3 version, same result. Installed the applications manually, same result. I downloaded 2.6.5 and again, same result. My next attempt will be the 2.5.5 version, but I do not expect and different result. I am using Leopard 10.5.8 with all software up to date. Any suggestions? ---------- nosy: +yandapanda type: -> crash versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 02:37:15 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 31 Jul 2010 00:37:15 +0000 Subject: [issue9430] Document str() and repr() of timedelta. In-Reply-To: <1280516276.66.0.738062201536.issue9430@psf.upfronthosting.co.za> Message-ID: <1280536635.8.0.917452884147.issue9430@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: First revision: issue9430.diff ---------- Added file: http://bugs.python.org/file18278/issue9430.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 02:47:27 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 31 Jul 2010 00:47:27 +0000 Subject: [issue9227] can't import Tkinter / use IDLE after installing Python 2.7 on Mac OS X In-Reply-To: <1278883906.89.0.545374403914.issue9227@psf.upfronthosting.co.za> Message-ID: <1280537247.61.0.452614395385.issue9227@psf.upfronthosting.co.za> Ned Deily added the comment: @Danielle: Are you sure you are launching the correct IDLE? In a terminal window, enter the following shell commands and report the output: cd /Library/Frameworks/Python.framework/Versions/2.7/ file lib/python2.7/lib-dynload/_tkinter.so otool -L lib/python2.7/lib-dynload/_tkinter.so bin/idle2.7 That last should launch idle for 2.7. Quit it then in the Finder try double-clicking on the IDLE in /Applications/Python 2.7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 03:58:39 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 31 Jul 2010 01:58:39 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280541519.06.0.945301562245.issue9315@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Eli, I was about to commit issue9315.3.patch, which is a lightly modified version of issue9315.2.patch, but it turned out that test_trace cannot be run by regrtest.py: $ ./python.exe Lib/test/regrtest.py test_trace test_trace test test_trace failed -- multiple errors occurred; run in verbose mode for details 1 test failed: test_trace It looks like your fake module machinery is a little too clever. ---------- nosy: -Alexander.Belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 03:58:58 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 31 Jul 2010 01:58:58 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280541538.29.0.831825298138.issue9315@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file18279/issue9315.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 05:45:01 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 31 Jul 2010 03:45:01 +0000 Subject: [issue8620] wrong truncation of last line in cmd.Cmd In-Reply-To: <1273059355.74.0.713627995995.issue8620@psf.upfronthosting.co.za> Message-ID: <1280547901.48.0.830949682402.issue8620@psf.upfronthosting.co.za> R. David Murray added the comment: Here is a unit test that demonstrates the problem (against py3k trunk). I'm not convinced that fixing this would be backward incompatible. (NB: please no one patch this bug, I'm expecting the patch to get created tomorrow during PyOhio.) ---------- keywords: +patch nosy: +r.david.murray stage: -> needs patch Added file: http://bugs.python.org/file18280/cmd-noeol-test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 05:45:34 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 31 Jul 2010 03:45:34 +0000 Subject: [issue8620] wrong truncation of last line in cmd.Cmd In-Reply-To: <1273059355.74.0.713627995995.issue8620@psf.upfronthosting.co.za> Message-ID: <1280547934.81.0.3123899846.issue8620@psf.upfronthosting.co.za> Changes by R. David Murray : Removed file: http://bugs.python.org/file18280/cmd-noeol-test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 05:46:51 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 31 Jul 2010 03:46:51 +0000 Subject: [issue8620] wrong truncation of last line in cmd.Cmd In-Reply-To: <1273059355.74.0.713627995995.issue8620@psf.upfronthosting.co.za> Message-ID: <1280548011.4.0.998761346751.issue8620@psf.upfronthosting.co.za> Changes by R. David Murray : Added file: http://bugs.python.org/file18281/cmd-noeol-test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 07:18:48 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 31 Jul 2010 05:18:48 +0000 Subject: [issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before) In-Reply-To: <1279530588.62.0.226192140376.issue9301@psf.upfronthosting.co.za> Message-ID: <1280553528.88.0.497575133703.issue9301@psf.upfronthosting.co.za> Ezio Melotti added the comment: > All the quote*/unquote* functions accept both str and bytes (except quote_from_bytes). According to the documentation [0] unquote() only accepts str (not bytes), so checking for b'' in "if string in (b'', '')" seems wrong to me, especially if then it returns b''. [0]: http://docs.python.org/dev/py3k/library/urllib.parse.html#urllib.parse.unquote ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 07:24:39 2010 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 31 Jul 2010 05:24:39 +0000 Subject: [issue9315] The trace module lacks unit tests In-Reply-To: <1279647891.9.0.117287880523.issue9315@psf.upfronthosting.co.za> Message-ID: <1280553879.51.0.700423973845.issue9315@psf.upfronthosting.co.za> Eli Bendersky added the comment: Alexander, Your issue9315.3.patch file doesn't contain the new test module at all. I'm attaching the updated test_trace.py, fixing the problem with running via regrtest. The problem was very simple and not about the fake module - I fixed to runctx with globals() and vars() instead of run on tracer (since the called function is in my module). The fix is on line 218 (with a docstring fix on line 213). Now `py27 regrtest.py -v test_trace` passes cleanly. I apologize for not trying it before. I'll learn for the future :-) ---------- Added file: http://bugs.python.org/file18282/test_trace.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 09:06:04 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 07:06:04 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1280559964.05.0.83447272584.issue2986@psf.upfronthosting.co.za> Georg Brandl added the comment: Deferring to after 3.2a1. ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 09:28:34 2010 From: report at bugs.python.org (Daniel Urban) Date: Sat, 31 Jul 2010 07:28:34 +0000 Subject: [issue9214] Most Set methods of KeysView and ItemsView do not work right In-Reply-To: <1278703905.18.0.125671722438.issue9214@psf.upfronthosting.co.za> Message-ID: <1280561314.98.0.877840697763.issue9214@psf.upfronthosting.co.za> Daniel Urban added the comment: > P.S. Please let me know how to detect such issues in future patches. In some editors there is an option "Remove trailing spaces" or something like that. Also, some editors (for example Kate) show trailing spaces. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 09:43:48 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 31 Jul 2010 07:43:48 +0000 Subject: [issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows In-Reply-To: <1277827107.42.0.0793977492373.issue9116@psf.upfronthosting.co.za> Message-ID: <1280562228.11.0.52066751877.issue9116@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 09:48:16 2010 From: report at bugs.python.org (Ray.Allen) Date: Sat, 31 Jul 2010 07:48:16 +0000 Subject: [issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions In-Reply-To: <1280333027.17.0.112361474517.issue9400@psf.upfronthosting.co.za> Message-ID: <1280562496.84.0.880108877286.issue9400@psf.upfronthosting.co.za> Ray.Allen added the comment: I got "OSError: [Errno 2] No such file or directory" instead of TypeError when running the "bug.py", did I miss something? ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 09:55:46 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 07:55:46 +0000 Subject: [issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX) In-Reply-To: <1272979850.31.0.0455265952928.issue8611@psf.upfronthosting.co.za> Message-ID: <1280562946.64.0.491572220933.issue8611@psf.upfronthosting.co.za> Georg Brandl added the comment: This will have to wait until after alpha1, as well. ---------- dependencies: +Rewrite import machinery to work with unicode paths nosy: +georg.brandl priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 10:00:48 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 08:00:48 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1280563248.66.0.311631667907.issue2986@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed 2.6 patch in r83314. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 10:47:14 2010 From: report at bugs.python.org (Radoslaw Madej) Date: Sat, 31 Jul 2010 08:47:14 +0000 Subject: [issue9385] _ctypes module uses 'rwx' mmap() calls In-Reply-To: <1280163756.22.0.278914543931.issue9385@psf.upfronthosting.co.za> Message-ID: <1280566034.69.0.407460724788.issue9385@psf.upfronthosting.co.za> Radoslaw Madej added the comment: Yes, the aforementioned patch does the job when applied manually with some tweaking and importing ctypes does not result in a MemoryError anymore. Tested with Python-2.7 and Python-3.1.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 11:01:02 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 31 Jul 2010 09:01:02 +0000 Subject: [issue9432] unquote(None) raises AttributeError - Instead of TypeError In-Reply-To: <1280518304.67.0.979148690814.issue9432@psf.upfronthosting.co.za> Message-ID: <1280566862.11.0.831046225374.issue9432@psf.upfronthosting.co.za> Florent Xicluna added the comment: IMHO we could keep AttributeError in this case. This is a case where "practicality beats purity". See also issue 1285086. ---------- components: +Library (Lib) nosy: +flox resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 11:04:17 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 31 Jul 2010 09:04:17 +0000 Subject: [issue9301] urllib.quote(None) returns None in 2.7 (raised TypeError before) In-Reply-To: <1279530588.62.0.226192140376.issue9301@psf.upfronthosting.co.za> Message-ID: <1280567057.39.0.701518436917.issue9301@psf.upfronthosting.co.za> Florent Xicluna added the comment: Fixed in r83319. Thanks. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 11:05:57 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 31 Jul 2010 09:05:57 +0000 Subject: [issue9088] revert distutils to its 3.1 state In-Reply-To: <1277593682.01.0.850281070845.issue9088@psf.upfronthosting.co.za> Message-ID: <1280567157.63.0.813399468808.issue9088@psf.upfronthosting.co.za> Tarek Ziad? added the comment: done in r83053 ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 11:51:47 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 31 Jul 2010 09:51:47 +0000 Subject: [issue9433] regrtest.py -j 2 doesn't work on Windows: remove close_fds=True on Windows In-Reply-To: <1280569907.44.0.401416640246.issue9433@psf.upfronthosting.co.za> Message-ID: <1280569907.44.0.401416640246.issue9433@psf.upfronthosting.co.za> New submission from STINNER Victor : On Windows, subprocess doesn't support close_fds=True if stdin, stdout or stderr is redirected to a pipe. The problem is in the work function: popen = Popen([sys.executable, '-E', '-m', 'test.regrtest', ...], ..., stdout=PIPE, stderr=PIPE, close_fds=True). ---------- messages: 112125 nosy: haypo priority: normal severity: normal status: open title: regrtest.py -j 2 doesn't work on Windows: remove close_fds=True on Windows versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 11:52:55 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 09:52:55 +0000 Subject: [issue9053] distutils compiles extensions so that Python.h cannot be found In-Reply-To: <1277157811.25.0.502780750068.issue9053@psf.upfronthosting.co.za> Message-ID: <1280569975.35.0.51013953454.issue9053@psf.upfronthosting.co.za> Mark Lawrence added the comment: Reading msg108321 I'm setting this to 3.2. Given that the first alpha is due now shouldn't this be addressed, apologies if this has already happened but I don't know here to look? ---------- nosy: +BreamoreBoy versions: +Python 3.2 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 11:53:52 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 31 Jul 2010 09:53:52 +0000 Subject: [issue9433] regrtest.py -j 2 doesn't work on Windows: remove close_fds=True on Windows In-Reply-To: <1280569907.44.0.401416640246.issue9433@psf.upfronthosting.co.za> Message-ID: <1280570032.65.0.136558925463.issue9433@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- components: +Tests, Windows stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 11:53:57 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 31 Jul 2010 09:53:57 +0000 Subject: [issue9433] regrtest.py -j 2 doesn't work on Windows: remove close_fds=True on Windows In-Reply-To: <1280569907.44.0.401416640246.issue9433@psf.upfronthosting.co.za> Message-ID: <1280570037.86.0.921971821611.issue9433@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 12:07:20 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 31 Jul 2010 10:07:20 +0000 Subject: [issue8433] buildbot: test_curses failure, getmouse() returned ERR In-Reply-To: <1271525184.22.0.100709248737.issue8433@psf.upfronthosting.co.za> Message-ID: <1280570840.59.0.113774010985.issue8433@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:00:13 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Jul 2010 11:00:13 +0000 Subject: [issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows In-Reply-To: <1277827107.42.0.0793977492373.issue9116@psf.upfronthosting.co.za> Message-ID: <1280574013.08.0.800834456946.issue9116@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch shouldn't remove COND_RESET, otherwise there will be spurious wakeups. Also, it would be nice to have more precisions about the issue. At which point does PyThreadState_Get() fail? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:01:34 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 11:01:34 +0000 Subject: [issue3699] test_bigaddrspace broken In-Reply-To: <1219841607.12.0.523528748152.issue3699@psf.upfronthosting.co.za> Message-ID: <1280574094.01.0.367705891115.issue3699@psf.upfronthosting.co.za> Mark Lawrence added the comment: Adding 2.7 as blame shows the file is essentially the same as for py3k. Can the priority of this be lowered to normal? ---------- nosy: +BreamoreBoy versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:12:58 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Jul 2010 11:12:58 +0000 Subject: [issue3699] test_bigaddrspace broken In-Reply-To: <1219841607.12.0.523528748152.issue3699@psf.upfronthosting.co.za> Message-ID: <1280574778.43.0.530385903892.issue3699@psf.upfronthosting.co.za> Antoine Pitrou added the comment: No, the problem is specific to 3.x, because the tests haven't been ported properly. I still want to have the priority as "high", because a broken test should not be left as-is. ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:18:27 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 11:18:27 +0000 Subject: [issue4188] Lib/threading.py causes infinite recursion when running as verbose In-Reply-To: <1224793703.28.0.169476277835.issue4188@psf.upfronthosting.co.za> Message-ID: <1280575107.89.0.677132929296.issue4188@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could someone with knowledge of threading provide a unit test for this, assuming that you want or need to force threading into infinite recursion. Then we can test a patch that only moves two lines. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:23:00 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Jul 2010 11:23:00 +0000 Subject: [issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows In-Reply-To: <1277827107.42.0.0793977492373.issue9116@psf.upfronthosting.co.za> Message-ID: <1280575380.46.0.951406453987.issue9116@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I don't have much time at the moment to investigate, but I find it odd > that this isn't occurring on the two Windows py3k buildbots. At least two of them (and perhaps the third -- I've asked Paul about it) are single-core virtual machines. What is your setup? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:25:56 2010 From: report at bugs.python.org (Eric Smith) Date: Sat, 31 Jul 2010 11:25:56 +0000 Subject: [issue9430] Document str() and repr() of timedelta. In-Reply-To: <1280516276.66.0.738062201536.issue9430@psf.upfronthosting.co.za> Message-ID: <1280575556.45.0.426447141237.issue9430@psf.upfronthosting.co.za> Eric Smith added the comment: I think it would be clearer if the footnote said something like "Negative 1 day plus 19 hours is equivalent to the timedelta argument of -5 hours)". If I hadn't been following the discussion on #python-dev the point of this doc change would have been lost on me without much closer scrutiny, so a little more explanation would help. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:26:48 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 11:26:48 +0000 Subject: [issue4650] getopt need re-factor... In-Reply-To: <1229150797.88.0.480483260709.issue4650@psf.upfronthosting.co.za> Message-ID: <1280575608.93.0.727669406842.issue4650@psf.upfronthosting.co.za> Mark Lawrence added the comment: Wang Chun this is unlikely to move unless you can provide a patch that changes the code and the unit test. ---------- nosy: +BreamoreBoy versions: +Python 2.7, Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:30:47 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 11:30:47 +0000 Subject: [issue4657] Doctest gets line numbers wrongs with <> in name In-Reply-To: <1229242886.47.0.883564319605.issue4657@psf.upfronthosting.co.za> Message-ID: <1280575847.76.0.954176554477.issue4657@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Nick: could you provide a patch that addresses this issue? ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:34:37 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Jul 2010 11:34:37 +0000 Subject: [issue4188] Lib/threading.py causes infinite recursion when running as verbose In-Reply-To: <1224793703.28.0.169476277835.issue4188@psf.upfronthosting.co.za> Message-ID: <1280576077.39.0.401408376953.issue4188@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch looks ok. A more robust solution would be to modify _note() so that it never creates a DummyThread, and instead uses the raw thread id if the current thread doesn't have a corresponding Thread object. ---------- nosy: +gps, pitrou stage: unit test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:35:50 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 11:35:50 +0000 Subject: [issue4744] asynchat documentation needs to be more precise In-Reply-To: <1230168171.56.0.381937953807.issue4744@psf.upfronthosting.co.za> Message-ID: <1280576150.89.0.746076984782.issue4744@psf.upfronthosting.co.za> Mark Lawrence added the comment: Is there anyone with knowledge of asynchat who could provide a patch for this? ---------- assignee: georg.brandl -> docs at python nosy: +BreamoreBoy, docs at python stage: -> needs patch versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:36:58 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Jul 2010 11:36:58 +0000 Subject: [issue9430] Document str() and repr() of timedelta. In-Reply-To: <1280516276.66.0.738062201536.issue9430@psf.upfronthosting.co.za> Message-ID: <1280576218.19.0.670585308258.issue9430@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:37:07 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 11:37:07 +0000 Subject: [issue4934] tp_del and tp_version_tag undocumented In-Reply-To: <1231869285.41.0.170645063597.issue4934@psf.upfronthosting.co.za> Message-ID: <1280576227.67.0.307294862466.issue4934@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: georg.brandl -> docs at python nosy: +docs at python versions: +Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:38:22 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Jul 2010 11:38:22 +0000 Subject: [issue4188] Lib/threading.py causes infinite recursion when running as verbose In-Reply-To: <1224793703.28.0.169476277835.issue4188@psf.upfronthosting.co.za> Message-ID: <1280576302.01.0.0637058771991.issue4188@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I spoke too fast. With the patch, test_3_join_in_forked_from_thread in test_threading still fails with _VERBOSE manually set to True. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:39:09 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 11:39:09 +0000 Subject: [issue5001] Remove assertion-based checking in multiprocessing In-Reply-To: <1232382762.58.0.610641171059.issue5001@psf.upfronthosting.co.za> Message-ID: <1280576349.01.0.538591844926.issue5001@psf.upfronthosting.co.za> Mark Lawrence added the comment: @Jesse: could you provide a patch that addresses this issue? ---------- nosy: +BreamoreBoy stage: -> needs patch versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:40:22 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 11:40:22 +0000 Subject: [issue9430] Document str() and repr() of timedelta. In-Reply-To: <1280516276.66.0.738062201536.issue9430@psf.upfronthosting.co.za> Message-ID: <1280576422.6.0.66975827635.issue9430@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r83341. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:41:36 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 11:41:36 +0000 Subject: [issue5149] syntactic sugar: type coercion on pointer assignment In-Reply-To: <1233710403.4.0.267443476473.issue5149@psf.upfronthosting.co.za> Message-ID: <1280576496.5.0.223074522872.issue5149@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> unit test needed type: -> feature request versions: +Python 3.2 -Python 2.6, Python 2.7, Python 3.0, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:42:57 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 11:42:57 +0000 Subject: [issue9432] unquote(None) raises AttributeError - Instead of TypeError In-Reply-To: <1280518304.67.0.979148690814.issue9432@psf.upfronthosting.co.za> Message-ID: <1280576577.89.0.966184854648.issue9432@psf.upfronthosting.co.za> Georg Brandl added the comment: I'd say keep the AttributeError too. This is not different from many other functions that fail variously with random types fed into them. ---------- nosy: +georg.brandl status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:43:30 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 11:43:30 +0000 Subject: [issue1481347] parse_makefile doesn't handle $$ correctly Message-ID: <1280576610.17.0.834790375019.issue1481347@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> unit test needed versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:44:13 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 11:44:13 +0000 Subject: [issue4650] getopt need re-factor... In-Reply-To: <1229150797.88.0.480483260709.issue4650@psf.upfronthosting.co.za> Message-ID: <1280576653.02.0.873989715113.issue4650@psf.upfronthosting.co.za> Georg Brandl added the comment: getopt.error is now in 3k for a few releases, so the opportunity to remove is gone. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:44:51 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 11:44:51 +0000 Subject: [issue9431] 2to3 reapplies fix_dict In-Reply-To: <1280518101.61.0.560600920548.issue9431@psf.upfronthosting.co.za> Message-ID: <1280576691.81.0.791312618929.issue9431@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:45:08 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 11:45:08 +0000 Subject: [issue9429] 2to3 does not rename test.test_support to test.support In-Reply-To: <1280513955.81.0.17259447489.issue9429@psf.upfronthosting.co.za> Message-ID: <1280576708.34.0.627058300814.issue9429@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:48:28 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 31 Jul 2010 11:48:28 +0000 Subject: [issue9429] 2to3 does not rename test.test_support to test.support In-Reply-To: <1280513955.81.0.17259447489.issue9429@psf.upfronthosting.co.za> Message-ID: <1280576908.42.0.850300093169.issue9429@psf.upfronthosting.co.za> Florent Xicluna added the comment: See #6583. ---------- nosy: +flox resolution: -> duplicate status: open -> closed superseder: -> 2to3 fails to fix test.test_support _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 13:51:49 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Jul 2010 11:51:49 +0000 Subject: [issue4188] Lib/threading.py causes infinite recursion when running as verbose In-Reply-To: <1224793703.28.0.169476277835.issue4188@psf.upfronthosting.co.za> Message-ID: <1280577109.03.0.610854474624.issue4188@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch with the alternative approach suggested above. There still is the aforementioned test_threading issue when run standalone. ---------- Added file: http://bugs.python.org/file18283/verbosethreading.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 14:05:33 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Jul 2010 12:05:33 +0000 Subject: [issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows In-Reply-To: <1277827107.42.0.0793977492373.issue9116@psf.upfronthosting.co.za> Message-ID: <1280577933.53.0.962027245126.issue9116@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 14:06:37 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 31 Jul 2010 12:06:37 +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: <1280577997.43.0.379945627967.issue7092@psf.upfronthosting.co.za> Florent Xicluna added the comment: This issue is over, except for #7723 which is tracked separately. ---------- dependencies: -sqlite only accept buffer() for BLOB objects (input/output) resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 14:10:58 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 31 Jul 2010 12:10:58 +0000 Subject: [issue8920] PYTHONSTARTUP should expand "~" In-Reply-To: <1275847365.81.0.275671627787.issue8920@psf.upfronthosting.co.za> Message-ID: <1280578258.69.0.85443148708.issue8920@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 14:20:39 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Jul 2010 12:20:39 +0000 Subject: [issue9433] regrtest.py -j 2 doesn't work on Windows: remove close_fds=True on Windows In-Reply-To: <1280569907.44.0.401416640246.issue9433@psf.upfronthosting.co.za> Message-ID: <1280578839.38.0.992242756603.issue9433@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Does it work ok if you remove close_fds? There is a reason it's better to close all handles :) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 14:23:39 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Jul 2010 12:23:39 +0000 Subject: [issue4934] tp_del and tp_version_tag undocumented In-Reply-To: <1231869285.41.0.170645063597.issue4934@psf.upfronthosting.co.za> Message-ID: <1280579019.62.0.469320716848.issue4934@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think the reason tp_del isn't documented is that, as we somehow learnt it with the new IO code, it isn't really meant for third-party types. I would suggest checking with python-dev. As for tp_version_tag, it's for internal use (it indicated whether the method cache is still fresh), I don't think extension authors should modify it. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 14:24:20 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Jul 2010 12:24:20 +0000 Subject: [issue4934] tp_del and tp_version_tag undocumented In-Reply-To: <1231869285.41.0.170645063597.issue4934@psf.upfronthosting.co.za> Message-ID: <1280579060.07.0.626490987388.issue4934@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 15:07:07 2010 From: report at bugs.python.org (Jesse Noller) Date: Sat, 31 Jul 2010 13:07:07 +0000 Subject: [issue5001] Remove assertion-based checking in multiprocessing In-Reply-To: <1232382762.58.0.610641171059.issue5001@psf.upfronthosting.co.za> Message-ID: <1280581627.97.0.487422688478.issue5001@psf.upfronthosting.co.za> Jesse Noller added the comment: @Mark Yeah - I'm the current multiprocessing maintainer. If I fix it, I'll just commit it :) I filed this as a to do against myself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 15:08:46 2010 From: report at bugs.python.org (Jesse Noller) Date: Sat, 31 Jul 2010 13:08:46 +0000 Subject: [issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions In-Reply-To: <1280333027.17.0.112361474517.issue9400@psf.upfronthosting.co.za> Message-ID: <1280581726.48.0.304894644927.issue9400@psf.upfronthosting.co.za> Jesse Noller added the comment: @ray - you probably don't have the "dcon" binary on your path. bug.py calls a subprocess call. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 15:11:55 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 31 Jul 2010 13:11:55 +0000 Subject: [issue1776674] glob.glob inconsistent Message-ID: <1280581915.4.0.173659601509.issue1776674@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Here is a test + patch, to preserve the separator. Of course this changes the current behaviour, like: >>> glob.glob('/tmp/////foo*') ['/tmp/////foo1', '/tmp/////foo2'] ---------- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file18284/glob_preserve_sep.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 15:49:28 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 13:49:28 +0000 Subject: [issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows In-Reply-To: <1277827107.42.0.0793977492373.issue9116@psf.upfronthosting.co.za> Message-ID: <1280584168.3.0.856974784756.issue9116@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 15:59:04 2010 From: report at bugs.python.org (Brian Curtin) Date: Sat, 31 Jul 2010 13:59:04 +0000 Subject: [issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows In-Reply-To: <1277827107.42.0.0793977492373.issue9116@psf.upfronthosting.co.za> Message-ID: <1280584744.77.0.172339172395.issue9116@psf.upfronthosting.co.za> Brian Curtin added the comment: Both machines I've seen this on were true multicore, no VMs. One is dual core the other is 16. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 16:45:31 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 31 Jul 2010 14:45:31 +0000 Subject: [issue4657] Doctest gets line numbers wrongs with <> in name In-Reply-To: <1280575847.76.0.954176554477.issue4657@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: On Sat, Jul 31, 2010 at 9:30 PM, Mark Lawrence wrote: > > Mark Lawrence added the comment: > > @Nick: could you provide a patch that addresses this issue? Probably, but the "don't do that" work around is trivial enough that my own motivation to fix it is really low (otherwise I would have fixed it by now). It's still a genuine bug though. Since my original post isn't all that helpful in reproducing it, I'll provide some more details for anyone else that wants to tackle it. To reproduce it, edit Lib/test/test_zipimport_support.py to pass "" instead of name as the second argument to the finder.find call inside _run_object_doctest(). Running "python -m test.regrtest test_zipimport_support" will fail (with 6 of 33 doctests failing as of 2.7) Then pass "anon" (no angle brackets) to see that the reported doctest errors are different (1 of 19 reported as failing in 2.7) and, unlike the errors with "" the error in this latter case is directly attributable to having the wrong module name in the pdb output. (Note: regrtest's "-v" option is actually more confusing than helpful in debugging this test case due to the sheer amount of output it generates from the doctest tests themselves) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 17:10:21 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 31 Jul 2010 15:10:21 +0000 Subject: [issue9385] _ctypes module uses 'rwx' mmap() calls In-Reply-To: <1280163756.22.0.278914543931.issue9385@psf.upfronthosting.co.za> Message-ID: <1280589021.16.0.196422550875.issue9385@psf.upfronthosting.co.za> Florent Xicluna added the comment: This is a duplicate of #5504, according to Arfrever ---------- nosy: +flox resolution: -> duplicate status: open -> closed superseder: -> ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 17:12:32 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 31 Jul 2010 15:12:32 +0000 Subject: [issue5504] ctypes should work with systems where mmap can't be PROT_WRITE and PROT_EXEC In-Reply-To: <1237348531.28.0.513167073983.issue5504@psf.upfronthosting.co.za> Message-ID: <1280589152.56.0.62329329935.issue5504@psf.upfronthosting.co.za> Florent Xicluna added the comment: Issue #9385 marked as duplicate. ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 17:28:59 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 31 Jul 2010 15:28:59 +0000 Subject: [issue1686] string.Template.safe_substitute fail when overriding pattern attribute In-Reply-To: <1198301656.07.0.935231571982.issue1686@psf.upfronthosting.co.za> Message-ID: <1280590139.13.0.690078097812.issue1686@psf.upfronthosting.co.za> Florent Xicluna added the comment: The patch (braced_override.diff) still applies on 3.2. I am +0, because it is small and tested. What is the decision? ---------- nosy: +flox stage: -> patch review versions: +Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 17:36:26 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 15:36:26 +0000 Subject: [issue9435] test_distutils fails without zlib In-Reply-To: <1280590585.97.0.266735291444.issue9435@psf.upfronthosting.co.za> Message-ID: <1280590585.97.0.266735291444.issue9435@psf.upfronthosting.co.za> New submission from Georg Brandl : Noticed it in 3.2a1, but probably present on other branches. It should not fail, but skip these tests. ---------- assignee: tarek components: Distutils messages: 112157 nosy: georg.brandl, tarek priority: normal severity: normal stage: needs patch status: open title: test_distutils fails without zlib type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 17:36:39 2010 From: report at bugs.python.org (Nikolaus Rath) Date: Sat, 31 Jul 2010 15:36:39 +0000 Subject: [issue9400] multiprocessing.pool.AsyncResult.get() messes up exceptions In-Reply-To: <1280333027.17.0.112361474517.issue9400@psf.upfronthosting.co.za> Message-ID: <1280590599.78.0.915047899755.issue9400@psf.upfronthosting.co.za> Nikolaus Rath added the comment: @ray: Try it with the following dummy dcon program: $ cat dcon #!/bin/sh exit 127 (and change the path to dcon in bug.py accordingly). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 17:46:10 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 15:46:10 +0000 Subject: [issue5622] wrong error from curses.wrapper if curses initialization fails In-Reply-To: <1238511637.05.0.307555783931.issue5622@psf.upfronthosting.co.za> Message-ID: <1280591170.32.0.760993569202.issue5622@psf.upfronthosting.co.za> Mark Lawrence added the comment: This is a one line patch on wrapper.py. Sorry I can't do any more with this cos I only have a windows box. ---------- keywords: +patch nosy: +BreamoreBoy stage: -> unit test needed type: -> behavior versions: +Python 3.2 -Python 3.0 Added file: http://bugs.python.org/file18285/issue5622.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 17:48:13 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 15:48:13 +0000 Subject: [issue5626] misleading comment in socket.gethostname() documentation In-Reply-To: <1238515382.33.0.784525971679.issue5626@psf.upfronthosting.co.za> Message-ID: <1280591293.27.0.207815625434.issue5626@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- assignee: georg.brandl -> docs at python nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 17:50:31 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 15:50:31 +0000 Subject: [issue5701] ZipFile returns compressed data stream when encountering unsupported compression method In-Reply-To: <1238947051.8.0.105309388943.issue5701@psf.upfronthosting.co.za> Message-ID: <1280591431.24.0.451577511311.issue5701@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> unit test needed type: -> behavior versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 17:51:07 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Jul 2010 15:51:07 +0000 Subject: [issue9038] test_distutils failure In-Reply-To: <1277066901.58.0.116708897563.issue9038@psf.upfronthosting.co.za> Message-ID: <1280591467.32.0.713988054613.issue9038@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Seems to have disappeared with the distutils revert. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 17:52:47 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 31 Jul 2010 15:52:47 +0000 Subject: [issue5622] wrong error from curses.wrapper if curses initialization fails In-Reply-To: <1238511637.05.0.307555783931.issue5622@psf.upfronthosting.co.za> Message-ID: <1280591567.6.0.349694406837.issue5622@psf.upfronthosting.co.za> Ned Deily added the comment: [FYI: Comments at the beginning of a patch file are ignored by the standard Unix-y patch utilities. They are there for a reason.] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 17:53:11 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Jul 2010 15:53:11 +0000 Subject: [issue9436] test_sysconfig failure In-Reply-To: <1280591591.84.0.476083865565.issue9436@psf.upfronthosting.co.za> Message-ID: <1280591591.84.0.476083865565.issue9436@psf.upfronthosting.co.za> New submission from Antoine Pitrou : When I use the following configuration (in order to build a 32-bit Python a 64-bit OS): ./configure --with-computed-gotos CFLAGS=-m32 LDFLAGS=-m32 I then get a failure in test_sysconfig: ====================================================================== FAIL: test_ldshared_value (test.test_sysconfig.TestSysConfig) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/m32/Lib/test/test_sysconfig.py", line 285, in test_ldshared_value self.assertIn(ldflags, ldshared) AssertionError: '-m32 ' not found in 'gcc -pthread -shared' ---------- components: Library (Lib) messages: 112162 nosy: jyasskin, pitrou, tarek priority: normal severity: normal status: open title: test_sysconfig failure type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 17:55:12 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Jul 2010 15:55:12 +0000 Subject: [issue9437] test_distutils failure with -m32 In-Reply-To: <1280591712.46.0.151463924195.issue9437@psf.upfronthosting.co.za> Message-ID: <1280591712.46.0.151463924195.issue9437@psf.upfronthosting.co.za> New submission from Antoine Pitrou : When I use the following configuration (in order to build a 32-bit Python a 64-bit OS): ./configure --with-computed-gotos CFLAGS=-m32 LDFLAGS=-m32 I then get two failures in test_distutils: test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase) ... /tmp/tmpssz80G/tmp/tmpssz80G/xxmodule.o: could not read symbols: File in wrong format collect2: ld a retourn? 1 code d'?tat d'ex?cution ERROR [...] test_get_outputs (distutils.tests.test_build_ext.BuildExtTestCase) ... /tmp/tmphxwa1S/tempt/tmp/tmpuD17us/foo.o: could not read symbols: File in wrong format collect2: ld a retourn? 1 code d'?tat d'ex?cution ERROR [...] ====================================================================== ERROR: test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/m32/Lib/distutils/unixccompiler.py", line 254, in link self.spawn(linker + ld_args) File "/home/antoine/py3k/m32/Lib/distutils/ccompiler.py", line 909, in spawn spawn(cmd, dry_run=self.dry_run) File "/home/antoine/py3k/m32/Lib/distutils/spawn.py", line 34, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/home/antoine/py3k/m32/Lib/distutils/spawn.py", line 138, in _spawn_posix % (cmd[0], exit_status)) distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/antoine/py3k/m32/Lib/distutils/tests/test_build_ext.py", line 65, in test_build_ext cmd.run() File "/home/antoine/py3k/m32/Lib/distutils/command/build_ext.py", line 347, in run self.build_extensions() File "/home/antoine/py3k/m32/Lib/distutils/command/build_ext.py", line 456, in build_extensions self.build_extension(ext) File "/home/antoine/py3k/m32/Lib/distutils/command/build_ext.py", line 543, in build_extension target_lang=language) File "/home/antoine/py3k/m32/Lib/distutils/ccompiler.py", line 719, in link_shared_object extra_preargs, extra_postargs, build_temp, target_lang) File "/home/antoine/py3k/m32/Lib/distutils/unixccompiler.py", line 256, in link raise LinkError(msg) distutils.errors.LinkError: command 'gcc' failed with exit status 1 ====================================================================== ERROR: test_get_outputs (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/m32/Lib/distutils/unixccompiler.py", line 254, in link self.spawn(linker + ld_args) File "/home/antoine/py3k/m32/Lib/distutils/ccompiler.py", line 909, in spawn spawn(cmd, dry_run=self.dry_run) File "/home/antoine/py3k/m32/Lib/distutils/spawn.py", line 34, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/home/antoine/py3k/m32/Lib/distutils/spawn.py", line 138, in _spawn_posix % (cmd[0], exit_status)) distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/antoine/py3k/m32/Lib/distutils/tests/test_build_ext.py", line 321, in test_get_outputs cmd.run() File "/home/antoine/py3k/m32/Lib/distutils/command/build_ext.py", line 347, in run self.build_extensions() File "/home/antoine/py3k/m32/Lib/distutils/command/build_ext.py", line 456, in build_extensions self.build_extension(ext) File "/home/antoine/py3k/m32/Lib/distutils/command/build_ext.py", line 543, in build_extension target_lang=language) File "/home/antoine/py3k/m32/Lib/distutils/ccompiler.py", line 719, in link_shared_object extra_preargs, extra_postargs, build_temp, target_lang) File "/home/antoine/py3k/m32/Lib/distutils/unixccompiler.py", line 256, in link raise LinkError(msg) distutils.errors.LinkError: command 'gcc' failed with exit status 1 ---------- assignee: tarek components: Distutils, Tests messages: 112163 nosy: jyasskin, pitrou, tarek priority: high severity: normal stage: needs patch status: open title: test_distutils failure with -m32 type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 17:58:29 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 31 Jul 2010 15:58:29 +0000 Subject: [issue5622] wrong error from curses.wrapper if curses initialization fails In-Reply-To: <1238511637.05.0.307555783931.issue5622@psf.upfronthosting.co.za> Message-ID: <1280591909.43.0.577729807173.issue5622@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 18:24:17 2010 From: report at bugs.python.org (Alan McIntyre) Date: Sat, 31 Jul 2010 16:24:17 +0000 Subject: [issue1710703] zipfile.ZipFile behavior inconsistent. Message-ID: <1280593457.16.0.692822307472.issue1710703@psf.upfronthosting.co.za> Alan McIntyre added the comment: Sure thing; I'll see if I can have a look within the next week or so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 18:35:28 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 31 Jul 2010 16:35:28 +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: <1280594128.56.0.427996568665.issue7723@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 18:44:25 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 31 Jul 2010 16:44:25 +0000 Subject: [issue8047] Serialiser in ElementTree returns unicode strings in Py3k In-Reply-To: <1267600525.56.0.547982490868.issue8047@psf.upfronthosting.co.za> Message-ID: <1280594665.5.0.221890017524.issue8047@psf.upfronthosting.co.za> Changes by Florent Xicluna : Removed file: http://bugs.python.org/file16543/issue8047_etree_encoding.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 18:50:36 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 16:50:36 +0000 Subject: [issue9410] Add Unladen Swallow's optimizations to Python 3's pickle. In-Reply-To: <1280384767.75.0.12386540434.issue9410@psf.upfronthosting.co.za> Message-ID: <1280595036.11.0.117002338186.issue9410@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- title: Add Unladden Swallow's optimizations to Python 3's pickle. -> Add Unladen Swallow's optimizations to Python 3's pickle. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 18:55:45 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 31 Jul 2010 16:55:45 +0000 Subject: [issue8047] Serialiser in ElementTree returns unicode strings in Py3k In-Reply-To: <1267600525.56.0.547982490868.issue8047@psf.upfronthosting.co.za> Message-ID: <1280595345.62.0.0463089960626.issue8047@psf.upfronthosting.co.za> Florent Xicluna added the comment: Patch updated here, and on Rietveld too. http://codereview.appspot.com/664043 Rules (as discussed): - tree.tostring(encoding=None) => encodes to "US-ASCII" (compatible with 2.7 and lxml.etree) - tree.tostring(encoding="unicode") => outputs Unicode - tree.tostring(encoding=str) => outputs Unicode (compatible with lxml.etree) For 2.7, no change planned. For 3.1, do we keep the current behavior? - tree.tostring(encoding=None) => outputs Unicode ---------- components: +XML stage: patch review -> commit review Added file: http://bugs.python.org/file18286/issue8047_etree_encoding_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 19:01:47 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 17:01:47 +0000 Subject: [issue5776] RPM build error with python-2.6.spec In-Reply-To: <1239954590.57.0.776112423275.issue5776@psf.upfronthosting.co.za> Message-ID: <1280595707.47.0.777779998426.issue5776@psf.upfronthosting.co.za> Mark Lawrence added the comment: Could someone comment on the patch as I don't understand the purpose of this file. ---------- nosy: +BreamoreBoy stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 19:03:28 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 31 Jul 2010 17:03:28 +0000 Subject: [issue6231] ElementInclude may drop text In-Reply-To: <1244384504.27.0.561199535147.issue6231@psf.upfronthosting.co.za> Message-ID: <1280595808.66.0.740365768238.issue6231@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- assignee: -> flox components: +XML stage: -> patch review status: languishing -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 19:07:48 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 31 Jul 2010 17:07:48 +0000 Subject: [issue9438] Clarify __debug__ restrictions In-Reply-To: <1280596068.17.0.635843199861.issue9438@psf.upfronthosting.co.za> Message-ID: <1280596068.17.0.635843199861.issue9438@psf.upfronthosting.co.za> New submission from Barry A. Warsaw : On http://docs.python.org/library/constants.html?highlight=__debug__#__debug__ * Be more explicit that assigments to None and __debug__ are illegal even when used as attributes. IOW it's not just assignment to the built-in names that are illegal. * Add a "Changed in 2.7" to __debug__ stating that assignments to __debug__ as an attribute became illegal. Add this to the NEWS and What's New files for 2.7. (Also double check for Python 3.2) ---------- assignee: barry components: Documentation messages: 112167 nosy: barry priority: normal severity: normal status: open title: Clarify __debug__ restrictions type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 19:08:01 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 17:08:01 +0000 Subject: [issue5934] fix gcc warnings: explicit type conversion for uid/gid in posix In-Reply-To: <1241484258.44.0.246331146842.issue5934@psf.upfronthosting.co.za> Message-ID: <1280596081.66.0.832349285571.issue5934@psf.upfronthosting.co.za> Changes by Mark Lawrence : ---------- stage: -> patch review versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 19:14:38 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Jul 2010 17:14:38 +0000 Subject: [issue9439] Add SSL changes to 3.2 what's new In-Reply-To: <1280596478.45.0.905218658684.issue9439@psf.upfronthosting.co.za> Message-ID: <1280596478.45.0.905218658684.issue9439@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Patch waiting for un-freeze. ---------- assignee: georg.brandl components: Documentation files: whatsnew-ssl.patch keywords: patch messages: 112168 nosy: georg.brandl, pitrou priority: low severity: normal stage: commit review status: open title: Add SSL changes to 3.2 what's new versions: Python 3.2 Added file: http://bugs.python.org/file18287/whatsnew-ssl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 19:24:15 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 17:24:15 +0000 Subject: [issue9440] Remove bad assert in TestDateTime.test_microsecond_rounding In-Reply-To: <1280597055.4.0.682917662697.issue9440@psf.upfronthosting.co.za> Message-ID: <1280597055.4.0.682917662697.issue9440@psf.upfronthosting.co.za> New submission from Georg Brandl : The last assertion in TestDateTime.test_microsecond_rounding does not test a predictable outcome. For example, on my box it passes with pydebug enabled and fails without. It should just be removed. ---------- assignee: belopolsky components: Tests messages: 112169 nosy: belopolsky, georg.brandl priority: high severity: normal status: open title: Remove bad assert in TestDateTime.test_microsecond_rounding versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 19:25:19 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 17:25:19 +0000 Subject: [issue6008] Idle should be installed as `idle3.1` and not `idle3` In-Reply-To: <1242175792.97.0.077794043098.issue6008@psf.upfronthosting.co.za> Message-ID: <1280597119.71.0.308414665433.issue6008@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can someone with Linux and/or Mac confirm whether or not this is still an issue. ---------- nosy: +BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 19:26:20 2010 From: report at bugs.python.org (Tom Dunham) Date: Sat, 31 Jul 2010 17:26:20 +0000 Subject: [issue9441] increase logging handlers test coverage In-Reply-To: <1280597180.41.0.450800729974.issue9441@psf.upfronthosting.co.za> Message-ID: <1280597180.41.0.450800729974.issue9441@psf.upfronthosting.co.za> New submission from Tom Dunham : Some regression tests for logging handlers, brings coverage up from 37% to 52%. Mainly tests to rotating file handlers. ---------- components: Library (Lib) files: rotating_file_handlers.patch keywords: patch messages: 112171 nosy: Tom priority: normal severity: normal status: open title: increase logging handlers test coverage versions: Python 3.2 Added file: http://bugs.python.org/file18288/rotating_file_handlers.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 19:36:15 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 31 Jul 2010 17:36:15 +0000 Subject: [issue3532] bytes.tohex method In-Reply-To: <1218299394.34.0.421334599583.issue3532@psf.upfronthosting.co.za> Message-ID: <1280597775.22.0.515810929727.issue3532@psf.upfronthosting.co.za> R. David Murray added the comment: The 'add transform/untransform' issue seems to be issue 7475. Note that there was in fact supposed to be a 'hex' method: http://mail.python.org/pipermail/python-dev/2009-September/091628.html Matt, if you'd like to raise this question again on python-dev, maybe your patch could be used to add it, in which case we could reopen this issue. Or we can wait for transform/untransform and just ignore the existence of fromhex :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 19:37:47 2010 From: report at bugs.python.org (David Stanek) Date: Sat, 31 Jul 2010 17:37:47 +0000 Subject: [issue9141] Allow objects to decide if they can be collected by GC In-Reply-To: <1278070212.7.0.406390843902.issue9141@psf.upfronthosting.co.za> Message-ID: <1280597867.71.0.791136785426.issue9141@psf.upfronthosting.co.za> Changes by David Stanek : ---------- nosy: +dstanek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 19:39:57 2010 From: report at bugs.python.org (David Stanek) Date: Sat, 31 Jul 2010 17:39:57 +0000 Subject: [issue2244] urllib and urllib2 decode userinfo multiple times In-Reply-To: <1204819810.33.0.413464262118.issue2244@psf.upfronthosting.co.za> Message-ID: <1280597997.49.0.17014911655.issue2244@psf.upfronthosting.co.za> Changes by David Stanek : ---------- nosy: +dstanek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 19:40:45 2010 From: report at bugs.python.org (David Stanek) Date: Sat, 31 Jul 2010 17:40:45 +0000 Subject: [issue2304] subprocess under windows fails to quote properly when shell=True In-Reply-To: <1205685138.96.0.183811169845.issue2304@psf.upfronthosting.co.za> Message-ID: <1280598045.41.0.68212751732.issue2304@psf.upfronthosting.co.za> Changes by David Stanek : ---------- nosy: +dstanek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 19:44:57 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sat, 31 Jul 2010 17:44:57 +0000 Subject: [issue3532] bytes.tohex method In-Reply-To: <1218299394.34.0.421334599583.issue3532@psf.upfronthosting.co.za> Message-ID: <1280598297.31.0.459930305508.issue3532@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- resolution: -> duplicate superseder: -> codecs missing: base64 bz2 hex zlib hex_codec ... _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 19:46:03 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 31 Jul 2010 17:46:03 +0000 Subject: [issue9440] Remove bad assert in TestDateTime.test_microsecond_rounding In-Reply-To: <1280597055.4.0.682917662697.issue9440@psf.upfronthosting.co.za> Message-ID: <1280598363.92.0.0866599096008.issue9440@psf.upfronthosting.co.za> Mark Dickinson added the comment: I agree this should be removed; it's a halfway case, and on a machine that's using x87 floating-point it's subject to the usual issues involving register spills and unpredictable conversions from 64-bit precision to 53-bit precision (dependent on compiler options, wind speed, and the FTSE 100 index). ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 19:50:10 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 17:50:10 +0000 Subject: [issue6036] Clean up test_posixpath.py In-Reply-To: <1242465658.7.0.601350758359.issue6036@psf.upfronthosting.co.za> Message-ID: <1280598610.3.0.0655310266962.issue6036@psf.upfronthosting.co.za> Mark Lawrence added the comment: The duplicate hasattr test still exists in 2.7 but the code has been rewritten for py3k. The shebang line is still missing but isn't used in many test files. The svn:executable property has not been set but is this needed? The OP has had finger trouble as everything appears twice in the patch file. ---------- nosy: +BreamoreBoy stage: -> patch review versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 19:57:51 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 17:57:51 +0000 Subject: [issue6059] uuid.uuid4 cause segfault in emesene In-Reply-To: <1242699417.24.0.211949858612.issue6059@psf.upfronthosting.co.za> Message-ID: <1280599071.88.0.409064764945.issue6059@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can someone with a linux box please try to reproduce this crash. ---------- components: +Extension Modules nosy: +BreamoreBoy stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 20:01:48 2010 From: report at bugs.python.org (Mark Lawrence) Date: Sat, 31 Jul 2010 18:01:48 +0000 Subject: [issue6103] Static library (libpythonX.Y.a) installed in incorrect location In-Reply-To: <1243229174.04.0.856181043806.issue6103@psf.upfronthosting.co.za> Message-ID: <1280599308.61.0.940990334648.issue6103@psf.upfronthosting.co.za> Mark Lawrence added the comment: Can someone from the build team please review the attached patch, thanks. ---------- nosy: +BreamoreBoy stage: -> patch review type: -> behavior versions: +Python 3.2 -Python 2.4, Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 20:09:09 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 31 Jul 2010 18:09:09 +0000 Subject: [issue9439] Add SSL changes to 3.2 what's new In-Reply-To: <1280596478.45.0.905218658684.issue9439@psf.upfronthosting.co.za> Message-ID: <1280599749.69.0.429212677477.issue9439@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r83349. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 20:11:25 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 18:11:25 +0000 Subject: [issue9440] Remove bad assert in TestDateTime.test_microsecond_rounding In-Reply-To: <1280597055.4.0.682917662697.issue9440@psf.upfronthosting.co.za> Message-ID: <1280599885.28.0.47458677955.issue9440@psf.upfronthosting.co.za> Georg Brandl added the comment: Removed in r83352. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 20:23:59 2010 From: report at bugs.python.org (David Stanek) Date: Sat, 31 Jul 2010 18:23:59 +0000 Subject: [issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True In-Reply-To: <1265137684.99.0.487285282872.issue7839@psf.upfronthosting.co.za> Message-ID: <1280600639.7.0.810165892834.issue7839@psf.upfronthosting.co.za> Changes by David Stanek : ---------- nosy: +dstanek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 20:24:27 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 18:24:27 +0000 Subject: [issue2986] difflib.SequenceMatcher not matching long sequences In-Reply-To: <1211920199.48.0.934398772587.issue2986@psf.upfronthosting.co.za> Message-ID: <1280600667.85.0.255317730483.issue2986@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 20:24:42 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 18:24:42 +0000 Subject: [issue9116] test_capi.test_no_FatalError_infinite_loop crash on Windows In-Reply-To: <1277827107.42.0.0793977492373.issue9116@psf.upfronthosting.co.za> Message-ID: <1280600682.35.0.684462795521.issue9116@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 20:24:44 2010 From: report at bugs.python.org (David Stanek) Date: Sat, 31 Jul 2010 18:24:44 +0000 Subject: [issue9370] Add reader redirect from test package docs to unittest module In-Reply-To: <1279968547.11.0.280770421062.issue9370@psf.upfronthosting.co.za> Message-ID: <1280600684.82.0.158000376893.issue9370@psf.upfronthosting.co.za> Changes by David Stanek : ---------- nosy: +dstanek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 20:24:55 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 18:24:55 +0000 Subject: [issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX) In-Reply-To: <1272979850.31.0.0455265952928.issue8611@psf.upfronthosting.co.za> Message-ID: <1280600695.15.0.855015089212.issue8611@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 20:25:19 2010 From: report at bugs.python.org (David Stanek) Date: Sat, 31 Jul 2010 18:25:19 +0000 Subject: [issue6293] Have regrtest.py echo back sys.flags In-Reply-To: <1245173731.34.0.991251966726.issue6293@psf.upfronthosting.co.za> Message-ID: <1280600719.48.0.278910768819.issue6293@psf.upfronthosting.co.za> Changes by David Stanek : ---------- nosy: +dstanek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 20:25:40 2010 From: report at bugs.python.org (David Stanek) Date: Sat, 31 Jul 2010 18:25:40 +0000 Subject: [issue8910] Write a text file explaining why Lib/test/data exists In-Reply-To: <1275793580.19.0.611567237471.issue8910@psf.upfronthosting.co.za> Message-ID: <1280600740.18.0.339759964483.issue8910@psf.upfronthosting.co.za> Changes by David Stanek : ---------- nosy: +dstanek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 20:26:02 2010 From: report at bugs.python.org (David Stanek) Date: Sat, 31 Jul 2010 18:26:02 +0000 Subject: [issue7331] Command line testing consistency between 2.x and 3.x In-Reply-To: <1258352095.53.0.801407348476.issue7331@psf.upfronthosting.co.za> Message-ID: <1280600762.58.0.512724413717.issue7331@psf.upfronthosting.co.za> Changes by David Stanek : ---------- nosy: +dstanek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 20:26:28 2010 From: report at bugs.python.org (David Stanek) Date: Sat, 31 Jul 2010 18:26:28 +0000 Subject: [issue7325] tempfile.mkdtemp() does not return absolute pathname when dir is specified In-Reply-To: <1258226856.45.0.72736645389.issue7325@psf.upfronthosting.co.za> Message-ID: <1280600788.58.0.955757484313.issue7325@psf.upfronthosting.co.za> Changes by David Stanek : ---------- nosy: +dstanek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 20:26:37 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 18:26:37 +0000 Subject: [issue8638] Remove suggestion for name mangling from the tutorial In-Reply-To: <1273176032.85.0.0243971489868.issue8638@psf.upfronthosting.co.za> Message-ID: <1280600797.96.0.809047779074.issue8638@psf.upfronthosting.co.za> Georg Brandl added the comment: No objections noted, closing. ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 20:27:02 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 18:27:02 +0000 Subject: [issue8005] datetime's comparison methods do not return NotImplemented when they should In-Reply-To: <1266960457.45.0.360868730978.issue8005@psf.upfronthosting.co.za> Message-ID: <1280600822.9.0.289981105374.issue8005@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing now. ---------- nosy: +georg.brandl resolution: out of date -> wont fix status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 21:07:51 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 19:07:51 +0000 Subject: [issue9328] str.__format__.__doc__ backport glitch In-Reply-To: <1279752555.95.0.938195163481.issue9328@psf.upfronthosting.co.za> Message-ID: <1280603271.22.0.83034756609.issue9328@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r83354. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 21:10:36 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 19:10:36 +0000 Subject: [issue1711605] CGIHttpServer leaves traces of previous requests in env Message-ID: <1280603436.54.0.290756651511.issue1711605@psf.upfronthosting.co.za> Georg Brandl added the comment: #9272 has a patch. ---------- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> CGIHTTPServer poisons os.environ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 21:23:54 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 31 Jul 2010 19:23:54 +0000 Subject: [issue5778] sys.version format differs between MSC and GCC In-Reply-To: <1239958808.78.0.447380255755.issue5778@psf.upfronthosting.co.za> Message-ID: <1280604234.21.0.876938364689.issue5778@psf.upfronthosting.co.za> ?ric Araujo added the comment: This change would bring the code in agreement with the docs: 'version (#build_number, build_date, build_time) [compiler]'. FWIW, it would also save one line, which can be useful in small terminals/consoles. Tentatively adding the easy keyword since fixing Python/getversion.c would probably not take much time for a C programmer. ---------- keywords: +easy nosy: +merwok stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 21:25:58 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 31 Jul 2010 19:25:58 +0000 Subject: [issue8620] wrong truncation of last line in cmd.Cmd In-Reply-To: <1273059355.74.0.713627995995.issue8620@psf.upfronthosting.co.za> Message-ID: <1280604358.62.0.841554295765.issue8620@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 21:26:21 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 31 Jul 2010 19:26:21 +0000 Subject: [issue8620] wrong truncation of last line in cmd.Cmd In-Reply-To: <1273059355.74.0.713627995995.issue8620@psf.upfronthosting.co.za> Message-ID: <1280604381.66.0.965983355956.issue8620@psf.upfronthosting.co.za> R. David Murray added the comment: Here is a unit test that demonstrates the problem (against py3k trunk). I'm not convinced that fixing this would be backward incompatible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 21:32:42 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 19:32:42 +0000 Subject: [issue5778] sys.version format differs between MSC and GCC In-Reply-To: <1239958808.78.0.447380255755.issue5778@psf.upfronthosting.co.za> Message-ID: <1280604762.35.0.640353701657.issue5778@psf.upfronthosting.co.za> Georg Brandl added the comment: Hmm, in Python/getcompiler.c there is an explicit \n before [GCC ...], and this is why: ------------------------------------------------------------------------ r17259 | gvanrossum | 2000-09-05 06:40:39 +0200 (Di, 05. Sep 2000) The GCC version is loooooooooong; put it on a new line. ------------------------------------------------------------------------ ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 21:35:09 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 19:35:09 +0000 Subject: [issue2830] Copy cgi.escape() to html In-Reply-To: <1210563693.47.0.635782576194.issue2830@psf.upfronthosting.co.za> Message-ID: <1280604909.6.0.121855855287.issue2830@psf.upfronthosting.co.za> Georg Brandl added the comment: In light of #9061, it should also start quoting single quotes when the arg is true. Since this function is called a LOT, it might also make sense to trivially implement it in C. If there are no objections, I can do that for 3.2. ---------- nosy: +georg.brandl priority: low -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 21:37:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 31 Jul 2010 19:37:05 +0000 Subject: [issue5778] sys.version format differs between MSC and GCC In-Reply-To: <1239958808.78.0.447380255755.issue5778@psf.upfronthosting.co.za> Message-ID: <1280605025.9.0.324423612359.issue5778@psf.upfronthosting.co.za> ?ric Araujo added the comment: Maybe it has changed in ten years: [GCC 4.4.4] on linux2 Or maybe it?s looooong when run from an unreleased version built from the sources. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 21:42:37 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 19:42:37 +0000 Subject: [issue1700304] pydoc.help samples sys.stdout and sys.stdin at import time Message-ID: <1280605357.89.0.370510908889.issue1700304@psf.upfronthosting.co.za> Georg Brandl added the comment: Duplicate of #8198. ---------- nosy: +georg.brandl resolution: -> duplicate status: open -> closed superseder: -> Importing pydoc and overwriting sys.stdout, causes one char to be sent to the console when calling help() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 21:46:33 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 31 Jul 2010 19:46:33 +0000 Subject: [issue9442] Update sys.version doc In-Reply-To: <1280605593.44.0.301230771819.issue9442@psf.upfronthosting.co.za> Message-ID: <1280605593.44.0.301230771819.issue9442@psf.upfronthosting.co.za> New submission from ?ric Araujo : Attaching a patch to edit mention of ?build number? in library/sys. I also don?t understand ?The first three characters are used to identify the version in the installation directories (where appropriate on each platform)?, maybe someone who does could enlighten me. If #5778 is rejected, the doc will need another update to mention that there may be a newline in sys.version. ---------- assignee: docs at python components: Documentation files: sys.version1.diff keywords: patch messages: 112189 nosy: docs at python, merwok priority: normal severity: normal stage: patch review status: open title: Update sys.version doc versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file18289/sys.version1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 21:50:13 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 19:50:13 +0000 Subject: [issue6829] Frendly error message when inheriting from function In-Reply-To: <1251962419.95.0.109154121907.issue6829@psf.upfronthosting.co.za> Message-ID: <1280605813.14.0.573697006665.issue6829@psf.upfronthosting.co.za> Georg Brandl added the comment: In Python 3, due to the new class creation the somewhat confusing message augmentation has been removed altogether, and for me there seems to be no way to add a better message about base class types somewhere without making too many assumptions. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 21:53:20 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 31 Jul 2010 19:53:20 +0000 Subject: [issue5778] sys.version format differs between MSC and GCC In-Reply-To: <1239958808.78.0.447380255755.issue5778@psf.upfronthosting.co.za> Message-ID: <1280606000.54.0.588711873853.issue5778@psf.upfronthosting.co.za> Martin v. L?wis added the comment: On OS X, it's still something like 2.6.5 (r265:79359, Mar 24 2010, 01:32:55) [GCC 4.0.1 (Apple Inc. build 5493)] on Redhat, it once was 2.3.4 (#1, Oct 26 2004, 16:42:40) [GCC 3.4.2 20041017 (Red Hat 3.4.2-6.fc3)] Apple once had 2.3 (#1, Sep 13 2003, 00:49:11) [GCC 3.3 20030304 (Apple Computer, Inc. build 1495)] I also found 2.2.2 (#0, Mar 23 2007, 12:02:04) [GCC 2.9-psion-98r2 (Symbian build 546)] 2.4.4 (#2, Apr 5 2007, 20:11:18) [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] Python 2.2.2 (#1, Oct 28 2002, 17:22:19) [GCC 3.2 (Mandrake Linux 9.0 3.2-1mdk)] I recommend to close this as "won't fix". There is no promise that sys.version follows any particular syntax. Developers should use sys.version_info instead, and the platform module (e.g. platform.python_compiler()) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 21:57:46 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 19:57:46 +0000 Subject: [issue9061] cgi.escape Can Lead To XSS Vulnerabilities In-Reply-To: <1277307995.11.0.923855376948.issue9061@psf.upfronthosting.co.za> Message-ID: <1280606266.77.0.0176171250928.issue9061@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 21:58:33 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 31 Jul 2010 19:58:33 +0000 Subject: [issue9442] Update sys.version doc In-Reply-To: <1280605593.44.0.301230771819.issue9442@psf.upfronthosting.co.za> Message-ID: <1280606313.15.0.427352659049.issue9442@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I recommend to drop any specific guarantee of what the string looks like. Saying "svn info" is also going to be outdated soon, when the code becomes maintained in Mercurial. Instead, the documentation should point to sys.version_info and the platform module for programmatic consumption, and explain that the string is meant for human readers. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 22:00:52 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 20:00:52 +0000 Subject: [issue5778] sys.version format differs between MSC and GCC In-Reply-To: <1239958808.78.0.447380255755.issue5778@psf.upfronthosting.co.za> Message-ID: <1280606452.08.0.247483531035.issue5778@psf.upfronthosting.co.za> Georg Brandl added the comment: Agreed. I've also added a sentence in the docs (r83357) that a newline may be present. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 22:06:13 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 20:06:13 +0000 Subject: [issue9442] Update sys.version doc In-Reply-To: <1280605593.44.0.301230771819.issue9442@psf.upfronthosting.co.za> Message-ID: <1280606773.51.0.832281343813.issue9442@psf.upfronthosting.co.za> Georg Brandl added the comment: Yes, this is even better than my fix for #5778. Changed in r83358 to: A string containing the version number of the Python interpreter plus additional information on the build number and compiler used. This string is displayed when the interactive interpreter is started. Do not extract version information out of it, rather, use :data:`version_info` and the functions provided by the :mod:`platform` module. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 22:08:41 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 20:08:41 +0000 Subject: [issue1286] fileinput, StringIO, and cStringIO do not support the with protocol In-Reply-To: <1192538556.96.0.72107595061.issue1286@psf.upfronthosting.co.za> Message-ID: <1280606921.9.0.745732574108.issue1286@psf.upfronthosting.co.za> Georg Brandl added the comment: For 3.x, the builtin io.StringIO and io.BytesIO already have context manager capability. Added fileinput in r83359. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 22:29:50 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 31 Jul 2010 20:29:50 +0000 Subject: [issue5778] sys.version format differs between MSC and GCC In-Reply-To: <1239958808.78.0.447380255755.issue5778@psf.upfronthosting.co.za> Message-ID: <1280608190.69.0.479832004653.issue5778@psf.upfronthosting.co.za> ?ric Araujo added the comment: Fair enough, I?d hate to cause the line to wrap over 80 characters for other people, so I?d live with the extra line on my system Pythons and with a personal patch for the versions I compile myself :) Thank you both for the thoughts and the fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 22:30:47 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 31 Jul 2010 20:30:47 +0000 Subject: [issue9442] Update sys.version doc In-Reply-To: <1280605593.44.0.301230771819.issue9442@psf.upfronthosting.co.za> Message-ID: <1280608247.11.0.727504879503.issue9442@psf.upfronthosting.co.za> ?ric Araujo added the comment: Is ?The first three characters are used to identify the version in the installation directories (where appropriate on each platform)? clear for anyone but me? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 22:39:15 2010 From: report at bugs.python.org (Dan Buch) Date: Sat, 31 Jul 2010 20:39:15 +0000 Subject: [issue1274] doctest fails to run file based tests with 8bit paths In-Reply-To: <1192213919.32.0.843568182453.issue1274@psf.upfronthosting.co.za> Message-ID: <1280608755.13.0.35239846829.issue1274@psf.upfronthosting.co.za> Dan Buch added the comment: just updating the patch ---------- nosy: +meatballhat versions: +Python 3.2, Python 3.3 -Python 2.5, Python 2.6 Added file: http://bugs.python.org/file18290/doctest-support-unicode-file-paths.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 22:40:34 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 31 Jul 2010 20:40:34 +0000 Subject: [issue1274] doctest fails to run file based tests with 8bit paths In-Reply-To: <1192213919.32.0.843568182453.issue1274@psf.upfronthosting.co.za> Message-ID: <1280608834.37.0.968885075831.issue1274@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 22:42:18 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 31 Jul 2010 20:42:18 +0000 Subject: [issue1109602] Need some setup.py sanity Message-ID: <1280608938.61.0.709625486376.issue1109602@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 22:48:46 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 31 Jul 2010 20:48:46 +0000 Subject: [issue9442] Update sys.version doc In-Reply-To: <1280605593.44.0.301230771819.issue9442@psf.upfronthosting.co.za> Message-ID: <1280609326.5.0.813529075247.issue9442@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Ask yourself: what are the first three characters? If that's not clear, type sys.version[:3]. Is it still unclear what this is talking about? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 22:49:57 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 20:49:57 +0000 Subject: [issue9442] Update sys.version doc In-Reply-To: <1280605593.44.0.301230771819.issue9442@psf.upfronthosting.co.za> Message-ID: <1280609397.41.0.664478209967.issue9442@psf.upfronthosting.co.za> Georg Brandl added the comment: I think it meant that '3.2' is the string used for determining the /usr/lib/python3.2 directory name. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 23:04:17 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 21:04:17 +0000 Subject: [issue3788] test_cookie isn't comprehensive In-Reply-To: <1220648824.87.0.764661238377.issue3788@psf.upfronthosting.co.za> Message-ID: <1280610257.02.0.264246286677.issue3788@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed new tests together with extensive cleanup of http.cookies in r83361, coverage is now at 95%. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jul 31 23:07:04 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 31 Jul 2010 21:07:04 +0000 Subject: [issue1144533] htmllib quote parse error within a