From report at bugs.python.org Tue Jun 1 00:20:15 2010 From: report at bugs.python.org (Christian Schubert) Date: Mon, 31 May 2010 22:20:15 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> New submission from Christian Schubert : invoking select.poll.poll() concurrently from multiple threads frequently yields garbage in one thread: while poll_poll in thread 1 is parsing its result, another thread 2 calling poll may overwrite revents; assuming poll_result was 1 in thread 1 and thread 2 managed to clear all revents before thread 1 started scanning ufds, thread 1 would iterate straight through all ufds, past its bounds (no bound checks there), and return the first out-of-bounds entry that happens to have revents != 0 this issue needs at least documentation (although bounds-checking to prevent garbage in the result wouldn't hurt) also, since there doesn't seem to be any locking w/ regards to ufds, it might be possible to corrupt python's heap, by concurrently invoking poll_register and poll_poll. poll_register could move the ufds array to another location while resizing it and poll_poll would subsequently overwrite memory that is not allocated anymore or allocated by someone else (did not test that) python 2.5.5 ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 106815 nosy: apexo, docs at python priority: normal severity: normal status: open title: select.poll is not thread safe type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 00:24:09 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 31 May 2010 22:24:09 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1275344649.95.0.716754337947.issue8865@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Do you have a script that reproduces it? ---------- assignee: docs at python -> components: -Documentation nosy: +pitrou 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 Jun 1 00:50:12 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 31 May 2010 22:50:12 +0000 Subject: [issue8866] socket.getaddrinfo() should support keyword arguments In-Reply-To: <1275346212.88.0.3146354655.issue8866@psf.upfronthosting.co.za> Message-ID: <1275346212.88.0.3146354655.issue8866@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : As of now socket.getaddrinfo() only supports positional arguments, so that if I want to, say, specify "flags" argument I'm forced to specify "0" for other missing arguments: >>> socket.getaddrinfo("www.python.org", 0, 0, 0, socket.SOL_TCP) [(2, 1, 6, '', ('82.94.164.162', 0)), (10, 1, 6, '', ('2001:888:2000:d::a2', 0, 0, 0))] >>> >>> socket.getaddrinfo("www.python.org", flags=socket.SOL_TCP) Traceback (most recent call last): File "", line 1, in TypeError: getaddrinfo() takes no keyword arguments >>> ---------- components: Library (Lib) messages: 106817 nosy: exarkun, giampaolo.rodola, pitrou priority: normal severity: normal status: open title: socket.getaddrinfo() should support keyword arguments versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 00:52:19 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 31 May 2010 22:52:19 +0000 Subject: [issue8866] socket.getaddrinfo() should support keyword arguments In-Reply-To: <1275346212.88.0.3146354655.issue8866@psf.upfronthosting.co.za> Message-ID: <1275346339.69.0.986122127955.issue8866@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: ...also, the returning tuples could be named tuples instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 00:52:21 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 31 May 2010 22:52:21 +0000 Subject: [issue8864] multiprocessing: undefined struct/union member: msg_control In-Reply-To: <1275342146.08.0.266544809639.issue8864@psf.upfronthosting.co.za> Message-ID: <1275346341.77.0.802008656849.issue8864@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +movement, zooko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 01:22:37 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 31 May 2010 23:22:37 +0000 Subject: [issue8867] serve.py (using wsgiref) cannot serve Python docs under Python3 due to encoding issues In-Reply-To: <1275348157.42.0.660423745202.issue8867@psf.upfronthosting.co.za> Message-ID: <1275348157.42.0.660423745202.issue8867@psf.upfronthosting.co.za> New submission from R. David Murray : If you do a 'make serve' in the docs directory (after doing a make html, of course) and try to open the What's New link in the served doc pages, the following error results: ValueError: Unicode data must contain only code points representable in ISO-8859-1 encoding ---------- components: Library (Lib) messages: 106819 nosy: r.david.murray priority: normal severity: normal status: open title: serve.py (using wsgiref) cannot serve Python docs under Python3 due to encoding issues type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 01:54:43 2010 From: report at bugs.python.org (John Levon) Date: Mon, 31 May 2010 23:54:43 +0000 Subject: [issue8864] multiprocessing: undefined struct/union member: msg_control In-Reply-To: <1275342146.08.0.266544809639.issue8864@psf.upfronthosting.co.za> Message-ID: <1275350083.23.0.880687640297.issue8864@psf.upfronthosting.co.za> John Levon added the comment: This appears to be one of the few cases where there's incompatibilities between different versions of the standards. Old BSD sockets use msg_accrights*, whereas the more modern way is msg_control* pointing to a struct cmsghdr. In terms of user/kernel interface, this difference is encoded as a MSG_XPG4_2 flag via a __xnet_recvmsg() re-define depending upon #ifdef _XPG4_2. The result being that it's impossible to use C99 and a modern struct msghdr together. This is less than ideal and I'm following it up internally. In terms of getting Python building again, it should be sufficient to define _XPG4_2 for the multiprocessing module compile only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 03:34:11 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Jun 2010 01:34:11 +0000 Subject: [issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute In-Reply-To: <1275069249.63.0.318211846232.issue8845@psf.upfronthosting.co.za> Message-ID: <1275356051.6.0.566311776287.issue8845@psf.upfronthosting.co.za> R. David Murray added the comment: Committed in r81632. ---------- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 03:49:16 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Jun 2010 01:49:16 +0000 Subject: [issue7583] Improve explanation of tab expansion in doctests In-Reply-To: <1261932632.12.0.972907709846.issue7583@psf.upfronthosting.co.za> Message-ID: <1275356956.88.0.796053308276.issue7583@psf.upfronthosting.co.za> R. David Murray added the comment: In the absence of feedback about the doc patch, I have applied it in r81634. @techtonic: if I recall correctly I explained in your issue that had the patch what the problem was. Short summary: there are two equally valid ways in which tabs in the output and the spacing in the sample output could be reconciled; both have their problems. Therefore it is better to have the user handle it explicitly one way or another. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 05:19:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 01 Jun 2010 03:19:23 +0000 Subject: [issue5023] Segfault in datetime.time.strftime("%z") In-Reply-To: <1232556285.78.0.999173961019.issue5023@psf.upfronthosting.co.za> Message-ID: <1275362363.35.0.870996981868.issue5023@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Philipp, Why do you think you see the same problem as Eric? Can you set a trace on &tuple and see when it gets modified? Do you see the crash with zone_failure.py, test_datetime.py or both? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 05:38:57 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 01 Jun 2010 03:38:57 +0000 Subject: [issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics In-Reply-To: <1275323981.58.0.479401459542.issue8860@psf.upfronthosting.co.za> Message-ID: <1275363537.73.0.966478848772.issue8860@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Mark> (2) seems like overkill to me. I agree, however it would be interesting to figure out when accumulated errors can produce an inaccurate result. ISTM that leftover is the sum of up to 7 doubles each between 0 and 1 which is then rounded to the nearest integer. I don't see how accumulated error can exceed 1 and affect the result. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 05:54:41 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 01 Jun 2010 03:54:41 +0000 Subject: [issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics In-Reply-To: <1275323981.58.0.479401459542.issue8860@psf.upfronthosting.co.za> Message-ID: <1275364481.73.0.412336942918.issue8860@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I wonder if it would be justified to expose something like int _PyLong_IsOdd(PyObject *self) { PyLongObject *lo = (PyLongObject *)self; return Py_SIZE(lo) != 0 && ((lo->ob_digit[0] & 1) != 0); } in longobject.h? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 07:21:03 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 01 Jun 2010 05:21:03 +0000 Subject: [issue8864] multiprocessing: undefined struct/union member: msg_control In-Reply-To: <1275342146.08.0.266544809639.issue8864@psf.upfronthosting.co.za> Message-ID: <1275369663.4.0.716082224212.issue8864@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Defining _XPG4_2 is surely the wrong thing to do, right? It's an internal flag only, not meant to be used by applications. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 08:35:22 2010 From: report at bugs.python.org (Christian Schubert) Date: Tue, 01 Jun 2010 06:35:22 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1275374122.79.0.768137848872.issue8865@psf.upfronthosting.co.za> Christian Schubert added the comment: okay, I've managed to put together a script that fairly consistently reproduces the problem on my (core2 duo 2,something GHz) machine some parameters (sleep times) are randomized in each iteration, the script runs for 30 iterations, each for 1 second, and counts the number of events where the fd looks bogus (max 1 per iteration); some other events (fd correct, revents bogus are also reported, but not counted) example output: poll returned [(-3, 65535)], we were looking for fd 3 poll returned [(-3, 65535)], we were looking for fd 3 poll returned [(-3, 65535)], we were looking for fd 3 poll returned [(-3, 65535)], we were looking for fd 3 poll returned [(-3, 65535)], we were looking for fd 3 poll returned [(-1, 65535)], we were looking for fd 3 poll returned [(-1, 65535)], we were looking for fd 3 poll returned [(-1627358347, 60497)], we were looking for fd 3 should not get here; poll returned [(3, 0)] poll returned [(-3, 65535)], we were looking for fd 3 9 events in 30 iterations ---------- Added file: http://bugs.python.org/file17510/select_threads.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 08:59:37 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 01 Jun 2010 06:59:37 +0000 Subject: [issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics In-Reply-To: <1275323981.58.0.479401459542.issue8860@psf.upfronthosting.co.za> Message-ID: <1275375577.66.0.214035966135.issue8860@psf.upfronthosting.co.za> Mark Dickinson added the comment: The accumulated error doesn't need to exceed 1; it just needs to be enough to make (e.g.) leftover appear to be >= 0.5 when it's actually just less than 0.5. It shouldn't be too hard to find examples where this happens, but I haven't thought about it. > I wonder if it would be justified to expose something like > int _PyLong_IsOdd(PyObject *self) {...} Yes, that could work. I'd be happier with this if there are other uses (even within longobject.c); there might well be, but I haven't looked. I also have a mild preference for _PyLong_IsEven over _PyLong_IsOdd. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 09:09:28 2010 From: report at bugs.python.org (Christian Schubert) Date: Tue, 01 Jun 2010 07:09:28 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1275376168.66.0.275641078025.issue8865@psf.upfronthosting.co.za> Christian Schubert added the comment: the other issue (poll_register freeing data structures that poll_poll currently uses) can be reproduced by the attached script (at least I can) depending on the parameters/circumstances it either segfaults or prints garbage results from poll, e.g. [(1684955474, 28192)]; the expected result would be [(3, 1)] ---------- Added file: http://bugs.python.org/file17511/concurrent_poll_and_register.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 10:02:58 2010 From: report at bugs.python.org (Philipp Gortan) Date: Tue, 01 Jun 2010 08:02:58 +0000 Subject: [issue5023] Segfault in datetime.time.strftime("%z") In-Reply-To: <1232556285.78.0.999173961019.issue5023@psf.upfronthosting.co.za> Message-ID: <1275379378.0.0.106340554655.issue5023@psf.upfronthosting.co.za> Philipp Gortan added the comment: Unfortunately, I'm no longer able to reproduce this issue as I upgraded to gcc 4.3 sometime within the last nine months... With 4.3, I don't see this segfault any longer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 10:31:12 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 01 Jun 2010 08:31:12 +0000 Subject: [issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics In-Reply-To: <1275323981.58.0.479401459542.issue8860@psf.upfronthosting.co.za> Message-ID: <1275381072.68.0.694530842599.issue8860@psf.upfronthosting.co.za> Mark Dickinson added the comment: An example where getting correct rounding is awkward: the following rounds up, with or without the patch: >>> datetime.timedelta(seconds=0.6112295) datetime.timedelta(0, 0, 611230) But in this case, the result should actually be rounded down (with either rounding mode), since the exact value of float('0.6112295') is a little less than 0.6112295: >>> print(Decimal(0.6112295)) 0.61122949999999998116351207499974407255649566650390625 The problem is that leftover_us ends up being exactly 0.5 in this case. Again, this could be worked around if we really care, but I'm not convinced it's worth it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 10:35:02 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 01 Jun 2010 08:35:02 +0000 Subject: [issue8867] serve.py (using wsgiref) cannot serve Python docs under Python3 due to encoding issues In-Reply-To: <1275348157.42.0.660423745202.issue8867@psf.upfronthosting.co.za> Message-ID: <1275381302.77.0.340865361278.issue8867@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 11:36:18 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 01 Jun 2010 09:36:18 +0000 Subject: [issue8853] getaddrinfo should accept port of type long In-Reply-To: <1275155293.8.0.373298822378.issue8853@psf.upfronthosting.co.za> Message-ID: <1275384978.45.0.90067524158.issue8853@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 14:18:44 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Jun 2010 12:18:44 +0000 Subject: [issue4769] b64decode should accept strings or bytes In-Reply-To: <1230572153.22.0.954048343235.issue4769@psf.upfronthosting.co.za> Message-ID: <1275394724.01.0.128751514231.issue4769@psf.upfronthosting.co.za> R. David Murray added the comment: The patch appears to be fixing the wrong functions. It is decode that needs to accept unicode. Encode should still be restricted to bytes. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 14:25:54 2010 From: report at bugs.python.org (John Levon) Date: Tue, 01 Jun 2010 12:25:54 +0000 Subject: [issue8864] multiprocessing: undefined struct/union member: msg_control In-Reply-To: <1275342146.08.0.266544809639.issue8864@psf.upfronthosting.co.za> Message-ID: <1275395154.43.0.75755619195.issue8864@psf.upfronthosting.co.za> John Levon added the comment: Right, it should be one of the "official" ways of enabling that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 15:09:27 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 01 Jun 2010 13:09:27 +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: <1275397767.99.0.85828774593.issue8797@psf.upfronthosting.co.za> Senthil Kumaran added the comment: This is fixed in r81636, r81637, r81638, r81637. Just like the Digest Authentication, the urllib2 will try for 5 times before failing for any authentication failure ( It won't lead to recursion). I had a thought that Basic Authentication need not be retried (no where in the RFC it mentions about it), but I found some references that clients do present the dialog a couple of times for retry on wrong authentication, so we are going for the same. This is tested with actual resource setup. Closing this issue as this bug is fixed. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 15:48:48 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Jun 2010 13:48:48 +0000 Subject: [issue1368247] unicode in email.MIMEText and email/Charset.py Message-ID: <1275400128.55.0.603112232396.issue1368247@psf.upfronthosting.co.za> R. David Murray added the comment: I don't think either of the previous patches are correct. I found a note in Issue1685453 that Barry would like for this to work, and after poking around in the code for a bit I think it can be done without breaking anything. Attached is a patch that adds unicode support to MIMEText, including unit tests and docs updates. Note that it is necessary to specify a charset if you have non-ASCII text in your unicode string, since the default charset is us-ascii. The unit tests confirm this behavior. Now the question is, is this a bug-fix or an enhancement? I *think* it is safe to apply and backport, since I think the only behavior it changes is to make unicode input work, whereas before it would give a traceback. But I've been wrong before :( ---------- resolution: invalid -> fixed stage: committed/rejected -> patch review versions: +Python 3.2 -Python 3.0 Added file: http://bugs.python.org/file17512/mimetext_unicode_input.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 15:54:04 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 01 Jun 2010 13:54:04 +0000 Subject: [issue8618] test_winsound fails when no playback devices configured In-Reply-To: <1273019000.91.0.843326391671.issue8618@psf.upfronthosting.co.za> Message-ID: <1275400444.88.0.946980216647.issue8618@psf.upfronthosting.co.za> Brian Curtin added the comment: Committed in r81640 through r81643 ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 15:56:36 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Jun 2010 13:56:36 +0000 Subject: [issue1368247] unicode in email.MIMEText and email/Charset.py Message-ID: <1275400596.03.0.826563347686.issue1368247@psf.upfronthosting.co.za> Changes by R. David Murray : Removed file: http://bugs.python.org/file17512/mimetext_unicode_input.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 15:56:50 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Jun 2010 13:56:50 +0000 Subject: [issue1368247] unicode in email.MIMEText and email/Charset.py Message-ID: <1275400610.61.0.795637393489.issue1368247@psf.upfronthosting.co.za> Changes by R. David Murray : Added file: http://bugs.python.org/file17513/mimetext_unicode_input.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 16:05:44 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Jun 2010 14:05:44 +0000 Subject: [issue1368247] unicode in email.MIMEText and email/Charset.py Message-ID: <1275401144.35.0.957561085878.issue1368247@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, it's not 100% true that it doesn't change "working" behavior. Before the patch, the first example in this ticket doesn't raise an error until the as_string call. After this patch, the error is raised as soon as MIMEText is called without the charset parameter. Since without the patch the code still fails eventually, I think this is an acceptable behavior change for a bug fix, but it does make me a little nervous :) Updated patch with doc change to Message.set_charset attached. ---------- Added file: http://bugs.python.org/file17514/mimetext_unicode_input.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 16:13:03 2010 From: report at bugs.python.org (Michiel de Hoon) Date: Tue, 01 Jun 2010 14:13:03 +0000 Subject: [issue8868] Framework install does not behave as a framework In-Reply-To: <1275401583.76.0.0937518467482.issue8868@psf.upfronthosting.co.za> Message-ID: <1275401583.76.0.0937518467482.issue8868@psf.upfronthosting.co.za> New submission from Michiel de Hoon : (The discussion for this bug started on the pythonmac-sig mailing list; see http://mail.python.org/pipermail/pythonmac-sig/2010-May/022362.html) When I try to install Python as a framework: ./configure --enable-framework make make install then Python gets installed under /Library/Frameworks/Python.framework/Versions/2.7, but it doesn't seem to function as a framework: >>> import MacOS >>> MacOS.WMAvailable() False >>> Python 2.6.5 returns True here. This is important for GUI extension modules; such modules do not interact correctly with the window manager if Python is not installed as a framework. I see the same behavior with the current Python in trunk with Mac OS X 10.4 and 10.5 both with Python installed from source and the precompiled python 2.7b2. Python revision 77030 seems to be the last revision without this problem. In revision 77031, posix_spawn() was introduced instead of execv() in pythonw.c to start the Python executable. ---------- assignee: ronaldoussoren components: Macintosh messages: 106838 nosy: mdehoon, ronaldoussoren priority: normal severity: normal status: open title: Framework install does not behave as a framework type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 16:17:28 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 01 Jun 2010 14:17:28 +0000 Subject: [issue8868] Framework install does not behave as a framework In-Reply-To: <1275401583.76.0.0937518467482.issue8868@psf.upfronthosting.co.za> Message-ID: <1275401848.19.0.0614577783207.issue8868@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The pythonw executable always uses execv on OSX 10.4 because posix_spawnv isn't available there. A possibly significant change is the value of argv[0] as passed to the Python.app executable. Could you check if this patch fixes the issue? Index: Mac/Tools/pythonw.c =================================================================== --- Mac/Tools/pythonw.c (revision 81605) +++ Mac/Tools/pythonw.c (working copy) @@ -149,6 +149,8 @@ main(int argc, char **argv) { char* exec_path = get_python_path(); + argv[0] = exec_path; + #ifdef HAVE_SPAWN_H /* We're weak-linking to posix-spawnv to ensure that ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 16:23:22 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Tue, 01 Jun 2010 14:23:22 +0000 Subject: [issue8868] Framework install does not behave as a framework In-Reply-To: <1275401583.76.0.0937518467482.issue8868@psf.upfronthosting.co.za> Message-ID: <1275402202.55.0.241827650728.issue8868@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Note that the subject is not entirely correct: the framework install is a framework install, but the python commandline doesn't behave like an application bundle. ---------- priority: normal -> high stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 16:40:38 2010 From: report at bugs.python.org (stier08) Date: Tue, 01 Jun 2010 14:40:38 +0000 Subject: [issue8869] execfile does not work with UNC paths In-Reply-To: <1275403238.02.0.475988525563.issue8869@psf.upfronthosting.co.za> Message-ID: <1275403238.02.0.475988525563.issue8869@psf.upfronthosting.co.za> New submission from stier08 : execfile() builtin function does not work with UNC paths on Windows platform (Windows 7 x64 has been tested, python 2.6.5) Since standard IO operations successfully process UNC paths, therefore this behavior of execfile() seems to be a bug. Code to reproduce (assuming drive c: is present and you have rw permissions) >>> a=u'\\\\?\\c:\\a.py' >>> open(a,"w").write("print 'hellow'") # successful write to UNC file >>> file(a).read() # successful read from UNC file "print 'hellow'" >>> execfile(a) # ERROR Traceback (most recent call last): File "", line 1, in IOError: [Errno 2] No such file or directory: '\\\\?\\c:\\a.py' See description of UNC naming convention at msdn http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx at wikipedia http://en.wikipedia.org/wiki/Path_(computing)#Uniform_Naming_Convention ---------- components: Unicode, Windows messages: 106841 nosy: stier08 priority: normal severity: normal status: open title: execfile does not work with UNC paths type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 16:54:14 2010 From: report at bugs.python.org (Tim Golden) Date: Tue, 01 Jun 2010 14:54:14 +0000 Subject: [issue8869] execfile does not work with UNC paths In-Reply-To: <1275403238.02.0.475988525563.issue8869@psf.upfronthosting.co.za> Message-ID: <4C051F10.8030208@timgolden.me.uk> Tim Golden added the comment: Since execfile is basically shorthand for exec (open (filename).read ()), and since open (filename) *does* support the full range of filepath syntax on Windows, and since execfile has been removed in py3k in favour of exec (open ...)), and since Python 2.x is nearing its end-of-life, I doubt this issue will garner much sympathy. I haven't actually looked at the code to discover just *why* execfile doesn't support that style of filename. But is there any reason you can't use exec (open (...))? ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 17:18:19 2010 From: report at bugs.python.org (Michiel de Hoon) Date: Tue, 01 Jun 2010 15:18:19 +0000 Subject: [issue8868] Framework install does not behave as a framework In-Reply-To: <1275401583.76.0.0937518467482.issue8868@psf.upfronthosting.co.za> Message-ID: <1275405499.47.0.35737199106.issue8868@psf.upfronthosting.co.za> Michiel de Hoon added the comment: The patch fixes the problem on Mac OS X 10.4. I'll try on 10.5 tomorrow. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 17:49:22 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 01 Jun 2010 15:49:22 +0000 Subject: [issue8869] execfile does not work with UNC paths In-Reply-To: <1275403238.02.0.475988525563.issue8869@psf.upfronthosting.co.za> Message-ID: <1275407362.47.0.0449070610722.issue8869@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Reproduced on WinXP. execfile() does not work because it calls the system function stat(); this function does accept UNC paths (like \\machine\share\file), but not paths which contain a wildcard character ('?' or '*') I suggest to remove the leading '\\\\?\\'. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 18:12:29 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Tue, 01 Jun 2010 16:12:29 +0000 Subject: [issue8864] multiprocessing: undefined struct/union member: msg_control In-Reply-To: <1275350083.23.0.880687640297.issue8864@psf.upfronthosting.co.za> Message-ID: Sridhar Ratnakumar added the comment: On 2010-05-31, at 4:54 PM, John Levon wrote: > In terms of getting Python building again, it should be sufficient to define _XPG4_2 for the multiprocessing module compile only. I can verify that the following patch works around this issue (for now); --- python.org/Modules/_multiprocessing/multiprocessing.c 2010-05-31 17:04:08.499559243 -0700 +++ python/Modules/_multiprocessing/multiprocessing.c 2010-05-31 17:04:28.568723434 -0700 @@ -6,6 +6,11 @@ * Copyright (c) 2006-2008, R Oudkerk --- see COPYING.txt */ +/* + * Workaround for http://bugs.python.org/issue8864#msg106820 + */ +#define _XPG4_2 + #include "multiprocessing.h" #ifdef SCM_RIGHTS On 2010-06-01, at 5:25 AM, John Levon wrote: > Right, it should be one of the "official" ways of enabling that. So I presume this should be the right way to fix this bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 18:40:18 2010 From: report at bugs.python.org (Jess Austin) Date: Tue, 01 Jun 2010 16:40:18 +0000 Subject: [issue5434] datetime.monthdelta In-Reply-To: <1236402290.49.0.02662803662.issue5434@psf.upfronthosting.co.za> Message-ID: <1275410418.05.0.498943364241.issue5434@psf.upfronthosting.co.za> Jess Austin added the comment: Yeah, the masses have spoken, and their silence is deafening. I was going to downplay the "health" of the package based on the number of downloads, but then I looked at the "futures" page. b^) Seriously, getting this in would require a core developer wanting it in, and at this point it seems none do. On the subject of float operations, while there may be some question about the integerness or floatness of timedelta, monthdelta is definitely an integer. As monthdelta already supports multiplication by integers and floor division by integers or monthdeltas, I don't see anything missing. To use monthdeltas with floats is to miss the point entirely. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 18:40:50 2010 From: report at bugs.python.org (John Levon) Date: Tue, 01 Jun 2010 16:40:50 +0000 Subject: [issue8864] multiprocessing: undefined struct/union member: msg_control In-Reply-To: <1275342146.08.0.266544809639.issue8864@psf.upfronthosting.co.za> Message-ID: <1275410450.92.0.935414898348.issue8864@psf.upfronthosting.co.za> John Levon added the comment: defining _XOPEN_SOURCE=600 or similar is better, as Martin pointed out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 18:47:36 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 01 Jun 2010 16:47:36 +0000 Subject: [issue8864] multiprocessing: undefined struct/union member: msg_control In-Reply-To: <1275342146.08.0.266544809639.issue8864@psf.upfronthosting.co.za> Message-ID: <1275410856.88.0.766313060552.issue8864@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Would such a workaround also be necessary if we want to add support for recvmsg() to the socket module (as in issue6560), or is it totally unrelated? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 18:57:09 2010 From: report at bugs.python.org (John Levon) Date: Tue, 01 Jun 2010 16:57:09 +0000 Subject: [issue8864] multiprocessing: undefined struct/union member: msg_control In-Reply-To: <1275342146.08.0.266544809639.issue8864@psf.upfronthosting.co.za> Message-ID: <1275411429.75.0.416031981758.issue8864@psf.upfronthosting.co.za> John Levon added the comment: Yes, we would almost certainly want something similar. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 19:27:56 2010 From: report at bugs.python.org (stier08) Date: Tue, 01 Jun 2010 17:27:56 +0000 Subject: [issue8869] execfile does not work with UNC paths In-Reply-To: <1275403238.02.0.475988525563.issue8869@psf.upfronthosting.co.za> Message-ID: <1275413276.24.0.309293340301.issue8869@psf.upfronthosting.co.za> stier08 added the comment: yep exec (open (...)) is OK here thanks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 19:56:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 01 Jun 2010 17:56:52 +0000 Subject: [issue8591] update mkpkg to latest coding standards In-Reply-To: <1272727331.63.0.427295643421.issue8591@psf.upfronthosting.co.za> Message-ID: <1275415012.12.0.149529474732.issue8591@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?ve started to review your patch but I find it a bid unwieldy to read. Would you mind exporting changesets to patches? I tried to look at your repo, but didn?t know which branch to look at. So, thanks for giving us the occasion of thinking about the patch workflow. Using changesets seems more natural since we use Bitbucket, while OTOH using regular diffs can streamline the history and remove unnecessary details (e.g. I?m not sure we want branch names to clutter the history forever (see http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/ for more info)). Would it be too much of a hassle to provide links or a Mercurial bundle of a set of small changesets? Having different patches would help us separate the non-controversial stuff (whitespace) from the refactoring and improvements. That said, I can offer a few remarks on the patch. - Don?t put editor settings in the files. - Changing ?if s in 'yn'? to ?if s in ('y', 'n')? is not really an improvement. It?s not more readable to always use tuples or frozensets for membership testing; str has __contains__ for a reason :) - Not sure how your print_ indirection is helpful. - I don?t know how much reST we want in the docstrings: None, some constructs, Sphinx extensions? Don?t worry if there are no replies in a few days, people are pretty busy. I?ll ask about the meta-issues (workflow, reST) on the ML if Tarek doesn?t answer here. Cheers :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 20:38:01 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 01 Jun 2010 18:38:01 +0000 Subject: [issue8870] --user-access-control=force produces invalid installer on Vista In-Reply-To: <1275417481.6.0.247175279763.issue8870@psf.upfronthosting.co.za> Message-ID: <1275417481.6.0.247175279763.issue8870@psf.upfronthosting.co.za> New submission from anatoly techtonik : Running `python setup.py bdist_wininst --user-access-control=force` produces invalid installer that fails to install with the error message: Failed to start elevated process (ShellExecute returned 5) ---------- assignee: tarek components: Distutils messages: 106852 nosy: tarek, techtonik priority: normal severity: normal status: open title: --user-access-control=force produces invalid installer on Vista type: crash versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 20:56:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 01 Jun 2010 18:56:06 +0000 Subject: [issue6641] strptime doesn't support %z format ? In-Reply-To: <1249394677.85.0.527199310346.issue6641@psf.upfronthosting.co.za> Message-ID: <1275418566.42.0.898994361765.issue6641@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 21:08:13 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 01 Jun 2010 19:08:13 +0000 Subject: [issue8867] serve.py (using wsgiref) cannot serve Python docs under Python3 due to encoding issues In-Reply-To: <1275348157.42.0.660423745202.issue8867@psf.upfronthosting.co.za> Message-ID: <1275419293.41.0.492446594072.issue8867@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 21:08:26 2010 From: report at bugs.python.org (Jess Austin) Date: Tue, 01 Jun 2010 19:08:26 +0000 Subject: [issue5434] datetime.monthdelta In-Reply-To: <1236402290.49.0.02662803662.issue5434@psf.upfronthosting.co.za> Message-ID: <1275419306.35.0.0704336192377.issue5434@psf.upfronthosting.co.za> Changes by Jess Austin : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 21:22:19 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 01 Jun 2010 19:22:19 +0000 Subject: [issue8871] --user-access-control=auto has no effect In-Reply-To: <1275420139.65.0.104008426141.issue8871@psf.upfronthosting.co.za> Message-ID: <1275420139.65.0.104008426141.issue8871@psf.upfronthosting.co.za> New submission from anatoly techtonik : Seems like `--user-access-control=auto` option [1] introduced in Python 2.6 for to bdist_wininst has no effect on Vista. Test. 1. Get a Vista. 2. `hg clone http://bitbucket.org/techtonik/python-wget/` 3. Add {{{ scripts=['wget.py'], }}} to setup.py 4. `python setup.py bdist_wininst --user-access-control=auto` 5. Execute wget-0.6.win32.exe 6. Watch the error {{{ Access is denied. CreateFile (C:\Python27\Scripts\wget.py) }}} 7. Python is always installed for "All users" on Vista [1] http://docs.python.org/distutils/builtdist.html#vista-user-access-control-uac ---------- assignee: tarek components: Distutils messages: 106853 nosy: tarek, techtonik priority: normal severity: normal status: open title: --user-access-control=auto has no effect type: crash versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 21:59:37 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 01 Jun 2010 19:59:37 +0000 Subject: [issue2581] Vista UAC/elevation support for bdist_wininst In-Reply-To: <1207622587.48.0.467176827447.issue2581@psf.upfronthosting.co.za> Message-ID: <1275422377.7.0.584987491508.issue2581@psf.upfronthosting.co.za> anatoly techtonik added the comment: Doesn't seem to work anymore. Please, see: http://bugs.python.org/issue8870 http://bugs.python.org/issue8871 ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 22:08:59 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 01 Jun 2010 20:08:59 +0000 Subject: [issue7833] Bdist_wininst installers fail to load extensions built with Issue4120 patch In-Reply-To: <1265062373.01.0.461114831555.issue7833@psf.upfronthosting.co.za> Message-ID: <1275422939.68.0.348849292687.issue7833@psf.upfronthosting.co.za> anatoly techtonik added the comment: I see that this issue mentions --user-access-control option. Can somebody also check if issue8870 and issue8871 are related to this one? ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 22:11:03 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 01 Jun 2010 20:11:03 +0000 Subject: [issue8870] --user-access-control=force produces invalid installer on Vista In-Reply-To: <1275417481.6.0.247175279763.issue8870@psf.upfronthosting.co.za> Message-ID: <1275423063.46.0.214616984932.issue8870@psf.upfronthosting.co.za> anatoly techtonik added the comment: See also issue8871 and original report http://scons.tigris.org/issues/show_bug.cgi?id=2533 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 22:12:18 2010 From: report at bugs.python.org (Chris) Date: Tue, 01 Jun 2010 20:12:18 +0000 Subject: [issue8872] if/else stament bug? In-Reply-To: <1275423138.87.0.563453181958.issue8872@psf.upfronthosting.co.za> Message-ID: <1275423138.87.0.563453181958.issue8872@psf.upfronthosting.co.za> New submission from Chris : i am trying to learn to program in Python from a book on programming that says to use Python 3 i downloaded the Python 3.1.2 Windows x86 MSI installer for my machine aka an HP DV2500 running Win 7 it runs fine, but when i try to write the test program from my book i can't get past the if/else statement aka it gives me a syntax error when i get to the point of an if/else statement aka i program to ask the user to guess the number .. and then i try to create an if/else statement to print a you lose type statement if the input guess is not equal to the number specified by the program. for example i program the game to = 777 and print the you lose type message if the user's guess is not equal to 777, however i use the check module command from the run window in IDLE and it gave me a syntax error when i typed it the way the book said ... I've tried to figure this out myself but have had no success .. so i looked up if statements in the Python tutorials on python.org and tried that format and am still getting a syntax error ---------- components: IDLE, Windows files: hash.py messages: 106857 nosy: chrits55 priority: normal severity: normal status: open title: if/else stament bug? type: behavior versions: Python 3.1 Added file: http://bugs.python.org/file17515/hash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 22:25:46 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 01 Jun 2010 20:25:46 +0000 Subject: [issue8872] if/else stament bug? In-Reply-To: <1275423138.87.0.563453181958.issue8872@psf.upfronthosting.co.za> Message-ID: <1275423946.03.0.990642544983.issue8872@psf.upfronthosting.co.za> R. David Murray added the comment: The bug tracker is not the place to get help on learning python. Please try python-list or python-help (see mail.python.org). ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 22:30:48 2010 From: report at bugs.python.org (Mark Hammond) Date: Tue, 01 Jun 2010 20:30:48 +0000 Subject: [issue8870] --user-access-control=force produces invalid installer on Vista In-Reply-To: <1275417481.6.0.247175279763.issue8870@psf.upfronthosting.co.za> Message-ID: <1275424248.45.0.213908375532.issue8870@psf.upfronthosting.co.za> Mark Hammond added the comment: Is it possible the installer is being run from a network share? A comment from PC/bdist_wininst/install.c: // interesting failure scenario that has been seen: initial executable // runs from a network drive - but once elevated, that network share // isn't seen, and ShellExecute fails with SE_ERR_ACCESSDENIED. SE_ERR_ACCESSDENIED is 5, so googling for that might offer more insights. ---------- nosy: +mhammond _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 22:42:39 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 01 Jun 2010 20:42:39 +0000 Subject: [issue8857] socket.getaddrinfo needs tests In-Reply-To: <1275238691.69.0.194519582018.issue8857@psf.upfronthosting.co.za> Message-ID: <1275424959.86.0.316971541464.issue8857@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: A patch which adds some basic tests is in attachment. It basically tests what told in the documentation without going too deeper. ---------- Added file: http://bugs.python.org/file17516/getaddrinfotest.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 1 23:13:29 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 01 Jun 2010 21:13:29 +0000 Subject: [issue8864] multiprocessing: undefined struct/union member: msg_control In-Reply-To: <1275342146.08.0.266544809639.issue8864@psf.upfronthosting.co.za> Message-ID: <1275426809.49.0.721424174427.issue8864@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Most likely, we wouldn't be able to support recvmsg on Solaris. We would need to run configure tests to determine whether the APIs are available, and that would require defining _XOPEN_SOURCE in pyconfig.h.in, which (according to #1759169) we must not do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 00:18:46 2010 From: report at bugs.python.org (Hugh Secker-Walker) Date: Tue, 01 Jun 2010 22:18:46 +0000 Subject: [issue8873] Popen uses 333 times as much CPU as a shell pipe on Mac OS X In-Reply-To: <1275430726.49.0.216093303643.issue8873@psf.upfronthosting.co.za> Message-ID: <1275430726.49.0.216093303643.issue8873@psf.upfronthosting.co.za> New submission from Hugh Secker-Walker : Popen seems to be *very* costly, CPU wise, on Mac OS X. I need to read and process bytes from the stdout of another process that outputs bytes in a rate-limited fashion, e.g. 80000 bytes per second. If I use a shell pipeline and a simple Python script to read the bytes and log some details then top and time both agree that the Python script is using roughly 1 second of CPU time for every 2000 seconds of elapsed time. If I change the script to use Popen to start the first process and to read from proc.stdout, then top and time both agree that the Python script uses roughly 1 second of CPU time for every 6 seconds of elapsed time. That is, using Popen uses 333 times as much CPU as using a shell pipeline. In practice, this means that using a shell pipeline has no measureable impact on system performance, and I can run 300 concurrent pipeline jobs, whereas using Popen limits me to running 6 such concurrent jobs. This is on an up-to-date Mac OS X 10.5.8 system. The behavior happens with both the stock Python 2.5 from Apple and with Python 2.6 from Macports. On Ubuntu Linux the Popen solution is perhaps 2% slower than using a shell pipeline. I'll attach three scripts: bytestream -- simple program that sends bytes to its stdout pull0 -- Python script that reads its stdin and logs a couple of stats pull1 -- Python script that uses Popen to start bytestream and pulls from proc.stdout and runs abysmally slowly. Use this with a concurrent top to see the shell pipeline behavior: $ ./bytestream 80000 4 | time ./pull0 11000 Use this with a concurrent top to see the Popen behavior: $ time ./pull1 ./bytestream 80000 4 11000 In both cases you'll see that system and user time are approximately equal, but that they're roughly 333 times higher for pull1. Is there a clue in the fact that both times go up by about the same huge factor? -Hugh ---------- components: Library (Lib) files: bytestream messages: 106862 nosy: hughsw priority: normal severity: normal status: open title: Popen uses 333 times as much CPU as a shell pipe on Mac OS X type: behavior versions: Python 2.5, Python 2.6 Added file: http://bugs.python.org/file17517/bytestream _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 00:19:32 2010 From: report at bugs.python.org (Hugh Secker-Walker) Date: Tue, 01 Jun 2010 22:19:32 +0000 Subject: [issue8873] Popen uses 333 times as much CPU as a shell pipe on Mac OS X In-Reply-To: <1275430726.49.0.216093303643.issue8873@psf.upfronthosting.co.za> Message-ID: <1275430772.77.0.302387387888.issue8873@psf.upfronthosting.co.za> Changes by Hugh Secker-Walker : Added file: http://bugs.python.org/file17518/pull0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 00:20:11 2010 From: report at bugs.python.org (Hugh Secker-Walker) Date: Tue, 01 Jun 2010 22:20:11 +0000 Subject: [issue8873] Popen uses 333 times as much CPU as a shell pipe on Mac OS X In-Reply-To: <1275430726.49.0.216093303643.issue8873@psf.upfronthosting.co.za> Message-ID: <1275430811.66.0.91094680263.issue8873@psf.upfronthosting.co.za> Changes by Hugh Secker-Walker : Added file: http://bugs.python.org/file17519/pull1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 00:47:31 2010 From: report at bugs.python.org (John Levon) Date: Tue, 01 Jun 2010 22:47:31 +0000 Subject: [issue8864] multiprocessing: undefined struct/union member: msg_control In-Reply-To: <1275342146.08.0.266544809639.issue8864@psf.upfronthosting.co.za> Message-ID: <1275432451.03.0.645231734623.issue8864@psf.upfronthosting.co.za> John Levon added the comment: It's not clear why you'd need configure tests, but you could easily add the define in the body of the autoconf test AFAIK - is there a reason this is difficult? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 00:52:38 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 01 Jun 2010 22:52:38 +0000 Subject: [issue8870] --user-access-control=force produces invalid installer on Vista In-Reply-To: <1275417481.6.0.247175279763.issue8870@psf.upfronthosting.co.za> Message-ID: <1275432758.74.0.391480709888.issue8870@psf.upfronthosting.co.za> anatoly techtonik added the comment: It is local Ext2 partition system accessible through http://www.fs-driver.org/ on the same HDD as primary system partition. But there is definitely issue with difference between drives. There is no problem if the package is executed from the NTFS system drive - permissions asked as expected, no errors. On the Ext2 partition VLC and other installers that require elevated privileges fail. I do not remember any such problems last year, but it just can be that most applications on this drive are not windows specific or do not require elevated privileges. I still doesn't explain why this drive is threatened as "network". It would be nice to see how Windows treats other partition types - FAT32 or FAT16. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 00:54:06 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 01 Jun 2010 22:54:06 +0000 Subject: [issue8870] --user-access-control=force produces invalid installer on Vista In-Reply-To: <1275417481.6.0.247175279763.issue8870@psf.upfronthosting.co.za> Message-ID: <1275432846.92.0.537561727481.issue8870@psf.upfronthosting.co.za> anatoly techtonik added the comment: Attaching installer file for testing. ---------- Added file: http://bugs.python.org/file17520/wget-0.6.win32.exe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 01:17:40 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 01 Jun 2010 23:17:40 +0000 Subject: [issue8669] lack of bdist_rpm module raises error on 'setup.py --help-commands' In-Reply-To: <1273369633.98.0.458470159807.issue8669@psf.upfronthosting.co.za> Message-ID: <1275434260.56.0.0717721271543.issue8669@psf.upfronthosting.co.za> ?ric Araujo added the comment: Can you still reproduce it? I think it?s fixed by http://bitbucket.org/tarek/distutils2/changeset/19f1965a304d ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 01:41:06 2010 From: report at bugs.python.org (Koen van de Sande) Date: Tue, 01 Jun 2010 23:41:06 +0000 Subject: [issue7833] Bdist_wininst installers fail to load extensions built with Issue4120 patch In-Reply-To: <1265062373.01.0.461114831555.issue7833@psf.upfronthosting.co.za> Message-ID: <1275435666.47.0.441119286395.issue7833@psf.upfronthosting.co.za> Koen van de Sande added the comment: issue8870 and issue8871 are not related to this one. There, the UAC elevation fails, here the issue is with the MS runtimes, elevation is working fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 01:43:39 2010 From: report at bugs.python.org (Koen van de Sande) Date: Tue, 01 Jun 2010 23:43:39 +0000 Subject: [issue8870] --user-access-control=force produces invalid installer on Vista In-Reply-To: <1275417481.6.0.247175279763.issue8870@psf.upfronthosting.co.za> Message-ID: <1275435819.18.0.652610423672.issue8870@psf.upfronthosting.co.za> Koen van de Sande added the comment: This is listed as a known limitation of the Ext2 FS driver. From http://www.fs-driver.org/relnotes.html : === Running programs on an Ext2/Ext3 volume on Windows Vista Currently it is not possible to start a program on Vista if UAC is enabled and the program's executable is stored on an Ex2/Ext3 volume. An "invalid parameter" message box appears, but the program does not start. UAC is the feature of Vista that prompts the user to elevate the user privileges to administrator level when necessary. UAC is enabled by default. It is not recommended to disable it. The problem is caused by Vista's internals: There is some code that compares whether the name of the file system type is one of the following: "NTFS", "FAT", "FAT32", "CDFS", "NPFS", "MSFS" or "UDF". If there is a match, it is one of Microsoft's file system types and a lot of code is skipped in the Multiple UNC Provider (MUP) implementation of Vista. If the file system type is a third-party type, for example "Ext2", some code runs in the MUP of Vista that always generates an ERROR_INVALID_PARAMETER error status code due to a bug of Vista. === So the bug is in that FS (or in Windows if you will). It is not something Python can fix. ---------- nosy: +koen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 01:45:43 2010 From: report at bugs.python.org (Yaniv Aknin) Date: Tue, 01 Jun 2010 23:45:43 +0000 Subject: [issue8874] py3k documentation mentions deprecated opcode LOAD_LOCALS In-Reply-To: <1275435943.68.0.198055718764.issue8874@psf.upfronthosting.co.za> Message-ID: <1275435943.68.0.198055718764.issue8874@psf.upfronthosting.co.za> New submission from Yaniv Aknin : The documentation of the dis module mentions LOAD_LOCALS, which used to exist in Python 2.x and I believe was removed from py3k (doesn't appear in recent Include/opcode.h). The exact offending section is: http://docs.python.org/py3k/library/dis.html#opcode-LOAD_LOCALS I think it should just be edited out. ---------- assignee: docs at python components: Documentation messages: 106869 nosy: Yaniv.Aknin, docs at python priority: normal severity: normal status: open title: py3k documentation mentions deprecated opcode LOAD_LOCALS versions: Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 02:40:05 2010 From: report at bugs.python.org (Dan Buch) Date: Wed, 02 Jun 2010 00:40:05 +0000 Subject: [issue8591] update mkpkg to latest coding standards In-Reply-To: <1272727331.63.0.427295643421.issue8591@psf.upfronthosting.co.za> Message-ID: <1275439205.5.0.26690129864.issue8591@psf.upfronthosting.co.za> Dan Buch added the comment: @merwok much thanks for the feedback. After seeing how you're working via bitbucket I've decided to create a fresh fork from tarek and recreate my patch in multiple changesets all within the default branch. I'll update the issue when finished. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 03:09:30 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Jun 2010 01:09:30 +0000 Subject: [issue6521] Contradictory documentation for email.mime.text.MIMEText In-Reply-To: <1248009581.26.0.315231370095.issue6521@psf.upfronthosting.co.za> Message-ID: <1275440970.27.0.243638426931.issue6521@psf.upfronthosting.co.za> R. David Murray added the comment: This is not quite a duplicate of issue 1368247, but in the patch for that issue the doc changes should clarify the ambiguity. ---------- resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 04:01:21 2010 From: report at bugs.python.org (Michiel de Hoon) Date: Wed, 02 Jun 2010 02:01:21 +0000 Subject: [issue8868] Framework install does not behave as a framework In-Reply-To: <1275401583.76.0.0937518467482.issue8868@psf.upfronthosting.co.za> Message-ID: <1275444081.3.0.709810104968.issue8868@psf.upfronthosting.co.za> Michiel de Hoon added the comment: The patch solves the problem also on Mac OS X 10.5 (I tried 32-bits and 64-bits with the current python in trunk, after applying the patch). Thanks again! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 04:19:09 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Jun 2010 02:19:09 +0000 Subject: [issue1555842] email package and Unicode strings handling Message-ID: <1275445149.64.0.279491580132.issue1555842@psf.upfronthosting.co.za> R. David Murray added the comment: It took me a while to figure out why latin-1 works. I turns out to be an accident: latin-1 uses quoted-printable encoding, and the email quoprimime module accidentally manages to quote unicode characters in the latin-1 range. The Header example, as noted by the OP, is working as documented. This confusing interface isn't going to get fixed in the current email package. The equivalent email6 API will be cleaner. The MIMEText portion is a duplicate of issue 1368247. ---------- resolution: -> duplicate stage: unit test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 04:31:52 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 02 Jun 2010 02:31:52 +0000 Subject: [issue8788] urllib.urlencode documentation unclear on doseq In-Reply-To: <1274542983.4.0.702068503568.issue8788@psf.upfronthosting.co.za> Message-ID: <1275445912.19.0.752031506174.issue8788@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Agree to your concern that doseq parameter is not properly explained. Fixed in r81645, r81646, r81647 and r81648. ---------- nosy: +orsenthil resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 04:45:31 2010 From: report at bugs.python.org (INADA Naoki) Date: Wed, 02 Jun 2010 02:45:31 +0000 Subject: [issue8875] XML-RPC improvement is described twice. In-Reply-To: <1275446731.65.0.0364952757342.issue8875@psf.upfronthosting.co.za> Message-ID: <1275446731.65.0.0364952757342.issue8875@psf.upfronthosting.co.za> New submission from INADA Naoki : http://docs.python.org/dev/whatsnew/2.7.html#new-and-improved-modules "The XML-RPC client and server, provided by..." appears twice. ---------- assignee: docs at python components: Documentation messages: 106875 nosy: docs at python, naoki priority: normal severity: normal status: open title: XML-RPC improvement is described twice. versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 04:53:23 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 02 Jun 2010 02:53:23 +0000 Subject: [issue8875] XML-RPC improvement is described twice. In-Reply-To: <1275446731.65.0.0364952757342.issue8875@psf.upfronthosting.co.za> Message-ID: <1275447203.2.0.672581162715.issue8875@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +akuchling, ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 05:51:35 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 02 Jun 2010 03:51:35 +0000 Subject: [issue8868] Framework install does not behave as a framework In-Reply-To: <1275401583.76.0.0937518467482.issue8868@psf.upfronthosting.co.za> Message-ID: <1275450695.22.0.570592147062.issue8868@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Thanks for testing. I've applied the patch (with some additional documentation) in r81649 (2.7) and r81650 (3.2). Other versions are not affected. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 06:05:00 2010 From: report at bugs.python.org (Ionut Turturica) Date: Wed, 02 Jun 2010 04:05:00 +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: <1275451500.5.0.334374085999.issue8797@psf.upfronthosting.co.za> Ionut Turturica added the comment: Why would you waste the time and resources to test 5 times for a known to be wrong credential ?! This is not like in a browser where the user is presented with a dialog box 5 times and he/she can try different credentials. I don't see the point... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 06:13:35 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 02 Jun 2010 04:13:35 +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: <1275452015.19.0.252471762447.issue8797@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The point of retry is for auth failure, which can happen due to any reason. It is not just for a wrong password. I was thinking just doing a single verification and failing, but did find some resources (not just browsers) which adopt this approach of retry. BTW, Basic auth is gone now and Digest auth has some recommendations so I found its fine to do the same way as Digest auth does. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 08:38:51 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 02 Jun 2010 06:38:51 +0000 Subject: [issue8873] Popen uses 333 times as much CPU as a shell pipe on Mac OS X In-Reply-To: <1275430726.49.0.216093303643.issue8873@psf.upfronthosting.co.za> Message-ID: <1275460731.19.0.225900184175.issue8873@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Have you tried specifying a value for the bufsize argument to Popen? Either 1 for line buffering or e.g. 4096 for a decent size block buffering. ---------- nosy: +gregory.p.smith, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 10:39:01 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 02 Jun 2010 08:39:01 +0000 Subject: [issue1038909] pydoc method documentation lookup enhancement Message-ID: <1275467941.43.0.624264166945.issue1038909@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 10:40:03 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 02 Jun 2010 08:40:03 +0000 Subject: [issue1185124] pydoc doesn't find all module doc strings Message-ID: <1275468003.43.0.987136933461.issue1185124@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 14:25:39 2010 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Wed, 02 Jun 2010 12:25:39 +0000 Subject: [issue8848] Deprecate or remove "U" and "U#" formats of Py_BuildValue() In-Reply-To: <1275097128.66.0.216673219733.issue8848@psf.upfronthosting.co.za> Message-ID: <1275481539.54.0.156127799067.issue8848@psf.upfronthosting.co.za> Walter D?rwald added the comment: The code for case 's'/'z' in py3k is indeed the same as for case 'U'. The patch looks good to me. IMHO removing 'U' should only be done once Py2 is dead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 15:38:36 2010 From: report at bugs.python.org (samtygier) Date: Wed, 02 Jun 2010 13:38:36 +0000 Subject: [issue8876] distutils should not assume that hardlinks will work In-Reply-To: <1275485916.86.0.44676570948.issue8876@psf.upfronthosting.co.za> Message-ID: <1275485916.86.0.44676570948.issue8876@psf.upfronthosting.co.za> New submission from samtygier : distutils will currently try to use hardlinks if os has a 'link' attribute, however sometimes os.link() will fail, for example the filesystem may not support it (see attached traceback). in commands/sdist.py in make_release_tree() there is the test: if hasattr(os, 'link'): # can make hard links on this system link = 'hard' msg = "making hard links in %s..." % base_dir 'link' is then passed to copy_file() in file_util.py, which trusts that if link == 'hard', then hardlinking will work. there has been discussion in the past, but i dont think it has been fixed http://thread.gmane.org/gmane.comp.python.distutils.devel/2076 ---------- assignee: tarek components: Distutils files: hardlink-traceback.txt messages: 106881 nosy: samtygier, tarek priority: normal severity: normal status: open title: distutils should not assume that hardlinks will work versions: Python 2.6 Added file: http://bugs.python.org/file17521/hardlink-traceback.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 15:40:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 02 Jun 2010 13:40:59 +0000 Subject: [issue8876] distutils should not assume that hardlinks will work In-Reply-To: <1275485916.86.0.44676570948.issue8876@psf.upfronthosting.co.za> Message-ID: <1275486059.16.0.499281910791.issue8876@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: +Distutils2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 16:09:05 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Wed, 02 Jun 2010 14:09:05 +0000 Subject: [issue8877] 2to3 fixes stdlib import wrongly In-Reply-To: <1275487745.39.0.469741822942.issue8877@psf.upfronthosting.co.za> Message-ID: <1275487745.39.0.469741822942.issue8877@psf.upfronthosting.co.za> New submission from Dirkjan Ochtman : djc at enrai src $ ls -l test/* -rw-r--r-- 1 djc users 34 Jun 2 16:00 test/http.py -rw-r--r-- 1 djc users 0 Jun 2 16:00 test/__init__.py djc at enrai src $ cat test/http.py from httplib import BadStatusLine djc at enrai src $ 2to3 test/* RefactoringTool: Skipping implicit fixer: buffer RefactoringTool: Skipping implicit fixer: idioms RefactoringTool: Skipping implicit fixer: set_literal RefactoringTool: Skipping implicit fixer: ws_comma --- test/http.py (original) +++ test/http.py (refactored) @@ -1,1 +1,1 @@ -from httplib import BadStatusLine +from .http.client import BadStatusLine RefactoringTool: Files that need to be modified: RefactoringTool: test/http.py ... which doesn't work, of course. On the other hand, http.py is not in a package, it works correctly. If test/http.py is moved to test/blah.py instead, it also works correctly. 2to3 should be able to conclude that the "httplib" it was before did not refer to .http, but refered to http.client. ---------- components: 2to3 (2.x to 3.0 conversion tool) messages: 106882 nosy: djc priority: normal severity: normal status: open title: 2to3 fixes stdlib import wrongly versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 16:17:03 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Wed, 02 Jun 2010 14:17:03 +0000 Subject: [issue2459] speedup for / while / if with better bytecode In-Reply-To: <1206224909.42.0.227263347483.issue2459@psf.upfronthosting.co.za> Message-ID: <1275488223.89.0.827357919347.issue2459@psf.upfronthosting.co.za> Dirkjan Ochtman added the comment: Is this still relevant / will it get some love in the future? ---------- nosy: +djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 16:33:48 2010 From: report at bugs.python.org (Tal Einat) Date: Wed, 02 Jun 2010 14:33:48 +0000 Subject: [issue1766304] improve xrange.__contains__ Message-ID: <1275489228.47.0.542405176524.issue1766304@psf.upfronthosting.co.za> Tal Einat added the comment: I'd like to implement this for 2.x, if there's any chance of this being accepted. Is there still a chance of getting this into 2.7? This will be my first patch for the Python core, so please tell me if I'm missing something. Currently I'm thinking of: 1. starting with the original patch 2. applying the required changes as mentioned Mark Dickinson, looking at the the accepted 3.x patch for guidance 3. back-porting the tests 4. checking for later additional changes in the source history, and back-porting any such relevant changes ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 16:36:22 2010 From: report at bugs.python.org (samtygier) Date: Wed, 02 Jun 2010 14:36:22 +0000 Subject: [issue8876] distutils should not assume that hardlinks will work In-Reply-To: <1275485916.86.0.44676570948.issue8876@psf.upfronthosting.co.za> Message-ID: <1275489382.98.0.798193175281.issue8876@psf.upfronthosting.co.za> samtygier added the comment: here is a patch against http://svn.python.org/projects/python/trunk it moves the return statements into the individual file copying sections, and takes the final call to _copy_file_contents() out of the else. this allows an error in hardlinking to fall through by passing the exception. i have only tested on Linux. when running it still prints out "hard linking CHANGES -> pyzgoubi-0.4dev" because of how the message is generated in line 130. do you think this needs to be changed. do we need a "hardlinking failed, falling back to copy" message? it might cause unnecessary worry (distutils already suppresses tracebacks to avoid scaring non-python-programmers). i have a patch that applies to 2.6 as well, is there much chance of that being accepted? ---------- keywords: +patch Added file: http://bugs.python.org/file17522/distutil-hardlink-trunk.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 16:43:50 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 02 Jun 2010 14:43:50 +0000 Subject: [issue8876] distutils should not assume that hardlinks will work In-Reply-To: <1275485916.86.0.44676570948.issue8876@psf.upfronthosting.co.za> Message-ID: <1275489830.28.0.649889871202.issue8876@psf.upfronthosting.co.za> ?ric Araujo added the comment: Distutils is a special case: Many third-party code relies on its undocumented quirks and bugs, so it?s basically frozen. Some non-disruptive bugfixes are accepted, in which case the normal Python rules apply (e.g., no new features in 2.7 which is in beta). Work has been moved to Distutils2, which breaks compatibility in order to fix things and add needed features. If Tarek (maintainer of both packages) agrees this can go into Distutils, Benjamin Peterson (release manager) will say whether he agrees or not. Patient a while for Tarek to see this bug report, and thanks for your work :) ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 16:47:42 2010 From: report at bugs.python.org (Neil Crouch) Date: Wed, 02 Jun 2010 14:47:42 +0000 Subject: [issue8878] IDLE - str(integer) - TypeError: 'str' object is not callable In-Reply-To: <1275490062.25.0.32490402155.issue8878@psf.upfronthosting.co.za> Message-ID: <1275490062.25.0.32490402155.issue8878@psf.upfronthosting.co.za> New submission from Neil Crouch : Unable to convert int to str in idle but from the cmd python prompt it work sfine. ---------- components: IDLE files: IDLE_err.txt messages: 106887 nosy: Stranger381 priority: normal severity: normal status: open title: IDLE - str(integer) - TypeError: 'str' object is not callable type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file17523/IDLE_err.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 16:49:31 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 02 Jun 2010 14:49:31 +0000 Subject: [issue8878] IDLE - str(integer) - TypeError: 'str' object is not callable In-Reply-To: <1275490062.25.0.32490402155.issue8878@psf.upfronthosting.co.za> Message-ID: <1275490171.92.0.817850731031.issue8878@psf.upfronthosting.co.za> Ezio Melotti added the comment: You probably did str = '4bf3e914' at some point and overridden str. ---------- nosy: +ezio.melotti resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 16:52:40 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 02 Jun 2010 14:52:40 +0000 Subject: [issue8878] IDLE - str(integer) - TypeError: 'str' object is not callable In-Reply-To: <1275490062.25.0.32490402155.issue8878@psf.upfronthosting.co.za> Message-ID: <1275490360.73.0.874995475595.issue8878@psf.upfronthosting.co.za> Mark Dickinson added the comment: The code you show works fine for me. The error you're seeing is almost certainly the result of inadvertently using 'str' as a variable name earlier in the IDLE session: Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> str = '4bf3e914' >>> hell = str(123) Traceback (most recent call last): File "", line 1, in TypeError: 'str' object is not callable >>> help(str) no Python documentation found for '4bf3e914' ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 17:02:44 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 02 Jun 2010 15:02:44 +0000 Subject: [issue1766304] improve xrange.__contains__ Message-ID: <1275490964.4.0.635886479219.issue1766304@psf.upfronthosting.co.za> Mark Dickinson added the comment: A rapidly diminishing chance for 2.7, IMO. I wouldn't want to try to add this after the first release candidate, which is scheduled for June 5 (and I'm not sure I'll have time to review a patch between now and then). On the other hand, since this is pure optimization it might be acceptable for 2.7.1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 17:17:33 2010 From: report at bugs.python.org (Tal Einat) Date: Wed, 02 Jun 2010 15:17:33 +0000 Subject: [issue1766304] improve xrange.__contains__ Message-ID: <1275491853.16.0.0244433664453.issue1766304@psf.upfronthosting.co.za> Tal Einat added the comment: I'd really like to have this in 2.7. Is there no chance of getting it into 2.7 after rc1 is released? If so, I can have the patch ready by Friday 14:00 GMT, but if nobody will have time to review (and possibly commit) in time for RC1 I guess I'll take my time with this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 17:32:29 2010 From: report at bugs.python.org (Hugh Secker-Walker) Date: Wed, 02 Jun 2010 15:32:29 +0000 Subject: [issue8873] Popen uses 333 times as much CPU as a shell pipe on Mac OS X In-Reply-To: <1275430726.49.0.216093303643.issue8873@psf.upfronthosting.co.za> Message-ID: <1275492749.57.0.0370658207184.issue8873@psf.upfronthosting.co.za> Hugh Secker-Walker added the comment: OK. Using bufsize=4096 or bufsize=-1 eliminates the CPU-hogging problem on Mac OS X. Thank you. I have to say that the Popen() doc could be better. It says: "bufsize, if given, has the same meaning as the corresponding argument to the built-in open() function!" which implies behavior like open(), which is to use the system's default buffering, generally a good thing. I think the default of 0, meaning unbuffered, is a poor choice. I'm guessing many many Mac users are getting a big slowdown from this default behavior (as I've now discovered elsewhere in our project!). I request that you change the default to be the same as open(), i.e. use the system default. Barring that semantic change, please add a note to the doc: "Most users will want to set bufsize=4096 for pipe-like buffering, or bufsize=1 for line-based buffering." Thanks again for the quick response and resolution. -Hugh ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 17:34:35 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 02 Jun 2010 15:34:35 +0000 Subject: [issue1766304] improve xrange.__contains__ Message-ID: <1275492875.14.0.999454748426.issue1766304@psf.upfronthosting.co.za> Mark Dickinson added the comment: Benjamin? > I'd really like to have this in 2.7. Is there no chance of getting it > into 2.7 after rc1 is released? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 17:56:42 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 02 Jun 2010 15:56:42 +0000 Subject: [issue8873] Popen uses 333 times as much CPU as a shell pipe on Mac OS X In-Reply-To: <1275492749.57.0.0370658207184.issue8873@psf.upfronthosting.co.za> Message-ID: <1275494197.3180.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > I think the default of 0, meaning unbuffered, is a poor choice. So do I, but I'm not sure whether it's acceptable to change behaviour in a potentially incompatible way. > Barring that semantic change, please add a note to the doc: "Most > users will want to set bufsize=4096 for pipe-like buffering, or > bufsize=1 for line-based buffering." Yes, it deserves a documentation note indeed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 18:42:52 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 02 Jun 2010 16:42:52 +0000 Subject: [issue8870] --user-access-control=force produces invalid installer on Vista In-Reply-To: <1275417481.6.0.247175279763.issue8870@psf.upfronthosting.co.za> Message-ID: <1275496972.22.0.893734727591.issue8870@psf.upfronthosting.co.za> anatoly techtonik added the comment: Thanks for thorough explanation. Can somebody close it with some resolution like "Can't fix. OS level problem"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 18:51:23 2010 From: report at bugs.python.org (Skip Montanaro) Date: Wed, 02 Jun 2010 16:51:23 +0000 Subject: [issue8873] Popen uses 333 times as much CPU as a shell pipe on Mac OS X In-Reply-To: <1275430726.49.0.216093303643.issue8873@psf.upfronthosting.co.za> Message-ID: <1275497483.18.0.708907591538.issue8873@psf.upfronthosting.co.za> Skip Montanaro added the comment: This problem has come up before. It was a bug introduced I think when the subprocess module was first incorporated into Python. I don't recall if the default was changed in 2.7 or 3.x. Can you demonstrate the problem with Python 2.7 or 3.1? If not, I'd recommend this ticket just be closed. ---------- nosy: +skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 19:07:32 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 02 Jun 2010 17:07:32 +0000 Subject: [issue8877] 2to3 fixes stdlib import wrongly In-Reply-To: <1275487745.39.0.469741822942.issue8877@psf.upfronthosting.co.za> Message-ID: <1275498452.05.0.697710691604.issue8877@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Just in case it isn't clear: this is because of the order of fixes. The first fixer replaces httplib with http.client, then the next fixer thinks this is a relative import. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 19:09:19 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 02 Jun 2010 17:09:19 +0000 Subject: [issue8873] Popen uses 333 times as much CPU as a shell pipe on Mac OS X In-Reply-To: <1275497483.18.0.708907591538.issue8873@psf.upfronthosting.co.za> Message-ID: <1275498555.3180.6.camel@localhost.localdomain> Antoine Pitrou added the comment: > This problem has come up before. It was a bug introduced I think when > the subprocess module was first incorporated into Python. I don't > recall if the default was changed in 2.7 or 3.x. According to the docs it is still unbuffered by default. I've added a documentation note about performance issues in r81652. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 20:03:00 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 02 Jun 2010 18:03:00 +0000 Subject: [issue1766304] improve xrange.__contains__ In-Reply-To: <1275491853.16.0.0244433664453.issue1766304@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Wed, Jun 2, 2010 at 11:17 AM, Tal Einat wrote: .. > If so, I can have the patch ready by Friday 14:00 GMT, but if nobody will have time to review > (and possibly commit) in time for RC1 I guess I'll take my time with this. I'll review your patch, but why are you so eager to get this into 2.7? You realize that for integer x, x in xrange(a, b) is just another way to spell a <= x < b. What is your use case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 20:03:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 02 Jun 2010 18:03:23 +0000 Subject: [issue1766304] improve xrange.__contains__ Message-ID: <1275501803.22.0.830208969467.issue1766304@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 20:03:56 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 02 Jun 2010 18:03:56 +0000 Subject: [issue8877] 2to3 fixes stdlib import wrongly In-Reply-To: <1275487745.39.0.469741822942.issue8877@psf.upfronthosting.co.za> Message-ID: <1275501836.97.0.652809570021.issue8877@psf.upfronthosting.co.za> Benjamin Peterson added the comment: And this has been fixed in the lastest versions of 2to3. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 20:07:03 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 02 Jun 2010 18:07:03 +0000 Subject: [issue1766304] improve xrange.__contains__ In-Reply-To: Message-ID: <1275502018.3180.7.camel@localhost.localdomain> Antoine Pitrou added the comment: > > If so, I can have the patch ready by Friday 14:00 GMT, but if nobody will have time to review > > (and possibly commit) in time for RC1 I guess I'll take my time with this. > > I'll review your patch, but why are you so eager to get this into 2.7? > You realize that for integer x, x in xrange(a, b) is just another way > to spell a <= x < b. What is your use case? I really think this shouldn't go into 2.7. We certainly have better things to do than potentially break something for an almost useless non-feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 20:07:30 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 02 Jun 2010 18:07:30 +0000 Subject: [issue1766304] improve xrange.__contains__ Message-ID: <1275502050.83.0.293025647318.issue1766304@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Rescheduling to 3.2, if applicable (otherwise I suggest closing). ---------- versions: +Python 3.2 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 20:09:12 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 02 Jun 2010 18:09:12 +0000 Subject: [issue1766304] improve xrange.__contains__ Message-ID: <1275502152.68.0.230819078529.issue1766304@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I don't really see the point. I would be more inclined towards it if there was a patch already, but patching this doesn't strike me as a key feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 20:10:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 02 Jun 2010 18:10:18 +0000 Subject: [issue1766304] improve xrange.__contains__ In-Reply-To: <1275502050.83.0.293025647318.issue1766304@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: This is already in 3.x. The only reason I can think of to get this in 2.7 is to have fewer performance surprises between 2.x and 3.x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 20:10:32 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 02 Jun 2010 18:10:32 +0000 Subject: [issue8874] py3k documentation mentions deprecated opcode LOAD_LOCALS In-Reply-To: <1275435943.68.0.198055718764.issue8874@psf.upfronthosting.co.za> Message-ID: <1275502232.16.0.0084436930389.issue8874@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thanks. Removed in r81656. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 20:14:43 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 02 Jun 2010 18:14:43 +0000 Subject: [issue5434] datetime.monthdelta In-Reply-To: <1236402290.49.0.02662803662.issue5434@psf.upfronthosting.co.za> Message-ID: <1275502483.77.0.152802810593.issue5434@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Rejecting this for stdlib. A 3rd party package is available at http://pypi.python.org/pypi?name=MonthDelta&:action=display . ---------- stage: -> committed/rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 20:18:42 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 02 Jun 2010 18:18:42 +0000 Subject: [issue1766304] improve xrange.__contains__ In-Reply-To: Message-ID: <1275502717.3180.8.camel@localhost.localdomain> Antoine Pitrou added the comment: Le mercredi 02 juin 2010 ? 18:10 +0000, Alexander Belopolsky a ?crit : > This is already in 3.x. The only reason I can think of to get this in > 2.7 is to have fewer performance surprises between 2.x and 3.x. Since you are supposed to forward-port from 2.x and 3.x, the surprise will be a good one anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 20:47:38 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 02 Jun 2010 18:47:38 +0000 Subject: [issue8879] Implement os.link on Windows In-Reply-To: <1275504458.06.0.136411734773.issue8879@psf.upfronthosting.co.za> Message-ID: <1275504458.06.0.136411734773.issue8879@psf.upfronthosting.co.za> New submission from Brian Curtin : Add os.link support for Windows (mostly a reminder to myself to finish the patch I have) ---------- assignee: brian.curtin components: Extension Modules, Windows messages: 106908 nosy: brian.curtin priority: normal severity: normal stage: needs patch status: open title: Implement os.link on Windows type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 21:51:26 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 02 Jun 2010 19:51:26 +0000 Subject: [issue8870] --user-access-control=force produces invalid installer on Vista In-Reply-To: <1275417481.6.0.247175279763.issue8870@psf.upfronthosting.co.za> Message-ID: <1275508286.31.0.25490446936.issue8870@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 22:08:19 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 02 Jun 2010 20:08:19 +0000 Subject: [issue8866] socket.getaddrinfo() should support keyword arguments In-Reply-To: <1275346212.88.0.3146354655.issue8866@psf.upfronthosting.co.za> Message-ID: <1275509299.01.0.620807770539.issue8866@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: The patch in attachment implements keyword arguments. ---------- keywords: +patch Added file: http://bugs.python.org/file17524/kwargs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 22:30:58 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 02 Jun 2010 20:30:58 +0000 Subject: [issue8870] --user-access-control=force produces invalid installer on Vista In-Reply-To: <1275417481.6.0.247175279763.issue8870@psf.upfronthosting.co.za> Message-ID: <1275510658.88.0.0316425617173.issue8870@psf.upfronthosting.co.za> anatoly techtonik added the comment: Is it possible to detect this situation and display more user-friendly error message with a reference to this issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 22:49:53 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 02 Jun 2010 20:49:53 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275511793.79.0.181481529342.issue5094@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Here is my first attempt to implement fixed offset timezone type. The patch is based on Brett's next-patch.txt and while I changed the type name from datetime.UTC to datetime.timezone, I did not change the name of the related C structures. I would like to ask for comments on the following questions: 1. How to call the new type? I like "timezone" because it is likely to be the only concrete tzinfo subclass in datetime module, so we don't really need to call it fixedoffsetfromutctimezone. 2. Do we want to add a dst indicator and altname attributes? I would say: no. I would rather treat DST as a different fixed offset timezone. 3. I am not quite happy about having to specify offset in minutes. I think timezone(hours[, minutes]) may be clearer. Alternatively we may just take offset as a timedelta. Note issue5288. There is some interest in supporting sub-minute timezones. 4. I have fixed a reference leak in utcnow, but I am still against giving it tz_aware argument. ---------- Added file: http://bugs.python.org/file17525/issue5094.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 23:01:38 2010 From: report at bugs.python.org (Edwin Pozharski) Date: Wed, 02 Jun 2010 21:01:38 +0000 Subject: [issue8880] ConfigParser.set does not convert non-string values In-Reply-To: <1275512498.11.0.636017814706.issue8880@psf.upfronthosting.co.za> Message-ID: <1275512498.11.0.636017814706.issue8880@psf.upfronthosting.co.za> New submission from Edwin Pozharski : set() method of ConfigParser accepts boolean True/False as values at runtime without converting them to strings internally. As a result, getboolean() method reports the following error File "/usr/lib/python2.6/ConfigParser.py", line 350, in getboolean if v.lower() not in self._boolean_states: AttributeError: 'bool' object has no attribute 'lower' since it expects get() method to return strings. (Same problem occurs if other types are used, int/float, etc) Altering set() behavior may be not the best thing to do, I'd rather suggest that getboolean() converts the get() output to string. Of course, the way to avoid this problem is always convert values submitted to set() to strings, but it's a hard-to-catch bug. In my case, I was stuck with problematic configuration when assigning values to wx.CheckBox.GetValue(), which returns boolean. ---------- messages: 106912 nosy: Edwin.Pozharski priority: normal severity: normal status: open title: ConfigParser.set does not convert non-string values type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 23:08:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 02 Jun 2010 21:08:05 +0000 Subject: [issue8880] ConfigParser.set does not convert non-string values In-Reply-To: <1275512498.11.0.636017814706.issue8880@psf.upfronthosting.co.za> Message-ID: <1275512885.87.0.531743561958.issue8880@psf.upfronthosting.co.za> ?ric Araujo added the comment: Would that mean that booleans would be converted to strings on set and converted back on get? Seems wasteful. (I?ve changed the version field for this bug. Its meaning is not ?versions this applies to? but ?versions that will get a fix?, and 3.2 is the only active branch now. Some bugfixes may still go into 2.7.) ---------- components: +Library (Lib) nosy: +merwok versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 23:24:02 2010 From: report at bugs.python.org (Brett Cannon) Date: Wed, 02 Jun 2010 21:24:02 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275513842.77.0.021274202719.issue5094@psf.upfronthosting.co.za> Brett Cannon added the comment: My thoughts on Alexander's questions: 1. Call it FixedTimezone or something (remember it has to be CapWords). Calling it simply Timezone does not convey the fact that DST is not supported and people might naively think it will. Its limited abilities should be portrayed in the name. 2. Keep the class dead-simple. The primary motivator is to support UTC, maybe the %z directive for strptime. Otherwise everything else should be left out of the stdlib and let third-parties manage it as they will be the ones that need to manage the bazillion timezone instances they need. We don't need to dictate an interface to them. 3. Taking a timedelta makes sense since the class represents the fixed time offset from UTC. As for the tz_aware argument to utcnow and friends, I am fine with letting go of them if we have a utc attribute on datetime and we simply document that to get a UTC-aware value do ``now(datetime.utc)`` and consider deprecating utcnow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 23:27:26 2010 From: report at bugs.python.org (Christoph Gohlke) Date: Wed, 02 Jun 2010 21:27:26 +0000 Subject: [issue6470] Tkinter import fails when running Python.exe from a network share In-Reply-To: <1247430164.29.0.0724763544583.issue6470@psf.upfronthosting.co.za> Message-ID: <1275514046.64.0.450423883571.issue6470@psf.upfronthosting.co.za> Christoph Gohlke added the comment: Any chance to get this fixed in 2.7? On Windows, the bug prevents some popular applications and packages, such as pymol and matplotlib, to be used when installed on network shares, as is common practice in computer labs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 23:31:28 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 02 Jun 2010 21:31:28 +0000 Subject: [issue8881] socket.getaddrinfo() should return named tuples In-Reply-To: <1275514288.42.0.225628200657.issue8881@psf.upfronthosting.co.za> Message-ID: <1275514288.42.0.225628200657.issue8881@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : As of right now socket.getaddrinfo() returns a sequence of 5-tuples reflecting family, type, protocol, canonname, and address of a socket: >>> socket.getaddrinfo(None, 0) [(10, 1, 6, '', ('::1', 0, 0, 0)), (10, 2, 17, '', ('::1', 0, 0, 0)), (10, 3, 0, '', ('::1', 0, 0, 0)), (2, 1, 6, '', ('127.0.0.1', 0)), (2, 2, 17, '', ('127.0.0.1', 0)), (2, 3, 0, '', ('127.0.0.1', 0))] For readability it would be good if they were named tuples instead: >>> socket.getaddrinfo(None, 0)[0] addr_info(family=10, type=1, protocol=6, canonname='', address=('::1', 0, 0, 0)) Optionally, integers can be replaced by socket constant names: >>> socket.getaddrinfo(None, 0)[0] addr_info(family=socket.AF_INET6, type=socket.SOCK_STREAM, protocol=socket.IPPROTO_TCP, canonname='', address=('::1', 0, 0, 0)) ---------- components: Library (Lib) messages: 106916 nosy: exarkun, giampaolo.rodola, pitrou priority: normal severity: normal status: open title: socket.getaddrinfo() should return named tuples versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 23:33:15 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 02 Jun 2010 21:33:15 +0000 Subject: [issue8866] socket.getaddrinfo() should support keyword arguments In-Reply-To: <1275346212.88.0.3146354655.issue8866@psf.upfronthosting.co.za> Message-ID: <1275514395.22.0.994378159429.issue8866@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Created issue 8881 to treat the named tuples issue separately. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 23:33:19 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Jun 2010 21:33:19 +0000 Subject: [issue8880] ConfigParser.set does not convert non-string values In-Reply-To: <1275512498.11.0.636017814706.issue8880@psf.upfronthosting.co.za> Message-ID: <1275514399.16.0.8441694431.issue8880@psf.upfronthosting.co.za> R. David Murray added the comment: Use SafeConfigParser instead, then you can't make the mistake of passing non-strings to set. We really should update the docs so that ConfigParser is doced only in a 'deprecated' section. But that's a different issue. (Care to open it, merwok? :) ---------- nosy: +r.david.murray resolution: -> wont fix stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 23:47:22 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 02 Jun 2010 21:47:22 +0000 Subject: [issue8879] Implement os.link on Windows In-Reply-To: <1275504458.06.0.136411734773.issue8879@psf.upfronthosting.co.za> Message-ID: <1275515242.92.0.926711054703.issue8879@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 2 23:52:51 2010 From: report at bugs.python.org (Eric Smith) Date: Wed, 02 Jun 2010 21:52:51 +0000 Subject: [issue8881] socket.getaddrinfo() should return named tuples In-Reply-To: <1275514288.42.0.225628200657.issue8881@psf.upfronthosting.co.za> Message-ID: <1275515571.26.0.575076245422.issue8881@psf.upfronthosting.co.za> Eric Smith added the comment: Keep in mind this isn't an entirely backwards compatible change. See issue 8413, for example. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 00:02:12 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 02 Jun 2010 22:02:12 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1275513842.77.0.021274202719.issue5094@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Wed, Jun 2, 2010 at 5:24 PM, Brett Cannon wrote: .. > 1. Call it FixedTimezone or something (remember it has to be CapWords). I thought consistency within module trumps PEP 8 naming standards. The datetime module (for better or worse) uses lowercase names for its types: date, time, datetime, tzinfo. Shouldn't the new type follow the suit? (This will also avoid a source of typos TimeZone vs. TimeZone). I don't like "fixed timezone" - it is not clear what it is fixed: offset, geographical location or historical set of rules. I think we should promote the notion that timezone is just an offset. EST is -5 hours, EDT is -4. New York uses EST in winter and EDT in summer. A zoneinfo database (external to python) is a mapping from place and time to timezone. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 00:05:51 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 02 Jun 2010 22:05:51 +0000 Subject: [issue6470] Tkinter import fails when running Python.exe from a network share In-Reply-To: <1247430164.29.0.0724763544583.issue6470@psf.upfronthosting.co.za> Message-ID: <1275516351.61.0.179665974139.issue6470@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can somebody please explain how the test and the reported bug are related? The patch seems to deal with paths that have "UNC" in them; and the test seems not to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 00:08:05 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 02 Jun 2010 22:08:05 +0000 Subject: [issue6470] Tkinter import fails when running Python.exe from a network share In-Reply-To: <1247430164.29.0.0724763544583.issue6470@psf.upfronthosting.co.za> Message-ID: <1275516485.28.0.532491795231.issue6470@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Also, cgohlke, can you please provide complete, detailed instructions on how to reproduce this issue? How do I get python.exe into \\Server\Share in the first place? And why did you not map a network drive letter? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 00:26:22 2010 From: report at bugs.python.org (Brett Cannon) Date: Wed, 02 Jun 2010 22:26:22 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275517582.78.0.459951794992.issue5094@psf.upfronthosting.co.za> Brett Cannon added the comment: Forgot about datetime breaking the PEP 8 rules. You're right, consistency wins. As for fixedtimezone being odd, that's why my mind went with FixedOffsetTimezone to start, but that doesn't go with the naming of the module, and fixedoffsettimezone is just hard to read. As long as the documentation is VERY clear that the timezone class only supports a fixed offset from UTC and nothing else I can live with the "timezone". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 00:26:28 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 02 Jun 2010 22:26:28 +0000 Subject: [issue1368247] unicode in email.MIMEText and email/Charset.py Message-ID: <1275517588.58.0.12880379504.issue1368247@psf.upfronthosting.co.za> R. David Murray added the comment: Committed to 2.7 in r81658 and 2.6 in r81659. I'm leaving this open for the moment because while py3 doesn't have this problem, the tests should still pass and they don't. ---------- stage: patch review -> committed/rejected versions: -Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 00:49:37 2010 From: report at bugs.python.org (David Watson) Date: Wed, 02 Jun 2010 22:49:37 +0000 Subject: [issue6560] socket sendmsg(), recvmsg() methods In-Reply-To: <1248424219.19.0.278000580973.issue6560@psf.upfronthosting.co.za> Message-ID: <1275518977.23.0.723998927336.issue6560@psf.upfronthosting.co.za> David Watson added the comment: OK. I don't like creating/using a Google account, but here it is: http://codereview.appspot.com/1487041/show ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 00:50:09 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 02 Jun 2010 22:50:09 +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: <1275519009.24.0.608239947113.issue1820@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 00:57:05 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 02 Jun 2010 22:57:05 +0000 Subject: [issue6470] Tkinter import fails when running Python.exe from a network share In-Reply-To: <1247430164.29.0.0724763544583.issue6470@psf.upfronthosting.co.za> Message-ID: <1275519425.05.0.718070740913.issue6470@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: to reproduce: on Vista, start \\%COMPUTERNAME%\c$\python26\python.exe -c "import Tkinter; print Tkinter" In this case, the path returned by GetFinalPathNameByHandle starts with \\?\UNC\. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 01:02:13 2010 From: report at bugs.python.org (Christoph Gohlke) Date: Wed, 02 Jun 2010 23:02:13 +0000 Subject: [issue6470] Tkinter import fails when running Python.exe from a network share In-Reply-To: <1247430164.29.0.0724763544583.issue6470@psf.upfronthosting.co.za> Message-ID: <1275519733.07.0.465892593629.issue6470@psf.upfronthosting.co.za> Christoph Gohlke added the comment: Btw, this bug is also present in Python 3.1, of course when using tkinter instead of Tkinter. Here is how to reproduce the bug on your local system: Install python-2.7b2.msi into C:\Python27. Then open a command prompt with administrator privileges and start python.exe as follows: \\%COMPUTERNAME%\C$\Python27\python.exe -c "from Tkinter import *" Traceback (most recent call last): File "", line 1, in File "\\KLAPAUCIUS\C$\Python27\lib\lib-tk\Tkinter.py", line 38, in import FixTk File "\\KLAPAUCIUS\C$\Python27\lib\lib-tk\FixTk.py", line 56, in for name in os.listdir(prefix): WindowsError: [Error 3] The system cannot find the path specified: 'UNC\\KLAPAUCIUS\\C$\\Python27\\tcl/*.*' It does not matter whether the network share is mapped as a drive letter or not, the Tkinter import fails with the same WindowsError. Also mounted network drives do have problems with UAC. A local Python installation can simply be copied to a network share and used from there from several other computers. All that eventually needs attention is the python*.dll, some scripts, and the MSVC runtime. I have deployed Python like this for years in several computer labs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 02:11:33 2010 From: report at bugs.python.org (Christoph Gohlke) Date: Thu, 03 Jun 2010 00:11:33 +0000 Subject: [issue6470] Tkinter import fails when running Python.exe from a network share In-Reply-To: <1247430164.29.0.0724763544583.issue6470@psf.upfronthosting.co.za> Message-ID: <1275523893.64.0.824392757878.issue6470@psf.upfronthosting.co.za> Christoph Gohlke added the comment: > The patch seems to deal with paths that have "UNC" in them; > and the test seems not to. The UNCW path is a result of the call to ctypes.windll.kernel32.GetFinalPathNameByHandleW() in FixTk.py, which translates "\\Server\Share\File" paths to "\\?\UNC\Server\Share\File". Simply removing the leading "\\?\" from the UNCW path, as it is done in Python 2.6.5 and 2.7b2 FixTk.py, results in an invalid "UNC\Server\Share\File" path. The proposed patch removes "UNC" and prepends a "\\", which gives a valid "\\Server\Share\File" path. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 02:42:35 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jun 2010 00:42:35 +0000 Subject: [issue5423] Exception raised when attempting to call set_charset on an email.mime.multipart once sub-parts have been attached In-Reply-To: <1236258073.44.0.224242973923.issue5423@psf.upfronthosting.co.za> Message-ID: <1275525755.83.0.0714523589792.issue5423@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: -> r.david.murray nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 03:27:50 2010 From: report at bugs.python.org (Edward Pilatowicz) Date: Thu, 03 Jun 2010 01:27:50 +0000 Subject: [issue8882] socketmodule.c`getsockaddrarg() should not check the length of sun_path In-Reply-To: <1275528470.51.0.813873994417.issue8882@psf.upfronthosting.co.za> Message-ID: <1275528470.51.0.813873994417.issue8882@psf.upfronthosting.co.za> New submission from Edward Pilatowicz : recently i was writing some python code that attempted to bind a unix domain socket to a long filesystem path. this code was failing and telling me that the path name was too long. tracing python i saw that it wasn't event issuing a system call for my bind() request. eventually i tracked down the problem to socketmodule.c`getsockaddrarg(): http://svn.python.org/view/python/trunk/Modules/socketmodule.c?view=markup there we see that getsockaddrarg() checks to verify that the specified path is less than "sizeof addr->sun_path", where addr is a struct sockaddr_un. this seems incorrect to me. on most systems sockaddr_un.sun_path is defined as a small character array. this limit is an ancient bit of unix legacy and most modern systems do not actually limit domain socket names to a path as short as sun_path. on solaris the real limit is MAXPATHLEN, there by allowing unix domain sockets to be bound to any filesystem path. the posix specification also says that users of the sockaddr_un structure should not make any assumptions about the maximum supported length of sun_path. from: http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/un.h.html we have: char sun_path[] socket pathname ... The size of sun_path has intentionally been left undefined. This is because different implementations use different sizes. For example, 4.3 BSD uses a size of 108, and 4.4 BSD uses a size of 104. Since most implementations originate from BSD versions, the size is typically in the range 92 to 108. Applications should not assume a particular length for sun_path or assume that it can hold {_POSIX_PATH_MAX} characters (255). hence, it seems to me that python should not actually be doing any size checks on the path passed to getsockaddrarg(). instead is should dynamically allocate a sockaddr_un large enough to hold whatever string was pass in. this structure can then be passed on to system calls which can they check if the specified path is of a supported length. (if you look at the posix definitions for bind() and connect() you'll see that they both can return ENAMETOOLONG if the passed in pathname is too large.) ---------- components: None messages: 106929 nosy: Edward.Pilatowicz priority: normal severity: normal status: open title: socketmodule.c`getsockaddrarg() should not check the length of sun_path type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 04:07:05 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jun 2010 02:07:05 +0000 Subject: [issue1368247] unicode in email.MIMEText and email/Charset.py Message-ID: <1275530825.54.0.458450517193.issue1368247@psf.upfronthosting.co.za> R. David Murray added the comment: OK, py3k now passes all but one of the tests, and I've disabled that one pending email6 since fixing it would break backward compatibility within the 3.x series. The fix is different, doing the encoding to output_charset just before calling base64mime. This makes me think that quopri in py3k probably isn't working right, but that's a different issue. I did not forward port the doc changes as they are inappropriate for py3k. py3k patched in r81660, 3.1 in r81661. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 08:56:56 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 03 Jun 2010 06:56:56 +0000 Subject: [issue8882] socketmodule.c`getsockaddrarg() should not check the length of sun_path In-Reply-To: <1275528470.51.0.813873994417.issue8882@psf.upfronthosting.co.za> Message-ID: <4C075234.1020503@v.loewis.de> Martin v. L?wis added the comment: > Applications should not assume a particular length for sun_path or > assume that it can hold {_POSIX_PATH_MAX} characters (255). > > hence, it seems to me that python should not actually be doing any size > checks on the path passed to getsockaddrarg(). You are misinterpreting the specification. What they say is that the right way of doing it is the way Python currently does it. "not assume a particular length" means "not assume, in the source code, and specific fixed length, such as 108, or 255". Now, if the program must not assume any specific length, it must use sizeof instead to determine how large sun_path is. If your operating system declares sun_path to be shorter than the strings it actually supports, complain to your operating system vendor that they fix their header files. ---------- nosy: +loewis title: socketmodule.c`getsockaddrarg() should not check the length of sun_path -> socketmodule.c`getsockaddrarg() should not check the length of sun_path _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 09:30:15 2010 From: report at bugs.python.org (Tal Einat) Date: Thu, 03 Jun 2010 07:30:15 +0000 Subject: [issue1766304] improve xrange.__contains__ Message-ID: <1275550215.68.0.0403243027248.issue1766304@psf.upfronthosting.co.za> Tal Einat added the comment: In my mind, the reason for this patch is that xrange/range can be thought of as a lazy list of integers. However without this patch, membership checking was done trivially instead of in a "smart/lazy" manner, which is unexpected for users. Finally, conditions such as "num in xrange(3, 1000, 5)" are not trivial to express correctly otherwise, and even more so for negative steps. This patch is already implemented and accepted for 3.2, I just wish to back-port it to 2.7 which should be fairly straightforward. I'll just have a patch ready by tomorrow, and hope that someone finds the time to review it and possibly commit it in time for rc1. I realize that this is a minor change at the last minute. I will certainly understand if the people responsible for preparing rc1 are too busy for this. ---------- versions: +Python 2.7 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 09:31:49 2010 From: report at bugs.python.org (Yuriy Taraday) Date: Thu, 03 Jun 2010 07:31:49 +0000 Subject: [issue8883] Proxy exception lookup fails on MacOS in urllib. In-Reply-To: <1275550309.78.0.672707816894.issue8883@psf.upfronthosting.co.za> Message-ID: <1275550309.78.0.672707816894.issue8883@psf.upfronthosting.co.za> New submission from Yuriy Taraday : I have straight IP in my proxy exception list like "192.168.0.2" without mask specification. The proxy_bypass_macosx_sysconf function verifies each item in this list by regexp r"(\d+(?:\.\d+)*)(/\d+)?" that produces two groups: IP and mask. The mask can be None here (as in my case) and this None case isn't handled, so urllib crashes with "TypeError: 'NoneType' object is unsubscriptable". I couldn't find specification of MacOS proxy exceptions list, so I don't know whether you can use just IP or prefix without mask specification. If you can, here is small patch that adds nesessary check and guesses mask if it is not specified. If you cannot, the last question mark should be removed from regex. ---------- components: Library (Lib) files: urllib.py.diff keywords: patch messages: 106933 nosy: yorik.sar priority: normal severity: normal status: open title: Proxy exception lookup fails on MacOS in urllib. type: crash versions: Python 2.6 Added file: http://bugs.python.org/file17526/urllib.py.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 11:33:24 2010 From: report at bugs.python.org (Gaz Davidson) Date: Thu, 03 Jun 2010 09:33:24 +0000 Subject: [issue8884] Allow binding to local address in httplib / http.client In-Reply-To: <1275557604.57.0.107374927825.issue8884@psf.upfronthosting.co.za> Message-ID: <1275557604.57.0.107374927825.issue8884@psf.upfronthosting.co.za> New submission from Gaz Davidson : The option to bind to a local IP address when creating an HTTP connection would be very useful for web testing tools like FunkLoad and webunit. For example in FunkLoad it would allow us to run tests with IP-based load balancing. ---------- components: IO messages: 106934 nosy: Gaz.Davidson priority: normal severity: normal status: open title: Allow binding to local address in httplib / http.client type: feature request versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 11:48:46 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 03 Jun 2010 09:48:46 +0000 Subject: [issue7724] setup.py ignores SDK root on OSX In-Reply-To: <1263740773.9.0.498921408121.issue7724@psf.upfronthosting.co.za> Message-ID: <1275558526.03.0.522035955062.issue7724@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've applied a new version of the patch in r81662. I'll be monitoring the buildbot farm to ensure that any issues that might crop up get fixed ASAP. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 12:18:11 2010 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Thu, 03 Jun 2010 10:18:11 +0000 Subject: [issue8833] tarfile: broken hardlink handling and testcase. In-Reply-To: <1274976429.42.0.686584361847.issue8833@psf.upfronthosting.co.za> Message-ID: <1275560291.15.0.13039348457.issue8833@psf.upfronthosting.co.za> Lars Gust?bel added the comment: Thank you very much for this valuable report. Fixed in r81663-81666. ---------- resolution: -> accepted status: open -> closed versions: +Python 2.6, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 12:31:42 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 03 Jun 2010 10:31:42 +0000 Subject: [issue3864] 26.rc1: test_signal issue on FreeBSD 6.3 In-Reply-To: <1221392514.26.0.835541576459.issue3864@psf.upfronthosting.co.za> Message-ID: <1275561102.26.0.617425562276.issue3864@psf.upfronthosting.co.za> Stefan Krah added the comment: On 2.6, the tests aren't skipped if test_support.verbose is 0. David, if the fix looks good to you I can apply it. test_itimer_virtual: timeout: likely cause: machine too slow or load too high. test test_signal failed -- Traceback (most recent call last): File "/usr/home/db3l/buildarea/2.6.bolen-freebsd/build/Lib/test/test_signal.py", line 183, in test_main self.fail(tb) AssertionError: Traceback (most recent call last): File "/usr/home/db3l/buildarea/2.6.bolen-freebsd/build/Lib/test/test_signal.py", line 166, in test_main self.run_test() File "/usr/home/db3l/buildarea/2.6.bolen-freebsd/build/Lib/test/test_signal.py", line 99, in run_test self.assertTrue(self.a_called) File "/usr/home/db3l/buildarea/2.6.bolen-freebsd/build/Lib/unittest.py", line 325, in failUnless if not expr: raise self.failureException, msg AssertionError ---------- keywords: +patch nosy: +skrah resolution: fixed -> status: closed -> open Added file: http://bugs.python.org/file17527/issue3864-skip-when-not-verbose.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 13:14:11 2010 From: report at bugs.python.org (Mark Nottingham) Date: Thu, 03 Jun 2010 11:14:11 +0000 Subject: [issue8885] markerbase declaration errors aren't recoverable In-Reply-To: <1275563651.6.0.351540013915.issue8885@psf.upfronthosting.co.za> Message-ID: <1275563651.6.0.351540013915.issue8885@psf.upfronthosting.co.za> New submission from Mark Nottingham : In markupbase.py's ParserBase.parse_declaration, an unexpected character is caught like this: else: self.error( "unexpected %r char in declaration" % rawdata[j]) However, the position (j) isn't updated, which means that error() will be called again once it returns. For example, this declaration: (which I think is generated by MS Office) will trigger this behaviour. Two possible resolutions: 1) increment J and try the next character in this case 2) document that error() is not recoverable; i.e., it MUST raise an exception. My preference is strongly for #1 (as HTML parsing should be forgiving, and HTMLParser is based upon markerbase). ---------- components: Library (Lib) messages: 106938 nosy: mnot priority: normal severity: normal status: open title: markerbase declaration errors aren't recoverable type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 13:21:39 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 03 Jun 2010 11:21:39 +0000 Subject: [issue7384] curses crash on FreeBSD In-Reply-To: <1259006628.77.0.121355571453.issue7384@psf.upfronthosting.co.za> Message-ID: <1275564099.43.0.449773112665.issue7384@psf.upfronthosting.co.za> Stefan Krah added the comment: I think it would be nice to get this into 2.7. I don't expect buildbot failures, since the 2.7 patch is essentially the same as the py3k version, which has been tested extensively. ---------- Added file: http://bugs.python.org/file17528/issue7384-5-trunk.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 13:35:32 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 03 Jun 2010 11:35:32 +0000 Subject: [issue7384] curses crash on FreeBSD In-Reply-To: <1259006628.77.0.121355571453.issue7384@psf.upfronthosting.co.za> Message-ID: <1275564932.08.0.298108149058.issue7384@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I think it would be nice to get this into 2.7. Agreed. I think you should go ahead and commit it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 13:39:27 2010 From: report at bugs.python.org (Erik Carstensen) Date: Thu, 03 Jun 2010 11:39:27 +0000 Subject: [issue8886] zipfile.ZipExtFile should be a context manager In-Reply-To: <1275565167.77.0.94387257463.issue8886@psf.upfronthosting.co.za> Message-ID: <1275565167.77.0.94387257463.issue8886@psf.upfronthosting.co.za> New submission from Erik Carstensen : It's nice that ZipFile is a context manager in 2.7. It would be nice and more consistent if the objects returned from ZipFile.open() were context managers too. ---------- components: Library (Lib) messages: 106941 nosy: sandberg priority: normal severity: normal status: open title: zipfile.ZipExtFile should be a context manager type: feature request versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 13:42:54 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Jun 2010 11:42:54 +0000 Subject: =?utf-8?b?W2lzc3VlODg4N10g4oCccHlkb2Mgc3Ry4oCdIHdvcmtzIGJ1dCBub3Qg4oCc?= =?utf-8?q?pydoc_str=2Etranslate=E2=80=9D?= In-Reply-To: <1275565374.87.0.956319261544.issue8887@psf.upfronthosting.co.za> Message-ID: <1275565374.87.0.956319261544.issue8887@psf.upfronthosting.co.za> New submission from ?ric Araujo : Inconsistent behavior: pydoc3 str: works pydoc3 str.translate: doesn?t pydoc3 builtins.str: works pydoc3 builtins.str.translate: doesn?t I think pydoc3 str.translate should work. I?ll be able to try to write a patch in some weeks. ---------- components: Library (Lib) messages: 106942 nosy: merwok priority: normal severity: normal status: open title: ?pydoc str? works but not ?pydoc str.translate? type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 13:49:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Jun 2010 11:49:59 +0000 Subject: [issue8888] Promote SafeConfigParser and warn about ConfigParser In-Reply-To: <1275565799.83.0.624762218664.issue8888@psf.upfronthosting.co.za> Message-ID: <1275565799.83.0.624762218664.issue8888@psf.upfronthosting.co.za> New submission from ?ric Araujo : Problems like #8880 could be prevented with a deprecation notice for the ConfigParser class, in favor of SafeConfigParser. (Not sure if R.?David Murray meant just a recommendation or a real deprecation.) ---------- assignee: docs at python components: Documentation messages: 106943 nosy: docs at python, merwok, r.david.murray priority: normal severity: normal status: open title: Promote SafeConfigParser and warn about ConfigParser versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 13:50:21 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Jun 2010 11:50:21 +0000 Subject: [issue8880] ConfigParser.set does not convert non-string values In-Reply-To: <1275512498.11.0.636017814706.issue8880@psf.upfronthosting.co.za> Message-ID: <1275565821.42.0.844209930836.issue8880@psf.upfronthosting.co.za> ?ric Araujo added the comment: See #8888 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 14:10:19 2010 From: report at bugs.python.org (Erik Carstensen) Date: Thu, 03 Jun 2010 12:10:19 +0000 Subject: [issue8886] zipfile.ZipExtFile is a context manager, but that is not documented In-Reply-To: <1275565167.77.0.94387257463.issue8886@psf.upfronthosting.co.za> Message-ID: <1275567019.29.0.917548486036.issue8886@psf.upfronthosting.co.za> Erik Carstensen added the comment: Sorry, my mistake, ZipExtFile is indeed a context manager: I ran into the problem in 2.6, and checked whether it was fixed in 2.7; when quickly reading zipfile.py I saw that only ZipFile had context manager methods, I missed the BufferedIOBase inheritance. And when reading the tests I didn't see any 'with ZipFile.open(x) as y' expression. Maybe it still makes sense to document and test this. Changing the title. ---------- title: zipfile.ZipExtFile should be a context manager -> zipfile.ZipExtFile is a context manager, but that is not documented _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 14:32:59 2010 From: report at bugs.python.org (Erik Carstensen) Date: Thu, 03 Jun 2010 12:32:59 +0000 Subject: [issue8886] zipfile.ZipExtFile is a context manager, but that is not documented In-Reply-To: <1275565167.77.0.94387257463.issue8886@psf.upfronthosting.co.za> Message-ID: <1275568379.96.0.746640158148.issue8886@psf.upfronthosting.co.za> Erik Carstensen added the comment: Patch that makes the zipfile test consistently use with statements to handle the return value of ZipFile.open(). ---------- keywords: +patch Added file: http://bugs.python.org/file17529/with-ZipExtFile-in-test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 14:49:59 2010 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Thu, 03 Jun 2010 12:49:59 +0000 Subject: [issue8741] 2.7 regression in tarfile: IOError: link could not be created In-Reply-To: <1274118345.32.0.801692184283.issue8741@psf.upfronthosting.co.za> Message-ID: <1275569399.04.0.969933185967.issue8741@psf.upfronthosting.co.za> Lars Gust?bel added the comment: I have just committed the fix. I hope that this code is now more robust. See r81667 (trunk) and r81670 (py3k). Thank you very much for your report! ---------- resolution: -> accepted stage: -> committed/rejected status: open -> closed versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 14:57:14 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 03 Jun 2010 12:57:14 +0000 Subject: [issue7384] curses crash on FreeBSD In-Reply-To: <1259006628.77.0.121355571453.issue7384@psf.upfronthosting.co.za> Message-ID: <1275569834.72.0.239551934436.issue7384@psf.upfronthosting.co.za> Stefan Krah added the comment: Mark, thanks. Committed in r81669; I'll keep an eye on the buildbots. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 15:29:35 2010 From: report at bugs.python.org (July Tikhonov) Date: Thu, 03 Jun 2010 13:29:35 +0000 Subject: [issue8862] curses.wrapper does not restore terminal if curses.getkey() gets KeyboardInterrupt In-Reply-To: <1275330239.59.0.0964939469403.issue8862@psf.upfronthosting.co.za> Message-ID: <1275571775.74.0.761993511843.issue8862@psf.upfronthosting.co.za> July Tikhonov added the comment: Patch added. Calls PyErr_CheckSignals(). If nothing happens, raises _curses.error. ---------- keywords: +patch Added file: http://bugs.python.org/file17530/curses-getkey.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 15:37:53 2010 From: report at bugs.python.org (Edwin Pozharski) Date: Thu, 03 Jun 2010 13:37:53 +0000 Subject: [issue8880] ConfigParser.set does not convert non-string values In-Reply-To: <1275514399.16.0.8441694431.issue8880@psf.upfronthosting.co.za> Message-ID: Edwin Pozharski added the comment: Thanks - gotta rtfm :) On Wed, Jun 2, 2010 at 5:33 PM, R. David Murray wrote: > > R. David Murray added the comment: > > Use SafeConfigParser instead, then you can't make the mistake of passing > non-strings to set. > > We really should update the docs so that ConfigParser is doced only in a > 'deprecated' section. But that's a different issue. (Care to open it, > merwok? :) > > ---------- > nosy: +r.david.murray > resolution: -> wont fix > stage: -> committed/rejected > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file17531/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Thanks - gotta rtfm :)

On Wed, Jun 2, 2010 at 5:33 PM, R. David Murray <report at bugs.python.org> wrote:

R. David Murray <rdmurray at bitdance.com> added the comment:

Use SafeConfigParser instead, then you can't make the mistake of passing non-strings to set.

We really should update the docs so that ConfigParser is doced only in a 'deprecated' section. ??But that's a different issue. ??(Care to open it, merwok? :)

----------
nosy: +r.david.murray
resolution: ??-> wont fix
stage: ??-> committed/rejected
status: open -> closed

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

From report at bugs.python.org Thu Jun 3 15:50:48 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 03 Jun 2010 13:50:48 +0000 Subject: [issue8883] Proxy exception lookup fails on MacOS in urllib. In-Reply-To: <1275550309.78.0.672707816894.issue8883@psf.upfronthosting.co.za> Message-ID: <1275573048.61.0.393029298349.issue8883@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Patchs looks file, although the 'None' branch might be a bit too fancy. I haven't found a spec either, and therefore your code is probably the safest way to deduce a mask. ---------- assignee: -> ronaldoussoren nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 16:16:38 2010 From: report at bugs.python.org (Yuriy Taraday) Date: Thu, 03 Jun 2010 14:16:38 +0000 Subject: [issue8883] Proxy exception lookup fails on MacOS in urllib. In-Reply-To: <1275550309.78.0.672707816894.issue8883@psf.upfronthosting.co.za> Message-ID: <1275574598.68.0.77190380998.issue8883@psf.upfronthosting.co.za> Yuriy Taraday added the comment: The strange thing is that in both 2.7 and 3.1 branches there is no such code at all. Inernet Config is used there without mentioning any exceptions despite the fact that ic module is marked as deprecated and proxy bypass is real. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 16:24:54 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 03 Jun 2010 14:24:54 +0000 Subject: [issue8883] Proxy exception lookup fails on MacOS in urllib. In-Reply-To: <1275550309.78.0.672707816894.issue8883@psf.upfronthosting.co.za> Message-ID: <1275575094.24.0.990751752895.issue8883@psf.upfronthosting.co.za> Ronald Oussoren added the comment: 2.7 and 3.x use the SystemConfiguration framework (through the _scproxy extension) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 16:33:47 2010 From: report at bugs.python.org (Yuriy Taraday) Date: Thu, 03 Jun 2010 14:33:47 +0000 Subject: [issue8883] Proxy exception lookup fails on MacOS in urllib. In-Reply-To: <1275550309.78.0.672707816894.issue8883@psf.upfronthosting.co.za> Message-ID: <1275575627.68.0.111639666081.issue8883@psf.upfronthosting.co.za> Yuriy Taraday added the comment: I'm completely lost 2.7 tree in svn. My last post was about 3.1.2 release. As I understand, System Configuration framework is being used since 2.6.5 and 3.2. So, this bug is about all this versions. ---------- versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 16:42:48 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 03 Jun 2010 14:42:48 +0000 Subject: [issue7724] setup.py ignores SDK root on OSX In-Reply-To: <1263740773.9.0.498921408121.issue7724@psf.upfronthosting.co.za> Message-ID: <1275576168.74.0.162099136667.issue7724@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Ported to 3.2 in r81673. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 16:46:51 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 03 Jun 2010 14:46:51 +0000 Subject: [issue2568] Seconds range in time unit In-Reply-To: <1207551193.66.0.586350051723.issue2568@psf.upfronthosting.co.za> Message-ID: <1275576411.02.0.710358184752.issue2568@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am reopening this issue because the following note is still not entirely correct: """ The range really is 0 to 61; according to the Posix standard this accounts for leap seconds and the (very rare) double leap seconds. The time module may produce and does accept leap seconds since it is based on the Posix standard ... """ - http://docs.python.org/library/datetime.html#strftime-and-strptime-behavior First, the latest POSIX standard (IEEE Std 1003.1, 2004 Edition) defines seconds range as [0, 60]. http://www.opengroup.org/onlinepubs/009695399/basedefs/time.h.html Second, AFAIK, the only way to produce tm structure with tm_sec = 60 using a POSIX function is to explicitly pass "60" to a "%S" field in strptime. Other functions that fill tm structure, such as localtime or gmtime will never produce tm_sec = 60. This is important because in the current form the comment suggests that the common recipe of passing first six elements of time.struct_time() to datetime constructor is unsafe while it is only unsafe if the time information comes from a non-POSIX system. Third, POSIX is not a relevant standard for Python. I have not seen any statement of python compliance to any version of Posix. The relevant standard, I believe is C89: """ Python now must be compiled with C89 compilers (after 19 years!). """ - http://docs.python.org/whatsnew/2.6.html While strictly speaking this is not a compliance statement, at least it has Python and C89 in the same sentence. :-) AFAIK, the C89 standard does allow double leap seconds. It may also allow compliant systems to produce leap second times from localtime() or gmtime(), but I don't have access to the text at the moment. If this is true, the only fix required is s/POSIX/C89/g. ---------- assignee: -> belopolsky nosy: +mark.dickinson resolution: fixed -> stage: patch review -> needs patch status: closed -> open versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 16:47:24 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Jun 2010 14:47:24 +0000 Subject: [issue4673] Distutils should provide an uninstall command In-Reply-To: <1229380134.57.0.765808366709.issue4673@psf.upfronthosting.co.za> Message-ID: <1275576444.18.0.842220404998.issue4673@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: +Distutils2 -Distutils keywords: +gsoc versions: +Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 16:53:13 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Jun 2010 14:53:13 +0000 Subject: [issue2279] distutils sdist add_defaults does not add data_files In-Reply-To: <1205333612.66.0.693918609529.issue2279@psf.upfronthosting.co.za> Message-ID: <1275576793.54.0.739928237281.issue2279@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: accepted -> fixed stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 16:54:56 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Jun 2010 14:54:56 +0000 Subject: [issue5300] Distutils ignores file permissions In-Reply-To: <1234907694.25.0.317480697226.issue5300@psf.upfronthosting.co.za> Message-ID: <1275576896.42.0.935825454503.issue5300@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 17:00:30 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 03 Jun 2010 15:00:30 +0000 Subject: [issue7724] setup.py ignores SDK root on OSX In-Reply-To: <1263740773.9.0.498921408121.issue7724@psf.upfronthosting.co.za> Message-ID: <1275577230.46.0.300204373265.issue7724@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Committed for 2.6 in r81674 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 17:06:04 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 03 Jun 2010 15:06:04 +0000 Subject: [issue6608] asctime causing python to crash In-Reply-To: <1248998208.56.0.3155599029.issue6608@psf.upfronthosting.co.za> Message-ID: <1275577564.28.0.333979037855.issue6608@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Here is a quote from the relevant CERT advisory (MSC33-C): """ This function is supposed to output a character string of 26 positions at most, including the terminating zero. If we count the length indicated by the format directives we arrive at 25. Taking into account the terminating zero, the array size of the string appears sufficient. However, this implementation assumes that the values of the struct tm data in timeptr are within normal ranges, and does nothing to enforce this. If any of the values print more characters than expected, the sprintf() function may overflow the result array. For instance, if tm_year has the value 12345, then 27 characters (including the terminating null character) are printed, resulting in a buffer overflow. The asctime() function primarily exists for compatibility with older implementations. Also, the asctime() function does not support localized date and time formats. The POSIX standard developers decided to mark the asctime() function obsolescent even though they are in C99 because of the possibility of buffer overflow. C99 also provides the strftime() function which can be used to avoid these problems. """ https://www.securecoding.cert.org/confluence/display/seccode/MSC33-C.+Do+not+pass+invalid+data+to+the+asctime%28%29+function (I am changing the stage back to "needs patch" because the current patch is vulnerable to buffer overflow.) I think it is best to leave the code as is and possibly add a warning in documentation that passing hand-crafted timetuple is unsafe on some systems and that locale aware strftime("%c", ..) is preferable to asctime. ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 17:30:33 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jun 2010 15:30:33 +0000 Subject: [issue3864] 26.rc1: test_signal issue on FreeBSD 6.3 In-Reply-To: <1221392514.26.0.835541576459.issue3864@psf.upfronthosting.co.za> Message-ID: <1275579033.17.0.86646236722.issue3864@psf.upfronthosting.co.za> R. David Murray added the comment: I can't believe I messed that up. Yes, the patch looks fine, please apply. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 17:46:46 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jun 2010 15:46:46 +0000 Subject: [issue5610] email feedparser.py CRLFLF bug: $ vs \Z In-Reply-To: <1238435977.23.0.604038870745.issue5610@psf.upfronthosting.co.za> Message-ID: <1275580006.3.0.646983374289.issue5610@psf.upfronthosting.co.za> R. David Murray added the comment: I've applied the NLCRE_eol part of the patch, and the test, in r81675. Tony, can you think of a test case that would demonstrate the problem with the boundaryre? ---------- stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 18:15:42 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 03 Jun 2010 16:15:42 +0000 Subject: [issue3864] 26.rc1: test_signal issue on FreeBSD 6.3 In-Reply-To: <1221392514.26.0.835541576459.issue3864@psf.upfronthosting.co.za> Message-ID: <1275581742.21.0.227733296876.issue3864@psf.upfronthosting.co.za> Stefan Krah added the comment: Thanks for looking at the patch! Committed in r81676. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 18:21:01 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 03 Jun 2010 16:21:01 +0000 Subject: [issue8424] Test assumptions for test_itimer_virtual and test_itimer_prof In-Reply-To: <1271435798.21.0.520260917353.issue8424@psf.upfronthosting.co.za> Message-ID: <1275582061.78.0.873364891163.issue8424@psf.upfronthosting.co.za> Stefan Krah added the comment: I can't find buildbot failures related to this any longer, so I'm closing this one. ---------- stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 18:21:44 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 03 Jun 2010 16:21:44 +0000 Subject: [issue7724] setup.py ignores SDK root on OSX In-Reply-To: <1263740773.9.0.498921408121.issue7724@psf.upfronthosting.co.za> Message-ID: <1275582104.06.0.548041050589.issue7724@psf.upfronthosting.co.za> Ronald Oussoren added the comment: And for 3.1 in r81677. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 18:31:23 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jun 2010 16:31:23 +0000 Subject: [issue4487] Add utf8 alias for email charsets In-Reply-To: <1228223832.43.0.0399583143577.issue4487@psf.upfronthosting.co.za> Message-ID: <1275582683.23.0.384513249134.issue4487@psf.upfronthosting.co.za> R. David Murray added the comment: For various reasons the email module has a table of character sets. What might be most effective would be for the email module to look a character set name up in the codecs module and find out the cannonical name of the character set, and then look that up in its table (ie: remove the aliases table from email completely, and instead depend on codecs to resolve the cannonical name). Unfortunately the codecs module does not recognize all of the aliases used by email, nor is there necessarily any guarantee that the two modules will agree on the proper cannonical name. The attached patch instead uses the codecs module as a fallback if the charset name does not appear in the email package's ALIASES or CHARSETS tables. It therefore makes both utf8 and utf_8 work, as well as all the other variants the codec module accepts. The unit test just tests 'utf8', since if that one works all the others should too. I'm tentatively reclassifying this as a bug rather than a feature request, since I think it is a reasonable expectation that email would support at least the same set of encoding names that the rest of Python does. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 18:31:58 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jun 2010 16:31:58 +0000 Subject: [issue4487] Add utf8 alias for email charsets In-Reply-To: <1228223832.43.0.0399583143577.issue4487@psf.upfronthosting.co.za> Message-ID: <1275582718.61.0.381612082401.issue4487@psf.upfronthosting.co.za> Changes by R. David Murray : Added file: http://bugs.python.org/file17532/email_accept_codec_aliases.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 18:32:28 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jun 2010 16:32:28 +0000 Subject: [issue4487] Add utf8 alias for email charsets In-Reply-To: <1228223832.43.0.0399583143577.issue4487@psf.upfronthosting.co.za> Message-ID: <1275582748.47.0.10648952378.issue4487@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: -> r.david.murray stage: -> patch review type: feature request -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 18:36:34 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Jun 2010 16:36:34 +0000 Subject: [issue4487] Add utf8 alias for email charsets In-Reply-To: <1228223832.43.0.0399583143577.issue4487@psf.upfronthosting.co.za> Message-ID: <1275582994.43.0.927417300364.issue4487@psf.upfronthosting.co.za> ?ric Araujo added the comment: Idea: Import the aliases mapping from codecs and extend it with email-specific aliases. Alternate idea: Add email?s names to codecs. Side note: ?charset? stands for ?character encoding?, not ?character set?. See ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 19:28:47 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 03 Jun 2010 17:28:47 +0000 Subject: [issue1766304] improve xrange.__contains__ In-Reply-To: <1275550215.68.0.0403243027248.issue1766304@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: 2010/6/3 Tal Einat : > > Tal Einat added the comment: > > In my mind, the reason for this patch is that xrange/range can be thought of as a lazy list of integers. However without this patch, membership checking was done trivially instead of in a "smart/lazy" manner, which is unexpected for users. Finally, conditions such as "num in xrange(3, 1000, 5)" are not trivial to express correctly otherwise, and even more so for negative steps. > > This patch is already implemented and accepted for 3.2, I just wish to back-port it to 2.7 which should be fairly straightforward. > > I'll just have a patch ready by tomorrow, and hope that someone finds the time to review it and possibly commit it in time for rc1. I realize that this is a minor change at the last minute. I will certainly understand if the people responsible for preparing rc1 are too busy for this. xrange has behaved like this for such a long time that I don't see what it buys us to commit the patch this late. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 19:32:05 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 03 Jun 2010 17:32:05 +0000 Subject: [issue1766304] improve xrange.__contains__ Message-ID: <1275586325.17.0.17833540344.issue1766304@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 19:58:05 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 03 Jun 2010 17:58:05 +0000 Subject: [issue8884] Allow binding to local address in http.client In-Reply-To: <1275557604.57.0.107374927825.issue8884@psf.upfronthosting.co.za> Message-ID: <1275587885.53.0.967607394803.issue8884@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- title: Allow binding to local address in httplib / http.client -> Allow binding to local address in http.client versions: +Python 3.2 -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 20:05:13 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 03 Jun 2010 18:05:13 +0000 Subject: [issue8884] Allow binding to local address in http.client In-Reply-To: <1275557604.57.0.107374927825.issue8884@psf.upfronthosting.co.za> Message-ID: <1275588313.52.0.873402365584.issue8884@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can you please elaborate? Why would binding be useful? In any case, what's wrong with 2.7's source_address parameter? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 20:16:13 2010 From: report at bugs.python.org (Gaz Davidson) Date: Thu, 03 Jun 2010 18:16:13 +0000 Subject: [issue8884] Allow binding to local address in http.client In-Reply-To: <1275557604.57.0.107374927825.issue8884@psf.upfronthosting.co.za> Message-ID: <1275588973.51.0.13218783457.issue8884@psf.upfronthosting.co.za> Gaz Davidson added the comment: Oops, I didn't see that in the 2.7 docs, I'll make sure I RTFM in future! source_address will do perfectly, sorry for wasting your time and thanks for the quick response. Cheers Gaz ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 20:21:27 2010 From: report at bugs.python.org (Jeff Craig) Date: Thu, 03 Jun 2010 18:21:27 +0000 Subject: [issue8820] IDLE not launching correctly In-Reply-To: <1274842084.45.0.257196773636.issue8820@psf.upfronthosting.co.za> Message-ID: <1275589287.8.0.133647823807.issue8820@psf.upfronthosting.co.za> Jeff Craig added the comment: I can confirm this behaviour and error. On Windows Server 2008 R2 64-bit. ---------- nosy: +foxxtrot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 20:30:23 2010 From: report at bugs.python.org (Jeff Craig) Date: Thu, 03 Jun 2010 18:30:23 +0000 Subject: [issue8820] IDLE not launching correctly In-Reply-To: <1274842084.45.0.257196773636.issue8820@psf.upfronthosting.co.za> Message-ID: <1275589823.97.0.320115416613.issue8820@psf.upfronthosting.co.za> Jeff Craig added the comment: Further information, this was an issue for me in 2.6.4, but with 2.6.5 it appears to no longer be an issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 20:36:41 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 03 Jun 2010 18:36:41 +0000 Subject: [issue8884] Allow binding to local address in http.client In-Reply-To: <1275557604.57.0.107374927825.issue8884@psf.upfronthosting.co.za> Message-ID: <1275590201.29.0.277726338778.issue8884@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 20:46:34 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 03 Jun 2010 18:46:34 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275590794.55.0.501110507148.issue5094@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching the next installment of the datetime.timezone class implementation. Here I add ``utc`` class attribute to timezone. I decided to place it in class rather than module namespace because this seems to be more inline with how datetime module defines particular instances of its classes such as ``min``, ``max`` and ``resolution``. I also feel that writing ``timezone.utc`` makes it clearer that its is an instance of ``timezone`` class while ``datetime.UTC`` or simply ``UTC`` is more ambiguous. I also changed ``timezone`` constructor to interpret int or float offset as number of hours and accept arbitrary timedelta between timedelta(hours=-12) and timedelta(hours=12). The rationale is that most common timezones have offsets at whole hours and less common but existing timezones use 1/2 or 1/4 hour offsets and thus can be specified as a binary float without any issue. I've added tests and some preliminary documentation. ---------- Added file: http://bugs.python.org/file17533/issue5094a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 20:50:06 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jun 2010 18:50:06 +0000 Subject: [issue8889] test_support.transient_internet fails on Freebsd because socket has no attribute EAI_NODATA In-Reply-To: <1275591006.22.0.670569241556.issue8889@psf.upfronthosting.co.za> Message-ID: <1275591006.22.0.670569241556.issue8889@psf.upfronthosting.co.za> New submission from R. David Murray : test_support.transient_internet was modified to check for more errors, but one of them, socket.EAI_NODATA, is not supported by FreeBSD. The attached patch rewrites transient_internet to only test EAI error codes that exist, and also improves the skip message. ---------- components: Tests files: transient_internet.patch keywords: patch messages: 106972 nosy: haypo, r.david.murray priority: normal severity: normal status: open title: test_support.transient_internet fails on Freebsd because socket has no attribute EAI_NODATA type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file17534/transient_internet.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 20:50:58 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jun 2010 18:50:58 +0000 Subject: [issue8889] test_support.transient_internet fails on Freebsd because socket has no attribute EAI_NODATA In-Reply-To: <1275591006.22.0.670569241556.issue8889@psf.upfronthosting.co.za> Message-ID: <1275591058.49.0.184963708028.issue8889@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: -> r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 21:15:58 2010 From: report at bugs.python.org (Brett Cannon) Date: Thu, 03 Jun 2010 19:15:58 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275592558.56.0.269028568798.issue5094@psf.upfronthosting.co.za> Brett Cannon added the comment: I don't think people would get confused as to what datetime.utc was, but as you pointed out, Alexander, the module seems to like class attributes so timezone.utc is fine. As for the float/int argument, I personally am wary of it. Since the timedelta constructor accepts hours as a keyword argument, I don't see the benefit of having to support both timedeltas and int/floats. And I can see someone messing up and putting in a float that is not perfectly representable and getting upset at odd behavior. I say keep it simple and just accept timedeltas for now. If there really is demand for accepting integers in the constructor than it can be added without backwards-compatibility issues. Better to keep the API small and expand later than make it too big to start and being burdened with extraneous API stuff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 21:19:14 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 03 Jun 2010 19:19:14 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275592754.62.0.279269665035.issue5094@psf.upfronthosting.co.za> Mark Dickinson added the comment: > accept arbitrary timedelta between timedelta(hours=-12) and > timedelta(hours=12) Aren't there valid timezones that are offset by more than 12 hours from UTC? ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 21:28:41 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jun 2010 19:28:41 +0000 Subject: [issue8889] test_support.transient_internet fails on Freebsd because socket has no attribute EAI_NODATA In-Reply-To: <1275591006.22.0.670569241556.issue8889@psf.upfronthosting.co.za> Message-ID: <1275593321.11.0.979675722935.issue8889@psf.upfronthosting.co.za> R. David Murray added the comment: Modified patch based on feedback from Antoine Pitrou on #python-dev. ---------- Added file: http://bugs.python.org/file17535/transient_internet.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 21:41:21 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 03 Jun 2010 19:41:21 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1275592754.62.0.279269665035.issue5094@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Thu, Jun 3, 2010 at 3:19 PM, Mark Dickinson wrote: .. > Aren't there valid timezones that are offset by more than 12 hours from UTC? I am not sure. At this stage treat 12 as a placeholder for whatever the relevant standard says. I've seen suggestions that the range should be (-24, 24) excluding ends and [-14, 14] . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 21:41:22 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jun 2010 19:41:22 +0000 Subject: [issue8889] test_support.transient_internet fails on Freebsd because socket has no attribute EAI_NODATA In-Reply-To: <1275591006.22.0.670569241556.issue8889@psf.upfronthosting.co.za> Message-ID: <1275594082.78.0.336096440613.issue8889@psf.upfronthosting.co.za> Changes by R. David Murray : Removed file: http://bugs.python.org/file17535/transient_internet.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 21:50:46 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 03 Jun 2010 19:50:46 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: Message-ID: Alexander Belopolsky added the comment: On Thu, Jun 3, 2010 at 3:41 PM, Alexander Belopolsky wrote: .. > I am not sure. ? At this stage treat 12 as a placeholder for whatever > the relevant standard says. Believe it or not, at least one standard, RFC 2822, allows any offset representable as HHMM: "the zone MUST be within the range -9959 through +9959" . I am inclined to simply remove any range checking and allow arbitrary timedelta as an offset. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 21:53:24 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jun 2010 19:53:24 +0000 Subject: [issue8889] test_support.transient_internet fails on Freebsd because socket has no attribute EAI_NODATA In-Reply-To: <1275591006.22.0.670569241556.issue8889@psf.upfronthosting.co.za> Message-ID: <1275594804.88.0.990693137742.issue8889@psf.upfronthosting.co.za> R. David Murray added the comment: A somewhat more clever version. ---------- Added file: http://bugs.python.org/file17536/transient_internet.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 22:02:28 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jun 2010 20:02:28 +0000 Subject: [issue8889] test_support.transient_internet fails on Freebsd because socket has no attribute EAI_NODATA In-Reply-To: <1275591006.22.0.670569241556.issue8889@psf.upfronthosting.co.za> Message-ID: <1275595348.34.0.0622589576073.issue8889@psf.upfronthosting.co.za> R. David Murray added the comment: Final version after more feedback. ---------- Added file: http://bugs.python.org/file17537/transient_internet.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 22:06:44 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 03 Jun 2010 20:06:44 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1275592558.56.0.269028568798.issue5094@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Thu, Jun 3, 2010 at 3:15 PM, Brett Cannon wrote: .. > As for the float/int argument, I personally am wary of it. Since the > timedelta constructor accepts hours as a keyword argument, I don't > see the benefit of having to support both timedeltas and int/floats. To my taste, timedelta(hours=-5) is just too verbose. It also forces you to import timedelta in a module that may otherwise not need it. > And I can see someone messing up and putting in a float that is not > perfectly representable and getting upset at odd behavior. Since timedelta accepts floats for hours, this argument does not really hold. Also, with timedelta correctly rounding to the nearest microsecond, it is really hard to mess up with binary vs. decimal representation. > I say keep it simple and just accept timedeltas for now. If there > really is demand for accepting integers in the constructor than it can > be added without backwards-compatibility issues. Better to keep the > API small and expand later than make it too big to start and being > burdened with extraneous API stuff. > This a valid argument. since it is easier to remove code than to add, I'll keep int/float support in the patch while we are discussing the design, but I am ready to remove it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 22:13:33 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 03 Jun 2010 20:13:33 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275596013.75.0.883584795143.issue5094@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 22:21:16 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 03 Jun 2010 20:21:16 +0000 Subject: [issue8889] test_support.transient_internet fails on Freebsd because socket has no attribute EAI_NODATA In-Reply-To: <1275591006.22.0.670569241556.issue8889@psf.upfronthosting.co.za> Message-ID: <1275596476.36.0.688395069733.issue8889@psf.upfronthosting.co.za> R. David Murray added the comment: Committed to trunk in r81678. I'll wait until the trunk buildbots show the test_ssl and test_urllib2net error clear before back/forward porting. ---------- stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 23:11:55 2010 From: report at bugs.python.org (Henri Salo) Date: Thu, 03 Jun 2010 21:11:55 +0000 Subject: [issue8890] Module logging has dangerous examples In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> New submission from Henri Salo : Module logging has dangerous examples as one can see from: 15.6.1.1: > import logging > LOG_FILENAME = '/tmp/logging_example.out' > logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG) > logging.debug('This message should go to the log file') It is not very wise to guide programmers to create programming mistakes. More information about the situation from: . ---------- components: None messages: 106982 nosy: Henri.Salo priority: normal severity: normal status: open title: Module logging has dangerous examples type: security versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 23:13:38 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 03 Jun 2010 21:13:38 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: <1275599618.14.0.926604611145.issue8891@psf.upfronthosting.co.za> Message-ID: <1275599618.14.0.926604611145.issue8891@psf.upfronthosting.co.za> New submission from anatoly techtonik : I am troubleshooting local issue with distutils and UAC on Windows, and I need to compare resulting binary archives. Unfortunately files to bdist archives are added in random order and this complicates comparisons. This patch makes distutils archives more deterministic. ---------- assignee: tarek components: Distutils files: sort_files_in_zip.26.patch keywords: patch messages: 106983 nosy: tarek, techtonik priority: normal severity: normal status: open title: sort files before archiving for consistency versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file17538/sort_files_in_zip.26.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 23:14:04 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 03 Jun 2010 21:14:04 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: <1275599618.14.0.926604611145.issue8891@psf.upfronthosting.co.za> Message-ID: <1275599644.87.0.360127067043.issue8891@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file17539/sort_files_in_zip.27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 23:32:19 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Jun 2010 21:32:19 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: <1275599618.14.0.926604611145.issue8891@psf.upfronthosting.co.za> Message-ID: <1275600739.97.0.0663771271963.issue8891@psf.upfronthosting.co.za> ?ric Araujo added the comment: This would be a new feature, so it can?t go into 2.6 unless I?m mistaken. It may even not go into 2.7. Your renaming of z to zip does not add much value and shadows a builtin; I advise against doing that. ---------- nosy: +merwok versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 23:36:22 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Jun 2010 21:36:22 +0000 Subject: [issue8890] Module logging has dangerous examples In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1275600982.49.0.783731612309.issue8890@psf.upfronthosting.co.za> ?ric Araujo added the comment: Would you be kind enough to provide a doc patch that would advertise using the tempfile module? ---------- assignee: -> docs at python components: +Documentation -None nosy: +docs at python, merwok versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 23:40:29 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 03 Jun 2010 21:40:29 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: <1275600739.97.0.0663771271963.issue8891@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: On Fri, Jun 4, 2010 at 12:32 AM, ?ric Araujo wrote: > > This would be a new feature, so it can?t go into 2.6 unless I?m mistaken. It may even not go into 2.7. It is not a feature, but a bugfix for wrong order of files in archive. That means that on different filesystems you will get different archives. I doubt that having files in random order is a feature. > Your renaming of z to zip does not add much value and shadows a builtin; I advise against doing that. I've just copy-pasted the same block from Python 2.7, so the bug with shadowing is already there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 23:51:01 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 03 Jun 2010 21:51:01 +0000 Subject: [issue8890] Module logging has dangerous examples In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1275601861.59.0.287825433162.issue8890@psf.upfronthosting.co.za> anatoly techtonik added the comment: import logging - LOG_FILENAME = '/tmp/logging_example.out' + LOG_FILENAME = 'example.log' logging.basicConfig(filename=LOG_FILENAME,level=logging.DEBUG) logging.debug('This message should go to the log file') ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 3 23:55:39 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Jun 2010 21:55:39 +0000 Subject: [issue8890] Module logging has dangerous examples In-Reply-To: <1275601861.59.0.287825433162.issue8890@psf.upfronthosting.co.za> Message-ID: <4C0824CE.9070903@netwok.org> ?ric Araujo added the comment: Nice, this example doesn?t require explaining tempfile and is shorter. Add a notice before the code that you need to be in a directory with write rights for this to work and I?m +1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 00:05:53 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Jun 2010 22:05:53 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: <1275599618.14.0.926604611145.issue8891@psf.upfronthosting.co.za> Message-ID: <1275602753.15.0.321033668557.issue8891@psf.upfronthosting.co.za> ?ric Araujo added the comment: > It is not a feature, but a bugfix for wrong order of files in archive. That?s debatable. If the docs did advertise ordering and if it?s not a regression from an older version, it?s a new feature. I?m not saying I don?t like it, just clarifying Python?s process. > I've just copy-pasted the same block from Python 2.7, so the bug with > shadowing is already there. I see in the log that Tarek has done this to respect PEP 8, which advocates using meaningful names. Not a big deal here. FTR, this function has been moved to shutil, still with the zip shadowing and without the sorting. I?ll shut up now and let Tarek and the release manager judge whether this is a bugfix or a new feature :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 00:11:01 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Jun 2010 22:11:01 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: <1275599618.14.0.926604611145.issue8891@psf.upfronthosting.co.za> Message-ID: <1275603061.19.0.376327576376.issue8891@psf.upfronthosting.co.za> ?ric Araujo added the comment: Sorry for writing when tired. Clearer first sentence: If it does not change the code to match the docs or to fix a regression from an older version, it?s a feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 00:20:51 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 03 Jun 2010 22:20:51 +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: <1275603651.87.0.583205697426.issue8892@psf.upfronthosting.co.za> New submission from Dave Malcolm : fix_itertools_imports.py fails on a "*" import 2to3 fails on this code: from itertools import * with a traceback: File "/home/david/coding/python-svn/trunk-2to3-issues/Lib/lib2to3/tests/test_fixers.py", line 3680, in test_star self.warns_unchanged(s, "Cannot handle star imports") File "/home/david/coding/python-svn/trunk-2to3-issues/Lib/lib2to3/tests/test_fixers.py", line 49, in warns_unchanged self.warns(before, before, message, unchanged=True) File "/home/david/coding/python-svn/trunk-2to3-issues/Lib/lib2to3/tests/test_fixers.py", line 43, in warns tree = self._check(before, after) File "/home/david/coding/python-svn/trunk-2to3-issues/Lib/lib2to3/tests/test_fixers.py", line 32, in _check tree = self.refactor.refactor_string(before, self.filename) File "/home/david/coding/python-svn/trunk-2to3-issues/Lib/lib2to3/refactor.py", line 359, in refactor_string self.refactor_tree(tree, name) File "/home/david/coding/python-svn/trunk-2to3-issues/Lib/lib2to3/refactor.py", line 393, in refactor_tree self.traverse_by(self.post_order_heads, tree.post_order()) File "/home/david/coding/python-svn/trunk-2to3-issues/Lib/lib2to3/refactor.py", line 417, in traverse_by new = fixer.transform(node, results) File "/home/david/coding/python-svn/trunk-2to3-issues/Lib/lib2to3/fixes/fix_itertools_imports.py", line 24, in transform assert child.type == syms.import_as_name AssertionError (seen when running 2to3 on python-lxml ; see problem in downstream tracker: https://bugzilla.redhat.com/show_bug.cgi?id=600036 ) ---------- components: 2to3 (2.x to 3.0 conversion tool) messages: 106991 nosy: dmalcolm priority: normal severity: normal status: open title: 2to3 fails with assertion failure on "from itertools import *" versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 00:22:24 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 03 Jun 2010 22:22:24 +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: <1275603744.9.0.568015098865.issue8892@psf.upfronthosting.co.za> Dave Malcolm added the comment: I'm attaching a reproducer for the test suite (though not a fix) ---------- keywords: +patch Added file: http://bugs.python.org/file17540/itertools_import_star_reproducer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 00:25:02 2010 From: report at bugs.python.org (Edward Pilatowicz) Date: Thu, 03 Jun 2010 22:25:02 +0000 Subject: [issue8882] socketmodule.c`getsockaddrarg() should not check the length of sun_path In-Reply-To: <1275528470.51.0.813873994417.issue8882@psf.upfronthosting.co.za> Message-ID: <1275603902.54.0.546688610953.issue8882@psf.upfronthosting.co.za> Edward Pilatowicz added the comment: so i wrote a simple test program that tells me the defined length of sun_path and then uses bind() with increasingly long paths to determine the actually supported length of sun_path. here's what i've found: Solaris: defined sun_path = 108 max sun_path = 1024 FreeBSD 8.0: defined sun_path = 104 max sun_path = 254 Fedora 11: defined sun_path = 108 max sun_path = 108 i have requested access to an AIX system to check what length of sun_path is defined and supported there. while i could request that this value be changed in the OS, that would likely cause problems with pre-existing compiled code. i'm guessing that most OS vendors would not be eager to update this value, which is probably why it's been the same small value for such a long time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 00:35:38 2010 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 03 Jun 2010 22:35:38 +0000 Subject: [issue8890] Module logging has dangerous examples In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1275604538.96.0.0575340356178.issue8890@psf.upfronthosting.co.za> Vinay Sajip added the comment: Documenation fix checked into trunk (r81680). ---------- assignee: docs at python -> vinay.sajip nosy: +vinay.sajip resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 00:39:36 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 03 Jun 2010 22:39:36 +0000 Subject: [issue8890] Module logging has dangerous examples In-Reply-To: <1275604538.96.0.0575340356178.issue8890@psf.upfronthosting.co.za> Message-ID: <4C082F23.1030001@netwok.org> ?ric Araujo added the comment: Thanks Vinay. You miss a closing paren in your commit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 00:39:46 2010 From: report at bugs.python.org (Mark Nottingham) Date: Thu, 03 Jun 2010 22:39:46 +0000 Subject: [issue8885] markerbase declaration errors aren't recoverable In-Reply-To: <1275563651.6.0.351540013915.issue8885@psf.upfronthosting.co.za> Message-ID: <1275604786.68.0.901872745929.issue8885@psf.upfronthosting.co.za> Mark Nottingham added the comment: Just to be clear -- if error() returns, it will cause an infinite loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 00:58:08 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 03 Jun 2010 22:58:08 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275605888.22.0.454304516486.issue5094@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am having second thoughts about dst indicator. I wrote: """ 2. Do we want to add a dst indicator and altname attributes? I would say: no. I would rather treat DST as a different fixed offset timezone. """ and Brett responded: """ 2. Keep the class dead-simple. The primary motivator is to support UTC, maybe the %z directive for strptime. Otherwise everything else should be left out of the stdlib and let third-parties manage it as they will be the ones that need to manage the bazillion timezone instances they need. We don't need to dictate an interface to them. """ Now note, that with fixed offset timezone class, it is possible to produce aware local times as follows: from datetime import datetime, timezone, timedelta import time EPOCH = datetime(1970, 1, 1) def localtime(utctime=None): if utctime is None: tm = time.localtime() else: seconds = (utctime - EPOCH).total_seconds() tm = time.localtime(seconds) tz = (timezone(timedelta(seconds=-time.altzone), time.tzname[1]) if tm.tm_isdst else timezone(timedelta(seconds=-time.timezone), time.tzname[0])) return datetime(*tm[:6], tzinfo=tz) (see also attached localtime.py) The problem with the above implementation is that t.timetuple().tm_isdst will always be 0 if t is produced by localtime(). I don't think adding fixed dst offset is much of complication. We already need to override the tzinfo.dst method and if we only allow timedeltas as offset and dst arguments to constructor, the constructor code will be extremely simple. ---------- Added file: http://bugs.python.org/file17541/localtime.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 01:37:31 2010 From: report at bugs.python.org (Brett Cannon) Date: Thu, 03 Jun 2010 23:37:31 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275608251.45.0.0645550660867.issue5094@psf.upfronthosting.co.za> Brett Cannon added the comment: So you want a third argument that lets you flag if the timezone is DST or not? I still don't think that will be necessary. If people want to add that they can very easily subclass the timezone class and add support for it. This class should be focused on providing a UTC instance and anything needed for a %z directive in strptime, nothing more. Anything fancier can be handled by libraries like pytz as they need it. Once again, keep the APi as simple as possible and add features as needed. I know how tempting it it is to design upfront, but just trust me, Alexander, we will all get burned for it later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 01:50:44 2010 From: report at bugs.python.org (Christophe Kalt) Date: Thu, 03 Jun 2010 23:50:44 +0000 Subject: [issue8893] file.{read,readlines} behaviour on Solaris In-Reply-To: <1275609044.71.0.537925857344.issue8893@psf.upfronthosting.co.za> Message-ID: <1275609044.71.0.537925857344.issue8893@psf.upfronthosting.co.za> New submission from Christophe Kalt : The following snippet of code is a concise way to exhibit the problem: import os wr = open('/tmp/test', 'w') wr.write('oink\noink\n') rd = open('/tmp/test', 'r') rdlns = open('/tmp/test', 'r') # first, read til EOF is reached (which is right away) assert len(rd.read()) == 0 assert len(rdlns.readlines()) == 0 # add data to the file wr.flush() # try to read again print 'read : ', rd.read().split() # fails print 'readlines: ', rdlns.readlines() # fails print 'readline : ', rdlns.readline().strip() # succeeds # cleanup wr.close() rd.close() rdlns.close() os.remove('/tmp/test') On Linux, here is the output: $ python2.6 src/readlines.py read : ['oink', 'oink'] readlines: ['oink\n', 'oink\n'] readline : On Solaris, here is the output: $ python src/readlines.py read : [] readlines: [] readline : oink The problems comes from the fact that once EOF is reached, nothing more will be read from the file on subsequent reads, as noted in the manual page (http://docs.sun.com/app/docs/doc/816-5168/getchar-3c?a=view): "If the stream is at end-of-file, the end-of-file indicator for the stream is set and these functions return EOF. For standard-conforming (see standards(5)) applications, if the end-of-file indicator for the stream is set, these functions return EOF whether or not the stream is at end-of-file." The attached diff fixes the problem. ---------- assignee: theller components: ctypes files: fileobject.diff keywords: patch messages: 106999 nosy: kalt, theller priority: normal severity: normal status: open title: file.{read,readlines} behaviour on Solaris type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file17542/fileobject.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 03:01:37 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 04 Jun 2010 01:01:37 +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: <1275613297.84.0.484885808985.issue7584@psf.upfronthosting.co.za> R. David Murray added the comment: I just took a look at RFC 3339, and I see what you mean, Anatoly, about the meaning of -00:00. But reading further: "While the Internet does have a tradition of accepting reality when creating specifications, this should not be done at the expense of interoperability. Since interpretation of an unqualified local time zone will fail in approximately 23/24 of the globe, the interoperability problems of unqualified local time are deemed unacceptable for the Internet." It seems to me that we should not try to produce an RFC 3339 compliant date string from a naive datetime. It will be practical to accept that restriction once issue 5094 is resolved. Given this, I'd be OK with Z being the default. ---------- dependencies: +datetime lacks concrete tzinfo impl. for UTC _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 03:54:55 2010 From: report at bugs.python.org (Sean Reifschneider) Date: Fri, 04 Jun 2010 01:54:55 +0000 Subject: [issue8810] TZ offset description is unclear in docs In-Reply-To: <1274718021.16.0.883294684947.issue8810@psf.upfronthosting.co.za> Message-ID: <1275616495.58.0.114875625102.issue8810@psf.upfronthosting.co.za> Sean Reifschneider added the comment: Committed to 2.7 in 81681 and 3.x in 81682. ---------- keywords: +needs review -patch resolution: -> accepted stage: -> committed/rejected status: open -> closed type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 05:31:22 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 03:31:22 +0000 Subject: [issue8810] TZ offset description is unclear in docs In-Reply-To: <1274718021.16.0.883294684947.issue8810@psf.upfronthosting.co.za> Message-ID: <1275622282.74.0.878800728613.issue8810@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > In this case, the docs.python.org link you point to seems > to be correct, saying that it returns a timedelta. This issue is specifically about ReST documentation, not the docstring. I explained in the opening comment that 'It is later explained that in fact "the value returned must be a timedelta object specifying a whole number of minutes", but many users won't read past the first sentence.' Ironically, you not noticing that reaffirms my proposition that "many users won't read past the first sentence." :-) Also, the documentation for tzinfo.dst is similarly unclear with ReST text slightly better than docstring. Finally, please use rNNNNN form for revisions in commit comments. These are converted to hyperlinks by the tracker. For example, your commit comment would become: Committed to 2.7 in r81681 and 3.x in r81682. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 05:31:45 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 03:31:45 +0000 Subject: [issue8810] TZ offset description is unclear in docs In-Reply-To: <1274718021.16.0.883294684947.issue8810@psf.upfronthosting.co.za> Message-ID: <1275622305.62.0.023753540326.issue8810@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- stage: committed/rejected -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 05:32:15 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 03:32:15 +0000 Subject: [issue8810] TZ offset description is unclear in docs In-Reply-To: <1274718021.16.0.883294684947.issue8810@psf.upfronthosting.co.za> Message-ID: <1275622335.05.0.716402670565.issue8810@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- resolution: accepted -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 06:02:29 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 04:02:29 +0000 Subject: [issue8810] TZ offset description is unclear in docs In-Reply-To: <1274718021.16.0.883294684947.issue8810@psf.upfronthosting.co.za> Message-ID: <1275624149.41.0.782796304632.issue8810@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Sean, It looks like you committed your first patch rather than your second. Is that what you intended? Also in msg106734, you agree to change "West" to "west", but committed "West." Note that "west" is correct. In English, the West means the western part of the world while western direction is the west. Pedantically, the UTC is not a location, so you cannot say "to the west of UTC". Instead, you should say "to the west of the Greenwich Meridian." Note how RFC 3339 defines the offset: """ Numeric offsets are calculated as "local time minus UTC". So the equivalent time in UTC can be determined by subtracting the offset from the local time. """ I think this is preferable because there are locations such as Spain to the west of Greenwich which use UTC+1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 06:14:11 2010 From: report at bugs.python.org (Forest Bond) Date: Fri, 04 Jun 2010 04:14:11 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1275624851.5.0.88380330636.issue3244@psf.upfronthosting.co.za> Forest Bond added the comment: Hi, I believe the attached implementation is reasonable. I'm not sure if it should be called "email.mime.formdata", "rfc2388", etc. I'd be happy to attach a proper patch with tests given some quick feedback. Thanks, Forest ---------- nosy: +forest_atq Added file: http://bugs.python.org/file17543/rfc2388.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 06:18:06 2010 From: report at bugs.python.org (Forest Bond) Date: Fri, 04 Jun 2010 04:18:06 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1275625086.58.0.765132892411.issue3244@psf.upfronthosting.co.za> Forest Bond added the comment: Oh, hm, looks like I left a hard-coded name="files" in attach_file. I'll fix that in the patch after I've received any other feedback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 06:42:49 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 04:42:49 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275626569.74.0.459968436013.issue5094@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > So you want a third argument that lets you flag if the timezone is DST or not? The third argument is not a flag, it is a timedelta just like the offset. I am attaching a python prototype for clarity. (See datetimeex.py.) Conceptually, a 3-argument timezone is very simple: tzinfo defines three abstract methods: utcoffset(..), tzname(..), and dts(..). The proposed concrete implementation lets allows the user to provide constant values to be returned from each of these methods. ---------- Added file: http://bugs.python.org/file17544/datetimeex.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 07:49:17 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Jun 2010 05:49:17 +0000 Subject: [issue8893] file.{read,readlines} behaviour on Solaris In-Reply-To: <1275609044.71.0.537925857344.issue8893@psf.upfronthosting.co.za> Message-ID: <1275630557.0.0.466163398097.issue8893@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for your report. This is not related to ctypes, adjusting component and nosy (per Misc/maintainers.rst); also adding keyword. Can you reproduce it with 3.1 and Subversion checkouts for trunk and py3k? Also, what?s the exact version of your OS? ---------- assignee: theller -> components: +IO -ctypes keywords: +needs review nosy: +benjamin.peterson, merwok, pitrou -theller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 07:59:57 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 04 Jun 2010 05:59:57 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275631197.4.0.125950401515.issue5094@psf.upfronthosting.co.za> Brett Cannon added the comment: I'm still leary of supporting any form of DST. A proper DST implementation would need to have some conditional code to account for the datetime object passed into dst, and yet the version you have prototyped doesn't handle it. So a proper timezone supporting DST would still need to subclass any concrete class. I still say keep it as simple as possible and let users subclass as needed to add DST support. Subclassing __init__ and dst() is not difficult if you want to add proper DST support, especially if dst() is set to return timdelta(0) and utcoffset() always returns CONSTANT + self.dst(). And just to mention it, the instance attributes you had in your example, Alexander, were not "private". For any final code, make sure you make them private else you are asking for trouble from people starting to rely on those attributes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 09:10:28 2010 From: report at bugs.python.org (jurjen Bos) Date: Fri, 04 Jun 2010 07:10:28 +0000 Subject: [issue8894] urllib2 authentication manager retries forever if password is wrong In-Reply-To: <1275635428.44.0.0623896045557.issue8894@psf.upfronthosting.co.za> Message-ID: <1275635428.44.0.0623896045557.issue8894@psf.upfronthosting.co.za> New submission from jurjen Bos : If you use an authentication manager from urllib2, it will submit user code and password if authentication fails. However, if the password is wrong, the authentication manager will happily try again, again with the same password. A simple way to circumvent this is attached: it modifies the password manager's behaviour to submit each password only once. One problem I see is in cases where a program needs to log in multiple times in the same site: I propose an extra call to the password manager to reset the "visited" flag. More details and sample code are in the file. ---------- components: Library (Lib) files: circumvent.py messages: 107009 nosy: Jurjen priority: normal severity: normal status: open title: urllib2 authentication manager retries forever if password is wrong type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file17545/circumvent.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 09:19:55 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 04 Jun 2010 07:19:55 +0000 Subject: [issue8894] urllib2 authentication manager retries forever if password is wrong In-Reply-To: <1275635428.44.0.0623896045557.issue8894@psf.upfronthosting.co.za> Message-ID: <1275635995.95.0.151491129818.issue8894@psf.upfronthosting.co.za> Senthil Kumaran added the comment: There was a fix made in issue8797, which adopts a retry approach before failing for wrong password. This is present for Basic Auth and Digest Auth, so the problem wont be faced. Jurjen, do you have any comments before I mark this as Invalid. I see you have adopted a different approach for the patch, but the result would be same (no infinite retries) ---------- assignee: -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 09:29:56 2010 From: report at bugs.python.org (jurjen Bos) Date: Fri, 04 Jun 2010 07:29:56 +0000 Subject: [issue8894] urllib2 authentication manager retries forever if password is wrong In-Reply-To: <1275635428.44.0.0623896045557.issue8894@psf.upfronthosting.co.za> Message-ID: <1275636596.59.0.4066832074.issue8894@psf.upfronthosting.co.za> jurjen Bos added the comment: Yep you're right. In that thread they are talking about the exact same problem as I was having. Obviously, I didn't find that one when I was looking for the problem in the database before I posted this. I do have my doubts about the 5 retries they propose though, I am not sure that the web site I use will not block the account if someone does 5 attempts. - Jurjen ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 09:33:44 2010 From: report at bugs.python.org (Henri Salo) Date: Fri, 04 Jun 2010 07:33:44 +0000 Subject: [issue8890] Module logging has dangerous examples In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1275636824.25.0.706057119852.issue8890@psf.upfronthosting.co.za> Henri Salo added the comment: Please note that there is other similar examples as well. Even on the same page. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 09:36:50 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 04 Jun 2010 07:36:50 +0000 Subject: [issue8894] urllib2 authentication manager retries forever if password is wrong In-Reply-To: <1275636596.59.0.4066832074.issue8894@psf.upfronthosting.co.za> Message-ID: <20100604073642.GB12378@remy> Senthil Kumaran added the comment: Okay, so there is another negative vote 5 retries in the basic auth. But yeah, this bug can be marked duplicate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 09:38:19 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 04 Jun 2010 07:38:19 +0000 Subject: [issue8894] urllib2 authentication manager retries forever if password is wrong In-Reply-To: <1275635428.44.0.0623896045557.issue8894@psf.upfronthosting.co.za> Message-ID: <1275637099.36.0.78490702481.issue8894@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Duplicate of issue8797 ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 09:50:24 2010 From: report at bugs.python.org (jurjen Bos) Date: Fri, 04 Jun 2010 07:50:24 +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: <1275637824.46.0.963980054874.issue8797@psf.upfronthosting.co.za> jurjen Bos added the comment: I would like to point out that this is not going to work if someone visits more than 5 sites with the same authentication manager. This would have to be documentated, at least. We could fix this by putting the retry counter in the HTTPPasswordMgr; it is not hard to put in an extra field in the password database with the retry counter. See also my remarks in issue8894 ---------- nosy: +Jurjen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 10:04:33 2010 From: report at bugs.python.org (Henri Salo) Date: Fri, 04 Jun 2010 08:04:33 +0000 Subject: [issue8890] Module logging has dangerous examples In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1275638673.08.0.351919550327.issue8890@psf.upfronthosting.co.za> Henri Salo added the comment: We should review all of these: install/index.rst: python setup.py build --build-base=/tmp/pybuild/foo-1.0 install/index.rst: python setup.py install --install-base=/tmp install/index.rst:would install pure modules to :file:`{/tmp/python/lib}` in the first case, and install/index.rst:to :file:`{/tmp/lib}` in the second case. (For the second case, you probably install/index.rst:want to supply an installation base of :file:`/tmp/python`.) library/pipes.rst: >>> f=t.open('/tmp/1', 'w') library/pipes.rst: >>> open('/tmp/1').read() library/mailcap.rst: >>> mailcap.findmatch(d, 'video/mpeg', filename='/tmp/tmp1223') library/mailcap.rst: ('xmpeg /tmp/tmp1223', {'view': 'xmpeg %s'}) library/logging.rst: LOG_FILENAME = '/tmp/logging_rotatingfile_example.out' library/logging.rst: /tmp/logging_rotatingfile_example.out library/logging.rst: /tmp/logging_rotatingfile_example.out.1 library/logging.rst: /tmp/logging_rotatingfile_example.out.2 library/logging.rst: /tmp/logging_rotatingfile_example.out.3 library/logging.rst: /tmp/logging_rotatingfile_example.out.4 library/logging.rst: /tmp/logging_rotatingfile_example.out.5 library/logging.rst:The most current file is always :file:`/tmp/logging_rotatingfile_example.out`, library/logging.rst: filename='/tmp/myapp.log', library/logging.rst:which results in output (written to ``/tmp/myapp.log``) which should look library/atexit.rst: _count = int(open("/tmp/counter").read()) library/atexit.rst: open("/tmp/counter", "w").write("%d" % _count) library/imghdr.rst: >>> imghdr.what('/tmp/bass.gif') library/tempfile.rst: '/var/folders/5q/5qTPn6xq2RaWqk+1Ytw3-U+++TI/-Tmp-/tmpG7V1Y0' library/tempfile.rst: * On all other platforms, the directories :file:`/tmp`, :file:`/var/tmp`, and library/tempfile.rst: :file:`/usr/tmp`, in that order. library/posixfile.rst: file = posixfile.open('/tmp/test', 'w') library/cgi.rst: cgitb.enable(display=0, logdir="/tmp") library/optparse.rst: prog -v --report /tmp/report.txt foo bar library/optparse.rst:takes one argument, ``"/tmp/report.txt"`` is an option argument. ``"foo"`` and library/rexec.rst: :file:`/tmp` or uploading it to the :file:`/incoming` directory of your public library/rexec.rst::file:`/tmp` to be written, we can subclass the :class:`RExec` class:: library/rexec.rst: # check filename : must begin with /tmp/ library/rexec.rst: if file[:5]!='/tmp/': library/rexec.rst: raise IOError("can't write outside /tmp") library/rexec.rst:called :file:`/tmp/foo/../bar`. To fix this, the :meth:`r_open` method would library/rexec.rst:have to simplify the filename to :file:`/tmp/bar`, which would require splitting library/compiler.rst::file:`/tmp/doublelib.py`. :: library/compiler.rst: >>> mod = compiler.parseFile("/tmp/doublelib.py") library/zipimport.rst:subdirectory. For example, the path :file:`/tmp/example.zip/lib/` would only library/zipimport.rst: $ unzip -l /tmp/example.zip library/zipimport.rst: Archive: /tmp/example.zip library/zipimport.rst: >>> sys.path.insert(0, '/tmp/example.zip') # Add .zip file to front of path library/zipimport.rst: '/tmp/example.zip/jwzthreading.py' library/trace.rst: # make a report, placing output in /tmp library/trace.rst: r.write_results(show_missing=True, coverdir="/tmp") library/nntplib.rst: >>> f = open('/tmp/article') library/bsddb.rst: >>> db = bsddb.btopen('/tmp/spam.db', 'c') library/sqlite3.rst::file:`/tmp/example` file:: library/sqlite3.rst: conn = sqlite3.connect('/tmp/example') tutorial/inputoutput.rst: >>> f = open('/tmp/workfile', 'w') tutorial/inputoutput.rst: tutorial/inputoutput.rst: >>> f = open('/tmp/workfile', 'r+') tutorial/inputoutput.rst: >>> with open('/tmp/workfile', 'r') as f: whatsnew/2.3.rst: amk at nyman:~/src/python$ unzip -l /tmp/example.zip whatsnew/2.3.rst: Archive: /tmp/example.zip whatsnew/2.3.rst: >>> sys.path.insert(0, '/tmp/example.zip') # Add .zip file to front of path whatsnew/2.3.rst: '/tmp/example.zip/jwzthreading.py' whatsnew/2.3.rst:subdirectory; for example, the path :file:`/tmp/example.zip/lib/` would only whatsnew/2.3.rst: >>> os.stat("/tmp").st_mtime whatsnew/2.3.rst: >>> os.stat("/tmp").st_mtime whatsnew/2.0.rst: output = UTF8_streamwriter( open( '/tmp/output', 'wb') ) whatsnew/2.0.rst: input = UTF8_streamreader( open( '/tmp/output', 'rb') ) whatsnew/2.6.rst: shutil.copytree('Doc/library', '/tmp/library', whatsnew/2.6.rst: # to the /tmp directory. whatsnew/2.6.rst: z.extract('Python/sysmodule.c', '/tmp') whatsnew/2.6.rst: plistlib.writePlist(data_struct, '/tmp/customizations.plist') whatsnew/2.6.rst: new_struct = plistlib.readPlist('/tmp/customizations.plist') whatsnew/2.7.rst: -> ./python.exe argparse-example.py -v -o /tmp/output -C 4 file1 file2 whatsnew/2.7.rst: {'output': '/tmp/output', whatsnew/2.4.rst: sts = subprocess.call(['dpkg', '-i', '/tmp/new-package.deb']) whatsnew/2.4.rst: sts = subprocess.call('dpkg -i /tmp/new-package.deb', shell=True) whatsnew/2.5.rst: dest = mailbox.mbox('/tmp/mbox') whatsnew/2.5.rst::file:`/tmp/example` file:: whatsnew/2.5.rst: conn = sqlite3.connect('/tmp/example') I can't change the status of resolution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 11:05:58 2010 From: report at bugs.python.org (Jean-Michel Fauth) Date: Fri, 04 Jun 2010 09:05:58 +0000 Subject: [issue8895] newline arg/attribute in the module io In-Reply-To: <1275642358.27.0.48977523408.issue8895@psf.upfronthosting.co.za> Message-ID: <1275642358.27.0.48977523408.issue8895@psf.upfronthosting.co.za> New submission from Jean-Michel Fauth : I was confused about the newline argument/attribute in the misc. classes of the io module until I realize there is a spelling issue between the docs and the real implementation. (Py 2.6.5, Py2.7b2). Py 3.x not tested. >>> sys.version 2.7b2 (r27b2:81019, May 9 2010, 11:33:14) [MSC v.1500 32 bit (Intel)] >>> sio = io.StringIO(u'abc') >>> sio.encoding, type(sio.encoding) (None, ) >>> sio.errors, type(sio.errors) (None, ) >>> sio.newline, type(sio.newline) Traceback (most recent call last): File "", line 1, in AttributeError: '_io.StringIO' object has no attribute 'newline' >>> sio.newlines, type(sio.newlines) (None, ) >>> >>> tio = io.TextIOWrapper(io.BytesIO()) >>> tio.buffer, type(tio.buffer) (<_io.BytesIO object at 0x02E6E600>, ) >>> tio.encoding, type(tio.encoding) ('cp1252', ) >>> tio.errors, type(tio.errors) ('strict', ) >>> tio.line_buffering, type(tio.line_buffering) (False, ) >>> tio.newline, type(tio.newline) Traceback (most recent call last): File "", line 1, in AttributeError: '_io.TextIOWrapper' object has no attribute 'newline' >>> tio.newlines, type(tio.newlines) (None, ) >>> sys.version 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] >>> import io >>> tio = io.TextIOWrapper(io.BytesIO()) >>> tio.encoding, type(tio.encoding) ('cp1252', ) >>> tio.line_buffering, type(tio.line_buffering) (False, ) >>> tio.errors, type(tio.errors) (u'strict', ) >>> tio.newline, type(tio.newline) Traceback (most recent call last): File "", line 1, in AttributeError: 'TextIOWrapper' object has no attribute 'newline' >>> tio.newlines, type(tio.newlines) (None, ) >>> [e for e in dir(tio) if 'new' in e] ['__new__', 'newlines'] >>> ---------- components: IO messages: 107017 nosy: jmfauth priority: normal severity: normal status: open title: newline arg/attribute in the module io versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 11:14:53 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 04 Jun 2010 09:14:53 +0000 Subject: [issue4487] Add utf8 alias for email charsets In-Reply-To: <1275582683.23.0.384513249134.issue4487@psf.upfronthosting.co.za> Message-ID: <4C08C408.8090100@egenix.com> Marc-Andre Lemburg added the comment: R. David Murray wrote: > > R. David Murray added the comment: > > For various reasons the email module has a table of character sets. What might be most effective would be for the email module to look a character set name up in the codecs module and find out the cannonical name of the character set, and then look that up in its table (ie: remove the aliases table from email completely, and instead depend on codecs to resolve the cannonical name). Unfortunately the codecs module does not recognize all of the aliases used by email, nor is there necessarily any guarantee that the two modules will agree on the proper cannonical name. I think that the encodings package should be the only source of valid aliases and encoding names - after all, you wouldn't be able to process email content using names or aliases not appearing in the encodings package tables. If there are aliases missing, then we can add them there. If the email packages needs different canonical names, it can apply its own map on the canonical names returned by the encodings package. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 11:39:23 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 Jun 2010 09:39:23 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1275644363.46.0.250797534151.issue3244@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You should write your patch against Python 3.x (py3k). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 11:47:41 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 04 Jun 2010 09:47:41 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: <1275603061.19.0.376327576376.issue8891@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: On Fri, Jun 4, 2010 at 1:11 AM, ?ric Araujo wrote: > > Sorry for writing when tired. Clearer first sentence: If it does not change the code to match the docs or to fix a regression from an older version, it?s a feature. This is the biggest problem with rigidness Python process. In this specific case the patch doesn't make Python any more unstable and according to policy it won't be integrated into Python 2.7 unless release manager chooses otherwise. But! release manager is overwhelmed, so it is VERY unlikely that he will include this patch, because it is a distraction, and there are always more important stuff to judge. In addition RM can be incompetent in this particular part of Python dist and just couldn't take the risk of making random decisions. To resolve this bottleneck and help release managers make decisions, community members should be able to vote on patches. Then release managers could be able to make releases that satisfy more Python users. In addition the part of this decision for particular component of Python dist could be delegated to component maintainers preserving RM's right to veto any opinion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 12:02:40 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 04 Jun 2010 10:02:40 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: <1275599618.14.0.926604611145.issue8891@psf.upfronthosting.co.za> Message-ID: <1275645760.12.0.591727857022.issue8891@psf.upfronthosting.co.za> Tarek Ziad? added the comment: > community members should be able to vote on patches *or* the core dev responsible for the development of the incriminated package, which is me for distutils. This is an improvement, not a feature, and this won't make it to 2.7. While distutils is now frozen, I agree that we can add it in 3.2 ---------- priority: normal -> low versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 12:12:53 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 04 Jun 2010 10:12:53 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: <1275599618.14.0.926604611145.issue8891@psf.upfronthosting.co.za> Message-ID: <1275646373.25.0.86225977141.issue8891@psf.upfronthosting.co.za> Tarek Ziad? added the comment: by the way, I am not sure what you call a binary sirting of zip files (since two equivalent zip files can have different metadata) but if you mean comparing a unzip -l output, you could use zipinfo instead, to sort the output. Overall, you need to compare the size and CRC of each file. I don't know if zipinfo does this. Maybe this could be a feature in the zipfile module in python. a same_archive() function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 13:21:36 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Jun 2010 11:21:36 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: <1275599618.14.0.926604611145.issue8891@psf.upfronthosting.co.za> Message-ID: <1275650496.15.0.430046665271.issue8891@psf.upfronthosting.co.za> ?ric Araujo added the comment: ?This is an improvement, not a feature? I used the two terms with the same meaning :) Do we add this to distutils in 3.2 and distutils2 too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 13:23:21 2010 From: report at bugs.python.org (Forest Bond) Date: Fri, 04 Jun 2010 11:23:21 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1275650601.64.0.850823585877.issue3244@psf.upfronthosting.co.za> Forest Bond added the comment: I haven't yet touched Python 3.0, and may not have time to dig in at the moment. It wouldn't be suitable to provide a patch against 2.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 13:26:38 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 Jun 2010 11:26:38 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1275650601.64.0.850823585877.issue3244@psf.upfronthosting.co.za> Message-ID: <1275650793.3140.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > I haven't yet touched Python 3.0, and may not have time to dig in at > the moment. It wouldn't be suitable to provide a patch against 2.7? 2.7 is almost in release candidate phase, which means it's much too late for new features now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 13:26:47 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Jun 2010 11:26:47 +0000 Subject: [issue8895] newline vs. newlines in io module In-Reply-To: <1275642358.27.0.48977523408.issue8895@psf.upfronthosting.co.za> Message-ID: <1275650807.34.0.596598824542.issue8895@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. Could you check the docs for 3.1 and 3.x trunk (py3k) too? ---------- assignee: -> docs at python components: +Documentation -IO nosy: +docs at python, merwok stage: -> needs patch title: newline arg/attribute in the module io -> newline vs. newlines in io module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 13:28:44 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 Jun 2010 11:28:44 +0000 Subject: [issue8893] file.{read,readlines} behaviour on Solaris In-Reply-To: <1275609044.71.0.537925857344.issue8893@psf.upfronthosting.co.za> Message-ID: <1275650924.81.0.975185829434.issue8893@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +tim_one stage: -> patch review versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 13:33:34 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 04 Jun 2010 11:33:34 +0000 Subject: [issue8893] file.{read,readlines} behaviour on Solaris In-Reply-To: <1275609044.71.0.537925857344.issue8893@psf.upfronthosting.co.za> Message-ID: <1275651214.38.0.622346704652.issue8893@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch looks harmless to me, although I'm not sure we're guaranteeing any of the behaviour you are expecting. ?ric, the buffering layer in 3.x is not libc-based, and therefore shouldn't exhibit this particular issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 13:49:43 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 04 Jun 2010 11:49:43 +0000 Subject: [issue8895] newline vs. newlines in io module In-Reply-To: <1275642358.27.0.48977523408.issue8895@psf.upfronthosting.co.za> Message-ID: <1275652183.03.0.628521298561.issue8895@psf.upfronthosting.co.za> R. David Murray added the comment: This is as documented: http://docs.python.org/dev/3.0/library/io.html#io.TextIOBase.newlines The keyword argument is named 'newline', the attribute is named 'newlines'. The attribute does not record what was passed to the newline argument, rather it records what newlines have been actually encountered. ---------- nosy: +r.david.murray resolution: -> invalid stage: needs patch -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 13:50:27 2010 From: report at bugs.python.org (Forest Bond) Date: Fri, 04 Jun 2010 11:50:27 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1275652227.89.0.962310899762.issue3244@psf.upfronthosting.co.za> Forest Bond added the comment: Okay, I'll submit against py3k. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 13:50:56 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 04 Jun 2010 11:50:56 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: <1275645760.12.0.591727857022.issue8891@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: > Tarek Ziad? added the comment: > >> community members should be able to vote on patches > > *or* the core dev responsible for the development of the incriminated package, which is me for distutils. This is said in the last part of the quoted msg107020: """In addition the part of this decision for particular component of Python dist could be delegated to component maintainers preserving RM's right to veto any opinion.""" > While distutils is now frozen, I agree that we can add it in 3.2 It would be nice if Python process could allow me to maintain my own patched version of Python stdlibs so that I can use it instead of main stdlib and quickly switch between them. It would be nice to be able to share such patches and see in which versions (or forks) they were integrated. I wonder if PSF license allows that? > by the way, I am not sure what you call a binary sirting of zip files I am not sure where did you see me mention that "binary sirting" too. =) > (since two equivalent zip files can have different metadata) but if you mean comparing a unzip -l output, you could use zipinfo instead, to sort the output. I use well-defined development toolchain for working with binary files that can detect insignificant change in some kind of binary data like timestamps in .zip archive, but comparing moving blocks is a disaster. I need to analyze exact binary copies for troubleshooting issue8871 closely related to issue8870 to exclude any chance that binary .exe generated by distutils on non-MS filesystem differs from the one generated on MS FS. Even if it seems such a minor issue, believe me that you do not want to meet any other minor issues when investigating 12 points checklist for some distutils bug that could be actually a well-known MS problem, when the problem you need to solve is misbehaving SCons installer that needs to install a couple of files in somehow "seems to be protected" windows directories in Python installation. > Overall, you need to compare the size and CRC of each file. I don't know if zipinfo does this. > > Maybe this could be a feature in the zipfile module in python. a same_archive() function. No. The archives should be generated consistently, but it is impossible to create perfectly matching bdist_wininst archive anyway, because timestamps will differ. > FTR, this function has been moved to shutil, still with the zip shadowing and without the sorting. Tarek, are you going to deal with shadowing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 13:52:05 2010 From: report at bugs.python.org (Forest Bond) Date: Fri, 04 Jun 2010 11:52:05 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1275652325.25.0.135011090944.issue3244@psf.upfronthosting.co.za> Forest Bond added the comment: Should the module be called rfc2388 or should it go into email.mime as formdata? It seems odd to put something HTML/HTTP related into email.mime, but maybe that would be fine. In any case, httplib docs should probably point to this module with an example, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 13:53:40 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Jun 2010 11:53:40 +0000 Subject: [issue3243] Support iterable bodies in httplib In-Reply-To: <1214848938.76.0.928668674728.issue3243@psf.upfronthosting.co.za> Message-ID: <1275652420.82.0.879644590153.issue3243@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 13:55:00 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Jun 2010 11:55:00 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1275652500.1.0.102569830428.issue3244@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think it belongs in the http package. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 13:55:14 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 04 Jun 2010 11:55:14 +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: <1275652514.5.0.141076936244.issue8797@psf.upfronthosting.co.za> R. David Murray added the comment: +1 for putting retry control on the password manager. Probably the default should be set to 1. If I understand correctly, it is the password manager that would be prompting the user for a new password, if someone chose to implement such a password manager. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 13:56:35 2010 From: report at bugs.python.org (Forest Bond) Date: Fri, 04 Jun 2010 11:56:35 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1275652595.83.0.0132810159139.issue3244@psf.upfronthosting.co.za> Forest Bond added the comment: As http.formdata? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 13:59:39 2010 From: report at bugs.python.org (Christophe Kalt) Date: Fri, 04 Jun 2010 11:59:39 +0000 Subject: [issue8893] file.{read,readlines} behaviour on Solaris In-Reply-To: <1275609044.71.0.537925857344.issue8893@psf.upfronthosting.co.za> Message-ID: <1275652779.33.0.0817627604427.issue8893@psf.upfronthosting.co.za> Christophe Kalt added the comment: This is on Solaris 10, but I also see it on Solaris 8 w/ Python 2.4. Just tried Python 3.6.1, and it doesn't seem to have that problem. Python 2.7b2 has the problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 14:03:47 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 04 Jun 2010 12:03:47 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: <1275599618.14.0.926604611145.issue8891@psf.upfronthosting.co.za> Message-ID: <1275653027.67.0.572038296072.issue8891@psf.upfronthosting.co.za> Tarek Ziad? added the comment: """ I use well-defined development toolchain for working with binary files that can detect insignificant change in some kind of binary data like timestamps in .zip archive, but comparing moving blocks is a disaster. """ Please explain us how you compare the content of two zip archives. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 14:06:08 2010 From: report at bugs.python.org (Christophe Kalt) Date: Fri, 04 Jun 2010 12:06:08 +0000 Subject: [issue8893] file.{read,readlines} behaviour on Solaris In-Reply-To: <1275609044.71.0.537925857344.issue8893@psf.upfronthosting.co.za> Message-ID: <1275653168.58.0.268502499911.issue8893@psf.upfronthosting.co.za> Christophe Kalt added the comment: Antoine: I'm not sure what the expected behaviour should be either, this is certainly for others more familiar with Python than I to decide. Although I am certainly annoyed that the current behaviour differs between Solaris and Linux. Haven't had time to check other platforms to see how things should be. Also, the behaviour seems inconsistent between the various file methods on Solaris which seems wrong. Finally, from looking into fileobject.c, clearerr() is used in most places and the omissions (corrected by my patch) do seem unintentional to me, e.g. bugs. Hope this helps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 14:07:04 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Jun 2010 12:07:04 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1275653224.5.0.164080652653.issue3244@psf.upfronthosting.co.za> ?ric Araujo added the comment: Seems good to me, as long as the module docstring clearly stats whether it?s useful for the client side, the server side or both. BTW, isn?t there overlap with cgi.FieldStorage? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 14:10:08 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Jun 2010 12:10:08 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: <1275599618.14.0.926604611145.issue8891@psf.upfronthosting.co.za> Message-ID: <1275653408.71.0.0616315418507.issue8891@psf.upfronthosting.co.za> ?ric Araujo added the comment: > It would be nice if Python process could allow me to maintain my own > patched version of Python stdlibs so that I can use it instead of main > stdlib and quickly switch between them. It?s free software, you have the right to copy, edit and release it. As for the technical aspect of easy switching, editing sys.path seems the way to go, or use PYTHONPATH to give your custom stdlib modules to have precedence over the real stdlib. I?ll stop being off-topic now. :) Tarek, seen my question about distutils2? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 14:10:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Jun 2010 12:10:11 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: <1275599618.14.0.926604611145.issue8891@psf.upfronthosting.co.za> Message-ID: <1275653411.81.0.91892850191.issue8891@psf.upfronthosting.co.za> ?ric Araujo added the comment: > It would be nice if Python process could allow me to maintain my own > patched version of Python stdlibs so that I can use it instead of main > stdlib and quickly switch between them. It?s free software, you have the right to copy, edit and release it. As for the technical aspect of easy switching, editing sys.path seems the way to go, or use PYTHONPATH to give your custom stdlib modules to have precedence over the real stdlib. I?ll stop being off-topic now. :) Tarek, seen my question about distutils2? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 14:11:03 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Jun 2010 12:11:03 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: <1275599618.14.0.926604611145.issue8891@psf.upfronthosting.co.za> Message-ID: <1275653463.65.0.164705937946.issue8891@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 14:40:49 2010 From: report at bugs.python.org (Forest Bond) Date: Fri, 04 Jun 2010 12:40:49 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1275655249.22.0.560240745058.issue3244@psf.upfronthosting.co.za> Forest Bond added the comment: Hi, Patch attached. Let me know what needs fixing. I had to fix a bug in email.encoders for my tests to pass. I have not run the full test suite at this point (need to build py3k to do that, maybe I'll have time later today, but if someone else has time, feel free). Thanks, Forest ---------- keywords: +patch Added file: http://bugs.python.org/file17546/http_formdata.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 14:48:50 2010 From: report at bugs.python.org (Forest Bond) Date: Fri, 04 Jun 2010 12:48:50 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1275655730.31.0.140285032202.issue3244@psf.upfronthosting.co.za> Forest Bond added the comment: ?ric, Sorry, I just read your message. I'll post a new patch with a module docstring. I believe cgi.FieldStorage is only useful for parsing (i.e. on the server side). MIMEMultipartFormData is for generating multipart/form-data messages (i.e. on the client side). Thanks, Forest ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 14:51:09 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 04 Jun 2010 12:51:09 +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: <1275655869.6.0.611272326425.issue8797@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Agree to single retry for Basic Auth. We are just dealing with BasicAuthentication here, so that's why we did not have in the HTTPPasswdManager. But, let me consider that viewpoint too. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 14:53:52 2010 From: report at bugs.python.org (Forest Bond) Date: Fri, 04 Jun 2010 12:53:52 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1275656032.53.0.903448547928.issue3244@psf.upfronthosting.co.za> Forest Bond added the comment: Here's a new patch. ---------- Added file: http://bugs.python.org/file17547/http_formdata.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 14:56:08 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Jun 2010 12:56:08 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1275656168.81.0.931264566128.issue3244@psf.upfronthosting.co.za> ?ric Araujo added the comment: Would you please open another issue for the email fix? Bonus points if you test it on trunk too, since release candidate happens in some days :) Do you people think we could unify client and server-side code in the new module (with an alias from cgi for b/w compat), to prevent endless questions? Minor remark: I think we don?t have to follow the email naming scheme here. A simpler name like FormData could be just fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 15:11:06 2010 From: report at bugs.python.org (Forest Bond) Date: Fri, 04 Jun 2010 13:11:06 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1275657066.99.0.435674758347.issue3244@psf.upfronthosting.co.za> Forest Bond added the comment: Hm, there is one issue. The example in the docstring wouldn't work. You have to get the headers *after* the body, because the boundary isn't generated until the body has been. So this would work: body = msg.get_body() headers = dict(msg) But this won't: headers = dict(msg) body = msg.get_body() I'm not sure what the best way to deal with this is. Maybe instead of get_body we should have get_request_data which returns both headers and body. That would provide simpler semantics. Thoughts? Thanks, Forest ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 15:23:51 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 04 Jun 2010 13:23:51 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: <1275653027.67.0.572038296072.issue8891@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: > """ > I use well-defined development toolchain for working with binary files > that can detect insignificant change in some kind of binary data like > timestamps in .zip archive, but comparing moving blocks is a disaster. > """ > > Please explain us how you compare the content of two zip archives. Here is the open source approach. I use soviet "swiss army knife" Far Manager tool from http://www.farmanager.com/ that some years ago became open sourced under revised BSD license. It can not compare files itself, but allows you to switch forth and back between two dumps of files in hex view with Ctrl-Tab / Ctrl-Shift-Tab shortcuts. The comparison is done with standard windows command line tool "fc". It is better to explain by example - I will list the key you need to type and explanation below - keyboard shortcuts are in square barckets. Right panel is C:\Downloads\python-wget\dist, left panel is M:\, the cursor is placed on file wget-0.6.win32.force.exe that is present in left and right panels and is the subject for comparison 1. fc /b [Ctrl-Enter] [Ctrl-]][Ctrl-Enter] this will give you the command line `fc /b wget-0.6.win32.force.exe M:\wget-0.6.win32.force.exe` 2. [Ctrl-Home]edit:< this will give you the command line `edit: _______________________________________ From report at bugs.python.org Fri Jun 4 15:25:56 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Jun 2010 13:25:56 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: Message-ID: <4C08FEDE.4030702@netwok.org> ?ric Araujo added the comment: I think Takek asked more for a description of the diff algo (e.g. ?compare the CRC?, ?compare all files?, etc.), not the UI of one tool. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 15:28:09 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 04 Jun 2010 13:28:09 +0000 Subject: [issue8891] sort files before archiving for consistency In-Reply-To: <1275653408.71.0.0616315418507.issue8891@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: On Fri, Jun 4, 2010 at 3:10 PM, ?ric Araujo wrote: > >> It would be nice if Python process could allow me to maintain my own >> patched version of Python stdlibs so that I can use it instead of main >> stdlib and quickly switch between them. > It?s free software, you have the right to copy, edit and release it. Sound good, but in reality I still have to get back the rest of the quote: """I wonder if PSF license allows that?""" > As for the technical aspect of easy switching, editing sys.path seems the way to go, or use PYTHONPATH to give your custom stdlib modules to have precedence over the real stdlib. Good starting point. The sync with stdlib and patch management is a bigger issue though. > I?ll stop being off-topic now. :) Yep. In Google Wave we could split it earlier and clean up this one. =) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 15:40:00 2010 From: report at bugs.python.org (Forest Bond) Date: Fri, 04 Jun 2010 13:40:00 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1275658800.61.0.550355693647.issue3244@psf.upfronthosting.co.za> Forest Bond added the comment: New patch: * Renames class to FormData. * Replaces method get_body with get_request_data to simplify semantics. * Drops changes to email.encoders. I'll create a new ticket to deal with that bug. Note that tests here fail without that fix. ---------- Added file: http://bugs.python.org/file17548/http_formdata.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 15:44:44 2010 From: report at bugs.python.org (Jean-Michel Fauth) Date: Fri, 04 Jun 2010 13:44:44 +0000 Subject: [issue8895] newline vs. newlines in io module In-Reply-To: <1275652183.03.0.628521298561.issue8895@psf.upfronthosting.co.za> Message-ID: Jean-Michel Fauth added the comment: 2010/6/4 R. David Murray > > R. David Murray added the comment: > > This is as documented: > > http://docs.python.org/dev/3.0/library/io.html#io.TextIOBase.newlines > > The keyword argument is named 'newline', the attribute is named 'newlines'. > The attribute does not record what was passed to the newline argument, > rather it records what newlines have been actually encountered. > Ok, I see. I read, reread the doc prior posting, and, in my mind, it is not obvious to understand this subtle difference from the doc. Sorry for the noise. Regards. ---------- Added file: http://bugs.python.org/file17549/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------

2010/6/4 R. David Murray <report at bugs.python.org>

R. David Murray <rdmurray at bitdance.com> added the comment:

This is as documented:

?? http://docs.python.org/dev/3.0/library/io.html#io.TextIOBase.newlines

The keyword argument is named 'newline', the attribute is named 'newlines'. ??The attribute does not record what was passed to the newline argument, rather it records what newlines have been actually encountered.

Ok, I see. I read, reread the doc prior posting, and, in my mind, it is not obvious to understand this subtle difference from the doc.
Sorry for the noise.
Regards.

From report at bugs.python.org Fri Jun 4 15:45:14 2010 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 04 Jun 2010 13:45:14 +0000 Subject: [issue8890] Module logging has dangerous examples In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1275659114.21.0.816534772477.issue8890@psf.upfronthosting.co.za> Vinay Sajip added the comment: Other logging cases contained /tmp/ has now been removed, the missing parenthesis added and the result checked in to trunk (r81684). I'll keep the issue open for the cases which remain in the other documentation. but remove myself from the assigned-to and change the resolution to "accepted". ---------- assignee: vinay.sajip -> resolution: fixed -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 15:47:27 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Jun 2010 13:47:27 +0000 Subject: [issue8890] Module logging has dangerous examples In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1275659247.19.0.912264654272.issue8890@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the listing Henri. Not all of these examples have to be changed; I?ll review them in some days if you want. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 15:48:44 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Jun 2010 13:48:44 +0000 Subject: [issue8895] newline vs. newlines in io module In-Reply-To: <1275642358.27.0.48977523408.issue8895@psf.upfronthosting.co.za> Message-ID: <1275659324.62.0.0666245445913.issue8895@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file17549/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 15:49:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Jun 2010 13:49:11 +0000 Subject: [issue8895] newline vs. newlines in io module In-Reply-To: <1275642358.27.0.48977523408.issue8895@psf.upfronthosting.co.za> Message-ID: <1275659351.45.0.959470544624.issue8895@psf.upfronthosting.co.za> ?ric Araujo added the comment: Could you think of a way to improve the docs on that point? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 16:07:18 2010 From: report at bugs.python.org (Forest Bond) Date: Fri, 04 Jun 2010 14:07:18 +0000 Subject: [issue8896] email.encoders.encode_base64 sets payload to bytes, should set to str In-Reply-To: <1275660438.53.0.968124979089.issue8896@psf.upfronthosting.co.za> Message-ID: <1275660438.53.0.968124979089.issue8896@psf.upfronthosting.co.za> New submission from Forest Bond : Ran into this while tackling issue3244. Encoded payload members should not be bytes. In the case of base64, we should have an ascii string. ---------- components: Library (Lib) files: python-email-encoders-base64-str.patch keywords: patch messages: 107055 nosy: forest_atq priority: normal severity: normal status: open title: email.encoders.encode_base64 sets payload to bytes, should set to str versions: Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file17550/python-email-encoders-base64-str.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 16:08:01 2010 From: report at bugs.python.org (Forest Bond) Date: Fri, 04 Jun 2010 14:08:01 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1275660481.26.0.235035120494.issue3244@psf.upfronthosting.co.za> Forest Bond added the comment: See issue8896 for email.encoders fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 16:12:08 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Jun 2010 14:12:08 +0000 Subject: [issue7475] codecs missing: base64 bz2 hex zlib ... In-Reply-To: <1260484060.32.0.471733830707.issue7475@psf.upfronthosting.co.za> Message-ID: <1275660728.37.0.0325124709448.issue7475@psf.upfronthosting.co.za> ?ric Araujo added the comment: Related: bytes vs. str for base64 encoding in email, #8896 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 16:13:24 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 04 Jun 2010 14:13:24 +0000 Subject: [issue8896] email.encoders.encode_base64 sets payload to bytes, should set to str In-Reply-To: <1275660438.53.0.968124979089.issue8896@psf.upfronthosting.co.za> Message-ID: <1275660804.79.0.728335450236.issue8896@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +l0nwlf, r.david.murray versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 16:15:23 2010 From: report at bugs.python.org (Forest Bond) Date: Fri, 04 Jun 2010 14:15:23 +0000 Subject: [issue3244] multipart/form-data encoding In-Reply-To: <1214849078.87.0.171093103517.issue3244@psf.upfronthosting.co.za> Message-ID: <1275660923.5.0.192345277873.issue3244@psf.upfronthosting.co.za> Forest Bond added the comment: I don't think Python trunk has the encoders issue, as that is related to the base64 moving to the bytes type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 16:17:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 14:17:23 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1275592754.62.0.279269665035.issue5094@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Thu, Jun 3, 2010 at 3:19 PM, Mark Dickinson wrote: .. > Aren't there valid timezones that are offset by more than 12 hours from UTC? Indeed, Christmas Island uses UTC+14. (http://en.wikipedia.org/wiki/Kiritimati). The most western timezone seems to be UTC-12 used on two uninhabited islands. The tzinfo specification requires [-24, 24] hours range: """ .. the value returned must be a timedelta object specifying a whole number of minutes in the range -1439 to 1439 inclusive (1440 = 24*60; the magnitude of the offset must be less than one day). """ -- http://docs.python.org/dev/py3k/library/datetime.html#datetime.tzinfo.utcoffset I am torn between two options with a slight preference for the first: 1. Don't do any checking in the constructor and allow any timedelta used as an offset. This is the simplest to implement and most future proof. For example, it may be desirable to extend [-24, 24] to at least [-99, 99] to allow round-tripping of compliant RFC 3339 timestamps. (Note that I am not suggesting that real life more than a day offsets are possible, but once a standard allows impossible values, people tend to abuse them as special markers in their data.) 2. Require [-24, 24] hours range. This is the letter of the current tzinfo.utcoffset() definition. Opinions? What do you think ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 16:20:01 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 14:20:01 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275661201.18.0.0240422662727.issue5094@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Merging in issue7584 nosy list. ---------- nosy: +durban, l0nwlf, r.david.murray, techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 16:42:02 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Fri, 04 Jun 2010 14:42:02 +0000 Subject: [issue6312] httplib fails with HEAD requests to pages with "transfer-encoding: chunked" In-Reply-To: <1245419610.47.0.800823464354.issue6312@psf.upfronthosting.co.za> Message-ID: <1275662522.02.0.148268398098.issue6312@psf.upfronthosting.co.za> Changes by Dirkjan Ochtman : ---------- priority: normal -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 16:56:01 2010 From: report at bugs.python.org (Henri Salo) Date: Fri, 04 Jun 2010 14:56:01 +0000 Subject: [issue8890] Module logging has dangerous examples In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1275663361.68.0.865498164227.issue8890@psf.upfronthosting.co.za> Henri Salo added the comment: Please review the changes for the quality of the documentation. There probably is still more places to change. References can be made to: ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 16:56:21 2010 From: report at bugs.python.org (Henri Salo) Date: Fri, 04 Jun 2010 14:56:21 +0000 Subject: [issue8890] Modules have dangerous examples in documentation In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1275663381.49.0.526282961478.issue8890@psf.upfronthosting.co.za> Changes by Henri Salo : ---------- title: Module logging has dangerous examples -> Modules have dangerous examples in documentation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 16:57:41 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 04 Jun 2010 14:57:41 +0000 Subject: [issue8896] email.encoders.encode_base64 sets payload to bytes, should set to str In-Reply-To: <1275660438.53.0.968124979089.issue8896@psf.upfronthosting.co.za> Message-ID: <1275663461.73.0.901365555241.issue8896@psf.upfronthosting.co.za> R. David Murray added the comment: This is a duplicate of issue 4768. Could you attach your patch to that issue, please? ---------- assignee: -> r.david.murray superseder: -> email.generator.Generator object bytes/str crash - b64encode() bug? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 17:01:49 2010 From: report at bugs.python.org (Forest Bond) Date: Fri, 04 Jun 2010 15:01:49 +0000 Subject: [issue4768] email.generator.Generator object bytes/str crash - b64encode() bug? In-Reply-To: <1230571301.08.0.30132908931.issue4768@psf.upfronthosting.co.za> Message-ID: <1275663709.07.0.639307131108.issue4768@psf.upfronthosting.co.za> Forest Bond added the comment: Attaching patch from reported duplicate issue8896. ---------- nosy: +forest_atq Added file: http://bugs.python.org/file17551/python-email-encoders-base64-str.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 17:02:19 2010 From: report at bugs.python.org (Forest Bond) Date: Fri, 04 Jun 2010 15:02:19 +0000 Subject: [issue8896] email.encoders.encode_base64 sets payload to bytes, should set to str In-Reply-To: <1275660438.53.0.968124979089.issue8896@psf.upfronthosting.co.za> Message-ID: <1275663739.47.0.562076111723.issue8896@psf.upfronthosting.co.za> Forest Bond added the comment: Duplicate. See issue4768. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 17:03:24 2010 From: report at bugs.python.org (Forest Bond) Date: Fri, 04 Jun 2010 15:03:24 +0000 Subject: [issue4768] email.generator.Generator object bytes/str crash - b64encode() bug? In-Reply-To: <1230571301.08.0.30132908931.issue4768@psf.upfronthosting.co.za> Message-ID: <1275663804.93.0.168745712639.issue4768@psf.upfronthosting.co.za> Forest Bond added the comment: Note that my patch is roughly the same as the original posted by haypo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 17:07:29 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 15:07:29 +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: <1275664049.28.0.385189432088.issue7584@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > It seems to me that we should not try to produce an RFC 3339 compliant > date string from a naive datetime. It will be practical to accept > that restriction once issue 5094 is resolved. Does this mean that t.rfcformat() should fail if t is naive? According to my reading of RFC 3339, it is not correct to produce 'Z' timestamps when local offset is not known. My understanding is that compliant producers must either know their local timezone and specify correct offset in the suffix or produce UTC timestamps with '-00:00'. Consumers receiving a '...Z' timestamp should be able to rely on that to conclude that the producer is in the UTC+0 timezone. Raising an exception when local offset is not known is OK, but I think generating '-00:00' would be more useful. Note that overall I am -1 on this proposal. A naive application can probably get away with datetime.isoformat. A strictly compliant RFC 3339 implementation is beyond the scope of datetime module and belongs to a separate module which should probably support parsing of RFC 3339 timestamps as well. Rather than adding more xxxformat() methods, I would rather see datetime getting a custom __format__ that would be flexible enough to make writing standard formats easy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 17:10:13 2010 From: report at bugs.python.org (Tal Einat) Date: Fri, 04 Jun 2010 15:10:13 +0000 Subject: [issue4785] json.JSONDecoder() strict argument undocumented and potentially confusing In-Reply-To: <1230658934.34.0.991784557371.issue4785@psf.upfronthosting.co.za> Message-ID: <1275664213.31.0.634488336688.issue4785@psf.upfronthosting.co.za> Tal Einat added the comment: This goes down into _json.scanstring. Looking at the C code for scanstring_unicode, the strict parameter allow control characters inside strings: "if strict is zero then literal control characters are allowed". From the code itself (current py3k head, r81032), it seems this means any character <= 0x1f. See scanstring_unicode in http://svn.python.org/view/python/branches/py3k/Modules/_json.c?revision=81032&view=markup for details. Documentation should be updated accordingly. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 17:13:49 2010 From: report at bugs.python.org (Tal Einat) Date: Fri, 04 Jun 2010 15:13:49 +0000 Subject: [issue4785] json.JSONDecoder() strict argument undocumented and potentially confusing In-Reply-To: <1230658934.34.0.991784557371.issue4785@psf.upfronthosting.co.za> Message-ID: <1275664429.0.0.0124071376188.issue4785@psf.upfronthosting.co.za> Tal Einat added the comment: This goes down into _json.scanstring. Looking at the C code for scanstring_unicode, strict=False allows control characters inside strings: "if strict is zero then literal control characters are allowed". From the code itself (current py3k head, r81032), it seems this means any character <= 0x1f. See scanstring_unicode in http://svn.python.org/view/python/branches/py3k/Modules/_json.c?revision=81032&view=markup for details. Documentation should be updated accordingly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 17:38:07 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 04 Jun 2010 15:38:07 +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: <1275665887.97.0.0511971540401.issue7584@psf.upfronthosting.co.za> R. David Murray added the comment: I see I didn't think it through far enough. Given this, it seems that the Atom standard is saying, "if you don't know your actual UTC offset, you can't generate a valid ATOM timestamp". Which sorta makes sense, though you'd think they'd want to accept a -00:00 timestamp since then at least you know when the article was generated/modified, even if you don't know the local time of the poster. And maybe they do, since as someone pointed out -00:00 is a numeric offest... I agree that generalizing the production of custom formats sounds like a better way forward long term. I'm not clear on why you think RFC3339 deserves its own module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 17:42:10 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 04 Jun 2010 15:42:10 +0000 Subject: [issue8828] Atomic function to rename a file In-Reply-To: <1274917301.93.0.503310941815.issue8828@psf.upfronthosting.co.za> Message-ID: <1275666130.25.0.951948314069.issue8828@psf.upfronthosting.co.za> R. David Murray added the comment: Victor: you could always name it best_effort_at_atomic_rename :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 17:45:45 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 04 Jun 2010 15:45:45 +0000 Subject: [issue4487] Add utf8 alias for email charsets In-Reply-To: <1228223832.43.0.0399583143577.issue4487@psf.upfronthosting.co.za> Message-ID: <1275666345.3.0.823749406924.issue4487@psf.upfronthosting.co.za> R. David Murray added the comment: Mark, any objection to my putting this patch in now, and then we'll fix the aliases implementation in 3.2? ---------- versions: +Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 18:05:47 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 16:05:47 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275667547.33.0.874032866075.issue5094@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > I'm still leary of supporting any form of DST. A proper DST > implementation would need to have some conditional code to > account for the datetime object passed into dst, and yet the > version you have prototyped doesn't handle it. No, any tzinfo implementation where utcoffset(dt) depends on dt is broken because once utcoffset starts to vary with time you can no longer determine a point in time from the local time alone. (In theory, a continuously increasing or decreasing in time utcoffset is an exception to this rule, but there is no practical use for those.) This limitation is admitted in datetime.tzinfo documentation: """ Note that there are unavoidable subtleties twice per year in a tzinfo subclass accounting for both standard and daylight time, at the DST transition points. ... Applications that can?t bear such ambiguities should avoid using hybrid tzinfo subclasses; there are no ambiguities when using UTC, or any other fixed-offset tzinfo subclass (such as a class representing only EST (fixed offset -5 hours), or only EDT (fixed offset -4 hours)). """ (See three paragraphs above http://docs.python.org/dev/py3k/library/datetime.html#strftime-and-strptime-behavior) In pytz, , tzinfo API is extended to add an is_dst flag to utcoffset(), tzname(), and dst() methods, but since datetime objects do not carry this flag, it is impossible for datetime module to pass this flag to timezone within datetime.datetime methods and datetime module does not know about this flag to begin with. To add insult to injury, the extended API still does not solve all the problems: . > So a proper timezone supporting DST would still need to subclass > any concrete class. No, as I explained above, it is not possible to implement a "proper timezone." I believe most of the frustration with the current tzinfo API stems from the fact that it is not implementable. The correct interface to a timezone database should provide a mapping from (universal time, geographical location) to civil time there and then. A common name for the timezone in use and information about DST being in effect is useful for interoperability but not strictly required. This is what I implemented in my localtime() prototype in localtime.py (loosing DST information) and datetimeex.py (interoperable with POSIX timetupe based interfaces and pytz extended API). Note that on systems supporting extended tm structure (with tm_zone and tm_gmtoff fields), it is possible to implement localtime() which will take advantage of the full historical timezone information available on the system. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 18:12:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 16:12:23 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275667943.99.0.767667793423.issue5094@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +tim_one _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 18:17:21 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 04 Jun 2010 16:17:21 +0000 Subject: [issue4768] email.generator.Generator object bytes/str crash - b64encode() bug? In-Reply-To: <1230571301.08.0.30132908931.issue4768@psf.upfronthosting.co.za> Message-ID: <1275668241.5.0.859157725922.issue4768@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, but yours was better formatted, so I used it :) Thanks for the patch. Applied in r81685 to py3k, and r81686. ---------- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 18:22:50 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 04 Jun 2010 16:22:50 +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: <1275668570.45.0.975004000598.issue8271@psf.upfronthosting.co.za> Ezio Melotti added the comment: I added a test for the 'ignore' error handler. I will commit the patch before the RC unless someone has something against it. To summarize, the patch updates PyUnicode_DecodeUTF8 from RFC 2279 to RFC 3629, so: 1) Invalid sequences are now handled as described in http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (pages 94-95); 2) 5- and 6-bits-long sequences are now invalid (no changes in behavior, I just removed the "deafult:" of the switch/case and marked them with '0' in the first table); 3) According to RFC 3629, codepoints in the surrogate range (U+D800-U+DFFF) should be considered invalid, but this would not be backward compatible, so I added code and tests but left them commented away; 4) I changed the error message "unexpected code byte" to "invalid start byte" and "invalid data" to "invalid continuation byte"; 5) I added an extensive set of tests in test_unicode; 6) I fixed test_codeccallbacks because it was failing after this change. ---------- Added file: http://bugs.python.org/file17552/issue8271v5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 18:45:32 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 04 Jun 2010 16:45:32 +0000 Subject: [issue4768] email.generator.Generator object bytes/str crash - b64encode() bug? In-Reply-To: <1230571301.08.0.30132908931.issue4768@psf.upfronthosting.co.za> Message-ID: <1275669932.28.0.552062906393.issue4768@psf.upfronthosting.co.za> R. David Murray added the comment: @garazi111: if you have an example where quopri fails, please open a new issue for it. I suspect you are right that there is a problem there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 18:46:09 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 04 Jun 2010 16:46:09 +0000 Subject: [issue6312] httplib fails with HEAD requests to pages with "transfer-encoding: chunked" In-Reply-To: <1245419610.47.0.800823464354.issue6312@psf.upfronthosting.co.za> Message-ID: <1275669969.59.0.707161335121.issue6312@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in r81687, r81688, r81689 and r81690. Yes, I see that before the original change was made any chuncked encoding went through _read_chunked which close the resp before returning. So, here for HEAD, the resp is closed thus fixing the problem mentioned by djc. ---------- priority: release blocker -> resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 19:06:48 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Fri, 04 Jun 2010 17:06:48 +0000 Subject: [issue6312] httplib fails with HEAD requests to pages with "transfer-encoding: chunked" In-Reply-To: <1245419610.47.0.800823464354.issue6312@psf.upfronthosting.co.za> Message-ID: <1275671208.29.0.64656910285.issue6312@psf.upfronthosting.co.za> Dirkjan Ochtman added the comment: Might be useful to have a test for this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 19:23:11 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 04 Jun 2010 17:23:11 +0000 Subject: [issue8864] multiprocessing: undefined struct/union member: msg_control In-Reply-To: <1275342146.08.0.266544809639.issue8864@psf.upfronthosting.co.za> Message-ID: <1275672191.2.0.516211865605.issue8864@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Fixed in r81692, r81694. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 19:26:29 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 04 Jun 2010 17:26:29 +0000 Subject: [issue5467] tools\msi\merge.py is sensitive to lack of config.py In-Reply-To: <1236694315.39.0.154575641767.issue5467@psf.upfronthosting.co.za> Message-ID: <1275672389.89.0.585504949901.issue5467@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch is now out of date; merge.py got merged into msi.py. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 19:33:11 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 04 Jun 2010 17:33:11 +0000 Subject: [issue6312] httplib fails with HEAD requests to pages with "transfer-encoding: chunked" In-Reply-To: <1245419610.47.0.800823464354.issue6312@psf.upfronthosting.co.za> Message-ID: <1275672791.76.0.607239420648.issue6312@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I saw the earlier tests was closing it explicitly. Removed that and added a test which verifies the closed resp obj. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 19:34:55 2010 From: report at bugs.python.org (Thomas Jollans) Date: Fri, 04 Jun 2010 17:34:55 +0000 Subject: [issue8897] sunau bytes / str TypeError in Py3k In-Reply-To: <1275672895.91.0.97400241219.issue8897@psf.upfronthosting.co.za> Message-ID: <1275672895.91.0.97400241219.issue8897@psf.upfronthosting.co.za> New submission from Thomas Jollans : The sunau module, essentially, "doesn't work". This looks like a problem with the bytes/unicode transition of "str" in Python 3.x vs Python 2: Python 3.1.2 (r312:79147, Apr 15 2010, 15:35:48) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sunau >>> aufile = sunau.open('test.au', 'w') >>> aufile.setsampwidth(2) >>> aufile.setframerate(44100) >>> aufile.setnchannels(1) >>> aufile.writeframes(b'aabbccdd') Exception wave.Error: Error('# channels not specified',) in > ignored Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.1/sunau.py", line 393, in writeframes self.writeframesraw(data) File "/usr/lib/python3.1/sunau.py", line 383, in writeframesraw self._ensure_header_written() File "/usr/lib/python3.1/sunau.py", line 418, in _ensure_header_written self._write_header() File "/usr/lib/python3.1/sunau.py", line 452, in _write_header self._file.write(self._info) TypeError: must be bytes or buffer, not str >>> The wave and aifc modules work as expected when used like this, as does the above code in Python 2.6. Au_read.readframes correctly returns a bytes. I haven't tested this on a development version of Python. ---------- components: Library (Lib) messages: 107081 nosy: tjollans priority: normal severity: normal status: open title: sunau bytes / str TypeError in Py3k type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 19:36:47 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 04 Jun 2010 17:36:47 +0000 Subject: [issue4487] Add utf8 alias for email charsets In-Reply-To: <1275666345.3.0.823749406924.issue4487@psf.upfronthosting.co.za> Message-ID: <4C0939AC.7090206@egenix.com> Marc-Andre Lemburg added the comment: R. David Murray wrote: > > R. David Murray added the comment: > > Mark, any objection to my putting this patch in now, and then we'll fix the aliases implementation in 3.2? No. Please open a new issue targeting Python 3.2 for this. Thanks, -- Marc-Andre Lemburg eGenix.com ________________________________________________________________________ 2010-07-19: EuroPython 2010, Birmingham, UK 44 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 Jun 4 19:45:54 2010 From: report at bugs.python.org (Jean-Michel Fauth) Date: Fri, 04 Jun 2010 17:45:54 +0000 Subject: [issue8895] newline vs. newlines in io module In-Reply-To: <1275659351.45.0.959470544624.issue8895@psf.upfronthosting.co.za> Message-ID: Jean-Michel Fauth added the comment: 2010/6/4 ??ric Araujo > > ??ric Araujo added the comment: > > Could you think of a way to improve the docs on that point? > > ---------- > > Quick and dirty answer. I have ~10 years experience with Python and it seems to me the io module is technically excellent. However, I have found it is not so obvious to understand the usage of all these arguments, errors, encoding, line_buffering, ... in the class constructors and methods like io.open(). The doc describes what these arguments are, their states, but not too much how to use them. As an exemple, I read some time ago on the c.l.p mailing list, somebody complaining about the "encoding" argument of the class TextIOWrapper. He defined an "encoding='utf-8'" in the ctor and did not understand why his "text" was not automagically encoded. Answer: the encoding arg is only a kind of information and does not do anything. BTW, it was only when I read that post, I understand a little bit more. Regards. ---------- Added file: http://bugs.python.org/file17553/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------

2010/6/4 ??ric Araujo <report at bugs.python.org>

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

Could you think of a way to improve the docs on that point?

----------

Quick and dirty answer.

I have ~10 years experience with Python and it seems
to me the io module is technically excellent.

However, I have found it is not so obvious to
understand the usage of all these arguments,
errors, encoding, line_buffering, ... in the
class constructors and methods like io.open().

The doc describes what these arguments are,
their states, but not too much how to use
them.

As an exemple, I read some time ago on the c.l.p
mailing list, somebody complaining about the "encoding"
argument of the class TextIOWrapper. He defined an
"encoding='utf-8'" in the ctor and did not
understand why his "text" was not automagically
encoded. Answer: the encoding arg is only a kind
of information and does not do anything.

BTW, it was only when I read that post, I understand
a little bit more.

Regards.

From report at bugs.python.org Fri Jun 4 20:15:22 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 04 Jun 2010 18:15:22 +0000 Subject: [issue5464] msgfmt.py does not work with plural form In-Reply-To: <1236635230.35.0.0644981096799.issue5464@psf.upfronthosting.co.za> Message-ID: <1275675322.35.0.955443852967.issue5464@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is now fixed in r81697 and r81698. ---------- resolution: -> fixed status: open -> closed versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 20:33:37 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 04 Jun 2010 18:33:37 +0000 Subject: [issue8895] newline vs. newlines in io module In-Reply-To: <1275642358.27.0.48977523408.issue8895@psf.upfronthosting.co.za> Message-ID: <1275676417.55.0.138666859023.issue8895@psf.upfronthosting.co.za> R. David Murray added the comment: This is off topic for this issue, but what you just reported makes no sense to me. TextIOWrapper calls the encoder corresponding to the specified encoding in its write method. That said, it is true that the IO docs are currently a class reference and not a user reference, and this should be fixed. There may even already be an open issue for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 20:34:03 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 18:34:03 +0000 Subject: [issue1647654] No obvious and correct way to get the time zone offset Message-ID: <1275676443.64.0.915516764949.issue1647654@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Issue #1667546 is more ambitious than this. I propose a very simple patch which makes tm_zone and tm_gmtoff available on systems with HAVE_STRUCT_TM_TM_ZONE defined (Linux and BSD variants). The additional fields are only allowed as attributes so len(time.localtime()) is still the same. This choice allows to get access to extra fields without breaking code that relies on the size of timetuple. The patch needs documentation updates which I will add if the idea is well received. ---------- keywords: +patch nosy: +mark.dickinson stage: -> patch review versions: +Python 3.2 -Python 2.7, Python 3.1 Added file: http://bugs.python.org/file17554/issue1647654.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 20:40:58 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 18:40:58 +0000 Subject: [issue1647654] No obvious and correct way to get the time zone offset Message-ID: <1275676858.65.0.0831378563251.issue1647654@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17555/issue1647654a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 20:54:18 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 04 Jun 2010 18:54:18 +0000 Subject: [issue8898] The email package should defer to the codecs module for all aliases In-Reply-To: <1275677631.44.0.514670475259.issue8898@psf.upfronthosting.co.za> Message-ID: <1275677631.44.0.514670475259.issue8898@psf.upfronthosting.co.za> New submission from R. David Murray : Currently the email module maintains a set of "charset" aliases that it maps to codec names before looking up the codec in the codecs module. Ideally it should instead be able to just look up any 'charset' name, and if it is a valid alias for a codec, the codec module would return the codec with the canonical name. It is possible (I haven't checked yet) that the email module needs a different canonical 'charset' name for certain codecs, but if so it can do that mapping after getting the canonical codec name from codecs. To implement this we need to make two simple changes: 1) add any aliases the email module recognizes but the codecs module doesn't to the codecs module. 2) rewrite email.charset so that it does not have an ALIASES table (but may have a smaller 'canonical charset map' table instead). ---------- assignee: r.david.murray components: Library (Lib) keywords: easy messages: 107087 nosy: l0nwlf, lemburg, r.david.murray priority: normal severity: normal stage: unit test needed status: open title: The email package should defer to the codecs module for all aliases type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 21:26:43 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 04 Jun 2010 19:26:43 +0000 Subject: [issue6926] socket module missing IPPROTO_IPV6, IPPROTO_IPV4 In-Reply-To: <1253143086.64.0.131724035197.issue6926@psf.upfronthosting.co.za> Message-ID: <1275679603.53.0.80672089082.issue6926@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Following the python-dev consensus, I have now added a warning to the 2.7 installer that this will be the last release supporting Windows 2000. I still think that we should not bump the SDK version above 500 for 2.7. Changing the SDK level does *not just* enable new API functions and constants, it may also change the layout of structures, causing applications to break on earlier systems (see the desaster with SystemParametersInfo, #1601). Bumping the version for 3.2 is fine. ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 21:47:17 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 19:47:17 +0000 Subject: [issue8899] Add docstrings to time.struct_time In-Reply-To: <1275680837.43.0.377357755743.issue8899@psf.upfronthosting.co.za> Message-ID: <1275680837.43.0.377357755743.issue8899@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : The time.struct_time class is missing class and field docstrings: >>> time.struct_time.__doc__ is None True >>> time.struct_time.tm_year.__doc__ is None True This is significant because it is not obvious that field values are different from those of C language struct tm fields with the same names. (While module level docstring describes the timetuple, it does not list the names of the struct_time fields or mentions struct_time.) With the attached patch, >>> from time import * >>> localtime() time.struct_time(tm_year=2010, tm_mon=6, tm_mday=4, tm_hour=15, tm_min=27, tm_sec=15, tm_wday=4, tm_yday=155, tm_isdst=1) >>> help(_) Help on struct_time object: time.struct_time = class struct_time(__builtin__.object) | The time value as returned by gmtime(), localtime(), and strptime(), and accepted | by asctime(), mktime() and strftime(), may be considered as a sequence of 9 integers. | Note that several fields' values are not the same as those defined by the C language | standard for struct tm. For example, the value of tm_year is the actual year, not | year - 1900. See individual fields' descriptions for details. ... | ---------------------------------------------------------------------- | Data descriptors defined here: | | tm_hour | hours, range [0 - 23] | | tm_isdst | 1 if summer time is in effect, 0 if not, and -1 if cannot be determined | | tm_mday | day of month, range [1 - 31] | | tm_min | minutes, range [0 - 59] | | tm_mon | month of year, range [1 - 12] | | tm_sec | seconds, range [0 - 61]) | | tm_wday | day of week, range [0,6], Monday is 0 | | tm_yday | day of year, range [1,366] | | tm_year | year, for example, 1993 | | ---------------------------------------------------------------------- ---------- assignee: belopolsky components: Documentation files: struct_time_doc.diff keywords: easy, patch messages: 107089 nosy: belopolsky, docs at python, mark.dickinson priority: normal severity: normal stage: commit review status: open title: Add docstrings to time.struct_time type: feature request versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file17556/struct_time_doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 21:53:51 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 04 Jun 2010 19:53:51 +0000 Subject: [issue6470] Tkinter import fails when running Python.exe from a network share In-Reply-To: <1247430164.29.0.0724763544583.issue6470@psf.upfronthosting.co.za> Message-ID: <1275681231.08.0.201106905139.issue6470@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for the patch. Committed as r81701, r81702, r81703 and r81704. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 21:54:32 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 04 Jun 2010 19:54:32 +0000 Subject: [issue4487] Add utf8 alias for email charsets In-Reply-To: <1228223832.43.0.0399583143577.issue4487@psf.upfronthosting.co.za> Message-ID: <1275681272.84.0.981014537025.issue4487@psf.upfronthosting.co.za> R. David Murray added the comment: Patch committed to trunk in r81705. Leaving issue open pending porting to the other branches, but I've also opened issue 8898 to further change things so that codecs becomes the sole authority for aliases in 3.2. ---------- resolution: -> fixed stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 22:09:20 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 04 Jun 2010 20:09:20 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275682160.9.0.0914585409976.issue5094@psf.upfronthosting.co.za> Brett Cannon added the comment: For the allowable range, follow the datetime docs as someone might be relying on that specification already. As for the ongoing DST debate, it seems we either need to say that since we cannot properly support all possible datetimes properly we should simply not even try, fixed offset or not, or we provide a class that gives the proper UTC offset, but in no way adjusts itself as people might expect or want. I'm arguing for the former, Alexander wants the latter. I still stand by my argument that it is not needed for the two use cases that we concretely have in the stdlib for a timezone class: a UTC instance and %z directive in strptime. Unless there is some way for the %z directive to specify that it is actually DST, I still think the functionality of the class should be kept to a functional minimum for our needs and let people needing more support, including fixed offset DST, decide how they want to handle it. I can still see a naive user thinking that DST is the same around the world and being taken by surprise when thing don't adjust accordingly by the timezone when he does ``timezone("PDT", 7, dst=True)``. Plus giving people any semblance of a DST-supporting timezone class is just going to lead for more calls of the stdlib to include concrete timezone instances that do manage DST. Unless other people step forward to debate this we probably are not going to reach consensus without going to python-dev to see what others think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 22:13:40 2010 From: report at bugs.python.org (Shashwat Anand) Date: Fri, 04 Jun 2010 20:13:40 +0000 Subject: [issue8898] The email package should defer to the codecs module for all aliases In-Reply-To: <1275677631.44.0.514670475259.issue8898@psf.upfronthosting.co.za> Message-ID: <1275682420.18.0.835843222268.issue8898@psf.upfronthosting.co.za> Shashwat Anand added the comment: from email.charset.ALIASES most of them failed to be recognize by codecs module. >>> for i in email.charset.ALIASES.keys(): ... try: ... codecs.lookup(i) ... except LookupError: ... print("Not recognized by codecs : alias {} mapped to {}".format(i, email.charset.ALIASES[i])) ... ... Not recognized by codecs : alias latin-8 mapped to iso-8859-14 Not recognized by codecs : alias latin-9 mapped to iso-8859-15 Not recognized by codecs : alias latin-2 mapped to iso-8859-2 Not recognized by codecs : alias latin-3 mapped to iso-8859-3 Not recognized by codecs : alias latin-6 mapped to iso-8859-10 Not recognized by codecs : alias latin-7 mapped to iso-8859-13 Not recognized by codecs : alias latin-4 mapped to iso-8859-4 Not recognized by codecs : alias latin-5 mapped to iso-8859-9 Not recognized by codecs : alias latin-10 mapped to iso-8859-16 Not recognized by codecs : alias latin_10 mapped to iso-8859-16 Not recognized by codecs : alias latin_2 mapped to iso-8859-2 Not recognized by codecs : alias latin_3 mapped to iso-8859-3 Not recognized by codecs : alias latin_4 mapped to iso-8859-4 Not recognized by codecs : alias latin_5 mapped to iso-8859-9 Not recognized by codecs : alias latin_6 mapped to iso-8859-10 Not recognized by codecs : alias latin_7 mapped to iso-8859-13 Not recognized by codecs : alias latin_8 mapped to iso-8859-14 Not recognized by codecs : alias latin_9 mapped to iso-8859-15 So basically apart from latin-1 all the latin* failed to be recognized by codecs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 22:14:13 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 20:14:13 +0000 Subject: [issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics In-Reply-To: <1275323981.58.0.479401459542.issue8860@psf.upfronthosting.co.za> Message-ID: <1275682453.32.0.303188053523.issue8860@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The timedelta(seconds=0.6112295) example is handled correctly because 0.6112295 sec is not half way between two nearest microseconds: >>> abs(0.6112295 - 0.6112290) == abs(0.6112295 - 0.6112300) False The fact that it displays as if it is does not make timedelta rounding wrong. I am still not sure that it is possible to accumulate rounding error by adding seven doubles, each < 1 to affect the rounded result. While proving that the rounding is always correct or finding a counter-example is an interesting puzzle, I think it has little practical value. I will add unit tests and get this patch ready for for commit review, but setting the priority to "low". ---------- components: +Extension Modules priority: normal -> low versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 22:18:30 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 20:18:30 +0000 Subject: [issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics In-Reply-To: <1275323981.58.0.479401459542.issue8860@psf.upfronthosting.co.za> Message-ID: <1275682710.3.0.547426193026.issue8860@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The half-way check should be done with decimal arihmetics, but the result is the same: >>> x = Decimal(0.6112295) >>> abs(x - Decimal('0.6112290')) == abs(x - Decimal('0.6112300')) False ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 22:21:49 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 04 Jun 2010 20:21:49 +0000 Subject: [issue8899] Add docstrings to time.struct_time In-Reply-To: <1275680837.43.0.377357755743.issue8899@psf.upfronthosting.co.za> Message-ID: <1275682909.91.0.0503379518119.issue8899@psf.upfronthosting.co.za> Georg Brandl added the comment: Patch review: * Quite a few lines are pretty long. Please stay below 80 chars/line. * There are trailing spaces in two member docs. * The range notation is inconsistent. [first, last] or [first, last+1) is what we generally use. * "if cannot be determined" does not sound grammatical, maybe just "unknown" is better. * Between "strftime()" and "may be considered" the sentence should be split. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 22:22:01 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 04 Jun 2010 20:22:01 +0000 Subject: [issue8860] Rounding in timedelta constructor is inconsistent with that in timedelta arithmetics In-Reply-To: <1275323981.58.0.479401459542.issue8860@psf.upfronthosting.co.za> Message-ID: <1275682921.87.0.0486946944464.issue8860@psf.upfronthosting.co.za> Mark Dickinson added the comment: > The timedelta(seconds=0.6112295) example is handled correctly No, it's not! It's being rounded *up* where it should be being rounded *down*. > because 0.6112295 sec is not half way between two nearest microseconds Exactly. The actual value stored by the C double is a little closer to 0.611229 than to 0.611230. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 22:43:39 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 04 Jun 2010 20:43:39 +0000 Subject: [issue8898] The email package should defer to the codecs module for all aliases In-Reply-To: <1275682420.18.0.835843222268.issue8898@psf.upfronthosting.co.za> Message-ID: <4C096577.2080500@egenix.com> Marc-Andre Lemburg added the comment: Shashwat Anand wrote: > > Shashwat Anand added the comment: > > from email.charset.ALIASES most of them failed to be recognize by codecs module. > > >>>> for i in email.charset.ALIASES.keys(): > ... try: > ... codecs.lookup(i) > ... except LookupError: > ... print("Not recognized by codecs : alias {} mapped to {}".format(i, email.charset.ALIASES[i])) > ... > ... > Not recognized by codecs : alias latin-8 mapped to iso-8859-14 > Not recognized by codecs : alias latin-9 mapped to iso-8859-15 > Not recognized by codecs : alias latin-2 mapped to iso-8859-2 > Not recognized by codecs : alias latin-3 mapped to iso-8859-3 > > Not recognized by codecs : alias latin-6 mapped to iso-8859-10 > Not recognized by codecs : alias latin-7 mapped to iso-8859-13 > Not recognized by codecs : alias latin-4 mapped to iso-8859-4 > Not recognized by codecs : alias latin-5 mapped to iso-8859-9 > > Not recognized by codecs : alias latin-10 mapped to iso-8859-16 > > Not recognized by codecs : alias latin_10 mapped to iso-8859-16 > > Not recognized by codecs : alias latin_2 mapped to iso-8859-2 > Not recognized by codecs : alias latin_3 mapped to iso-8859-3 > Not recognized by codecs : alias latin_4 mapped to iso-8859-4 > Not recognized by codecs : alias latin_5 mapped to iso-8859-9 > Not recognized by codecs : alias latin_6 mapped to iso-8859-10 > Not recognized by codecs : alias latin_7 mapped to iso-8859-13 > Not recognized by codecs : alias latin_8 mapped to iso-8859-14 > Not recognized by codecs : alias latin_9 mapped to iso-8859-15 > > > > > So basically apart from latin-1 all the latin* failed to be recognized by codecs. We need to add aliases for those codecs. The current aliases list only supports the format "latinN" for N in 1-10. ---------- title: The email package should defer to the codecs module for all aliases -> The email package should defer to the codecs module for all aliases _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 22:46:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 20:46:32 +0000 Subject: [issue8899] Add docstrings to time.struct_time In-Reply-To: <1275680837.43.0.377357755743.issue8899@psf.upfronthosting.co.za> Message-ID: <1275684392.15.0.2895195253.issue8899@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Please see fixes in issue8899.diff. * Quite a few lines are pretty long. Please stay below 80 chars/line. Fixed. * There are trailing spaces in two member docs. Fixed. * The range notation is inconsistent. [first, last] or [first, last+1) is what we generally use. Fixed in docstrings and time.rst. * "if cannot be determined" does not sound grammatical, maybe just "unknown" is better. Fixed. POSIX spec uses "if the information is not available", but I like * Between "strftime()" and "may be considered" the sentence should be split. Fixed in docstrings and time.rst. ---------- Added file: http://bugs.python.org/file17557/issue8899.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 22:53:04 2010 From: report at bugs.python.org (Shashwat Anand) Date: Fri, 04 Jun 2010 20:53:04 +0000 Subject: [issue8898] The email package should defer to the codecs module for all aliases In-Reply-To: <1275677631.44.0.514670475259.issue8898@psf.upfronthosting.co.za> Message-ID: <1275684784.08.0.39836176133.issue8898@psf.upfronthosting.co.za> Shashwat Anand added the comment: >We need to add aliases for those codecs. The current aliases >list only supports the format "latinN" for N in 1-10. latinN means latin1 to latin10 ? But latin_1 is a recognized alias. >>> codecs.lookup('latin_1') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 23:09:11 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 04 Jun 2010 21:09:11 +0000 Subject: [issue8899] Add docstrings to time.struct_time In-Reply-To: <1275680837.43.0.377357755743.issue8899@psf.upfronthosting.co.za> Message-ID: <1275685751.29.0.0815406834185.issue8899@psf.upfronthosting.co.za> Georg Brandl added the comment: The first change in time.rst is not needed; there the sentence is not a direct description of struct_time. The rest is good to commit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 23:14:19 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 04 Jun 2010 21:14:19 +0000 Subject: [issue8898] The email package should defer to the codecs module for all aliases In-Reply-To: <1275684784.08.0.39836176133.issue8898@psf.upfronthosting.co.za> Message-ID: <4C096CA7.3040508@egenix.com> Marc-Andre Lemburg added the comment: Shashwat Anand wrote: > > Shashwat Anand added the comment: > >> We need to add aliases for those codecs. The current aliases >> list only supports the format "latinN" for N in 1-10. > > latinN means latin1 to latin10 ? Yes. We should add aliases for the format "latin_N" as well. > But latin_1 is a recognized alias. > >>>> codecs.lookup('latin_1') > Yes, since that's the native name of the dedicated Python codec for ISO-8859-1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 23:22:22 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Jun 2010 21:22:22 +0000 Subject: [issue8847] crash appending list and namedtuple In-Reply-To: <1275087227.35.0.709211922869.issue8847@psf.upfronthosting.co.za> Message-ID: <1275686542.46.0.763477032981.issue8847@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Running the exact same binary on winxp with an amd athlon processor, I *did* get a crash after about 5 seconds. "python.exe has encountered a problem and needs to close. We are sorry for the inconvenience." Trying again with IDLE instead of the command window, I get the same message (for pythonw instead of python) and the shell restarts when I close the message. Even though foo()+[1] correctly raises a TypeError, the reverse [1] + foo() very bizarrely produces a length 1 tuple whose bizarre member is supposedly an instance of a empty list [] with length 1 from collections import namedtuple foo = namedtuple('foo', '') a = [1] + foo() b=a[0] print (type(a), len(a), type(b), len(type(b)), type(type(b))) # 1 [] 1 ([2]+foo() produces same output) Other than the above, any attempt to do anything with b or type(b) that I tried crashes. I presume that this is due to attribute lookups on the invalid type(b) (or something like that), which type(b) must bypass. In particular, the OP's crash is due to trying to print the tuple which tries to print its member which looks for type(b).__str__ which crashes. To anyone: investigating crashers like this is a lot easier with IDLE and an edit window than with the interactive command window. ---------- nosy: +tjreedy resolution: works for me -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 23:22:36 2010 From: report at bugs.python.org (AdamN) Date: Fri, 04 Jun 2010 21:22:36 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1275686556.26.0.200603701406.issue1712522@psf.upfronthosting.co.za> AdamN added the comment: Nudge. Somebody with the authority needs to increment the stage to "patch review". ---------- nosy: +adamnelson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 23:30:42 2010 From: report at bugs.python.org (Jack Diederich) Date: Fri, 04 Jun 2010 21:30:42 +0000 Subject: [issue8847] crash appending list and namedtuple In-Reply-To: <1275087227.35.0.709211922869.issue8847@psf.upfronthosting.co.za> Message-ID: <1275687042.29.0.492918641477.issue8847@psf.upfronthosting.co.za> Changes by Jack Diederich : ---------- nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 23:31:05 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 04 Jun 2010 21:31:05 +0000 Subject: [issue8847] crash appending list and namedtuple In-Reply-To: <1275087227.35.0.709211922869.issue8847@psf.upfronthosting.co.za> Message-ID: <1275687065.89.0.123635676067.issue8847@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 4 23:58:53 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 04 Jun 2010 21:58:53 +0000 Subject: [issue1712522] urllib.quote throws exception on Unicode URL Message-ID: <1275688733.71.0.718394122325.issue1712522@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: unit test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 00:17:43 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 22:17:43 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1275682160.9.0.0914585409976.issue5094@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, Jun 4, 2010 at 4:09 PM, Brett Cannon wrote: .. > For the allowable range, follow the datetime docs as someone might be relying on that specification already. > Will do. I think it is as simple simple s/12/24/ in two places of the current patch, but I will check and make sure it is tested by unittests. > As for the ongoing DST debate, it seems we either need to say that since we cannot properly support all possible > datetimes properly we should simply not even try, fixed offset or not, or we provide a class that gives the proper UTC > offset, but in no way adjusts itself as people might expect or want. I'm arguing for the former, Alexander wants the latter. > I disagree with your premise that "we cannot properly support all possible datetimes." If issue1647654 patch is applied, I can rewrite datetimeex.py so that print(localtime()) is consistent with the system date utility on Linux/MacOS/BSD for all times. This however can be achieved without DST offset in timezone object. The only issue is what time.strftime("%Z", localtime().timetuple()) will print. Recall that tm_isdst (the last entry in timetuple) is set according to what dst() returns. If dst() is None, tm_isdst = -1, if dst() is timedelta(0), tm_isdst = 0 and if dst() is non-zero timedelta, tm_isdst = 1. In these three cases, %Z will be formated as empty string, time.tzname[0] ('EST' in New York) and time.tzname[1] ('EDT' in New York) respectively. I would really like to get localtime() in datetime library at the next step. In the distant future, datetime.now() can be redefined to return aware local time. If this happens, we need to decide what localtime().dst() should return. With the current patch, it will return timedelta(0) which is wrong 50% of the time. A correct alternative is to return None, but this will be rather odd for timezone.utc. It appears that in order to implement dst() correctly to the letter of tzinfo specification there are really two choices: 1. Have separate classes: UTC and FixedOffsetTimezone with different dst(). UTC().dst(dt) -> timedelta(0) and FixedOffsetTimezone(offset).dst(dt) -> None. 2. Have a single class with dst(dt) returning fixed stored value. I think #2 clearly wins on simplicity. > I still stand by my argument that it is not needed for the two use cases that we concretely have in the stdlib for a > timezone class: a UTC instance and %z directive in strptime. I agree. The third member is needed to support aware local time, which is the third use case. > .. > I can still see a naive user thinking that DST is the same around the world and being taken > by surprise when thing don't adjust accordingly by the timezone when he does ``timezone("PDT", 7, dst=True)``. The actual syntax would be PDT = timezone(timedelta(hours=7), "PDT", dst=timedelta(hours=1)) (or -1 - I have to check). Is the surprise you have in mind that PDT.utcoffset(dt) is the same for dt in June and January? I agree this is not ideal and I would much rather not allow timezone.utcoffset() to take an argument, but this is not possible within the tzinfo design. Best we can do is to make the argument to utcoffset() optional and naive users will not even know that they can pass time value to the timezone methods. I think this is still less evil than to have an aware datetime t with t.tzname() -> 'PDT' and time.strftime('%Z', t.timetuple()) -> 'PST'. > Plus giving people any semblance of a DST-supporting timezone class is just going to lead for more calls of the > stdlib to include concrete timezone instances that do manage DST. > Again, managing DST is to use different timezone instances for different real times. It is not hard to do that. Implementing time-dependent utcoffset(dt) in a concrete tzinfo subclass is impossible unambiguously. In the long term we should be looking to deprecate the time argument to tzinfo methods. > Unless other people step forward to debate this we probably are not going to reach consensus > without going to python-dev to see what others think. Given the history of such discussions, I think we should reach consensus here first. I don't mind starting with a two-component timezone class and dst() returning None for all instances including timezone.utc. I still believe the cost of supporting DST is really small and adding it now is easier than in the future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 00:26:24 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 04 Jun 2010 22:26:24 +0000 Subject: [issue8899] Add docstrings to time.struct_time In-Reply-To: <1275680837.43.0.377357755743.issue8899@psf.upfronthosting.co.za> Message-ID: <1275690384.11.0.666025399025.issue8899@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 00:39:41 2010 From: report at bugs.python.org (Christophe Kalt) Date: Fri, 04 Jun 2010 22:39:41 +0000 Subject: [issue8893] file.{read,readlines} behaviour on Solaris In-Reply-To: <1275609044.71.0.537925857344.issue8893@psf.upfronthosting.co.za> Message-ID: <1275691181.22.0.0473119166504.issue8893@psf.upfronthosting.co.za> Christophe Kalt added the comment: FreeBSD is yet another beast: $ uname -rs FreeBSD 8.0-STABLE $ python -V Python 2.5.5 $ python readlines.py read : [] readlines: [] readline : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 00:40:00 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 04 Jun 2010 22:40:00 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: Message-ID: Brett Cannon added the comment: On Fri, Jun 4, 2010 at 15:17, Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Fri, Jun 4, 2010 at 4:09 PM, Brett Cannon wrote: > .. >> For the allowable range, follow the datetime docs as someone might be relying on that specification already. >> > Will do. ?I think it is as simple simple s/12/24/ in two places of the > current patch, but I will check and make sure it is tested by > unittests. Great! > >> As for the ongoing DST debate, it seems we either need to say that since we cannot properly support all possible >> datetimes properly we should simply not even try, fixed offset or not, or we provide a class that gives the proper UTC >> offset, but in no way adjusts itself as people might expect or want. I'm arguing for the former, Alexander wants the latter. >> > > I disagree with your premise that "we cannot properly support all > possible datetimes." If issue1647654 patch is applied, I can rewrite > datetimeex.py so that print(localtime()) is consistent with the system > date utility on Linux/MacOS/BSD for all times. ?This however can be > achieved without DST offset in timezone object. Well, I think the time module needs to be slowly phased out in preference for datetime and we stop monkey-patching the time tuple over and over again. The datetime module provides a much nicer interface and TOOWTDI, but that's a long term goal. > > The only issue is what time.strftime("%Z", localtime().timetuple()) > will print. ?Recall that tm_isdst (the last entry in timetuple) is set > according to what dst() returns. ?If dst() is None, ?tm_isdst = -1, if > dst() is timedelta(0), ?tm_isdst = 0 and if dst() is non-zero > timedelta, tm_isdst = 1. ?In these three cases, %Z will be formated as > empty string, time.tzname[0] ('EST' in New York) and time.tzname[1] > ('EDT' in New York) respectively. > > I would really like to get localtime() in datetime library at the next > step. In the distant future, datetime.now() can be redefined to return > aware local time. ?If this happens, we need to decide what > localtime().dst() should return. ?With the current patch, it will > return timedelta(0) which is wrong 50% of the time. ?A correct > alternative is to return None, but this will be rather odd for > timezone.utc. True. > > It appears that in order to implement dst() correctly to the letter of > tzinfo specification there are really two choices: > > 1. ?Have separate classes: UTC and FixedOffsetTimezone with different > dst(). ?UTC().dst(dt) -> timedelta(0) and > FixedOffsetTimezone(offset).dst(dt) -> None. > > 2. Have a single class with dst(dt) returning fixed stored value. > > I think #2 clearly wins on simplicity. Or #3: We have a UTC class as originally proposed way back when. We can even make all the methods staticmethods so that I get my desire to not require instantiating an instance while you do get your pseudo-singleton you originally wanted. > >> I still stand by my argument that it is not needed for the two use cases that we concretely have in the stdlib for a >> timezone class: a UTC instance and %z directive in strptime. > > I agree. ?The third member is needed to support aware local time, > which is the third use case. Sure, but we are not even there yet to consider that use case are we? > >> .. >> I can still see a naive user thinking that DST is the same around the world and being taken >> by surprise when thing don't adjust accordingly by the timezone when he does ``timezone("PDT", 7, dst=True)``. > > The actual syntax would be PDT = timezone(timedelta(hours=7), "PDT", > dst=timedelta(hours=1)) (or -1 - I have to check). Yes, I was typing from the cuff. > ?Is the surprise > you have in mind that PDT.utcoffset(dt) is the same for dt in June and > January? Exactly. > I agree this is not ideal and I would much rather not allow > timezone.utcoffset() to take an argument, but this is not possible > within the tzinfo design. ?Best we can do is to make the argument to > utcoffset() optional and naive users will not even know that they can > pass time value to the timezone methods. This is all starting to feel like the entire tzinfo ABC needs to be re-thought and either expanded upon or replaced. > > I think this is still less evil than to have an aware datetime t with > t.tzname() -> 'PDT' and time.strftime('%Z', t.timetuple()) -> 'PST'. > >> Plus giving people any semblance of a DST-supporting timezone class is just going to lead for more calls of the >> stdlib to include concrete timezone instances that do manage DST. >> > > Again, managing DST is to use different timezone instances for > different real times. ?It is not hard to do that. ?Implementing > time-dependent utcoffset(dt) in a concrete tzinfo subclass is > impossible unambiguously. ?In the long term we should be looking to > deprecate the time argument to tzinfo methods. This is why I hate datetime stuff. =) > >> Unless other people step forward to debate this we probably are not going to reach consensus >> without going to python-dev to see what others think. > > Given the history of such discussions, I think we should reach > consensus here first. ?I don't mind starting with a two-component > timezone class and dst() returning None for all instances including > timezone.utc. ?I still believe the cost of supporting DST is really > small and adding it now is easier than in the future. So how about this: we implement a UTC class now which contains only staticmethods to get you your singleton and me not having to instantiate the class. Then you take your time in possibly expanding the tzinfo class or coming up with a new ABC which replaces tzinfo that fixes all of these crazy problems. I have been arguing from a code maintainability and naive user POV, you from an experienced datetime POV. Lets solve my POV now and just start the ball rolling in solving your POV properly long-term instead of trying to shoe-horn known issues into pre-existing stuff. People complain about datetime enough, so let's take the time to fix it. The UTC class can be a stop-gap until datetime gets fixed (which could be in 3.2 if stuff happened really rapidly and the UTC solution can be ripped out; it's just code). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 00:51:31 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Jun 2010 22:51:31 +0000 Subject: [issue8847] crash appending list and namedtuple In-Reply-To: <1275087227.35.0.709211922869.issue8847@psf.upfronthosting.co.za> Message-ID: <1275691891.34.0.159102110547.issue8847@psf.upfronthosting.co.za> Terry J. Reedy added the comment: More experiments from collections import namedtuple foo = namedtuple('foo', '') a = [] + foo() print (a, type(a), len(a)) # () 0 ie, a standard empty tuple, whereas a = [1,1] + foo() crashes immediately. So the behavior of list()+namedtuple depends on the length of the list. There are also some funny interactions. Adding try: a = foo()+[] except TypeError: print("correct TypeError") after the 'foo = ' line in my original 5 line example causes the final print to crash, whereas adding the same 4 lines to the 4 line example at the beginning of this message does not obviously change anything. David, since you omitted all details, I wonder if you tested in batch mode, as I did, and hence never tried to print the malformed object, or used different OS or hardware. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 01:11:29 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Jun 2010 23:11:29 +0000 Subject: [issue8885] markerbase declaration errors aren't recoverable In-Reply-To: <1275563651.6.0.351540013915.issue8885@psf.upfronthosting.co.za> Message-ID: <1275693089.47.0.359763264519.issue8885@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Neither markerbase nor markupbase are in the list of 2.6 stdlib modules at http://docs.python.org/modindex.html even with all packages [+] listings expanded to [-]. So I have to guess this is a third party module. If so, please close and report to *its* authors, not here. ---------- nosy: +tjreedy resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 01:16:22 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Jun 2010 23:16:22 +0000 Subject: [issue8890] Modules have dangerous examples in documentation In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1275693382.92.0.586800244335.issue8890@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Henri, the owasp link you gave in your opening post now gives Bad Title error msg. ---------- nosy: +tjreedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 01:35:10 2010 From: report at bugs.python.org (Jack Diederich) Date: Fri, 04 Jun 2010 23:35:10 +0000 Subject: [issue8847] crash appending list and namedtuple In-Reply-To: <1275087227.35.0.709211922869.issue8847@psf.upfronthosting.co.za> Message-ID: <1275694510.34.0.133890958993.issue8847@psf.upfronthosting.co.za> Jack Diederich added the comment: I can't reproduce on 3k trunk with Ubuntu 10.04, gcc 4.4.3 namedtuples are just a subclass of tuple with only two dunder methods defined (a plain __new__ with empty __slots__). Can you provoke the same behavior with plain tuples, or a subclass of tuple that looks like one of these? class Crasher(tuple): pass class Crasher(tuple): __slots__ = () class Crasher(tuple): def __new__(cls,): return tuple.__new__(cls,) __slots__ = () ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 01:53:53 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 04 Jun 2010 23:53:53 +0000 Subject: [issue8847] crash appending list and namedtuple In-Reply-To: <1275087227.35.0.709211922869.issue8847@psf.upfronthosting.co.za> Message-ID: <1275695633.46.0.533443196978.issue8847@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Substituting foo = tuple() TypeError: can only concatenate list (not "tuple") to list class Crasher(tuple): pass foo = Crasher() a = [1] + foo b=a[0] print (type(a), len(a), type(b), len(type(b)), type(type(b))) 1 [] 1 as before, so namedtuple is not, in particular, the culprit. Other two Crasher versions do the same. I also get a delayed pythonw error message after the print that does not cause the shell to restart. This may partly be an IDLE artifact. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 01:58:18 2010 From: report at bugs.python.org (Michael Huster) Date: Fri, 04 Jun 2010 23:58:18 +0000 Subject: [issue8900] IDLE crashes if Preference set to At Startup -> Open Edit Window In-Reply-To: <1275695898.02.0.763223364629.issue8900@psf.upfronthosting.co.za> Message-ID: <1275695898.02.0.763223364629.issue8900@psf.upfronthosting.co.za> New submission from Michael Huster : This only seems to be a problem under Windows. >From a Portable Python discussion: I am using Portable Python 1.1, python 3.0.1. I am trying to set up a .bat file file to easily start IDLE. But IDLE is throwing an error and failing some of the time. It only happens if IDLE is set up to start in the edit mode. (Which I prefer.) And then it only throws the error the first time a file is opened. It doesn't seem to matter what kind of file is opened. The other symptom is that a new line is inserted at the top of the file that is opened. The error is (I'm typing it by hand): Exception in Tkinter callback Traceback (most recent call last): File "E:\py30\App\lib\tkinter\__init__.py", line 1399, in __call__ return self.func(*args) File "E:\py30\App\lib\idlelib\MultiCall.py", line 174, in handler doafterhandler.pop()() File "E:\py30\App\lib\idlelib\MultiCall.py", line 221, in doit = lambda: self.bindedfuncs[triplet[2]][triplet[0]].remove(func) ValueError: list.remove(x): x not in list I can work around this with a batch file that uses python.exe, not pythonw.exe, but it leaves an annoying command shell window open. I also tested IDLE under a normal python installation and the same thing happens, so, sorry, it is not a PP thing. There must be a bug in IDLE under py 3.0. I'll file this with python.org. ---------- components: IDLE messages: 107113 nosy: mhuster priority: normal severity: normal status: open title: IDLE crashes if Preference set to At Startup -> Open Edit Window type: crash versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 02:18:16 2010 From: report at bugs.python.org (Mark Nottingham) Date: Sat, 05 Jun 2010 00:18:16 +0000 Subject: [issue8885] markerbase declaration errors aren't recoverable In-Reply-To: <1275563651.6.0.351540013915.issue8885@psf.upfronthosting.co.za> Message-ID: <1275697096.76.0.147561647192.issue8885@psf.upfronthosting.co.za> Mark Nottingham added the comment: http://svn.python.org/view/python/trunk/Lib/markupbase.py?view=log ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 02:37:17 2010 From: report at bugs.python.org (Jack Diederich) Date: Sat, 05 Jun 2010 00:37:17 +0000 Subject: [issue8847] crash appending list and namedtuple In-Reply-To: <1275087227.35.0.709211922869.issue8847@psf.upfronthosting.co.za> Message-ID: <1275698237.82.0.120411988942.issue8847@psf.upfronthosting.co.za> Jack Diederich added the comment: Two more probes: 1) does it also have the same strange/crashy behavior when you subclass list and concat that to a tuple? 2) does dropping the optimization level down to -O help? This has "compiler quirk" written all over it. The C-code for list and tuple concat are almost identical, and both start with a type check. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 02:39:35 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Jun 2010 00:39:35 +0000 Subject: [issue8847] crash appending list and namedtuple In-Reply-To: <1275087227.35.0.709211922869.issue8847@psf.upfronthosting.co.za> Message-ID: <1275698375.37.0.270594662155.issue8847@psf.upfronthosting.co.za> Terry J. Reedy added the comment: "can't reproduce" does not inform as to what *did* happen with which code. More experiments: foo = str() TypeError: can only concatenate list (not "str") to list class s(str): pass foo = s() TypeError: Can't convert 'list' object to str implicitly Why is it trying to do that? Of course, the interpreter can (implicitly) convert list to tuple, which must be what happens in OP example. The subclasses of tuple and str do not gain an __radd__ method. If we add one class s(str): def __radd__(s,o): print('in radd, type(o)') foo = s() a = [1] + foo # prints "in radd " no implicit conversion is done. Reversing tuple and list class Crasher(list): pass a = () + Crasher() # or Crasher([1]) print(a, type(a), len(a)) #[] 0 # or [1] 1 whereas a = (1,) + Crasher() crashes, so not completely symmetrical ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 02:47:28 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Jun 2010 00:47:28 +0000 Subject: [issue8847] crash appending list and namedtuple In-Reply-To: <1275087227.35.0.709211922869.issue8847@psf.upfronthosting.co.za> Message-ID: <1275698848.28.0.0756073111317.issue8847@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 1) answered before you asked (yes, similar) 2) (same thought) I am using PSF windows installer, however that was prepared. Martin? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 02:53:01 2010 From: report at bugs.python.org (Edward Pilatowicz) Date: Sat, 05 Jun 2010 00:53:01 +0000 Subject: [issue8882] socketmodule.c`getsockaddrarg() should not check the length of sun_path In-Reply-To: <1275528470.51.0.813873994417.issue8882@psf.upfronthosting.co.za> Message-ID: <1275699181.28.0.114740635491.issue8882@psf.upfronthosting.co.za> Edward Pilatowicz added the comment: some additional data. AIX 6.1: defined sun_path = 1023 max sun_path = 1023 i'll also point out the existence of the SUN_LEN() macro, which is defined on all the previously mentioned operating systems, and which calculates the size of a sockaddr_un structure using strlen() of sun_path, not sizeof(). that said, as a counter argument, UNIX Network Programming by Richard Stevens explicitly mentions that the use of sizeof() is ok. still, personally, i think it's pretty risky for an OS to change this definition. (it seems that AIX is the only OS i've seen that has done so.) i say this because use of the sockaddr_un structure is so prevalent. it's commonly embedded into other structures and passed around via APIs that (unlike bind(), connect(), etc) don't take a size parameter which specifies the size of the structure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 03:31:57 2010 From: report at bugs.python.org (Jack Diederich) Date: Sat, 05 Jun 2010 01:31:57 +0000 Subject: [issue8847] crash appending list and namedtuple In-Reply-To: <1275087227.35.0.709211922869.issue8847@psf.upfronthosting.co.za> Message-ID: <1275701517.16.0.648116430065.issue8847@psf.upfronthosting.co.za> Jack Diederich added the comment: if the id() of the left operand is identical to the id() of the first element in the result it would strongly support compiler skulldugerry. class Crasher(tuple): pass foo = Crasher() x = [1] a = x + foo b=a[0] if id(b) == id(x): raise Exception("It's the C compiler what did it!") The only way I can think of this coming about is the right_op getting new'd and then .extend'ing(left_op). That extend() must be going batsh*t and inserting the left_op instead of it's contained items. The C-code for extend is more fiddly than the code for concatenation so there is more room for the compiler to generate bad code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 04:13:04 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 05 Jun 2010 02:13:04 +0000 Subject: [issue8847] crash appending list and namedtuple In-Reply-To: <1275087227.35.0.709211922869.issue8847@psf.upfronthosting.co.za> Message-ID: <1275703984.47.0.416857194985.issue8847@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Good try, but for one run, the ids of foo, x, a, and b are >>> 15719440 15717880 15273104 12266976 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 04:39:25 2010 From: report at bugs.python.org (flashk) Date: Sat, 05 Jun 2010 02:39:25 +0000 Subject: [issue8901] Windows registry path not ignored with -E option In-Reply-To: <1275705565.03.0.753930892849.issue8901@psf.upfronthosting.co.za> Message-ID: <1275705565.03.0.753930892849.issue8901@psf.upfronthosting.co.za> New submission from flashk : Hi, I noticed that Python still uses the Windows registry to initialize sys.path, when the -E option is used. >From my understanding, this option is mostly used by programs that are running an embedded version of python, and don't want it to be affected by global installations. Ignoring the registry, along with environment variables, seems to be the correct behavior in this case. I asked about this on the python-dev list (http://mail.python.org/pipermail/python-dev/2010-June/100492.html) and was told to submit a patch for this if I wanted it fixed before the 2.7 release. I've included a patch for 2.7 and 3.2 ---------- components: Interpreter Core files: IgnoreWindowsRegistry_27.patch keywords: patch messages: 107121 nosy: flashk priority: normal severity: normal status: open title: Windows registry path not ignored with -E option type: behavior versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file17558/IgnoreWindowsRegistry_27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 04:39:46 2010 From: report at bugs.python.org (flashk) Date: Sat, 05 Jun 2010 02:39:46 +0000 Subject: [issue8901] Windows registry path not ignored with -E option In-Reply-To: <1275705565.03.0.753930892849.issue8901@psf.upfronthosting.co.za> Message-ID: <1275705586.02.0.892586601031.issue8901@psf.upfronthosting.co.za> Changes by flashk : Added file: http://bugs.python.org/file17559/IgnoreWindowsRegistry_32.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 08:36:29 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 06:36:29 +0000 Subject: [issue8902] add datetime.time.now() for consistency In-Reply-To: <1275719789.45.0.168425659941.issue8902@psf.upfronthosting.co.za> Message-ID: <1275719789.45.0.168425659941.issue8902@psf.upfronthosting.co.za> New submission from anatoly techtonik : There is: datetime.date.today() datetime.datetime.today() datetime.datetime.now([tz]) But no: datetime.time.now([tz]) ---------- components: Library (Lib) messages: 107122 nosy: techtonik priority: normal severity: normal status: open title: add datetime.time.now() for consistency versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 08:48:27 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 06:48:27 +0000 Subject: [issue8903] datetime functions In-Reply-To: <1275720507.31.0.185559003971.issue8903@psf.upfronthosting.co.za> Message-ID: <1275720507.31.0.185559003971.issue8903@psf.upfronthosting.co.za> New submission from anatoly techtonik : Current OOP API of datetime is ugly: from datetime import datetime print datetime.today().isoformat() The proposal is to add today() and now() as module functions: from datetime import today, now print today() # datetime.date(2010, 6, 5) print now() # datetime.datetime(2010, 6, 5, 9, 48, 4, 868000) ---------- components: Library (Lib) messages: 107123 nosy: techtonik priority: normal severity: normal status: open title: datetime functions versions: Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 09:33:32 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 05 Jun 2010 07:33:32 +0000 Subject: [issue8847] crash appending list and namedtuple In-Reply-To: <1275087227.35.0.709211922869.issue8847@psf.upfronthosting.co.za> Message-ID: <1275723212.69.0.507018170459.issue8847@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The binaries get compiled with the PGInstrument/PGUpdate configurations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 10:44:46 2010 From: report at bugs.python.org (Jan Kratochvil) Date: Sat, 05 Jun 2010 08:44:46 +0000 Subject: [issue4434] Embedding into a shared library fails In-Reply-To: <1227690819.98.0.0359225476492.issue4434@psf.upfronthosting.co.za> Message-ID: <1275727486.57.0.401283484737.issue4434@psf.upfronthosting.co.za> Changes by Jan Kratochvil : ---------- nosy: +jankratochvil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 11:18:25 2010 From: report at bugs.python.org (Tal Einat) Date: Sat, 05 Jun 2010 09:18:25 +0000 Subject: [issue4785] json.JSONDecoder() strict argument undocumented and potentially confusing In-Reply-To: <1230658934.34.0.991784557371.issue4785@psf.upfronthosting.co.za> Message-ID: <1275729505.23.0.574189488018.issue4785@psf.upfronthosting.co.za> Tal Einat added the comment: Documentation patch attached against py3k branch. Changes are: * Added to documentation of JSONDecoder: If *strict* is ``False`` (``True`` is the default), then control characters will be allowed inside strings. Control characters in this context are those with character codes in the 0-31 range, including ``'\t'`` (tab), ``'\n'``, ``'\r'`` and ``'\0'``. * Added clarification in documentation of json.load and json.dump that unless the cls kwarg is specified, the JSONEncoder/JSONDecoder class will be used. * Mirrored these additions in the relevant doc-strings (JSONDecoder.__init__, json.load, json.loads, json.dump, json.dumps). * Copied description of the object_pairs_hook kwargs from the documentation to the relevant doc-strings, which otherwise fully mirrored the documentation. (json.load, json.loads, JSONDecoder.__init__) ---------- keywords: +patch versions: +Python 3.2 -Python 2.6, Python 3.0 Added file: http://bugs.python.org/file17560/json_docs_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 11:19:45 2010 From: report at bugs.python.org (Tal Einat) Date: Sat, 05 Jun 2010 09:19:45 +0000 Subject: [issue4785] json.JSONDecoder() strict argument undocumented and potentially confusing In-Reply-To: <1230658934.34.0.991784557371.issue4785@psf.upfronthosting.co.za> Message-ID: <1275729585.24.0.924457885731.issue4785@psf.upfronthosting.co.za> Tal Einat added the comment: Similar patch against trunk; same changes as for the py3k branch. ---------- Added file: http://bugs.python.org/file17561/json_docs_trunk.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 11:20:11 2010 From: report at bugs.python.org (Tal Einat) Date: Sat, 05 Jun 2010 09:20:11 +0000 Subject: [issue4785] json.JSONDecoder() strict argument undocumented and potentially confusing In-Reply-To: <1230658934.34.0.991784557371.issue4785@psf.upfronthosting.co.za> Message-ID: <1275729611.55.0.397660829656.issue4785@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 12:30:48 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 10:30:48 +0000 Subject: [issue8904] quick example how to fix docs In-Reply-To: <1275733848.36.0.713191812865.issue8904@psf.upfronthosting.co.za> Message-ID: <1275733848.36.0.713191812865.issue8904@psf.upfronthosting.co.za> New submission from anatoly techtonik : It would be helpful to have examples how to patch docs in some place like http://docs.python.org/bugs.html For example, in CHM version of 2.6.5 manual open() anchor points to reference/datamodel.html#index-844 and to tutorial/inputoutput.html#index-1080 but not to library/functions.html#open ---------- assignee: docs at python components: Documentation messages: 107127 nosy: docs at python, techtonik priority: normal severity: normal status: open title: quick example how to fix docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 12:36:44 2010 From: report at bugs.python.org (Tal Einat) Date: Sat, 05 Jun 2010 10:36:44 +0000 Subject: [issue8900] IDLE crashes if Preference set to At Startup -> Open Edit Window In-Reply-To: <1275695898.02.0.763223364629.issue8900@psf.upfronthosting.co.za> Message-ID: <1275734204.27.0.06389348413.issue8900@psf.upfronthosting.co.za> Tal Einat added the comment: I can consistently reproduce this with Python 3.0.1 by setting IDLE to start in editing mode and using Ctrl+o to open the Open dialog. Doesn't happen when using the menu item in the File menu. This leads me to believe it has something to do with keypress event processing. Also, the event for which the unbind call is failing is . Continuing to investigate. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 13:25:17 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 05 Jun 2010 11:25:17 +0000 Subject: [issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual() In-Reply-To: <1270769804.42.0.714910786313.issue8351@psf.upfronthosting.co.za> Message-ID: <1275737117.75.0.385563838674.issue8351@psf.upfronthosting.co.za> Michael Foord added the comment: Slightly modified version committed revision 81728. (It truncates large diffs rather than omitting them and allows max_diff to be None - meaning no maximum.) Needs some extended tests and needs documenting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 13:45:41 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 11:45:41 +0000 Subject: [issue8905] difflib: support input generators In-Reply-To: <1275738341.19.0.989231664853.issue8905@psf.upfronthosting.co.za> Message-ID: <1275738341.19.0.989231664853.issue8905@psf.upfronthosting.co.za> New submission from anatoly techtonik : difflib operates on the lists, but it should be possible to use arbitrary generators. This will require internal limit on buffer size that has a side advantage of limiting difflib to available memory. ---------- components: Library (Lib) messages: 107130 nosy: techtonik priority: normal severity: normal status: open title: difflib: support input generators type: resource usage versions: Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 14:11:56 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 05 Jun 2010 12:11:56 +0000 Subject: [issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual() In-Reply-To: <1270769804.42.0.714910786313.issue8351@psf.upfronthosting.co.za> Message-ID: <1275739916.03.0.444901732919.issue8351@psf.upfronthosting.co.za> Michael Foord added the comment: Modified again in revision 81739. No longer uses a new argument, but a class attribute instead. All assert methods that generate failure messages with difflib truncate messages. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 14:30:06 2010 From: report at bugs.python.org (Floris Bruynooghe) Date: Sat, 05 Jun 2010 12:30:06 +0000 Subject: [issue8906] Document TestCase attributes in class docstring In-Reply-To: <1275741006.84.0.66027792452.issue8906@psf.upfronthosting.co.za> Message-ID: <1275741006.84.0.66027792452.issue8906@psf.upfronthosting.co.za> New submission from Floris Bruynooghe : The unittest.TestCase class has some public attributes: failureException, longMessage and maxDiff. They each have a description in a comment, but I think it would be good if that description got moved into the class docstring so that it would be found using help(). ---------- components: Library (Lib) messages: 107132 nosy: ezio.melotti, flub priority: normal severity: normal status: open title: Document TestCase attributes in class docstring type: feature request versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 14:39:56 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 05 Jun 2010 12:39:56 +0000 Subject: [issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c In-Reply-To: <1273069856.93.0.435136167669.issue8627@psf.upfronthosting.co.za> Message-ID: <1275741596.1.0.764245347319.issue8627@psf.upfronthosting.co.za> Mark Dickinson added the comment: Removed the __cmp__ warning in r81736, and added a PyErr_Clear() for the __eq__ warning in r81740. I'll leave this open in case anyone wants to figure out how to propagate the warning exception properly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 14:40:56 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 05 Jun 2010 12:40:56 +0000 Subject: [issue8627] Unchecked PyErr_WarnPy3k return value in Objects/typeobject.c In-Reply-To: <1273069856.93.0.435136167669.issue8627@psf.upfronthosting.co.za> Message-ID: <1275741656.9.0.042375231367.issue8627@psf.upfronthosting.co.za> Mark Dickinson added the comment: Not sure why I added 3.1 and 3.2 to the versions. ---------- versions: -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 15:40:44 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 05 Jun 2010 13:40:44 +0000 Subject: [issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual() In-Reply-To: <1270769804.42.0.714910786313.issue8351@psf.upfronthosting.co.za> Message-ID: <1275745244.83.0.0829128951235.issue8351@psf.upfronthosting.co.za> Michael Foord added the comment: Modified again in revision 81752. Assertion methods now inform you when omitting an excessively long diff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 16:00:57 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 05 Jun 2010 14:00:57 +0000 Subject: [issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual() In-Reply-To: <1270769804.42.0.714910786313.issue8351@psf.upfronthosting.co.za> Message-ID: <1275746457.27.0.530276094641.issue8351@psf.upfronthosting.co.za> Michael Foord added the comment: Still some tests and documentation needed. Leaving issue open until it is done. (Also needs backporting to unittest2...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 16:06:13 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 05 Jun 2010 14:06:13 +0000 Subject: [issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual() In-Reply-To: <1270769804.42.0.714910786313.issue8351@psf.upfronthosting.co.za> Message-ID: <1275746773.8.0.62506180792.issue8351@psf.upfronthosting.co.za> Michael Foord added the comment: Note that we also have a bit of a performance issue in prettyprint / difflib when the diffs are very big. It can spend a minute or more constructing the diff - only to throw it away because it is too big... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 17:13:30 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 05 Jun 2010 15:13:30 +0000 Subject: [issue8899] Add docstrings to time.struct_time In-Reply-To: <1275680837.43.0.377357755743.issue8899@psf.upfronthosting.co.za> Message-ID: <1275750810.75.0.240447112795.issue8899@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in r81756 (trunk) and r81757 (py3k). ---------- stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 17:19:26 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 15:19:26 +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: <1275751166.65.0.962653814179.issue7584@psf.upfronthosting.co.za> anatoly techtonik added the comment: > According to my reading of RFC 3339, it is not correct to produce 'Z' > timestamps when local offset is not known. It is not said that 'Z' SHOULD NOT be produced if local offset is unknown. Even if offset is unknown, UTC still can be the preferred reference point for the specified time. >From the user point of view the assumption about "know or unknown offset" is beyond the judgement of low-level datetime library. For example, if I read timestamp of a local file, I assume that local offset is unknown and UTC is not preferred, but still do not have other choice than to write zero. It won't help me to find actual offset. For a network file I assume that preferred offset is actually UTC and although I do not have any means to check the offset I can write zero without any hesitation. Solving philosophical -00:00 +00:00 problems require a deep knowledge of RFC3339. I doubt that pleasing 1% who need this kind of fine-grained semantic control with special API deserves suffering of other 99%. In the end there is nothing hard in replacing 'Z' with a flavor of your choice. Of course, if smb. want to force developers to overload their brain for the sake of providing the most accurate semantic timestamps (that nobody uses anyway) - then the -00:00/+00:00 stuff is a way to go. But my opinion is that datetime API in Python is already complicated enough to negatively affect this language karma. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 17:35:51 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 15:35:51 +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: <1275752151.85.0.668549487512.issue7584@psf.upfronthosting.co.za> anatoly techtonik added the comment: s/datetime/date\/time/ in the last sentence, as the complication comes from: -- start offtopic -- 1. the vast amount of various date and time modules/functions 2. the little amount of what they can do I still hardly believe that there is no way to get current TZ offset given that every OS provides such information. -- end offtopic -- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 17:39:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 05 Jun 2010 15:39:09 +0000 Subject: [issue8907] time module documentation differs in trunk and py3k In-Reply-To: <1275752348.33.0.507552521147.issue8907@psf.upfronthosting.co.za> Message-ID: <1275752348.33.0.507552521147.issue8907@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Doc/library/time.rst differs in trunk and py3k. It appears that the trunk version is more up to date and can simply replace the py3k version, but I would like to have another pair of eyes to take a look before committing. I also noticed that time.asctime signature is displayed as asctime([t]) and as asctime([tuple]) in docstring. I think docstring variant is better. ---------- assignee: belopolsky components: Documentation files: time-doc.diff keywords: patch messages: 107141 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: time module documentation differs in trunk and py3k versions: Python 3.2 Added file: http://bugs.python.org/file17562/time-doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 17:40:26 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 05 Jun 2010 15:40:26 +0000 Subject: [issue8907] time module documentation differs in trunk and py3k In-Reply-To: <1275752348.33.0.507552521147.issue8907@psf.upfronthosting.co.za> Message-ID: <1275752426.46.0.127864636176.issue8907@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 17:48:31 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 15:48:31 +0000 Subject: [issue7229] [PATCH] Manual entry for time.daylight can be misleading In-Reply-To: <1256723052.19.0.148648938954.issue7229@psf.upfronthosting.co.za> Message-ID: <1275752911.34.0.233075830294.issue7229@psf.upfronthosting.co.za> anatoly techtonik added the comment: issue8907 seems related. ---------- nosy: +belopolsky, docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 17:52:27 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 05 Jun 2010 15:52:27 +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: <1275753147.48.0.948944836619.issue7229@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: [PATCH] Manual entry for time.daylight can be misleading -> Manual entry for time.daylight can be misleading _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 17:58:03 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 15:58:03 +0000 Subject: [issue8151] [patch] convenience links for subprocess.call() In-Reply-To: <1268692197.73.0.576136858806.issue8151@psf.upfronthosting.co.za> Message-ID: <1275753483.32.0.176403402181.issue8151@psf.upfronthosting.co.za> anatoly techtonik added the comment: easy, just waits to be ported ---------- nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 18:00:47 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 05 Jun 2010 16:00:47 +0000 Subject: [issue7584] datetime.rfcformat() for Date and Time on the Internet In-Reply-To: <1275752151.85.0.668549487512.issue7584@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Sat, Jun 5, 2010 at 11:35 AM, anatoly techtonik wrote: .. > s/datetime/date\/time/ in the last sentence, as the complication comes ?from: > -- start offtopic -- > 1. the vast amount of various date and time modules/functions "Vast" is a bit of overstatement. It is mostly the datetime and time module with a little bit in a less used calendar module. I believe a stated goal is to gradually remove the need for time module in date/time manipulation and possibly fold it into posix module. Can you be more specific? The biggest omission, IMO, is the lack of time zone support, but this is being worked on. See issue5094. > I still hardly believe that there is no way to get current TZ offset given that every OS provides such information. See issue1647654. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 18:04:10 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 16:04:10 +0000 Subject: [issue8519] [patch] doc: termios and ioctl reference links In-Reply-To: <1272125391.54.0.0119716465224.issue8519@psf.upfronthosting.co.za> Message-ID: <1275753850.87.0.931001763365.issue8519@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 18:10:23 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 16:10:23 +0000 Subject: [issue1635217] Add example of distutils setup() with "requires" argument Message-ID: <1275754223.84.0.844192580409.issue1635217@psf.upfronthosting.co.za> anatoly techtonik added the comment: Neal, why a piece from issue1635217#msg31028 doesn't qualify as an example? It seems that this issue may become obsolete with new packaging guide coming up. ---------- components: +Distutils, Distutils2 nosy: +docs at python versions: +Python 2.7, Python 3.3 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 18:15:02 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 05 Jun 2010 16:15:02 +0000 Subject: [issue8151] [patch] convenience links for subprocess.call() In-Reply-To: <1268692197.73.0.576136858806.issue8151@psf.upfronthosting.co.za> Message-ID: <1275754502.34.0.890225290758.issue8151@psf.upfronthosting.co.za> Georg Brandl added the comment: Already done AFAICS. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 18:21:55 2010 From: report at bugs.python.org (Matthew Barnett) Date: Sat, 05 Jun 2010 16:21:55 +0000 Subject: [issue8847] crash appending list and namedtuple In-Reply-To: <1275087227.35.0.709211922869.issue8847@psf.upfronthosting.co.za> Message-ID: <1275754915.94.0.0954200928714.issue8847@psf.upfronthosting.co.za> Matthew Barnett added the comment: I've just found that: [1] + foo() crashes, but: [1].__add__(foo()) gives: Traceback (most recent call last): File "", line 1, in [1].__add__(foo()) TypeError: can only concatenate list (not "foo") to list (IDLE on Windows XP) ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 18:23:01 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 05 Jun 2010 16:23:01 +0000 Subject: [issue8446] buildbot: DeprecationWarning not raised for icglue (test_py3kwarn.TestStdlibRemovals) In-Reply-To: <1271628757.81.0.455065561336.issue8446@psf.upfronthosting.co.za> Message-ID: <1275754982.0.0.722769045744.issue8446@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 18:32:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 05 Jun 2010 16:32:20 +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: <1275755540.13.0.788880042553.issue7229@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It may be a bit off-topic for this issue, but I don't like that the python manual uses UTC as if it was a geographical location. UTC is a time scale. You cannot be to the east or to the west of UTC just as you cannot be to the north of the Gregorian calendar. Even if we replace UTC with Prime or Greenwich Meridian, the manual would still be incorrect because some regions in the western hemisphere use positive offsets from UTC. For example, Madrid is at 3? 42' West, but uses Central European Time which is UTC+1. Since there are no plans to include any kind of geographical database in the standard library, I think the manual should avoid use of geographical terms. What I need to know from the manual is how to get local time from utc and daylight savings time from the standard time. >From the top of my head, I know that localtime = utctime + utcoffset, but I am not sure whether dsttime = stdtime + dst or dsttime = stdtime - dst and the manual, reworded or not, does not immediately help me. As for the original issue, do we really need time.daylight at all? ISTM that in timezones without DST, time.altzone = time.timezone, so the software that unconditionally accounts for DST will still work correctly and software that wants to optimize for no DST case can simply chsck time.altzone == time.timezone. $ TZ=UTC ./python.exe -c "import time; print(time.daylight, time.tzname, (time.timezone, time.altzone))" 0 ('UTC', 'UTC') (0, 0) In other words, time.daylight is strictly redundant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 18:45:01 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 16:45:01 +0000 Subject: [issue8908] friendly errors for UAC errors in windows installers In-Reply-To: <1275756301.53.0.564921810654.issue8908@psf.upfronthosting.co.za> Message-ID: <1275756301.53.0.564921810654.issue8908@psf.upfronthosting.co.za> New submission from anatoly techtonik : The problem investigated in issue8870 detected that bdist_wininst installers fail in Vista and Windows 7 with enabled UAC (user access control) when run from local drives with non-MS file systems and from network drives. The error message returned in this case is not explanative at all. "Failed to start elevated process (ShellExecute returned 5)" Further investigation revealed that if network samba share requires authentication, and authentication passes, then the installer won't fail. Unfortunately, I can not setup network access to unauthenticated Samba shares right now to test behavior, but I attach installer generated with --user-access-control=force in case somebody can help. The error message needs to be improved to give users immediate hint what Windows UAC doesn't allow to run privileged executables from non-MS file systems and/or network drives. ---------- assignee: tarek components: Distutils, Distutils2 files: wget-0.6.win32.force.exe messages: 107149 nosy: tarek, techtonik priority: normal severity: normal status: open title: friendly errors for UAC errors in windows installers versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file17563/wget-0.6.win32.force.exe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 18:48:19 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 16:48:19 +0000 Subject: [issue8908] friendly errors for UAC errors in windows installers In-Reply-To: <1275756301.53.0.564921810654.issue8908@psf.upfronthosting.co.za> Message-ID: <1275756499.61.0.138775979138.issue8908@psf.upfronthosting.co.za> anatoly techtonik added the comment: A proper user error message requires investigation of behavior on anonymous samba shares. Attaching patch to install.c with backlinks to relevant ticket descriptions. ---------- keywords: +patch Added file: http://bugs.python.org/file17564/8908.windows.uac.research.comments.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 18:48:57 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 16:48:57 +0000 Subject: [issue8908] friendly errors for UAC misbehavior in windows installers In-Reply-To: <1275756301.53.0.564921810654.issue8908@psf.upfronthosting.co.za> Message-ID: <1275756537.28.0.761548228701.issue8908@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- title: friendly errors for UAC errors in windows installers -> friendly errors for UAC misbehavior in windows installers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 18:58:26 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 16:58:26 +0000 Subject: [issue8871] --user-access-control=auto has no effect In-Reply-To: <1275420139.65.0.104008426141.issue8871@psf.upfronthosting.co.za> Message-ID: <1275757106.95.0.622697413181.issue8871@psf.upfronthosting.co.za> anatoly techtonik added the comment: Can't repeat right now. Please close with issue8870 as a superseder if nothing happens in the next two weeks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 19:16:29 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 17:16:29 +0000 Subject: [issue7582] [patch] diff.py to use iso timestamp In-Reply-To: <1261929478.18.0.289329990174.issue7582@psf.upfronthosting.co.za> Message-ID: <1275758189.78.0.107051768815.issue7582@psf.upfronthosting.co.za> anatoly techtonik added the comment: Adding Alexander as ISTM he may be interested to read the time discussion. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 19:24:03 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 17:24:03 +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: <1275758643.04.0.779704816395.issue7229@psf.upfronthosting.co.za> anatoly techtonik added the comment: It is too hard to track this issue without quotes from manual. Let's bring context into discussion: http://docs.python.org/library/time.html#time.altzone UTC offset of the local DST timezone if one is defined. Only use this if daylight is nonzero. http://docs.python.org/library/time.html#time.daylight Nonzero if a DST timezone is defined. http://docs.python.org/library/time.html#time.timezone UTC offset of the local (non-DST) timezone So, to answer a question "What is the current UTC offset?" you need to: if time.daylight: if time.altzone: # using only if defined use time.altzone else: use time.timezone else: use time.timezone 1. Is that really works like described above? 2. Should we at least group these timezone variables? As for offtopic UTC vs GMT - I doubt there is a way to clearly express that the offset sign of the returned values is negated in comparison with real "UTC offsets" without resorting to some king of alternative east/west scale. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 19:28:34 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 05 Jun 2010 17:28:34 +0000 Subject: [issue7582] [patch] diff.py to use iso timestamp In-Reply-To: <1261929478.18.0.289329990174.issue7582@psf.upfronthosting.co.za> Message-ID: <1275758914.48.0.856487255805.issue7582@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The latest patch will produce wrong results if the file was last modified before timezone rules changed in your location. See issue1647654. ---------- assignee: -> belopolsky dependencies: +No obvious and correct way to get the time zone offset _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 19:37:55 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 17:37:55 +0000 Subject: [issue1647654] No obvious and correct way to get the time zone offset Message-ID: <1275759475.05.0.350965044638.issue1647654@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 19:43:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 05 Jun 2010 17:43:59 +0000 Subject: [issue7229] Manual entry for time.daylight can be misleading In-Reply-To: <1275758643.04.0.779704816395.issue7229@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Sat, Jun 5, 2010 at 1:24 PM, anatoly techtonik wrote: .. > As for offtopic UTC vs GMT - I doubt there is a way to clearly express that the offset sign of the > returned values is negated in comparison with real "UTC offsets" without resorting to some > king of alternative east/west scale. Sure there is. Here is how RFC 3339 handles this: """ Numeric offsets are calculated as "local time minus UTC". So the equivalent time in UTC can be determined by subtracting the offset from the local time. """ and here is a quote from MacOS man page for tzset: """ offset Indicates the value one must add to the local time to arrive at Coor- dinated Universal Time. """ No geographic reference needed. (And the issue is not UTC vs. GMT: both UTC and GMT are timescales, sometimes even considered the same. The off-topic issue is UTC vs. Prime Meridian.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 19:48:20 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 17:48:20 +0000 Subject: [issue1667546] Time zone-capable variant of time.localtime Message-ID: <1275760100.67.0.686660490001.issue1667546@psf.upfronthosting.co.za> anatoly techtonik added the comment: Yet another timezone issue. =/ Seems like it is too complicated. Should we try to organize a dedicated sprint during EuroPython? Do we need some easy to read research on the problem? Should PSF define bounty for that? Should we try to approach this with some other entrypoint like high level user story? I can play the role of the dumb user. Please, add your replies to this Wave https://wave.google.com/wave/waveref/googlewave.com/w+FbjMbPbEA so that we can develop the story. ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 20:09:46 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 05 Jun 2010 18:09:46 +0000 Subject: [issue7229] Manual entry for time.daylight can be misleading In-Reply-To: <1275758643.04.0.779704816395.issue7229@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Sat, Jun 5, 2010 at 1:24 PM, anatoly techtonik wrote: .. > So, to answer a question "What is the current UTC offset?" you need to: > if time.daylight: > ?if time.altzone: # using only if defined > ? ? use time.altzone > ?else: > ? ? use time.timezone > else: > ?use time.timezone > No, if time.daylight is non-zero, you still need to check the current value of tm_isdst from localtime(). Here is how bzr reportedly handles this: def local_time_offset(t=None): """Return offset of local zone from GMT, either at present or at time t.""" # python2.3 localtime() can't take None if t is None: t = time.time() if time.localtime(t).tm_isdst and time.daylight: return -time.altzone else: return -time.timezone http://blogs.gnome.org/jamesh/2006/12/31/python-timetimezone-timealtzone-edge-case/ > 1. Is that really works like described above? That works for current time, but subject to race condition twice a year. You should get time and dst indormation from the same localtime() call. For problems with arbitrary time t, see the link above. > 2. Should we at least group these timezone variables? > The come from existing C library practice. POSIX defines tzname[2], timezone, and daylight. http://www.opengroup.org/onlinepubs/009695399/basedefs/time.h.html altzone is a popular non-standard addition which is strictly redundant. Since POSIX does not define anything about daylight variable other than it has to be zero when DST is not in effect, compliant implementations can define is so that altzone = timezone - daylight. These variables are already grouped in tzinfo API. What is missing is method to get concrete tzinfo implementation in stdlib. See issue5094. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 20:15:35 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 18:15:35 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1275682160.9.0.0914585409976.issue5094@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: On Fri, Jun 4, 2010 at 11:09 PM, Brett Cannon wrote: > Unless other people step forward to debate this we probably are not going to reach consensus without going to python-dev to see what others think. I would really like to see: 1. a good definition of the problem 2. summary of research 3. possible solutions The amount of text generated in bugtracker is already overwhelming for others to plug in. I remember that my thread about datetime TZ was also hijacked into the debate that we can not ship 3rd party TZ DB with Python, so I can't even reference it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 20:52:10 2010 From: report at bugs.python.org (Paul Boddie) Date: Sat, 05 Jun 2010 18:52:10 +0000 Subject: [issue1667546] Time zone-capable variant of time.localtime Message-ID: <1275763930.4.0.836518859289.issue1667546@psf.upfronthosting.co.za> Paul Boddie added the comment: Speaking for myself, I'm not sure whether I'm really the person to push this further, at least, although others may see it as a worthy sprinting topic. In principle, adding the extra fields is the right thing to do, merely because it exposes things from "struct tm" which were missing and which influence the other functions depending on it. The only things remaining are to make sure that existing code doesn't change its behaviour with these new fields, and that the new fields work together with the time functions as expected. Thus, testing is the most important thing now, I think. For the bigger picture, which shouldn't be discussed here, Python's way of handling times and dates probably needs improvement - this has been discussed already (a reference for anyone not involved is Anatoly's initial message in one recent discussion: http://mail.python.org/pipermail/python-dev/2010-February/097710.html) - and I think usage of pytz is a step in the right direction, although it does not eliminate the need to learn about time zones (UTC, CET...), time "regimes" (Europe/Oslo, America/New_York...), "floating" times, and zone transitions (and ambiguous times). Extending Python library support is potentially a sprinting topic, but not really a topic for discussion around this patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 20:53:43 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 18:53:43 +0000 Subject: [issue7584] datetime.rfcformat() for Date and Time on the Internet In-Reply-To: Message-ID: anatoly techtonik added the comment: On Sat, Jun 5, 2010 at 7:00 PM, Alexander Belopolsky wrote: > On Sat, Jun 5, 2010 at 11:35 AM, anatoly techtonik > wrote: > .. >> s/datetime/date\/time/ in the last sentence, as the complication comes ?from: >> -- start offtopic -- >> 1. the vast amount of various date and time modules/functions > > "Vast" is a bit of overstatement. ?It is mostly the datetime and time > module with a little bit in a less used calendar module. "Concise" Python datetime module API =) (without any way to get current UTC offset from operating system) ------------------- datetime.MINYEAR datetime.MAXYEAR class datetime.date class datetime.time class datetime.datetime class datetime.timedelta class datetime.tzinfo timedelta.min timedelta.max timedelta.resolution classmethod date.today() classmethod date.fromtimestamp() classmethod date.fromordinal() date.min date.max date.resolution date.year date.month date.day date.replace() date.timetuple() date.toordinal() date.weekday() date.isoweekday() date.isocalendar() date.isoformat() date.__str__() date.ctime() date.strftime(format) classmethod datetime.today() classmethod datetime.now() classmethod datetime.utcnow() classmethod datetime.fromtimestamp() classmethod datetime.utcfromtimestamp() classmethod datetime.fromordinal() classmethod datetime.combine() classmethod datetime.strptime() datetime.min datetime.max datetime.resolution datetime.year datetime.month datetime.day datetime.hour datetime.minute datetime.second datetime.microsecond datetime.tzinfo datetime.date() datetime.time() datetime.timetz() datetime.replace() datetime.astimezone() datetime.utcoffset() datetime.dst() datetime.tzname() datetime.timetuple() datetime.utctimetuple() datetime.toordinal() datetime.weekday() datetime.isoweekday() datetime.isocalendar() datetime.isoformat() datetime.__str__() datetime.ctime() datetime.strftime() time.min time.max time.resolution time.hour time.minute time.second time.microsecond time.tzinfo time.replace() time.isoformat() time.__str__() time.strftime() time.utcoffset() time.dst() time.tzname() tzinfo.utcoffset() tzinfo.dst() tzinfo.tzname() tzinfo.fromutc() Raw doc with stripped markup is only 58161 bytes. Perhaps the biggest problem that you need to read out the doc thoroughly to understand that all UTC related stuff starts to work only when somebody writes a tzinfo module. It is like "you are developer, so its your headache when you get this data - we gave you The API". =) > Can you be more specific? ?The biggest omission, IMO, is the lack of > time zone support, but this is being worked on. ?See ?issue5094. Great, but it is Python 3.2 and I will be using 2.x Python for the next two years at least. It is not an only about omission - it is also about ineffective and somehow bloated unpythonic C API that is not well suited for everyday tasks. >> I still hardly believe that there is no way to get current TZ offset given that every OS provides such information. > > See issue1647654. Too long, and I've a little bit tired, and will be pretty busy next week, but thanks for the pointers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 21:42:07 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 19:42:07 +0000 Subject: [issue8870] --user-access-control=force produces invalid installer on Vista In-Reply-To: <1275417481.6.0.247175279763.issue8870@psf.upfronthosting.co.za> Message-ID: <1275766927.93.0.122107826339.issue8870@psf.upfronthosting.co.za> anatoly techtonik added the comment: Please add issue8908 as superseder. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 21:45:25 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 05 Jun 2010 19:45:25 +0000 Subject: [issue8302] SkipTest exception in setUpClass or setUpModule is marked as an error rather than a skip In-Reply-To: <1270301652.92.0.301047962487.issue8302@psf.upfronthosting.co.za> Message-ID: <1275767125.49.0.722439422207.issue8302@psf.upfronthosting.co.za> Michael Foord added the comment: Committed revision 81760. Needs tests and documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 22:35:41 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 05 Jun 2010 20:35:41 +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: <1275770141.45.0.1893915343.issue8271@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed on trunk in r81758 and r81759. I'm leaving the issue open until I port it on the other versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 23:41:21 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 21:41:21 +0000 Subject: [issue8909] mention bitmap size for bdist_wininst Message-ID: <1275774081.13.0.449044323851.issue8909@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- assignee: tarek components: Distutils, Documentation files: mention.bdist.bitmap.size.diff keywords: patch nosy: tarek, techtonik priority: normal severity: normal status: open title: mention bitmap size for bdist_wininst versions: Python 2.6, Python 2.7, Python 3.1 Added file: http://bugs.python.org/file17565/mention.bdist.bitmap.size.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Jun 5 23:41:38 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 05 Jun 2010 21:41:38 +0000 Subject: [issue8909] mention bitmap size for bdist_wininst Message-ID: <1275774098.87.0.207135822372.issue8909@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 00:32:16 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 05 Jun 2010 22:32:16 +0000 Subject: [issue8302] SkipTest exception in setUpClass or setUpModule is marked as an error rather than a skip In-Reply-To: <1270301652.92.0.301047962487.issue8302@psf.upfronthosting.co.za> Message-ID: <1275777136.03.0.940652525619.issue8302@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- resolution: -> accepted stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 00:32:31 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 05 Jun 2010 22:32:31 +0000 Subject: [issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual() In-Reply-To: <1270769804.42.0.714910786313.issue8351@psf.upfronthosting.co.za> Message-ID: <1275777151.85.0.285361432868.issue8351@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 01:47:33 2010 From: report at bugs.python.org (Henri Salo) Date: Sat, 05 Jun 2010 23:47:33 +0000 Subject: [issue8890] Modules have dangerous examples in documentation In-Reply-To: <1275599514.93.0.639768129715.issue8890@psf.upfronthosting.co.za> Message-ID: <1275781653.86.0.830705339789.issue8890@psf.upfronthosting.co.za> Henri Salo added the comment: No it does not. http://www.owasp.org/index.php/Insecure_Temporary_File ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 02:04:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 00:04:32 +0000 Subject: [issue8903] datetime functions In-Reply-To: <1275720507.31.0.185559003971.issue8903@psf.upfronthosting.co.za> Message-ID: <1275782672.72.0.0213123294182.issue8903@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: How hard is it to add now = datetime.now todate = date.today at the top of your module is you really like shorter names? -1 ---------- assignee: -> belopolsky nosy: +belopolsky priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 02:11:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 00:11:40 +0000 Subject: [issue8902] add datetime.time.now() for consistency In-Reply-To: <1275719789.45.0.168425659941.issue8902@psf.upfronthosting.co.za> Message-ID: <1275783100.69.0.527677789639.issue8902@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Anatoly, Didn't you just recently complain about the large number of functions in datetime module? (issue7584) datetime.datetime.now().time() seems adequate to me. What is your use case? ---------- assignee: -> belopolsky nosy: +belopolsky priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 02:22:51 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 00:22:51 +0000 Subject: [issue1777412] Python's strftime dislikes years before 1900 Message-ID: <1275783771.33.0.451230622221.issue1777412@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I see this in py3k branch on MacOS X: [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import datetime >>> datetime.date(1876, 2, 3).strftime('%Y-%m-%d') Traceback (most recent call last): File "", line 1, in ValueError: year=1876 is before 1900; the datetime strftime() methods require year >= 1900 I like the approach taken in the David's patch. The datetime module should stop piggybacking on the time module. ---------- assignee: -> belopolsky nosy: +belopolsky versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 02:29:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 00:29:20 +0000 Subject: [issue3173] external strftime for Python? In-Reply-To: <1214189093.82.0.548435251403.issue3173@psf.upfronthosting.co.za> Message-ID: <1275784160.7.0.813668946889.issue3173@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: What platforms have broken strftime and how badly is it broken there? Is there a python version somewhere? PyPy? ---------- assignee: -> belopolsky nosy: +belopolsky type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 02:53:39 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 06 Jun 2010 00:53:39 +0000 Subject: [issue4015] Make installed scripts executable on windows In-Reply-To: <1222949528.24.0.767744507339.issue4015@psf.upfronthosting.co.za> Message-ID: <1275785619.47.0.0426246855804.issue4015@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: [patch] make installed scripts executable on windows -> Make installed scripts executable on windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 03:15:11 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 01:15:11 +0000 Subject: [issue6280] calendar.timegm() belongs in time module, next to time.gmtime() In-Reply-To: <1244911683.12.0.112588761912.issue6280@psf.upfronthosting.co.za> Message-ID: <1275786911.49.0.0539493509912.issue6280@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: With recent enhancements to datetime module, timegm has become a 1-liner: EPOCH = 1970 _EPOCH_DATETIME = datetime.datetime(EPOCH, 1, 1) _SECOND = datetime.timedelta(seconds=1) def timegm(tuple): """Unrelated but handy function to calculate Unix timestamp from GMT.""" return (datetime.datetime(*tuple[:6]) - _EPOCH_DATETIME) // _SECOND I suggest committing modernized implementation to serve as a reference and encourage people to use datetime module and datetime objects instead of time module and time tuples. ---------- assignee: -> belopolsky nosy: +belopolsky, mark.dickinson -Alexander.Belopolsky priority: normal -> low stage: needs patch -> commit review Added file: http://bugs.python.org/file17566/issue6280-calendar.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 03:25:33 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 01:25:33 +0000 Subject: [issue1083] Confusing error message when dividing timedelta using / In-Reply-To: <1188674374.08.0.925919990107.issue1083@psf.upfronthosting.co.za> Message-ID: <1275787533.24.0.544036332738.issue1083@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Closing as duplicate of issue1289118. Division of timedelta by integer is supported in py3k since r81625. ---------- nosy: +belopolsky -Alexander.Belopolsky resolution: -> duplicate status: open -> closed superseder: -> timedelta multiply and divide by floating point _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 03:28:14 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 01:28:14 +0000 Subject: [issue7463] PyDateTime_IMPORT() causes compiler warnings In-Reply-To: <1260352911.97.0.550126067946.issue7463@psf.upfronthosting.co.za> Message-ID: <1275787694.87.0.778407503055.issue7463@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> belopolsky nosy: +belopolsky stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 03:35:27 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 01:35:27 +0000 Subject: [issue7989] Transition time/datetime C modules to Python In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1275788127.21.0.430829926194.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: As far as I remember, the datetime module started as a pure python module and was reimplemented in C around year 2003 or so. One of the important additions at that time was the C API to datetime functionality. I am afraid that with the _timemodule.c/timemodule.py split there will be more an more functionality that is awkward to access from C API. ---------- assignee: -> belopolsky nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 03:39:21 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 06 Jun 2010 01:39:21 +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: <1275788361.15.0.751645567197.issue8482@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 03:40:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 01:40:18 +0000 Subject: [issue1726687] Bug found in datetime for Epoch time = -1 Message-ID: <1275788418.75.0.73591667019.issue1726687@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> belopolsky nosy: +belopolsky -Alexander.Belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 03:52:08 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 01:52:08 +0000 Subject: [issue7662] time.utcoffset() In-Reply-To: <1263057341.16.0.947515103763.issue7662@psf.upfronthosting.co.za> Message-ID: <1275789128.08.0.900783293101.issue7662@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I would prefer exposing tm_gmtoff in time.localtime() output. The advantage is that on platforms that support it is struct tm, it will return correct offset for times in the past, not only for the current time. See issue1647654. On platforms without tm_gmtoff we can fill it with -tm_isdst?timezone:altzone. The current situation on Linux is just backwards: we are trying to divine altzone by sampling tm_gmtoff and throw tm_gmtoff away. See http://blogs.gnome.org/jamesh/2006/12/31/python-timetimezone-timealtzone-edge-case/. ---------- assignee: -> belopolsky nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 04:07:45 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 02:07:45 +0000 Subject: [issue5979] strptime() gives inconsistent exceptions In-Reply-To: <1241896450.71.0.860512052019.issue5979@psf.upfronthosting.co.za> Message-ID: <1275790065.46.0.980893508963.issue5979@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Looks like a bug to me: >>> datetime.strptime("1", "%d") datetime.datetime(1900, 1, 1, 0, 0) >>> datetime.strptime('1', '%m') datetime.datetime(1900, 1, 1, 0, 0) both %m and %d accept single digits but they should not. >>> datetime.strptime('123', '%m%d') datetime.datetime(1900, 12, 3, 0, 0) >>> import this .. In the face of ambiguity, refuse the temptation to guess. ---------- assignee: -> belopolsky nosy: +belopolsky stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 04:08:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 02:08:18 +0000 Subject: [issue5979] strptime() gives inconsistent exceptions In-Reply-To: <1241896450.71.0.860512052019.issue5979@psf.upfronthosting.co.za> Message-ID: <1275790098.07.0.0926738030019.issue5979@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- versions: +Python 3.2 -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 Sun Jun 6 04:13:12 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 02:13:12 +0000 Subject: [issue1982] Feature: extend strftime to accept milliseconds In-Reply-To: <1201805956.67.0.436839158391.issue1982@psf.upfronthosting.co.za> Message-ID: <1275790392.09.0.460446215134.issue1982@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: With %f support in, isn't this issue out of date? ---------- assignee: -> belopolsky nosy: +belopolsky stage: -> unit test needed versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 04:16:07 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 02:16:07 +0000 Subject: [issue2516] Instance methods are misreporting the number of arguments In-Reply-To: <1206915815.51.0.55915619351.issue2516@psf.upfronthosting.co.za> Message-ID: <1275790567.94.0.636382442702.issue2516@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file14759/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 04:20:57 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 02:20:57 +0000 Subject: [issue2516] Instance methods are misreporting the number of arguments In-Reply-To: <1206915815.51.0.55915619351.issue2516@psf.upfronthosting.co.za> Message-ID: <1275790857.13.0.650515214511.issue2516@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: gungor: your messages look mangled. It may be the case of email to trucker bug. Can you briefly explain what you are trying to add to the discussion? ---------- assignee: -> belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 05:06:20 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 06 Jun 2010 03:06:20 +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: <1275793580.19.0.611567237471.issue8910@psf.upfronthosting.co.za> New submission from Brett Cannon : The directory is empty by default as that's where some temporary files are put during testing. Should have a text file in there explaining this fact. ---------- components: Tests keywords: easy messages: 107176 nosy: brett.cannon priority: low severity: normal status: open title: Write a text file explaining why Lib/test/data exists _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 05:23:26 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 06 Jun 2010 03:23:26 +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: <1275794606.83.0.993053669818.issue8911@psf.upfronthosting.co.za> New submission from Brett Cannon : If you look at importlib.regrtest you will notice it has to muck with sys.argv in order to get certain tests skipped. It would be much better if regrtest.main had an argument you could specify instead which listed the tests to skip. This might lead to breaking out the command line parsing into the __main__ block at the end of the file instead of having it all in regrtest.main. ---------- components: Tests keywords: easy messages: 107177 nosy: brett.cannon priority: low severity: normal status: open title: regrtest.main should have a test skipping argument versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 05:24:39 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 06 Jun 2010 03:24:39 +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: <1275794679.2.0.211731721822.issue8912@psf.upfronthosting.co.za> New submission from Brett Cannon : This would be especially useful now that only spaces are used in .c/.h files and not tabs. ---------- messages: 107178 nosy: brett.cannon priority: low severity: normal status: open title: `make patchcheck` should check the whitespace of .c/.h files type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 05:26:20 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 06 Jun 2010 03:26:20 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> New submission from Brett Cannon : Documenting that would help get people using datetime objects with string.format more. ---------- assignee: docs at python components: Documentation keywords: easy messages: 107179 nosy: brett.cannon, docs at python priority: low severity: normal status: open title: Document that datetime.__format__ is datetime.strftime versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 05:32:54 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 06 Jun 2010 03:32:54 +0000 Subject: [issue8914] Run clang's static analyzer In-Reply-To: <1275795174.58.0.536949662024.issue8914@psf.upfronthosting.co.za> Message-ID: <1275795174.58.0.536949662024.issue8914@psf.upfronthosting.co.za> New submission from Brett Cannon : Just like I did for Python 2.7. Should use this issue to keep track of what I have already processed and what I had to skip because OS X doesn't have the right files. ---------- components: Extension Modules, Interpreter Core messages: 107180 nosy: brett.cannon priority: low severity: normal status: open title: Run clang's static analyzer versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 05:35:09 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 06 Jun 2010 03:35:09 +0000 Subject: [issue8915] Use locale.nl_langinfo in _strptime In-Reply-To: <1275795309.62.0.41465361185.issue8915@psf.upfronthosting.co.za> Message-ID: <1275795309.62.0.41465361185.issue8915@psf.upfronthosting.co.za> New submission from Brett Cannon : It might perform better to use locale.nl_langinfo to get the current locale's datetime information instead of reverse-engineering from strftime (need to benchmark to see if this is true). This would need to be conditional as the datetime info might not be exposed through nl_langinfo. ---------- components: Library (Lib) messages: 107181 nosy: brett.cannon priority: low severity: normal status: open title: Use locale.nl_langinfo in _strptime versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 05:39:20 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 06 Jun 2010 03:39:20 +0000 Subject: [issue8916] Move PEP 362 (function signature objects) into inspect In-Reply-To: <1275795560.39.0.398177747359.issue8916@psf.upfronthosting.co.za> Message-ID: <1275795560.39.0.398177747359.issue8916@psf.upfronthosting.co.za> New submission from Brett Cannon : To get function signature objects (PEP 362) moving forward I should get it into the inspect module. That way people can start using it more beyond those in PyPI (http://pypi.python.org/pypi/pep362). Michael Foord has mentioned how IronPython could use function signature objects. This would be a first step in getting the objects standardized enough so that IronPython could eventually consider putting them on all of their objects. ---------- components: Library (Lib) messages: 107182 nosy: brett.cannon, michael.foord priority: low severity: normal status: open title: Move PEP 362 (function signature objects) into inspect type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 06:29:09 2010 From: report at bugs.python.org (Shashwat Anand) Date: Sun, 06 Jun 2010 04:29:09 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting In-Reply-To: <1258734165.92.0.303692639409.issue7370@psf.upfronthosting.co.za> Message-ID: <1275798549.16.0.451716913926.issue7370@psf.upfronthosting.co.za> Changes by Shashwat Anand : Removed file: http://bugs.python.org/file16900/BaseHTTPServer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 06:31:18 2010 From: report at bugs.python.org (Shashwat Anand) Date: Sun, 06 Jun 2010 04:31:18 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting In-Reply-To: <1258734165.92.0.303692639409.issue7370@psf.upfronthosting.co.za> Message-ID: <1275798678.49.0.878162222239.issue7370@psf.upfronthosting.co.za> Shashwat Anand added the comment: Seems that earlier patch was incorrect. Rectifying and submitting the correct patch. ---------- Added file: http://bugs.python.org/file17567/BaseHTTPServer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 07:56:12 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 05:56:12 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1275803772.87.0.206539659524.issue8913@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I wonder if this is subject to change. I find it odd that >>> "{:g}".format(1e3) '1000' but one has to use % in >>> "{:%Y}".format(datetime.now()) '2010' It is also different from PEP 3101 recommendation: """ An example is the 'datetime' class, whose format specifiers might look something like the arguments to the strftime() function: "Today is: {0:a b d H:M:S Y}".format(datetime.now()) """ The above, however, should probably be "Today is: {0:a} {0:b} {0:d} {0:H}:{0:M}:{0:S} {0:Y}".format(datetime.now()) ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 08:12:42 2010 From: report at bugs.python.org (Tal Einat) Date: Sun, 06 Jun 2010 06:12:42 +0000 Subject: [issue8641] IDLE 3 doesn't highlights b"", but u"" In-Reply-To: <1273212994.94.0.428777321336.issue8641@psf.upfronthosting.co.za> Message-ID: <1275804762.57.0.426792371467.issue8641@psf.upfronthosting.co.za> Tal Einat added the comment: Attaching patch against current py3k branch. I simply replaced the occurrences of [rRuU] in the relevant regexps to [rRbB]. ---------- keywords: +patch nosy: +taleinat Added file: http://bugs.python.org/file17568/IDLE_py3k_string_highlighting.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 08:25:21 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 06:25:21 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275805521.24.0.385073770988.issue5094@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching the next version of my patch and changing priority to high because it appears that several issues depend on resolution of this one. Here is the summary of changes since issue5094a.diff: 1. The constructor now accepts only whole number of minutes in [-23:59, 23:59] range. 2. Removed tz_aware option to utcnow(). 3. Moved struct PyDateTime_TimeZone definition to .c file. This effectively makes the actual definition private so that it can be changed in the future if desired without breaking C API. 4. Removed checks that the argument passed to tzinfo methods is a timedelta. The tzinfo spec requires that None is accepted. Since the argument is ignored, it is wasteful to check its type. 5. Make dst() return None as recommended by tzinfo documentation when DST information is not provided. Brett, is this close to a compromise that we can agree to or is it time to start writing a PEP? :-) PS: The latest patch does not include doc changes. ---------- priority: low -> high Added file: http://bugs.python.org/file17569/issue5094b.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 08:25:34 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 06 Jun 2010 06:25:34 +0000 Subject: [issue7166] IDLE (python 3.1.1) syntax coloring for b'bytestring' and u'unicode' string literal In-Reply-To: <1255894468.82.0.699463762919.issue7166@psf.upfronthosting.co.za> Message-ID: <1275805534.68.0.197758894874.issue7166@psf.upfronthosting.co.za> Ezio Melotti added the comment: Duplicate of #8641. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 08:25:41 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 06 Jun 2010 06:25:41 +0000 Subject: [issue8641] IDLE 3 doesn't highlights b"", but u"" In-Reply-To: <1273212994.94.0.428777321336.issue8641@psf.upfronthosting.co.za> Message-ID: <1275805541.37.0.718916824208.issue8641@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also #7166. ---------- nosy: +ezio.melotti, lieryan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 08:54:47 2010 From: report at bugs.python.org (Daniel Urban) Date: Sun, 06 Jun 2010 06:54:47 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275807287.52.0.356996922752.issue5094@psf.upfronthosting.co.za> Daniel Urban added the comment: Isn't it possible, that in the issue5094b.diff patch, in the new_timezone_ex function, in this part: self = (PyDateTime_TimeZone *)type->tp_alloc(type, 0); if (self == NULL) return NULL; should be a Py_DECREF(offset) call? I mean like: self = (PyDateTime_TimeZone *)type->tp_alloc(type, 0); if (self == NULL) { Py_DECREF(offset); return NULL; } I think the refcount of offset has always been incremented, so in case of an error, it should be decremented (as in the other error handling parts of the function). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 09:02:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 07:02:59 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275807779.1.0.566530388399.issue5094@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Good catch, Daniel! Fixed in issue5094c.diff. ---------- Added file: http://bugs.python.org/file17570/issue5094c.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 09:17:04 2010 From: report at bugs.python.org (Tal Einat) Date: Sun, 06 Jun 2010 07:17:04 +0000 Subject: [issue7166] IDLE (python 3.1.1) syntax coloring for b'bytestring' and u'unicode' string literal In-Reply-To: <1255894468.82.0.699463762919.issue7166@psf.upfronthosting.co.za> Message-ID: <1275808624.54.0.0745713369408.issue7166@psf.upfronthosting.co.za> Changes by Tal Einat : ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 10:00:14 2010 From: report at bugs.python.org (Daniel Urban) Date: Sun, 06 Jun 2010 08:00:14 +0000 Subject: [issue8916] Move PEP 362 (function signature objects) into inspect In-Reply-To: <1275795560.39.0.398177747359.issue8916@psf.upfronthosting.co.za> Message-ID: <1275811214.83.0.514819474427.issue8916@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +durban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 10:19:05 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 06 Jun 2010 08:19:05 +0000 Subject: [issue8902] add datetime.time.now() for consistency In-Reply-To: <1275719789.45.0.168425659941.issue8902@psf.upfronthosting.co.za> Message-ID: <1275812345.07.0.241565129764.issue8902@psf.upfronthosting.co.za> anatoly techtonik added the comment: > What is your use case? >>> from datetime import now, today >>> now() datetime.time ... >>> today() datetime.date ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 10:21:38 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 06 Jun 2010 08:21:38 +0000 Subject: [issue8902] add datetime.time.now() for consistency In-Reply-To: <1275719789.45.0.168425659941.issue8902@psf.upfronthosting.co.za> Message-ID: <1275812498.32.0.220768576294.issue8902@psf.upfronthosting.co.za> anatoly techtonik added the comment: > Didn't you just recently complain about the large number of functions in datetime module? About verbosity of datetime API to be exact, so it is a ratio of (API functions + required docs)/user code that makes required stuff done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 11:03:29 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Jun 2010 09:03:29 +0000 Subject: [issue8850] Remove "w" format of PyParse_ParseTuple() In-Reply-To: <1275099860.74.0.46695580149.issue8850@psf.upfronthosting.co.za> Message-ID: <1275815009.51.0.152442121583.issue8850@psf.upfronthosting.co.za> STINNER Victor added the comment: Attached patch removes "w" format, cleanups the code for "w*" and "w#" formats, and update the documentation. ---------- keywords: +patch Added file: http://bugs.python.org/file17571/remove_w_format.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 16:47:43 2010 From: report at bugs.python.org (tanaga) Date: Sun, 06 Jun 2010 14:47:43 +0000 Subject: [issue8917] Segmentation error happens in Embedding Python. In-Reply-To: <1275835663.33.0.520214000656.issue8917@psf.upfronthosting.co.za> Message-ID: <1275835663.33.0.520214000656.issue8917@psf.upfronthosting.co.za> New submission from tanaga : A segmentation error happens in Embedding Python. condition When I called four times of Py_Main in one process. and When I used ctypes in the script. A happening segmentation error(core dumped) [user at localhost debug]$ [user at localhost debug]$ ls -l total 24 -rwxrwxrwx 1 user user 333 May 30 03:17 build.sh -rwxrwxrwx 1 user user 385 Jun 6 23:27 ctypes_segmfault.c -rwxrwxrwx 1 user user 14 Jun 6 23:25 import_ctypes.py [user at localhost debug]$ [user at localhost debug]$ [user at localhost debug]$ ./build.sh /usr/local/lib/libpython2.6.a(posixmodule.o): In function `posix_tmpnam': /work/Python-2.6.5/./Modules/posixmodule.c:7207: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp' /usr/local/lib/libpython2.6.a(posixmodule.o): In function `posix_tempnam': /work/Python-2.6.5/./Modules/posixmodule.c:7162: warning: the use of `tempnam' is dangerous, better use `mkstemp' [user at localhost debug]$ [user at localhost debug]$ [user at localhost debug]$ ls -l total 4212 -rwxrwxrwx 1 user user 333 May 30 03:17 build.sh -rwxrwxr-x 1 user user 4256056 Jun 6 23:30 ctypes_segmfault -rwxrwxrwx 1 user user 385 Jun 6 23:27 ctypes_segmfault.c -rw-rw-r-- 1 user user 4664 Jun 6 23:30 ctypes_segmfault.o -rwxrwxrwx 1 user user 14 Jun 6 23:25 import_ctypes.py [user at localhost debug]$ [user at localhost debug]$ [user at localhost debug]$ ./ctypes_segmfault ----- 0 ----- ----- 1 ----- ----- 2 ----- ----- 3 ----- Segmentation fault (core dumped) [user at localhost debug]$ [user at localhost debug]$ [user at localhost debug]$ ls -l total 5960 -rwxrwxrwx 1 user user 333 May 30 03:17 build.sh -rw------- 1 user user 1933312 Jun 6 23:31 core.2981 -rwxrwxr-x 1 user user 4256056 Jun 6 23:30 ctypes_segmfault -rwxrwxrwx 1 user user 385 Jun 6 23:27 ctypes_segmfault.c -rw-rw-r-- 1 user user 4664 Jun 6 23:30 ctypes_segmfault.o -rwxrwxrwx 1 user user 14 Jun 6 23:25 import_ctypes.py [user at localhost debug]$ so I watched core with gdb. [user at localhost debug]$ gdb ctypes_segmfault core.2981 GNU gdb (GDB) Red Hat Enterprise Linux (7.0.1-23.el5_5.1) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /home/user/debug/ctypes_segmfault...done. warning: core file may not match specified executable file. Reading symbols from /lib/libpthread.so.0...(no debugging symbols found)...done. Loaded symbols for /lib/libpthread.so.0 Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/libdl.so.2 Reading symbols from /lib/libutil.so.1...(no debugging symbols found)...done. Loaded symbols for /lib/libutil.so.1 Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libm.so.6 Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done. Loaded symbols for /lib/ld-linux.so.2 Reading symbols from /usr/local/lib/python2.6/lib-dynload/_ctypes.so...done. Loaded symbols for /usr/local/lib/python2.6/lib-dynload/_ctypes.so Reading symbols from /usr/local/lib/python2.6/lib-dynload/_struct.so...done. Loaded symbols for /usr/local/lib/python2.6/lib-dynload/_struct.so Core was generated by `./ctypes_segmfault'. Program terminated with signal 11, Segmentation fault. #0 0x080a103a in type_dealloc (type=0x9f3180) at Objects/typeobject.c:2610 2610 _PyObject_GC_UNTRACK(type); (gdb) bt #0 0x080a103a in type_dealloc (type=0x9f3180) at Objects/typeobject.c:2610 #1 0x080888ef in dict_dealloc (mp=0xb7ef313c) at Objects/dictobject.c:911 #2 0x080888ef in dict_dealloc (mp=0xb7f4c02c) at Objects/dictobject.c:911 #3 0x080e7599 in _PyImport_Fini () at Python/import.c:240 #4 0x080f47cc in Py_Finalize () at Python/pythonrun.c:460 #5 0x08058183 in Py_Main (argc=1, argv=0xbfe5c6c8) at Modules/main.c:596 #6 0x080579d3 in main () at ./ctypes_segmfault.c:16 (gdb) quit [user at localhost debug]$ fumm... I don't know about inside of Python Interpreter. [user at localhost debug]$ cat ctypes_segmfault.c #include #include /* ulimit -c unlimited */ int main(void) { char *argpy[] = { "python", "import_ctypes.py" }; printf("----- 0 -----\n"); Py_Main(2, argpy); printf("----- 1 -----\n"); Py_Main(2, argpy); printf("----- 2 -----\n"); Py_Main(2, argpy); printf("----- 3 -----\n"); Py_Main(2, argpy); printf("----- 4 -----\n"); return 0; } [user at localhost debug]$ [user at localhost debug]$ cat build.sh #!/bin/sh gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 \ -Wall -Wstrict-prototypes -I/usr/local/include/python2.6/ \ -DPy_BUILD_CORE -o ctypes_segmfault.o ./ctypes_segmfault.c gcc -pthread -Xlinker -export-dynamic -o ctypes_segmfault \ ctypes_segmfault.o \ -lpython2.6 -lpthread -ldl -lutil -lm [user at localhost debug]$ [user at localhost debug]$ cat import_ctypes.py import ctypes [user at localhost debug]$ ---------- assignee: theller components: Interpreter Core, ctypes files: ctypes_segmfault.c messages: 107194 nosy: tanaga, theller priority: normal severity: normal status: open title: Segmentation error happens in Embedding Python. type: crash versions: Python 2.6 Added file: http://bugs.python.org/file17572/ctypes_segmfault.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 17:32:04 2010 From: report at bugs.python.org (lesmana) Date: Sun, 06 Jun 2010 15:32:04 +0000 Subject: [issue5845] rlcompleter should be enabled automatically In-Reply-To: <1240702039.68.0.55843541961.issue5845@psf.upfronthosting.co.za> Message-ID: <1275838324.6.0.142156936693.issue5845@psf.upfronthosting.co.za> Changes by lesmana : ---------- nosy: +lesmana _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 17:32:39 2010 From: report at bugs.python.org (lesmana) Date: Sun, 06 Jun 2010 15:32:39 +0000 Subject: [issue7898] rlcompleter add "real tab" when text is empty feature In-Reply-To: <1265789959.13.0.400404108309.issue7898@psf.upfronthosting.co.za> Message-ID: <1275838359.27.0.734772635334.issue7898@psf.upfronthosting.co.za> Changes by lesmana : ---------- nosy: +lesmana _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 18:51:02 2010 From: report at bugs.python.org (tanaga) Date: Sun, 06 Jun 2010 16:51:02 +0000 Subject: [issue8917] Segmentation error happens in Embedding Python. In-Reply-To: <1275835663.33.0.520214000656.issue8917@psf.upfronthosting.co.za> Message-ID: <1275843062.39.0.102402672658.issue8917@psf.upfronthosting.co.za> tanaga added the comment: I used Python 2.6.5 on CentOS 5.5. [root at localhost ~]# uname -a Linux localhost.localdomain 2.6.18-194.3.1.el5 #1 SMP Thu May 13 13:09:10 EDT 2010 i686 i686 i386 GNU/Linux [root at localhost ~]# python Python 2.6.5 (r265:79063, May 30 2010, 03:05:19) [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 19:51:00 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Sun, 06 Jun 2010 17:51:00 +0000 Subject: [issue8918] distutils test failure on solaris: IOError: [Errno 2] No such file or directory: '_configtest.i' In-Reply-To: <1275846660.59.0.731483262347.issue8918@psf.upfronthosting.co.za> Message-ID: <1275846660.59.0.731483262347.issue8918@psf.upfronthosting.co.za> New submission from Sridhar Ratnakumar : OS = SunOS ginsu 5.10 Generic_125101-10 i86pc i386 i86pc Python 2.7rc1 ====================================================================== ERROR: test_search_cpp (distutils.tests.test_config_cmd.ConfigTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/export/home/apy/rrun/tmp/autotest/apy/lib/python2.7/distutils/tests/test_config_cmd.py", line 46 , in test_search_cpp match = cmd.search_cpp(pattern='xxx', body='// xxx') File "/export/home/apy/rrun/tmp/autotest/apy/lib/python2.7/distutils/command/config.py", line 211, in search_cpp file = open(out) IOError: [Errno 2] No such file or directory: '_configtest.i' ---------- assignee: tarek components: Distutils, Tests messages: 107196 nosy: srid, tarek priority: normal severity: normal status: open title: distutils test failure on solaris: IOError: [Errno 2] No such file or directory: '_configtest.i' type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 19:56:24 2010 From: report at bugs.python.org (lesmana) Date: Sun, 06 Jun 2010 17:56:24 +0000 Subject: [issue8919] python should read ~/.pythonrc.py by default In-Reply-To: <1275846984.04.0.731293977336.issue8919@psf.upfronthosting.co.za> Message-ID: <1275846984.04.0.731293977336.issue8919@psf.upfronthosting.co.za> New submission from lesmana : if started as an interactive session python should check for and read ~/.pythonrc.py by default. furthermore there should be two options added: --rcfile filename this will read filename instead of ~/.pythonrc --norc this will prevent reading ~/.pythonrc (this is inspired by how bash handles initialization) afterwards the variable PYTHONSTARTUP can be deprecated. as far as i know, everything which can be done by the variable PYTHONSTARTUP can be done with the suggested method. the advantage of the suggested method is that it is "intuitive" in the sense that it is the way most other tools do it (bash for example). ---------- messages: 107197 nosy: lesmana priority: normal severity: normal status: open title: python should read ~/.pythonrc.py by default type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 20:02:45 2010 From: report at bugs.python.org (lesmana) Date: Sun, 06 Jun 2010 18:02:45 +0000 Subject: [issue8920] PYTHONSTARTUP should expand "~" In-Reply-To: <1275847365.81.0.275671627787.issue8920@psf.upfronthosting.co.za> Message-ID: <1275847365.81.0.275671627787.issue8920@psf.upfronthosting.co.za> New submission from lesmana : for example, this should be legal: PYTHONSTARTUP="~/.pythonrc.py" workaround (in bash) PYTHONSTARTUP=$(echo ~)"/.pythonrc.py" ---------- messages: 107198 nosy: lesmana priority: normal severity: normal status: open title: PYTHONSTARTUP should expand "~" type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 20:02:53 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Sun, 06 Jun 2010 18:02:53 +0000 Subject: [issue8921] 2.7rc1: test_ttk failures on OSX 10.4 In-Reply-To: <1275847373.81.0.425210704121.issue8921@psf.upfronthosting.co.za> Message-ID: <1275847373.81.0.425210704121.issue8921@psf.upfronthosting.co.za> New submission from Sridhar Ratnakumar : Several test_ttk failures on OSX 10.4 (w/ Tcl/Tk 8.5 installed in /Library/Frameworks) and Python 2.7rc1 ====================================================================== ERROR: test_tab_identifiers (test_ttk.test_widgets.NotebookTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/test/test_ttk/test_widgets .py", line 560, in test_tab_identifiers self.assertEqual(self.nb.tab('@5,5'), self.nb.tab('current')) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/ttk.py", line 922, in tab return _val_or_dict(kw, self.tk.call, self._w, "tab", tab_id) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/ttk.py", line 318, in _val _or_dict res = func(*(args + options)) TclError: tab '@5,5' not found ====================================================================== FAIL: test_identify (test_ttk.test_widgets.WidgetTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/test/test_ttk/test_widgets .py", line 27, in test_identify self.assertEqual(self.widget.identify(5, 5), "label") AssertionError: 'Button.button' != 'label' ====================================================================== FAIL: test_traversal (test_ttk.test_widgets.NotebookTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/test/test_ttk/test_widgets .py", line 721, in test_traversal self.assertEqual(self.nb.select(), str(self.child1)) AssertionError: '.73168616' != '.73169536' ---------------------------------------------------------------------- ---------- assignee: ronaldoussoren components: Macintosh, Tests, Tkinter messages: 107199 nosy: ronaldoussoren, srid priority: normal severity: normal status: open title: 2.7rc1: test_ttk failures on OSX 10.4 type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 20:03:33 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Jun 2010 18:03:33 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting In-Reply-To: <1258734165.92.0.303692639409.issue7370@psf.upfronthosting.co.za> Message-ID: <1275847413.34.0.971453931467.issue7370@psf.upfronthosting.co.za> ?ric Araujo added the comment: You could get a minor speedup by doing ?from email.utils import formatdate?. Do we have tests know to check that the patch does not break anything? Can this still go into 2.7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 20:04:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 18:04:09 +0000 Subject: [issue7463] PyDateTime_IMPORT() causes compiler warnings In-Reply-To: <1260352911.97.0.550126067946.issue7463@psf.upfronthosting.co.za> Message-ID: <1275847449.76.0.178808281575.issue7463@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: PyCObject is deprecated in 2.7 and removed in 3.x. PyCapsule_Import() should be used instead of PyCObject_Import() and it already has correct signature: Include/pycapsule.h:PyAPI_FUNC(void *) PyCapsule_Import(const char *name, int no_block); Since this is not a bug, I don't think it is appropriate to change it in 2.x. ---------- resolution: -> out of date stage: needs patch -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 20:15:20 2010 From: report at bugs.python.org (Shashwat Anand) Date: Sun, 06 Jun 2010 18:15:20 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting In-Reply-To: <1258734165.92.0.303692639409.issue7370@psf.upfronthosting.co.za> Message-ID: <1275848120.44.0.785575584663.issue7370@psf.upfronthosting.co.za> Changes by Shashwat Anand : Removed file: http://bugs.python.org/file17567/BaseHTTPServer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 20:20:36 2010 From: report at bugs.python.org (Shashwat Anand) Date: Sun, 06 Jun 2010 18:20:36 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting In-Reply-To: <1258734165.92.0.303692639409.issue7370@psf.upfronthosting.co.za> Message-ID: <1275848436.21.0.784970622093.issue7370@psf.upfronthosting.co.za> Shashwat Anand added the comment: > You could get a minor speedup by doing ?from email.utils import formatdate?. I guess I shall do that. Applied the patch and tested it, it does not break anything IMO and should go in python2.7 ---------- Added file: http://bugs.python.org/file17573/BaseHTTPServer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 20:23:58 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Jun 2010 18:23:58 +0000 Subject: [issue8922] Improve encoding shortcuts in PyUnicode_AsEncodedString() In-Reply-To: <1275848637.97.0.606582513318.issue8922@psf.upfronthosting.co.za> Message-ID: <1275848637.97.0.606582513318.issue8922@psf.upfronthosting.co.za> New submission from STINNER Victor : PyUnicode_Decode() and PyUnicode_AsEncodedString() calls directly builtin decoders/encoders for some known encodings (eg. "utf-8"), instead of using the slow path (call PyCodec_Decode() / PyCodec_Encode()). PyUnicode_Decode() does normalize the encoding name: convert to lower and replace "_" by "-", as normalizestring() does. But PyUnicode_AsEncodedString() doesn't normalize the encoding name, it just use strcmp(). PyUnicode_Decode() has a shortcut for ISO-8859-1, whereas PyUnicode_AsEncodedString() doesn't (only for "latin-1"). Attached patch creates a subfunction (static) normalize_encoding(), use it in PyUnicode_Decode() and PyUnicode_AsEncodedString(), and adds a shortcut for ISO-8859-1 to PyUnicode_AsEncodedString(). ---------- components: Unicode files: unicode_shortcuts.patch keywords: patch messages: 107203 nosy: haypo, pitrou priority: normal severity: normal status: open title: Improve encoding shortcuts in PyUnicode_AsEncodedString() type: performance versions: Python 3.2 Added file: http://bugs.python.org/file17574/unicode_shortcuts.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 20:28:41 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Jun 2010 18:28:41 +0000 Subject: [issue8923] Remove unused "errors" argument from _PyUnicode_AsDefaultEncodedString() In-Reply-To: <1275848921.87.0.52681950966.issue8923@psf.upfronthosting.co.za> Message-ID: <1275848921.87.0.52681950966.issue8923@psf.upfronthosting.co.za> New submission from STINNER Victor : _PyUnicode_AsDefaultEncodedString() has two arguments: unicode (input string) and errors. If errors is not NULL, it calls Py_FatalError()! The argument is useful: all functions call it with errors=NULL. Attached patch removes the argument. ---------- components: Unicode files: unicode_errors.patch keywords: patch messages: 107204 nosy: haypo priority: normal severity: normal status: open title: Remove unused "errors" argument from _PyUnicode_AsDefaultEncodedString() versions: Python 3.2 Added file: http://bugs.python.org/file17575/unicode_errors.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 20:40:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Jun 2010 18:40:06 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting In-Reply-To: <1258734165.92.0.303692639409.issue7370@psf.upfronthosting.co.za> Message-ID: <1275849606.19.0.881475538624.issue7370@psf.upfronthosting.co.za> ?ric Araujo added the comment: Opinions are nice, tests are better! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 20:49:48 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Jun 2010 18:49:48 +0000 Subject: [issue4769] b64decode should accept strings or bytes In-Reply-To: <1230572153.22.0.954048343235.issue4769@psf.upfronthosting.co.za> Message-ID: <1275850188.17.0.472494030379.issue4769@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file17441/base64_main.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 20:52:18 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Jun 2010 18:52:18 +0000 Subject: [issue8848] Deprecate or remove "U" and "U#" formats of Py_BuildValue() In-Reply-To: <1275097128.66.0.216673219733.issue8848@psf.upfronthosting.co.za> Message-ID: <1275850338.38.0.224274252126.issue8848@psf.upfronthosting.co.za> STINNER Victor added the comment: > IMHO removing 'U' should only be done once Py2 is dead. What do you mean by "once Py2 is dead"? Can I apply the patch in Python 3.2 now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 20:52:55 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sun, 06 Jun 2010 18:52:55 +0000 Subject: [issue8920] PYTHONSTARTUP should expand "~" In-Reply-To: <1275847365.81.0.275671627787.issue8920@psf.upfronthosting.co.za> Message-ID: <1275850375.48.0.436243674048.issue8920@psf.upfronthosting.co.za> Florent Xicluna added the comment: Here it works with : PYTHONSTARTUP="$HOME/.pythonrc" ./python ---------- components: +Interpreter Core nosy: +flox resolution: -> wont fix stage: -> committed/rejected status: open -> pending versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 20:53:58 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Jun 2010 18:53:58 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275850438.74.0.0647348369797.issue5094@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: -haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 21:01:52 2010 From: report at bugs.python.org (Peter Landgren) Date: Sun, 06 Jun 2010 19:01:52 +0000 Subject: [issue8924] Error in error message in logging In-Reply-To: <1275850912.41.0.0811394159532.issue8924@psf.upfronthosting.co.za> Message-ID: <1275850912.41.0.0811394159532.issue8924@psf.upfronthosting.co.za> New submission from Peter Landgren : This is in Windows. I got an error message in Logging in my application Gramps. However, there is an error message generated by by this logging, so the original message is never output. The last line indicate a problem with bytes in certain positions. I was able to check it and it is the Swedish character "?". The logging call is: ... except (IOError, OSError), msg: msg = unicode(str(msg), sys.getfilesystemencoding()) LOG.error(_("Could not make database directory: ") + msg) which results in: 3165: ERROR: clidbman.py: line 335: Kunde inte skapa databasmappen: [Error 3] Det g??r inte att hitta s??kv??ge n: u'F:\\' Traceback (most recent call last): File "C:\Python26\lib\logging\__init__.py", line 769, in emit msg = self.format(record) File "C:\Python26\lib\logging\__init__.py", line 649, in format return fmt.format(record) File "C:\Python26\lib\logging\__init__.py", line 448, in format s = s + record.exc_text UnicodeDecodeError: 'utf8' codec can't decode bytes in position 608-610: invalid data 4893: ERROR: gramps.py: line 138: Unhandled exception Traceback (most recent call last): File "C:\Program Files (x86)\gramps\gui\grampsgui.py", line 353, in __startgramps "Error details: %s %s" % (repr(e), fn), exc_info=True) File "C:\Python26\lib\logging\__init__.py", line 1075, in error self._log(ERROR, msg, args, **kwargs) File "C:\Python26\lib\logging\__init__.py", line 1166, in _log self.handle(record) File "C:\Python26\lib\logging\__init__.py", line 1176, in handle self.callHandlers(record) File "C:\Python26\lib\logging\__init__.py", line 1213, in callHandlers hdlr.handle(record) File "C:\Python26\lib\logging\__init__.py", line 674, in handle self.emit(record) File "C:\Program Files (x86)\gramps\GrampsLogger\_GtkHandler.py", line 26, in emit ErrorView(error_detail=self,rotate_handler=self._rotate_handler) File "C:\Program Files (x86)\gramps\GrampsLogger\_ErrorView.py", line 39, in __init__ self.draw_window() File "C:\Program Files (x86)\gramps\GrampsLogger\_ErrorView.py", line 94, in draw_window tb_label.get_buffer().set_text(self._error_detail.get_formatted_log()) File "C:\Program Files (x86)\gramps\GrampsLogger\_GtkHandler.py", line 29, in get_formatted_log return self.format(self._record) File "C:\Python26\lib\logging\__init__.py", line 649, in format return fmt.format(record) File "C:\Python26\lib\logging\__init__.py", line 448, in format s = s + record.exc_text UnicodeDecodeError: 'utf8' codec can't decode bytes in position 608-610: invalid data If I change line 448 in "C:\Python26\lib\logging\__init__.py" to: s = s + unicode(str(record.exc_text), sys.getfilesystemencoding()) I get the correct message: 4523: ERROR: grampsgui.py: line 353: Gramps terminated because of OS Error Error details: WindowsError(3, 'Det g\xe5r inte att hitta s\xf6kv\xe4gen') F:\grdbtest\*.* Traceback (most recent call last): File "C:\Program Files (x86)\gramps\gui\grampsgui.py", line 337, in __startgramps Gramps(argparser) File "C:\Program Files (x86)\gramps\gui\grampsgui.py", line 268, in __init__ gui=True) File "C:\Program Files (x86)\gramps\cli\arghandler.py", line 81, in __init__ self.dbman = CLIDbManager(self.dbstate) File "C:\Program Files (x86)\gramps\cli\clidbman.py", line 100, in __init__ self._populate_cli() File "C:\Program Files (x86)\gramps\cli\clidbman.py", line 175, in _populate_cli for dpath in os.listdir(dbdir): WindowsError: [Error 3] Det g??r inte att hitta s??kv??gen: u'F:\\grdbtest\\*.*' (There is a secondary problem with rendering some characers. All strings were generated on a Windows system, but I report using a Linux system.) ---------- components: Library (Lib) messages: 107208 nosy: PeterL priority: normal severity: normal status: open title: Error in error message in logging type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 21:03:55 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Jun 2010 19:03:55 +0000 Subject: [issue8925] Improve c-api/arg.rst: use "bytes" or "str" types instead of "string" In-Reply-To: <1275851035.31.0.736999556947.issue8925@psf.upfronthosting.co.za> Message-ID: <1275851035.31.0.736999556947.issue8925@psf.upfronthosting.co.za> New submission from STINNER Victor : http://docs.python.org/py3k/c-api/arg.html is unclear about what is a "string". Attached patch: - Use directly bytes, bytearray and str types - Replace "default encoding" by "``'utf-8'`` encoding" - Add bytes and/or bytearray to "... buffer compatible object" because it's not easy to understand what is a buffer compatible object, especially because there are different kind of buffer objects: read-only, read-write, pinned, etc. - Fix reST syntax ("..note ::") - Fix "es", "es#", "et" and "et#" formats: they doesn't accept "character buffer compatible object" (can someone double check that?) Py_BuildValue(): I choosed to mark U and U# formats as deprecated alias to s/s# => see issue #8848. I wrote the patch by reading getargs.c. ---------- assignee: docs at python components: Documentation, Unicode files: arg.patch keywords: patch messages: 107209 nosy: docs at python, haypo priority: normal severity: normal status: open title: Improve c-api/arg.rst: use "bytes" or "str" types instead of "string" versions: Python 3.2 Added file: http://bugs.python.org/file17576/arg.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 21:11:10 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Jun 2010 19:11:10 +0000 Subject: [issue8926] getargs.c: release the buffer on error In-Reply-To: <1275851470.16.0.472008534505.issue8926@psf.upfronthosting.co.za> Message-ID: <1275851470.16.0.472008534505.issue8926@psf.upfronthosting.co.za> New submission from STINNER Victor : PyArg_ParseTuple("t") calls PyObject_GetBuffer() and then raise an error if arg->ob_type->tp_as_buffer->bf_releasebuffer is not NULL. I think that it should call PyBuffer_Release(&view) before raising the error, or simply check bf_releasebuffer before calling PyObject_GetBuffer(). getbuffer() calls PyObject_GetBuffer() and then raise an error if the buffer is not contiguous. I think that it should call PyBuffer_Release() before the error. Attached patch fixes both errors. Tell me if I'm wrong :-) ---------- components: Interpreter Core files: getarg_release.patch keywords: patch messages: 107210 nosy: haypo priority: normal severity: normal status: open title: getargs.c: release the buffer on error versions: Python 3.2 Added file: http://bugs.python.org/file17577/getarg_release.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 21:15:20 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 06 Jun 2010 19:15:20 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1275851720.56.0.383189869494.issue8913@psf.upfronthosting.co.za> Brett Cannon added the comment: I don't find it odd at all that you use datetime-specific formats instead of integral formats to get numbers out of a datetime object; they are totally different things. And one of the reasons for __format__ support is to have DSLs such as the one for datetime objects. As for pulling out individual objects, that just looks ugly, so I wouldn't advocate pulling out individual values and then formatting them individually in the string itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 21:32:00 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 06 Jun 2010 19:32:00 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275852720.21.0.627523212652.issue5094@psf.upfronthosting.co.za> Brett Cannon added the comment: Put yourself down as the maintainer of datetime in Misc/maintainers.rst and you have a deal, Alexander! =) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 21:37:28 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 06 Jun 2010 19:37:28 +0000 Subject: [issue600952] Installing w/o admin generates key error Message-ID: <1275853048.28.0.762742337864.issue600952@psf.upfronthosting.co.za> anatoly techtonik added the comment: Seems like it still the issue for 2.4.4 http://scons.tigris.org/issues/show_bug.cgi?id=2533 http://trac.edgewall.org/ticket/9404#comment:2 ---------- nosy: +tarek, techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 21:37:40 2010 From: report at bugs.python.org (Dave Abrahams) Date: Sun, 06 Jun 2010 19:37:40 +0000 Subject: [issue8927] Cannot handle complex requirement resolution In-Reply-To: <1275853060.23.0.0333552205181.issue8927@psf.upfronthosting.co.za> Message-ID: <1275853060.23.0.0333552205181.issue8927@psf.upfronthosting.co.za> New submission from Dave Abrahams : [This looks like a bug report against PIP because Tarek told me distutils2 would be responsible for this kind of thing and that there was an open ticket for it. However, I can't find any such ticket so I'm posting it here] Not only does pip not check for conflicts as noted in http://bitbucket.org/ianb/pip/src/tip/pip/req.py#cl-928, it doesn't consider any requirements on a package other than the first. So if I have A requires B and C B requires D<=1.1 C requires D<=0.9 installing A will give us D==1.1 rather than D==0.9 Once responsibility for this functionality is sorted out, we may be able to close this ticket or http://bitbucket.org/ianb/pip/issue/119 ---------- assignee: tarek components: Distutils2 messages: 107214 nosy: dabrahams, tarek priority: normal severity: normal status: open title: Cannot handle complex requirement resolution type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 21:40:54 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Jun 2010 19:40:54 +0000 Subject: [issue8925] Improve c-api/arg.rst: use "bytes" or "str" types instead of "string" In-Reply-To: <1275851035.31.0.736999556947.issue8925@psf.upfronthosting.co.za> Message-ID: <1275853254.94.0.0809272531495.issue8925@psf.upfronthosting.co.za> ?ric Araujo added the comment: - buffer protocol (such as :class:`bytes` or :class:`bytearray` objects). + buffer protocol. Is there a reST construct to use here, say to reference a PEP or point to a glossary entry that defines this protocol? ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 21:42:35 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 06 Jun 2010 19:42:35 +0000 Subject: [issue1674555] sys.path in tests contains system directories Message-ID: <1275853355.38.0.400359541066.issue1674555@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: I noticed the same problem in many tests. E.g. test___all__ fails when pyxml is installed. ---------- nosy: +Arfrever title: Python 2.5 testsuite sys.path contains system dirs -> sys.path in tests contains system directories versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 21:56:23 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Jun 2010 19:56:23 +0000 Subject: [issue8925] Improve c-api/arg.rst: use "bytes" or "str" types instead of "string" In-Reply-To: <1275851035.31.0.736999556947.issue8925@psf.upfronthosting.co.za> Message-ID: <1275854183.95.0.372846050297.issue8925@psf.upfronthosting.co.za> Georg Brandl added the comment: If there is a glossary entry, use :term:`buffer protocol`. If there is none, write one :) PEPs are referenced by :pep:`4711`. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 21:58:20 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 06 Jun 2010 19:58:20 +0000 Subject: [issue600952] Installing w/o admin generates key error Message-ID: <1275854300.56.0.903388645203.issue600952@psf.upfronthosting.co.za> Tarek Ziad? added the comment: 2.4/2.5 are not fixed anymore. Only security patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 22:02:41 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 06 Jun 2010 20:02:41 +0000 Subject: [issue8928] wininst: could not create key In-Reply-To: <1275854561.45.0.0117544967496.issue8928@psf.upfronthosting.co.za> Message-ID: <1275854561.45.0.0117544967496.issue8928@psf.upfronthosting.co.za> New submission from anatoly techtonik : Projects that still support Python 2.4 are building distributions with either 2.4.x or 2.5.x versions, because they afraid that newer installers won't run on Windows XP or Windows 2000. http://trac.edgewall.org/ticket/9404#comment:2 Unfortunately, these installers fail to create uninstall keys with an error like: Could not create scons-py2.6 Could not set key value Python 2.6 SCons - a software construction tool Could not set key value ...\Python26\Removescons.exe" -u ... This is similar to http://bugs.python.org/issue600952 that was reported for Python 2.1 / 2.2 long ago. http://scons.tigris.org/issues/show_bug.cgi?id=2533 http://trac.edgewall.org/attachment/ticket/9404/win7_install_warnings.png ---------- assignee: tarek components: Distutils, Windows messages: 107219 nosy: tarek, techtonik priority: normal severity: normal status: open title: wininst: could not create key versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 22:05:30 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 06 Jun 2010 20:05:30 +0000 Subject: [issue8928] wininst: could not create key In-Reply-To: <1275854561.45.0.0117544967496.issue8928@psf.upfronthosting.co.za> Message-ID: <1275854730.93.0.254725443414.issue8928@psf.upfronthosting.co.za> anatoly techtonik added the comment: There is some uncertainty that 2.6 package installers are dependent on msvcr90.dll - http://trac.edgewall.org/ticket/9404#comment:7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 22:17:12 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 06 Jun 2010 20:17:12 +0000 Subject: [issue8928] wininst: could not create key In-Reply-To: <1275854561.45.0.0117544967496.issue8928@psf.upfronthosting.co.za> Message-ID: <1275855432.22.0.525348300117.issue8928@psf.upfronthosting.co.za> Tarek Ziad? added the comment: as I said in the other issue, there's no bug fix for 2.4 or 2.5 anymore, unless it's a security issue. So I am closing this issue. Also, your second message seems unrelated. If there's an issue with a dependency under 2.6, please open a distinct issue and explain in detail what is the problem. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 22:18:01 2010 From: report at bugs.python.org (Eric Smith) Date: Sun, 06 Jun 2010 20:18:01 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1275855481.84.0.0594177581524.issue8913@psf.upfronthosting.co.za> Eric Smith added the comment: I think Alexander's example is best written as: "Today is: {0:%a %b %d %H:%M:%S %Y}".format(datetime.now()) I agree with Brett that there's nothing unusual about having type-specific formatting languages, and for datetime strftime is the obvious choice. It's a little unfortunate that % is used, as it's mildly confusing with %-formatting, but not much can be done with that issue. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 22:19:04 2010 From: report at bugs.python.org (Eric Smith) Date: Sun, 06 Jun 2010 20:19:04 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1275855544.24.0.613420693819.issue8913@psf.upfronthosting.co.za> Eric Smith added the comment: This documentation should also be added for datetime.time and datetime.date, in addition to datetime.datetime. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 22:23:45 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 06 Jun 2010 20:23:45 +0000 Subject: [issue8909] mention bitmap size for bdist_wininst In-Reply-To: <1275855825.9.0.442655313563.issue8909@psf.upfronthosting.co.za> Message-ID: <1275855825.9.0.442655313563.issue8909@psf.upfronthosting.co.za> New submission from Tarek Ziad? : done in r81788, r81789, r81790, r81791 thanks! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 22:25:59 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 06 Jun 2010 20:25:59 +0000 Subject: [issue8928] wininst: could not create key In-Reply-To: <1275854561.45.0.0117544967496.issue8928@psf.upfronthosting.co.za> Message-ID: <1275855959.86.0.820631755072.issue8928@psf.upfronthosting.co.za> anatoly techtonik added the comment: Python process is rigid, no surprises here. But this issue is nevertheless useful to link packages that experience this problem. I'll bump it every time I run into broken package. So far I use: 1. SCons 2. Trac ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 22:37:35 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 20:37:35 +0000 Subject: [issue1667546] Time zone-capable variant of time.localtime Message-ID: <1275856655.72.0.384465862793.issue1667546@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I have updated time-4.diff patch for py3k. Code changes are minimal, mostly due to string to unicode conversion. I have not attempted to fix anything beyond passing supplied unittest, but I did noticed a few missing error return tests. I was not able to make the final test in test_mktimetz pass because I did not completely understand its logic. Georg, I am trying to consolidate and bring to resolution a number to timezone related issues. Would you like me to take this issue from you or do you want to continue to own it? ---------- Added file: http://bugs.python.org/file17578/time-4-py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 22:48:29 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 06 Jun 2010 20:48:29 +0000 Subject: [issue8929] wininst: msvcr90 dependency in x64 build In-Reply-To: <1275857309.36.0.937792645197.issue8929@psf.upfronthosting.co.za> Message-ID: <1275857309.36.0.937792645197.issue8929@psf.upfronthosting.co.za> New submission from anatoly techtonik : Installers generated with x64 version of Python 2.6.5 seems to have msvcr90.dll dependency that may not be present on all platforms. http://trac.edgewall.org/ticket/9404#comment:17 ---------- assignee: tarek components: Distutils messages: 107227 nosy: tarek, techtonik priority: normal severity: normal status: open title: wininst: msvcr90 dependency in x64 build versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 23:06:19 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 06 Jun 2010 21:06:19 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1275858379.38.0.138699635554.issue8913@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The problem I have with strftime %-format codes is that according to BSD manual page they have already ran out of English alphabet and still "there is no conversion specification for the phase of the moon." :-) On a serious note, there are no codes to format TZ offset hours and minutes separately which precludes specifying an important RFC 3339 format. I think we should take this opportunity to define a comprehensive mini-language for datetime formatting rather than slavishly reuse strftime. The new mini-language may end up to be a superset of that for strftime, but I would rather not commit to supporting %-codes indefinitely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 23:09:16 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Jun 2010 21:09:16 +0000 Subject: [issue8839] PyArg_ParseTuple(): remove "t# format In-Reply-To: <1275002949.14.0.769648340098.issue8839@psf.upfronthosting.co.za> Message-ID: <1275858556.34.0.0118825521828.issue8839@psf.upfronthosting.co.za> STINNER Victor added the comment: New version of the patch: - charbuffer_encode() uses y* instead of y# format to accept modifiable buffer objects (eg. bytearray) - Improve the documentation about the change @lemburg: So, do you agree with my patch? ---------- Added file: http://bugs.python.org/file17579/getarg_remove_tdash-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 23:13:59 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 06 Jun 2010 21:13:59 +0000 Subject: [issue8925] Improve c-api/arg.rst: use "bytes" or "str" types instead of "string" In-Reply-To: <1275851035.31.0.736999556947.issue8925@psf.upfronthosting.co.za> Message-ID: <1275858839.36.0.0955816790332.issue8925@psf.upfronthosting.co.za> STINNER Victor added the comment: > Is there a reST construct to use here, say to reference a PEP > or point to a glossary entry that defines this protocol? buffer API ("protocol" ?) is documented in Doc/c-api/buffer.rst. Should I link to this document? How? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 23:15:00 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 06 Jun 2010 21:15:00 +0000 Subject: [issue8929] wininst: msvcr90 dependency in x64 build In-Reply-To: <1275857309.36.0.937792645197.issue8929@psf.upfronthosting.co.za> Message-ID: <1275858900.03.0.213537691964.issue8929@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- nosy: +loewis, mhammond _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 23:22:58 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Jun 2010 21:22:58 +0000 Subject: [issue1667546] Time zone-capable variant of time.localtime Message-ID: <1275859378.39.0.368522205079.issue1667546@psf.upfronthosting.co.za> Georg Brandl added the comment: (Hi Alexander, sorry for not answering on IRC, I got a phonecall and was distracted for a while.) Please take on this issue -- I've simply not had energy enough to fight it through. ---------- assignee: georg.brandl -> belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 23:27:25 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 06 Jun 2010 21:27:25 +0000 Subject: [issue8928] wininst: could not create key In-Reply-To: <1275854561.45.0.0117544967496.issue8928@psf.upfronthosting.co.za> Message-ID: <1275859645.32.0.161720790272.issue8928@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Please don't add messages in here just to list the projects that suffer from a bug in Python 2.4 or 2.5. This is just making us extra triage/read work for nothing, and doesn't really help. Your first report is enough so the error and its references are indexed by the search engines. Thanks for them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 23:29:46 2010 From: report at bugs.python.org (Eric Smith) Date: Sun, 06 Jun 2010 21:29:46 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1275859786.36.0.500939390115.issue8913@psf.upfronthosting.co.za> Eric Smith added the comment: Unfortunately I think it's too late to do anything about this. I, for one, have many lines of code in production that use the strftime format specifier for datetime.__format__. You only option would be to invent a new language that was somehow distinguishable from the strftime specifiers, but I doubt you'd get much support. I think it's better to extend strftime, and let __format__ benefit from it. ---------- versions: +Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 23:38:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Jun 2010 21:38:16 +0000 Subject: [issue8925] Improve c-api/arg.rst: use "bytes" or "str" types instead of "string" In-Reply-To: <1275851035.31.0.736999556947.issue8925@psf.upfronthosting.co.za> Message-ID: <1275860296.02.0.677568046881.issue8925@psf.upfronthosting.co.za> ?ric Araujo added the comment: I see that the top section of this file can be referenced though the index entry named ?buffer interface?. Georg, would ?:term:`buffer interface`? work? Victor, ?protocol? is the named used in Python for what you could call an interface, e.g. the iterator protocol, the sequence protocol,?etc. It?s a documented set of methods, return types and use cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 23:39:03 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 06 Jun 2010 21:39:03 +0000 Subject: [issue8918] distutils test failure on solaris: IOError: [Errno 2] No such file or directory: '_configtest.i' In-Reply-To: <1275846660.59.0.731483262347.issue8918@psf.upfronthosting.co.za> Message-ID: <1275860343.09.0.875777975549.issue8918@psf.upfronthosting.co.za> Tarek Ziad? added the comment: I don't have this platform, could you investigate for me Srid ? Looks like self._preprocess() fails for some reason. we need to trace this down. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 23:42:36 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Jun 2010 21:42:36 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1275860556.29.0.633089971967.issue8913@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think this particular wheel has one very good reinvention as the Locale Data Markup Language specification. Example from the Python Babel package: >>> format_datetime(dt, "yyyyy.MMMM.dd GGG hh:mm a", locale='en') u'02007.April.01 AD 03:30 PM' http://unicode.org/reports/tr35/#Date_Format_Patterns http://babel.edgewall.org/wiki/Documentation/dates.html#pattern-syntax ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 23:55:24 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Jun 2010 21:55:24 +0000 Subject: [issue8908] friendly errors for UAC misbehavior in windows installers In-Reply-To: <1275756301.53.0.564921810654.issue8908@psf.upfronthosting.co.za> Message-ID: <1275861324.29.0.419712390406.issue8908@psf.upfronthosting.co.za> ?ric Araujo added the comment: Side remarks about tracker process: 1) I?m not sure attaching binary executable files is helpful; if I ran Windows, I wouldn?t run them. 2) Select the 3.3 version for bugs that won?t be fixed to 3.2. Selecting both is redundant: 3.2 is current py3k trunk, it?s not a different branch than 3.3, in contrary to 2.6 and 2.7. HTH ---------- nosy: +merwok versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 23:56:00 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Jun 2010 21:56:00 +0000 Subject: [issue8916] Move PEP 362 (function signature objects) into inspect In-Reply-To: <1275795560.39.0.398177747359.issue8916@psf.upfronthosting.co.za> Message-ID: <1275861360.71.0.0910611648008.issue8916@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Jun 6 23:58:13 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 06 Jun 2010 21:58:13 +0000 Subject: [issue8893] file.{read,readlines} behaviour on Solaris In-Reply-To: <1275609044.71.0.537925857344.issue8893@psf.upfronthosting.co.za> Message-ID: <1275861493.5.0.825742188873.issue8893@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > FreeBSD is yet another beast Does the patch fix it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 00:05:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Jun 2010 22:05:59 +0000 Subject: [issue8919] python should read ~/.pythonrc.py by default In-Reply-To: <1275846984.04.0.731293977336.issue8919@psf.upfronthosting.co.za> Message-ID: <1275861959.02.0.132805827591.issue8919@psf.upfronthosting.co.za> ?ric Araujo added the comment: As stated in http://docs.python.org/library/user (found via http://docs.python.org/genindex-Symbols), this file is an older customization hook that is deprecated. I (not a Python core dev, just a user) personally prefer the environment variable: I set it once in my .bashrc and every interactive python invocation uses it. (I admit that I have to cheat and import another module in order to be compatible from 2.4 to 3.1, but it?s not a big hurdle). Recent changes to the interpreter have added more envvars (PYTHONIOENCODING, PYTHONDONTWRITEBYTECODE), so I don?t see people agreeing to the removal of the venerable PYTHONSTARTUP. Your last argument can also be reverted: Everything that can be done via pythonrc can be done via PYTHONSTARTUP. The advantage of using an envvar is that it mirrors the behavior of a lot of programs: EDITOR, PAGER, MAILER, BROWSER, LESS, GPG_AGENT_INFO, SSH_AUTH_SOCK, GZIP, EMAIL, and so on. :-) FTR, ignoring PYTHONSTARTUP can be done by unsetting the variable before launching python, or using python -E (which will ignore all envvars, not only this one). ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 00:08:37 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 06 Jun 2010 22:08:37 +0000 Subject: [issue8930] messed up formatting after reindenting In-Reply-To: <1275862117.51.0.974367285734.issue8930@psf.upfronthosting.co.za> Message-ID: <1275862117.51.0.974367285734.issue8930@psf.upfronthosting.co.za> New submission from Benjamin Peterson : Some C code is incorrectly formatted after the Grand Indenting (TM). Take a gander at stringobject.c for an example. ---------- messages: 107240 nosy: benjamin.peterson, pitrou priority: normal severity: normal status: open title: messed up formatting after reindenting _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 00:09:13 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Jun 2010 22:09:13 +0000 Subject: [issue8920] PYTHONSTARTUP should expand "~" In-Reply-To: <1275847365.81.0.275671627787.issue8920@psf.upfronthosting.co.za> Message-ID: <1275862153.51.0.784348166853.issue8920@psf.upfronthosting.co.za> ?ric Araujo added the comment: The shell does not interpret tildes in quotes, but it does interpret variables, so both your examples make sense. Does removing the quotes fix your problem? ---------- nosy: +merwok status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 00:09:42 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 06 Jun 2010 22:09:42 +0000 Subject: [issue8916] Move PEP 362 (function signature objects) into inspect In-Reply-To: <1275795560.39.0.398177747359.issue8916@psf.upfronthosting.co.za> Message-ID: <1275862182.22.0.726294476844.issue8916@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I presume you'll either integrate this with the methods and objects inspect already has for this or deprecate them in favor of this? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 00:21:44 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 06 Jun 2010 22:21:44 +0000 Subject: [issue8925] Improve c-api/arg.rst: use "bytes" or "str" types instead of "string" In-Reply-To: <1275851035.31.0.736999556947.issue8925@psf.upfronthosting.co.za> Message-ID: <1275862904.85.0.533170745092.issue8925@psf.upfronthosting.co.za> Georg Brandl added the comment: The glossary (see docs.python.org/glossary) does not have an entry for "buffer interface" or "buffer protocol". An index entry just means that some location in the code defines this entry and gets a link back. Of course, you can also link to the C API section using :ref:`bufferobjects`. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 00:23:45 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Jun 2010 22:23:45 +0000 Subject: [issue8901] Windows registry path not ignored with -E option In-Reply-To: <1275705565.03.0.753930892849.issue8901@psf.upfronthosting.co.za> Message-ID: <1275863025.19.0.67894348207.issue8901@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good to me. Adding the release manager to the nosy list. ---------- keywords: +needs review nosy: +benjamin.peterson, merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 00:26:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Jun 2010 22:26:31 +0000 Subject: [issue8904] quick example how to fix docs In-Reply-To: <1275733848.36.0.713191812865.issue8904@psf.upfronthosting.co.za> Message-ID: <1275863191.75.0.981695971827.issue8904@psf.upfronthosting.co.za> ?ric Araujo added the comment: Would the addition of a link to http://www.python.org/dev/patches/ address your request? ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 00:28:53 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Jun 2010 22:28:53 +0000 Subject: [issue8905] difflib: support input generators In-Reply-To: <1275738341.19.0.989231664853.issue8905@psf.upfronthosting.co.za> Message-ID: <1275863333.85.0.0147662013129.issue8905@psf.upfronthosting.co.za> ?ric Araujo added the comment: If you allow me to rephrase your feature request to ?difflib should allow arbitrary iterators that yield lines?, I?m +1. Adjusting the version and adding tim_one to nosy as per py3k/Misc/maintainers.rst ---------- nosy: +merwok, tim_one type: resource usage -> feature request versions: -Python 3.1, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 00:32:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Jun 2010 22:32:11 +0000 Subject: [issue7202] "python setup.py MYCOMMAND --verbose" does not yield an unrecognized option error but also does not set the verbosity In-Reply-To: <1256481428.97.0.691214379627.issue7202@psf.upfronthosting.co.za> Message-ID: <1275863531.43.0.0597475094058.issue7202@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 00:37:17 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Jun 2010 22:37:17 +0000 Subject: [issue644744] bdist_rpm fails when installing man pages Message-ID: <1275863837.25.0.333158098097.issue644744@psf.upfronthosting.co.za> ?ric Araujo added the comment: Distutils is frozen, since changing even internal details breaks third-party tools, and Distutils2 has removed RPM support, since it?s better handled by OS-specific tools that comply with various policies and have smaller release cycles. Tarek, are you closing this bug? ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 00:40:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 06 Jun 2010 22:40:05 +0000 Subject: [issue1371826] distutils is silent about multiple -I/-L/-R Message-ID: <1275864005.63.0.0341679981797.issue1371826@psf.upfronthosting.co.za> ?ric Araujo added the comment: I suggest changing component to Distutils2. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 00:49:15 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 06 Jun 2010 22:49:15 +0000 Subject: [issue8916] Move PEP 362 (function signature objects) into inspect In-Reply-To: <1275862182.22.0.726294476844.issue8916@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Sun, Jun 6, 2010 at 15:09, Benjamin Peterson wrote: > > Benjamin Peterson added the comment: > > I presume you'll either integrate this with the methods and objects inspect already has for this or deprecate them in favor of this? Yes, that's the thinking as it replaces getargspec and friends with a much better API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 01:07:15 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 06 Jun 2010 23:07:15 +0000 Subject: [issue8931] '#' has no affect with 'c' type In-Reply-To: <1275865635.78.0.716511257083.issue8931@psf.upfronthosting.co.za> Message-ID: <1275865635.78.0.716511257083.issue8931@psf.upfronthosting.co.za> New submission from Benjamin Peterson : $ python3 Python 3.1.2 (release31-maint, May 3 2010, 22:18:46) [GCC 4.3.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> format(ord("a"), "c") 'a' >>> format(ord("a"), "#c") 'a' I wonder if '#' with 'c' should raise an exception. ---------- assignee: eric.smith components: Interpreter Core messages: 107250 nosy: benjamin.peterson, eric.smith priority: normal severity: normal status: open title: '#' has no affect with 'c' type type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 01:18:20 2010 From: report at bugs.python.org (lesmana) Date: Sun, 06 Jun 2010 23:18:20 +0000 Subject: [issue8919] python should read ~/.pythonrc.py by default In-Reply-To: <1275846984.04.0.731293977336.issue8919@psf.upfronthosting.co.za> Message-ID: <1275866300.59.0.0929781367116.issue8919@psf.upfronthosting.co.za> lesmana added the comment: the .pythonrc.py file is not deprecated. only the user module is deprecated. the problem i have with the PYTHONSTARTUP variable is that i find it is an unecessary intermediate step to set up an initialization file. let me elaborate: every single time you want to use PYTHONSTARTUP in any meaningfull way you will ALSO have to set up the corresponding file somehwere. it makes no sense to set up PYTHONSTARTUP without the file. it also makes no sense to set up the file without PYTHONSTARTUP. so PYTHONSTARTUP needs the file and the file needs PYTHONSTARTUP. that means the variable PYTHONSTARTUP has no added value. it is just an extra step, an extra source of error and possibly confusion. that is why i suggest to skip the variable and just load the file directly. if you (or anyone else) can point out a use case which can be done with PYTHONSTARTUP but cannot be done with my suggested method, or a use case where using PYTHONSTARTUP is so much simpler than using my suggested method, then i say mark this as wontfix. i was not able to think of such a use case, but i might be missing something. there is the argument that PYTHONSTARTUP allows the flexibility to point to files with other names. that can be easily achieved by setting up an alias in .bashrc (or respective initialization file for your favorite shell) like this: alias python="python --rcfile somefile". alternatively you can symlink .pythonrc.py to somefile. the effort to set up such an alias or symlink is the same as setting up an environment variable. everyone else who is happy with the default name (the majority in my opinion) will have one step less to set up. about the name .pythonrc.py: looking around the web i have the impression that many people set their PYTHONSTARTUP variable to point to .pythonrc.py. i think this is because they used to have the .pythonrc.py file loaded by the module user. after they saw that the module user is beeing deprecated they just point PYTHONSTARTUP to that file. other than that i find the name .pythonrc.py is a fitting name for an initialization file. about the other tools you mentioned. i checked some of them and some other tools which use environment variables. they almost never use the variables to just dully point to a file, exceptions are variables which point to a resource shared with many other tools (the temp directory for example). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 01:32:11 2010 From: report at bugs.python.org (lesmana) Date: Sun, 06 Jun 2010 23:32:11 +0000 Subject: [issue8920] PYTHONSTARTUP should expand "~" In-Reply-To: <1275847365.81.0.275671627787.issue8920@psf.upfronthosting.co.za> Message-ID: <1275867131.01.0.230239576839.issue8920@psf.upfronthosting.co.za> lesmana added the comment: yes the quotes prevented the tilde to be expanded by the shell. somehow i failed to check that. i also failed to check that there is $HOME. somehow i failed to see the forest because of the many trees (a german saying). technically my original description is still a valid bug report (or feature request). but i understand that it wont be fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 01:41:18 2010 From: report at bugs.python.org (Mark Hammond) Date: Sun, 06 Jun 2010 23:41:18 +0000 Subject: [issue8929] wininst: msvcr90 dependency in x64 build In-Reply-To: <1275857309.36.0.937792645197.issue8929@psf.upfronthosting.co.za> Message-ID: <1275867678.6.0.12126929384.issue8929@psf.upfronthosting.co.za> Mark Hammond added the comment: A quick check of my tree shows that the 32 and 64 bit versions are the same in this regard - the raw stubs wininst-9.0.exe and wininst-9.0-amd64.exe do not depend on the CRT. A test install of 2.6.5-amd64, then using the 64bit versoion of 'depends' against wininst-9.0-amd64.exe also shows no dependency against the msvc* DLLs. You may be instead striking a slightly different problem whereby the extension(s) installed by bdist_wininst are failing to start due to this dependency and them not finding or being able to use the same DLLs which Python itself depends on? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 02:08:29 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 07 Jun 2010 00:08:29 +0000 Subject: [issue8929] wininst: msvcr90 dependency in x64 build In-Reply-To: <1275857309.36.0.937792645197.issue8929@psf.upfronthosting.co.za> Message-ID: <1275869309.91.0.429280673213.issue8929@psf.upfronthosting.co.za> Martin v. L?wis added the comment: ISTM that this report is based on hearsay; nobody is *actually* experiencing any problems. Proposing to close this as "invalid". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 02:21:18 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 07 Jun 2010 00:21:18 +0000 Subject: [issue8931] '#' has no affect with 'c' type In-Reply-To: <1275865635.78.0.716511257083.issue8931@psf.upfronthosting.co.za> Message-ID: <1275870078.62.0.0834157620102.issue8931@psf.upfronthosting.co.za> Eric Smith added the comment: I think that every type that # does not apply to should raise an exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 02:29:55 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 07 Jun 2010 00:29:55 +0000 Subject: [issue8905] difflib: support input generators In-Reply-To: <1275738341.19.0.989231664853.issue8905@psf.upfronthosting.co.za> Message-ID: <1275870595.27.0.167105516632.issue8905@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +brian.curtin stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 02:39:43 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 07 Jun 2010 00:39:43 +0000 Subject: [issue8519] doc: termios and ioctl reference links In-Reply-To: <1272125391.54.0.0119716465224.issue8519@psf.upfronthosting.co.za> Message-ID: <1275871183.72.0.312442273434.issue8519@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- title: [patch] doc: termios and ioctl reference links -> doc: termios and ioctl reference links _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 08:34:53 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 07 Jun 2010 06:34:53 +0000 Subject: [issue8905] difflib should accept arbitrary line iterators In-Reply-To: <1275738341.19.0.989231664853.issue8905@psf.upfronthosting.co.za> Message-ID: <1275892493.47.0.209763342032.issue8905@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- title: difflib: support input generators -> difflib should accept arbitrary line iterators _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 09:32:23 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 07 Jun 2010 07:32:23 +0000 Subject: [issue8904] quick example how to fix docs In-Reply-To: <1275863191.75.0.981695971827.issue8904@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: On Mon, Jun 7, 2010 at 1:26 AM, ?ric Araujo wrote: > > Would the addition of a link to http://www.python.org/dev/patches/ address your request? No. It is not quick. It short only for an experienced developer. The example (or documentation HowTo) should be user based with explanation how to checkout, compile and test the changes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 09:56:11 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 07 Jun 2010 07:56:11 +0000 Subject: [issue8828] Atomic function to rename a file In-Reply-To: <1274917301.93.0.503310941815.issue8828@psf.upfronthosting.co.za> Message-ID: <1275897371.18.0.774069478672.issue8828@psf.upfronthosting.co.za> anatoly techtonik added the comment: Atomic file renames are reimplemented by: 1. Mercurial 2. Trac 3. Dulwich (aka HgGit) and essential for many other projects out there, so this should be in standard library. Atomic renames depend on filesystem more that on the OS. ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 10:06:17 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 07 Jun 2010 08:06:17 +0000 Subject: [issue7989] Transition time/datetime C modules to Python In-Reply-To: <1275788127.21.0.430829926194.issue7989@psf.upfronthosting.co.za> Message-ID: <4C0CA874.8090204@egenix.com> Marc-Andre Lemburg added the comment: Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > As far as I remember, the datetime module started as a pure python module and was reimplemented in C around year 2003 or so. One of the important additions at that time was the C API to datetime functionality. I am afraid that with the _timemodule.c/timemodule.py split there will be more an more functionality that is awkward to access from C API. That's correct, though the main reason for rewriting the module in C was to gain performance - this is essential for basic types like date/time types. -1 on undoing the C rewrite. It would be much better to spell out the problems you mention and provide patches to implement solutions for them. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 10:28:21 2010 From: report at bugs.python.org (Christian Boos) Date: Mon, 07 Jun 2010 08:28:21 +0000 Subject: [issue8929] wininst: msvcr90 dependency in x64 build In-Reply-To: <1275857309.36.0.937792645197.issue8929@psf.upfronthosting.co.za> Message-ID: <1275899301.43.0.535689039933.issue8929@psf.upfronthosting.co.za> Christian Boos added the comment: I did a mistake and downloaded an older installer, sorry for the trouble this caused. The actual Python 2.6.5 (x64) has wininst-9.0.exe and wininst-9.0-amd64.exe built statically as expected. ---------- nosy: +cboos _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 10:45:08 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 07 Jun 2010 08:45:08 +0000 Subject: [issue8929] wininst: msvcr90 dependency in x64 build In-Reply-To: <1275857309.36.0.937792645197.issue8929@psf.upfronthosting.co.za> Message-ID: <1275900308.66.0.174566012683.issue8929@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 10:55:46 2010 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Mon, 07 Jun 2010 08:55:46 +0000 Subject: [issue8848] Deprecate or remove "U" and "U#" formats of Py_BuildValue() In-Reply-To: <1275097128.66.0.216673219733.issue8848@psf.upfronthosting.co.za> Message-ID: <1275900946.17.0.762945541614.issue8848@psf.upfronthosting.co.za> Walter D?rwald added the comment: Yes, I think you should apply the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 11:55:44 2010 From: report at bugs.python.org (Mads Kiilerich) Date: Mon, 07 Jun 2010 09:55:44 +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: <1275904544.96.0.658346077634.issue8797@psf.upfronthosting.co.za> Mads Kiilerich added the comment: FYI: The regression was introduced in 2.6.5 with issue3819 . This also causes problems with Mercurial pushing to google code - see http://mercurial.selenic.com/bts/issue2179 . IIRC google code redirects to an url which then in turn requests authentication. I'm not sure how that will work with a retry count of 1. The funny and inconsistent thing is that it apparently would work if they replied 403 instead of 401. "durin42" from google/mercurial knows the details. (It seems suspicious to me that there are code paths where the retry counter is reset. Doesn't that mean that a remote server will be able to cause endless recursion? Shouldn't there be some kind of hard upper limit on the number of retries?) ---------- nosy: +kiilerix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 12:16:56 2010 From: report at bugs.python.org (Thomas Jollans) Date: Mon, 07 Jun 2010 10:16:56 +0000 Subject: [issue8897] sunau bytes / str TypeError in Py3k In-Reply-To: <1275672895.91.0.97400241219.issue8897@psf.upfronthosting.co.za> Message-ID: <1275905816.04.0.0566553053087.issue8897@psf.upfronthosting.co.za> Thomas Jollans added the comment: Attached is a patch against the current py3k trunk that fixes this. (as far as I can tell) ---------- keywords: +patch Added file: http://bugs.python.org/file17580/sunau-bytes.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 13:21:01 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jun 2010 11:21:01 +0000 Subject: [issue8897] sunau bytes / str TypeError in Py3k In-Reply-To: <1275672895.91.0.97400241219.issue8897@psf.upfronthosting.co.za> Message-ID: <1275909661.86.0.174618896416.issue8897@psf.upfronthosting.co.za> STINNER Victor added the comment: Can you add a test? ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 13:27:07 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jun 2010 11:27:07 +0000 Subject: [issue8828] Atomic function to rename a file In-Reply-To: <1274917301.93.0.503310941815.issue8828@psf.upfronthosting.co.za> Message-ID: <1275910027.57.0.445764818619.issue8828@psf.upfronthosting.co.za> STINNER Victor added the comment: Implementation of "atomic" rename() for Windows in Mercurial: http://selenic.com/repo/hg/file/tip/mercurial/windows.py (search for "def rename") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 15:10:01 2010 From: report at bugs.python.org (Daniel Urban) Date: Mon, 07 Jun 2010 13:10:01 +0000 Subject: [issue7989] Transition time/datetime C modules to Python In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1275916201.64.0.458499217861.issue7989@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +durban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 15:25:02 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 07 Jun 2010 13:25:02 +0000 Subject: [issue8904] quick example how to fix docs In-Reply-To: <1275733848.36.0.713191812865.issue8904@psf.upfronthosting.co.za> Message-ID: <1275917102.74.0.351202377008.issue8904@psf.upfronthosting.co.za> Brian Curtin added the comment: I think what you are suggesting is outside of the scope of that document -- it appears that the page intends to be quick and strictly focused on reporting bugs, not fixing them. ---------- nosy: +brian.curtin status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 15:45:05 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Mon, 07 Jun 2010 13:45:05 +0000 Subject: [issue8875] XML-RPC improvement is described twice. In-Reply-To: <1275446731.65.0.0364952757342.issue8875@psf.upfronthosting.co.za> Message-ID: <1275918305.47.0.394499753011.issue8875@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Fixed in rev81801. Thanks for your report! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 16:18:31 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 07 Jun 2010 14:18:31 +0000 Subject: [issue8932] test_capi fails --without-threads In-Reply-To: <1275920311.66.0.668508833074.issue8932@psf.upfronthosting.co.za> Message-ID: <1275920311.66.0.668508833074.issue8932@psf.upfronthosting.co.za> New submission from Stefan Krah : test_capi fails when compiled --without-threads: test test_capi failed -- Traceback (most recent call last): File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/test/test_capi.py", line 49, in test_no_FatalError_infinite_loop b'Fatal Python error:' AssertionError: b'Traceback (most recent call last):\n File "", line 1, in \nSystemError: error return without exception set\n[34135 refs]' != b'Fatal Python error: PyThreadState_Get: no current thread' Re-running test test_capi in verbose mode test_instancemethod (test.test_capi.CAPITest) ... ok test_no_FatalError_infinite_loop (test.test_capi.CAPITest) ... FAIL ====================================================================== FAIL: test_no_FatalError_infinite_loop (test.test_capi.CAPITest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/test/test_capi.py", line 49, in test_no_FatalError_infinite_loop b'Fatal Python error:' AssertionError: b'Traceback (most recent call last):\n File "", line 1, in \nSystemError: error return without exception set\n[34135 refs]' != b'Fatal Python error: PyThreadState_Get: no current thread' ---------------------------------------------------------------------- Ran 2 tests in 0.635s FAILED (failures=1) test test_capi failed -- Traceback (most recent call last): File "/usr/home/db3l/buildarea/3.x.bolen-freebsd7/build/Lib/test/test_capi.py", line 49, in test_no_FatalError_infinite_loop b'Fatal Python error:' AssertionError: b'Traceback (most recent call last):\n File "", line 1, in \nSystemError: error return without exception set\n[34135 refs]' != b'Fatal Python error: PyThreadState_Get: no current thread' ---------- components: Tests keywords: buildbot messages: 107267 nosy: skrah priority: normal severity: normal stage: needs patch status: open title: test_capi fails --without-threads type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 18:22:41 2010 From: report at bugs.python.org (Benjamin Liles) Date: Mon, 07 Jun 2010 16:22:41 +0000 Subject: [issue8933] Invalid detection of metadata version In-Reply-To: <1275927761.19.0.897367518837.issue8933@psf.upfronthosting.co.za> Message-ID: <1275927761.19.0.897367518837.issue8933@psf.upfronthosting.co.za> New submission from Benjamin Liles : The detection for metadata version does not follow what is specified in PEP 241 and PEP 314. Specifically, the following fields are being sent as version 1.0 when they are not allowed as per PEP 241: * Classifier * Download-URL ---------- assignee: tarek components: Distutils messages: 107268 nosy: benliles, tarek priority: normal severity: normal status: open title: Invalid detection of metadata version type: behavior versions: Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 18:25:46 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 07 Jun 2010 16:25:46 +0000 Subject: [issue8933] Invalid detection of metadata version In-Reply-To: <1275927761.19.0.897367518837.issue8933@psf.upfronthosting.co.za> Message-ID: <1275927946.81.0.369629939035.issue8933@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 19:06:42 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 07 Jun 2010 17:06:42 +0000 Subject: [issue8828] Atomic function to rename a file In-Reply-To: <1274917301.93.0.503310941815.issue8828@psf.upfronthosting.co.za> Message-ID: <1275930402.5.0.810607328258.issue8828@psf.upfronthosting.co.za> anatoly techtonik added the comment: Dulwich bug discussion (closed) - https://bugs.edge.launchpad.net/dulwich/+bug/557585 Trac implementation - http://trac.edgewall.org/browser/trunk/trac/util/__init__.py?#L82 Stackoverflow - http://stackoverflow.com/questions/167414/is-an-atomic-file-rename-with-overwrite-possible-on-windows ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 19:10:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 07 Jun 2010 17:10:25 +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: <1275930625.8.0.110376020589.issue8910@psf.upfronthosting.co.za> ?ric Araujo added the comment: Attaching a proposal. I think the component is a grey area between tests and documentation, so I?d be for including this file in all four branches. ---------- keywords: +needs review, patch nosy: +docs at python, merwok Added file: http://bugs.python.org/file17581/README _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 19:14:26 2010 From: report at bugs.python.org (Thomas Jollans) Date: Mon, 07 Jun 2010 17:14:26 +0000 Subject: [issue8897] sunau bytes / str TypeError in Py3k In-Reply-To: <1275672895.91.0.97400241219.issue8897@psf.upfronthosting.co.za> Message-ID: <1275930866.94.0.724530498796.issue8897@psf.upfronthosting.co.za> Thomas Jollans added the comment: test case for sunau, as requested. Loosely based on test_wave. ---------- Added file: http://bugs.python.org/file17582/sunau-test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 19:15:27 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 07 Jun 2010 17:15:27 +0000 Subject: [issue4769] b64decode should accept strings or bytes In-Reply-To: <1230572153.22.0.954048343235.issue4769@psf.upfronthosting.co.za> Message-ID: <1275930927.37.0.943350071696.issue4769@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 19:17:08 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 07 Jun 2010 17:17:08 +0000 Subject: [issue7989] Transition time/datetime C modules to Python In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1275931028.98.0.75757220062.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: For the datetime module there are also a few more subtle issues that would make it difficult to make a hybrid C/Python implementation. The problem is that unlike the time module where most of the functionality is implemented in module level functions, datetime functionality is entirely in class methods. One may suggest to use inheritance and derive datetime classes from those implemented in _datetime.c, but this will not work because for example datetime + timedelta will return a _datetime class unless __add__ is overridden in Python. There is another even less obvious issue with inheriting from datetime classes: see issue #5516. Therefore, it looks like there are only two choices: 1. Replicate all functionality in both _datetime.c and datetime.py and thus double the cost of implementing new features in CPython. (OK, maybe not double because Python development is easier than C, but increase instead of decrease.) 2. Incur a performance penalty in every method because every C call wil have to be wrapped in Python. Another -1 from me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 19:17:55 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 07 Jun 2010 17:17:55 +0000 Subject: [issue7989] Transition time/datetime C modules to Python In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1275931075.97.0.693016850825.issue7989@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 19:34:22 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 07 Jun 2010 17:34:22 +0000 Subject: [issue8719] buildbot: segfault on FreeBSD (signal 11) In-Reply-To: <1273875581.36.0.231394687131.issue8719@psf.upfronthosting.co.za> Message-ID: <1275932062.03.0.539419758964.issue8719@psf.upfronthosting.co.za> Stefan Krah added the comment: I ran a test --without-threads: test_runpy and test_exceptions passed, test_sys was not reached: test_sqlite Fatal error 'Cannot allocate red zone for initial thread' at line 384 in file /usr/src/lib/libthr/thread/thr_init.c (errno = 12) *** Signal 6 No Signal 11. I suspect threads (again). Would it be a good idea to run the FreeBSD bots --without-threads? ---------- nosy: +db3l, skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 20:56:05 2010 From: report at bugs.python.org (Thomas Jollans) Date: Mon, 07 Jun 2010 18:56:05 +0000 Subject: [issue8934] aifc should use str instead of bytes (wave, sunau compatibility) In-Reply-To: <1275936965.71.0.27334704307.issue8934@psf.upfronthosting.co.za> Message-ID: <1275936965.71.0.27334704307.issue8934@psf.upfronthosting.co.za> New submission from Thomas Jollans : aifc getcomptype() and setcomptype() use bytes while the corresponding methods in the sunau and wave modules use str (b'NONE', b'ULAW' vs 'NONE', 'ULAW'). This means that programmers wanting simple format-agnostic audio file output will have to special-case aifc. This was not necessary in Python 2.x, where all three modules used str (obviously). IMHO, there is no reason for this incompatibility. The solution I propose is to change aifc to use unicode str for "information" strings and bytes for raw data only, like the other two modules. This is, the way I see it, the most sensible behaviour. I'm attaching a patch that does just this: it changes aifc to use str for all (non-data) strings: comptype, compname, and markers. I've also changed the testcase accordingly. The problem is, obviously, that this could break existing code. I doubt that it would break a lot of code since: - not that many people use aifc anyway (I think), and py3k is still young - py3k code that's out there now would most likely handle both scenarios anyway to account for the wave and sunau modules - setcomptype() would still accept bytes. On the other hand, it would, as I said, simplify writing format-agnostic code. Special-casing any module wouldn't have been necessary with Python 2, why should Python 3 be any different? There, I've made my case. Georg, I put you on the nosy list because of [svn r64023] Remove cl usage from aifc and use bytes throughout. You, apparently, made the decision I'm arguing should be reverted, if indeed anyone consciously made it at all. If this is applied, it would have to be properly documented, of course. ---------- components: Library (Lib) files: aifc_use_str.diff keywords: patch messages: 107274 nosy: georg.brandl, tjollans priority: normal severity: normal status: open title: aifc should use str instead of bytes (wave, sunau compatibility) type: behavior versions: Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file17583/aifc_use_str.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 21:14:32 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 07 Jun 2010 19:14:32 +0000 Subject: [issue7989] Transition time/datetime C modules to Python In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1275938072.35.0.635816659728.issue7989@psf.upfronthosting.co.za> Brian Curtin added the comment: It seems like this might not be worth it or a good idea, and I have no strong feeling for this being done. Feel free to close/reject this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 21:48:29 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jun 2010 19:48:29 +0000 Subject: [issue8934] aifc should use str instead of bytes (wave, sunau compatibility) In-Reply-To: <1275936965.71.0.27334704307.issue8934@psf.upfronthosting.co.za> Message-ID: <1275940109.67.0.33901848128.issue8934@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- components: +Unicode nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 22:00:47 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jun 2010 20:00:47 +0000 Subject: [issue8848] Deprecate or remove "U" and "U#" formats of Py_BuildValue() In-Reply-To: <1275097128.66.0.216673219733.issue8848@psf.upfronthosting.co.za> Message-ID: <1275940847.66.0.758832354988.issue8848@psf.upfronthosting.co.za> STINNER Victor added the comment: Commited to py3k (r81807), blocked in 3.1 (r81808). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 22:02:34 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 07 Jun 2010 20:02:34 +0000 Subject: [issue8905] difflib should accept arbitrary line iterators In-Reply-To: <1275738341.19.0.989231664853.issue8905@psf.upfronthosting.co.za> Message-ID: <1275940954.67.0.73115958831.issue8905@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 22:03:52 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 07 Jun 2010 20:03:52 +0000 Subject: [issue8919] python should read ~/.pythonrc.py by default In-Reply-To: <1275846984.04.0.731293977336.issue8919@psf.upfronthosting.co.za> Message-ID: <1275941032.07.0.833354137142.issue8919@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 22:26:47 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 07 Jun 2010 20:26:47 +0000 Subject: [issue1982] Feature: extend strftime to accept milliseconds In-Reply-To: <1201805956.67.0.436839158391.issue1982@psf.upfronthosting.co.za> Message-ID: <1275942407.35.0.792690160948.issue1982@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 22:26:56 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jun 2010 20:26:56 +0000 Subject: [issue8897] sunau bytes / str TypeError in Py3k In-Reply-To: <1275672895.91.0.97400241219.issue8897@psf.upfronthosting.co.za> Message-ID: <1275942416.51.0.526966014044.issue8897@psf.upfronthosting.co.za> STINNER Victor added the comment: > test case for sunau, as requested. Loosely based on test_wave. Ok great. Commited to py3k (r81809) and 3.1 (r81810). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 22:53:11 2010 From: report at bugs.python.org (Thomas Jollans) Date: Mon, 07 Jun 2010 20:53:11 +0000 Subject: [issue8934] aifc should use str instead of bytes (wave, sunau compatibility) In-Reply-To: <1275936965.71.0.27334704307.issue8934@psf.upfronthosting.co.za> Message-ID: <1275943991.59.0.258846570077.issue8934@psf.upfronthosting.co.za> Thomas Jollans added the comment: tentative documentation patch uploaded ---------- Added file: http://bugs.python.org/file17584/aifc_str_doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 23:13:28 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 07 Jun 2010 21:13:28 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275945208.06.0.734620807012.issue5094@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Readying the patch for commit. Added documentation, tests and implementation of fromutc() method that does not need a dst(). ---------- resolution: -> accepted Added file: http://bugs.python.org/file17585/issue5094d.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 23:25:04 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 07 Jun 2010 21:25:04 +0000 Subject: [issue8922] Improve encoding shortcuts in PyUnicode_AsEncodedString() In-Reply-To: <1275848637.97.0.606582513318.issue8922@psf.upfronthosting.co.za> Message-ID: <4C0D63AC.4060705@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > New submission from STINNER Victor : > > PyUnicode_Decode() and PyUnicode_AsEncodedString() calls directly builtin decoders/encoders for some known encodings (eg. "utf-8"), instead of using the slow path (call PyCodec_Decode() / PyCodec_Encode()). > > PyUnicode_Decode() does normalize the encoding name: convert to lower and replace "_" by "-", as normalizestring() does. But PyUnicode_AsEncodedString() doesn't normalize the encoding name, it just use strcmp(). PyUnicode_Decode() has a shortcut for ISO-8859-1, whereas PyUnicode_AsEncodedString() doesn't (only for "latin-1"). > > Attached patch creates a subfunction (static) normalize_encoding(), use it in PyUnicode_Decode() and PyUnicode_AsEncodedString(), and adds a shortcut for ISO-8859-1 to PyUnicode_AsEncodedString(). The normalization in PyUnicode_Decode() must have been added to Python3 only. It is not present in Python2. I'm not sure whether it's a good idea to extend this further: the shortcuts were meant for Python internal use only. Python itself and it's stdlib should only use the shortcut names for the resp. special encodings and no variants. Dealing with variants and normalization is left to the encodings package and its alias machinery. Since the Python stdlib and the core already mostly use the shortcut names, adding normalization won't buy us much. Note that your change has also made it impossible for the compiler to do loop unrolling - there's not upper limit on the size of lower anymore. In terms of coding style, "static" should go on a separate line. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 23:33:54 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jun 2010 21:33:54 +0000 Subject: [issue8925] Improve c-api/arg.rst: use "bytes" or "str" types instead of "string" In-Reply-To: <1275851035.31.0.736999556947.issue8925@psf.upfronthosting.co.za> Message-ID: <1275946434.86.0.499038339355.issue8925@psf.upfronthosting.co.za> STINNER Victor added the comment: Commited to 3.2 (r81811) and 3.1 (r81812). The final patch adds also links to tuple, list, dict, float, complex and int. Replace also long by int (long doesn't exist anymore in Python3). @merwok: Please open a new issue if you would like to improve the documentation about the buffer protocol. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 23:34:32 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jun 2010 21:34:32 +0000 Subject: [issue8925] Improve c-api/arg.rst: use "bytes" or "str" types instead of "string" In-Reply-To: <1275851035.31.0.736999556947.issue8925@psf.upfronthosting.co.za> Message-ID: <1275946472.62.0.0249993296533.issue8925@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 23:37:07 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 07 Jun 2010 21:37:07 +0000 Subject: [issue8923] Remove unused "errors" argument from _PyUnicode_AsDefaultEncodedString() In-Reply-To: <1275848921.87.0.52681950966.issue8923@psf.upfronthosting.co.za> Message-ID: <4C0D667F.60601@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > New submission from STINNER Victor : > > _PyUnicode_AsDefaultEncodedString() has two arguments: unicode (input string) and errors. If errors is not NULL, it calls Py_FatalError()! > > The argument is useful: all functions call it with errors=NULL. > > Attached patch removes the argument. While it's an internal API, it's still public and we cannot just remove the extra argument - we're in stable branch mode. Since Python3 fixes the UTF-8 default encoding, it's better to enhance PyUnicode_AsUTF8String() to cache the UTF-8 string in the Unicode object or simply return it directly and then replace all uses of _PyUnicode_AsDefaultEncodedString() with PyUnicode_AsUTF8String(). We should phase out use of _PyUnicode_AsDefaultEncodedString() as well as the whole default encoding terminology altogether. Please also add a documentation patch and a NEWS entry. ---------- nosy: +lemburg title: Remove unused "errors" argument from _PyUnicode_AsDefaultEncodedString() -> Remove unused "errors" argument from _PyUnicode_AsDefaultEncodedString() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 23:43:54 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 07 Jun 2010 21:43:54 +0000 Subject: [issue8925] Improve c-api/arg.rst: use "bytes" or "str" types instead of "string" In-Reply-To: <1275851035.31.0.736999556947.issue8925@psf.upfronthosting.co.za> Message-ID: <4C0D680C.9070101@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > New submission from STINNER Victor : > > http://docs.python.org/py3k/c-api/arg.html is unclear about what is a "string". > > Attached patch: > - Use directly bytes, bytearray and str types > - Replace "default encoding" by "``'utf-8'`` encoding" > - Add bytes and/or bytearray to "... buffer compatible object" because it's not easy to understand what is a buffer compatible object, especially because there are different kind of buffer objects: read-only, read-write, pinned, etc. > - Fix reST syntax ("..note ::") > - Fix "es", "es#", "et" and "et#" formats: they doesn't accept "character buffer compatible object" (can someone double check that?) The character buffer concept is (unfortunately) gone in Python3. There's no way for a buffer compatible object to tell the arg parser that it is storing text data. Perhaps we can add something like that back via the Py_buffer flags for getting buffers. ---------- nosy: +lemburg title: Improve c-api/arg.rst: use "bytes" or "str" types instead of "string" -> Improve c-api/arg.rst: use "bytes" or "str" types instead of "string" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Jun 7 23:50:22 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 07 Jun 2010 21:50:22 +0000 Subject: [issue8839] PyArg_ParseTuple(): remove "t# format In-Reply-To: <1275858556.34.0.0118825521828.issue8839@psf.upfronthosting.co.za> Message-ID: <4C0D699B.7060000@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > New version of the patch: > - charbuffer_encode() uses y* instead of y# format to accept modifiable buffer objects (eg. bytearray) > - Improve the documentation about the change > > @lemburg: So, do you agree with my patch? No, because y*/y# are not correct replacements for t#. They don't accept Unicode objects. t# was meant to provide access to text data, so replacing it with a parser code that is meant for binary data is not correct. The closes Python3 gets to t# from Python2 is s# or s*, so please use those in the NEWS entry and s* in charbuffer_encode(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 00:00:12 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jun 2010 22:00:12 +0000 Subject: [issue8922] Improve encoding shortcuts in PyUnicode_AsEncodedString() In-Reply-To: <1275848637.97.0.606582513318.issue8922@psf.upfronthosting.co.za> Message-ID: <1275948012.87.0.376828447686.issue8922@psf.upfronthosting.co.za> STINNER Victor added the comment: > the shortcuts were meant for Python internal use only str.encode() calls PyUnicode_AsEncodedString() and bytes.decode() calls PyUnicode_Decode(), so it is not for internal use only. Eg. "text".encode("ASCII") doesn't use the fastpath. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 00:05:30 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 07 Jun 2010 22:05:30 +0000 Subject: [issue8922] Improve encoding shortcuts in PyUnicode_AsEncodedString() In-Reply-To: <1275948012.87.0.376828447686.issue8922@psf.upfronthosting.co.za> Message-ID: <4C0D6D26.402@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> the shortcuts were meant for Python internal use only > > str.encode() calls PyUnicode_AsEncodedString() and bytes.decode() calls PyUnicode_Decode(), so it is not for internal use only. Eg. "text".encode("ASCII") doesn't use the fastpath. Right. As I said: the *shortcuts* are meant for internal use only. External code should not rely on them, but can, of course, use those canonical names as well. Note that these shortcut bypass the codec registry logic. Codec search functions cannot redirect these shortcuts to their own implementations, so we have to be careful about adding more such shortcuts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 00:33:01 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jun 2010 22:33:01 +0000 Subject: [issue8922] Improve encoding shortcuts in PyUnicode_AsEncodedString() In-Reply-To: <1275848637.97.0.606582513318.issue8922@psf.upfronthosting.co.za> Message-ID: <1275949981.66.0.571681325081.issue8922@psf.upfronthosting.co.za> STINNER Victor added the comment: > Note that these shortcut bypass the codec registry logic. Yes, but it's already the case without my patch. I don't think that it's really useful to override latin1, utf-8, utf-16, utf-32 or mbcs. I prefer a faster Python :-) > we have to be careful about adding more such shortcuts. I just want to add a shortcut for ISO-8859-1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 00:48:46 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jun 2010 22:48:46 +0000 Subject: [issue8838] Remove codecs.readbuffer_encode() and codecs.charbuffer_encode() In-Reply-To: <1275002017.75.0.302568685323.issue8838@psf.upfronthosting.co.za> Message-ID: <1275950926.09.0.370952171389.issue8838@psf.upfronthosting.co.za> STINNER Victor added the comment: MAL agreed to remove "t#" parsing format (#8839), whereas charbuffer_encode() main goal was to offer "t#" parsing format to Python object space. charbuffer_encode() is now useless in Python3. bytes() accepts any buffer object (read-only and read/write buffer), so readbuffer_encode() became useless in Python3. readbuffer_encode() and charbuffer_encode() were never documented, and are not used by any 3rd party library. Can we remove these two functions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 01:04:58 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 07 Jun 2010 23:04:58 +0000 Subject: [issue8925] Improve c-api/arg.rst: use "bytes" or "str" types instead of "string" In-Reply-To: <1275851035.31.0.736999556947.issue8925@psf.upfronthosting.co.za> Message-ID: <1275951898.92.0.197760564329.issue8925@psf.upfronthosting.co.za> STINNER Victor added the comment: > There's no way for a buffer compatible object to tell the > arg parser that it is storing text data. I think that the buffer protocol targets byte strings/arrays, and that unicode type should be enough. If applications have to exchange text data, they use utf8, which is a byte string. I don't see the use case. Open a discussion on python-dev if you would like to continue the discussion because this issue is closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 01:29:05 2010 From: report at bugs.python.org (Daniel Urban) Date: Mon, 07 Jun 2010 23:29:05 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275953345.12.0.0168986057498.issue5094@psf.upfronthosting.co.za> Daniel Urban added the comment: In Doc/library/datetime.rst, in the documentation of datetime.utcnow this part: ".. versionchanged:: 2.7" probably should be ".. versionchanged:: 3.2". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 02:16:51 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 08 Jun 2010 00:16:51 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1275956211.93.0.291885276543.issue5094@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Thanks, Daniel. This was a leftover from the previous patch. The latest patch does not actually change utcnow(). Instead the users should call datetime.now(timezone.utc). Fixed in issue5094d1.diff. ---------- Added file: http://bugs.python.org/file17586/issue5094d1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 02:28:28 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 08 Jun 2010 00:28:28 +0000 Subject: [issue7989] Transition time/datetime C modules to Python In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1275956908.04.0.88451819431.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Brett Cannon wrote in a comment (msg106498) on another issue: """ The stated long-term goal of the stdlib is to minimize the C extension modules to only those that have to be written in C (modules can still have performance enhancing extension back-ends). Since datetime does not meet that requirement it's not a matter of "if" but "when" datetime will get a pure Python version and use the extension code only for performance. """ I'll keep this open for a while to give Brett and others a chance to respond to opposition. ---------- nosy: +brett.cannon priority: normal -> low type: behavior -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 02:35:08 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 08 Jun 2010 00:35:08 +0000 Subject: [issue7989] Transition time/datetime C modules to Python In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1275957308.33.0.170489863462.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Also, my opposition is only to splitting datetime. While I am not against splitting the time module, I believe it should be phased out eventually and posix compatibility portion folded into posix module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 02:58:40 2010 From: report at bugs.python.org (Stan Klein) Date: Tue, 08 Jun 2010 00:58:40 +0000 Subject: [issue8935] Syntax error in os.py In-Reply-To: <1275958720.19.0.807704526769.issue8935@psf.upfronthosting.co.za> Message-ID: <1275958720.19.0.807704526769.issue8935@psf.upfronthosting.co.za> New submission from Stan Klein : I got the following traceback on an "import os" statement: Traceback (most recent call last): File "setup.py", line 53, in ? import traceback File "/usr/lib/python2.6/traceback.py", line 3, in ? import linecache File "/usr/lib/python2.6/linecache.py", line 9, in ? import os File "/usr/lib/python2.6/os.py", line 758 bs = b"" ^ SyntaxError: invalid syntax >From looking at 2.4, the fix is probably bs="" ---------- components: Library (Lib) messages: 107294 nosy: sklein priority: normal severity: normal status: open title: Syntax error in os.py type: crash versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 02:58:49 2010 From: report at bugs.python.org (Brett Cannon) Date: Tue, 08 Jun 2010 00:58:49 +0000 Subject: [issue7989] Transition time/datetime C modules to Python In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1275958729.6.0.0895274034574.issue7989@psf.upfronthosting.co.za> Brett Cannon added the comment: So I see a couple of objections here to the idea that I will try to address. First is MAL's thinking that this will undo any C code, which it won't. The idea is that stdlib modules that do not inherently rely on other C code (e.g. sqlite3 does not fall underneath this) would have a pure Python implementation with possible C enhancements. In the case of datetime that code is done, so it won't go anywhere. In this case it would be bringing in a pure Python implementation like the one PyPy maintains. You can look at heapq if you want an existing example of what it looks like to maintain a pure Python and C version of a module. Alexander is worried about performance because of Python shims and duplication of work. For the performance issue, there is none. If you look at something like heapq you will see that there is an `import *` in there to pull in all extension code; there is no Python shim to pass through if you don't engineer the extension that way. So in datetime's case all of the extension code would just get pulled into datetime.py directly and not have any indirection cost. As for duplication of work, we already have that with datetime in the other Python VMs. IronPython, Jython, and PyPy have to do their own version of datetime because the stdlib doesn't provide a pure Python version for them to use. So while CPython might not be duplicating work, other people are. Besides, people typically prototype in Python anyway (including you, Alexander, for the UTC patch) and then write the C code, so there really isn't any wasted development cycles by having the Python and C version already. The key thing to remember is that this is so the VMs other than CPython are not treated as second-class. They are legit implementations just like CPython, but because we have this legacy stuff written in C in the stdlib they are put at a disadvantage. It would be better to pool resources and make sure everyone gets to use an equivalent standard library when possible. And I should also mention I expect the PyPy folks to be the ones to move their code over; I would never expect anyone to re-implement datetime from scratch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 03:04:15 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 08 Jun 2010 01:04:15 +0000 Subject: [issue8935] Syntax error in os.py In-Reply-To: <1275958720.19.0.807704526769.issue8935@psf.upfronthosting.co.za> Message-ID: <1275959055.75.0.923575767957.issue8935@psf.upfronthosting.co.za> Ezio Melotti added the comment: In 2.6 b"" is valid syntax. If you are using 2.6 modules on Python 2.4 you will probably see several more errors. ---------- nosy: +ezio.melotti resolution: -> invalid stage: -> committed/rejected status: open -> closed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 05:46:41 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 08 Jun 2010 03:46:41 +0000 Subject: [issue8936] webbrowser regression on windows In-Reply-To: <1275968801.71.0.456370362373.issue8936@psf.upfronthosting.co.za> Message-ID: <1275968801.71.0.456370362373.issue8936@psf.upfronthosting.co.za> New submission from anatoly techtonik : webbrowser.open("127.0.0.1:8080") opens page in IE even if default system browser is Chrome. ---------- components: Library (Lib), Windows messages: 107297 nosy: techtonik priority: normal severity: normal status: open title: webbrowser regression on windows versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 05:51:08 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 08 Jun 2010 03:51:08 +0000 Subject: [issue7989] Transition time/datetime C modules to Python In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1275969068.02.0.551327109676.issue7989@psf.upfronthosting.co.za> anatoly techtonik added the comment: It would be nice to see the transition accompanied by some tutorial that could be used as an example for other similar tasks. ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 05:53:39 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 08 Jun 2010 03:53:39 +0000 Subject: [issue8936] webbrowser regression on windows In-Reply-To: <1275968801.71.0.456370362373.issue8936@psf.upfronthosting.co.za> Message-ID: <1275969219.52.0.667129115703.issue8936@psf.upfronthosting.co.za> Brian Curtin added the comment: See also #8232 ---------- nosy: +brian.curtin stage: -> unit test needed type: -> behavior versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 05:54:26 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 08 Jun 2010 03:54:26 +0000 Subject: [issue8936] webbrowser regression on windows In-Reply-To: <1275968801.71.0.456370362373.issue8936@psf.upfronthosting.co.za> Message-ID: <1275969266.39.0.523263080293.issue8936@psf.upfronthosting.co.za> Brian Curtin added the comment: Also, since you stated that this is a regression -- what was the last version you saw this work in? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 05:55:58 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 08 Jun 2010 03:55:58 +0000 Subject: [issue8936] webbrowser regression on windows In-Reply-To: <1275968801.71.0.456370362373.issue8936@psf.upfronthosting.co.za> Message-ID: <1275969358.81.0.615805767809.issue8936@psf.upfronthosting.co.za> Ezio Melotti added the comment: If you want it to open it with the default browser you have to specify the protocol (e.g. webbrowser.open("http://127.0.0.1:8080/")). I don't know exactly why webbrowser decides to open webbrowser.open("127.0.0.1:8080") with IE, but the behavior seems consistent in all the versions, so it's not a regression. ---------- nosy: +ezio.melotti, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 06:30:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 08 Jun 2010 04:30:23 +0000 Subject: [issue7989] Transition time/datetime C modules to Python In-Reply-To: <1266855728.5.0.0452326559168.issue7989@psf.upfronthosting.co.za> Message-ID: <1275971423.86.0.152874870533.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Brett, Thanks for your explanation. It looks like I misunderstood the proposal. I though the idea was to have some methods of e.g. date type implemented in python and some in C. What you propose is much simpler. Effectively, your proposal is "let's distribute a pure python implementation of datetime with CPython." I don't have any problem with this. Patches welcome! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 06:42:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 08 Jun 2010 04:42: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: <1275972129.18.0.105396192759.issue7989@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am changing the title to match Brett's explanation better. Note that since the time module is a thin wrapper around C library calls, it falls under inherently relying on C code exception. ---------- title: Transition time/datetime C modules to Python -> Add pure Python implementation of datetime module to CPython _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 07:38:54 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 08 Jun 2010 05:38:54 +0000 Subject: [issue8937] SimpleHTTPServer should contain usage example In-Reply-To: <1275975534.8.0.563527396515.issue8937@psf.upfronthosting.co.za> Message-ID: <1275975534.8.0.563527396515.issue8937@psf.upfronthosting.co.za> New submission from anatoly techtonik : Currently SimpleHTTPServer docs contains phrase "For example usage, see the implementation of the test() function." with no reference where this test() function is located. This is not user friendly. ---------- assignee: docs at python components: Documentation messages: 107304 nosy: docs at python, techtonik priority: normal severity: normal status: open title: SimpleHTTPServer should contain usage example versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 07:40:13 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 08 Jun 2010 05:40:13 +0000 Subject: [issue8936] webbrowser regression on windows In-Reply-To: <1275968801.71.0.456370362373.issue8936@psf.upfronthosting.co.za> Message-ID: <1275975613.66.0.903556858614.issue8936@psf.upfronthosting.co.za> anatoly techtonik added the comment: 2.5 threw exception ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 08:25:22 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 08 Jun 2010 06:25:22 +0000 Subject: [issue8936] webbrowser regression on windows In-Reply-To: <1275968801.71.0.456370362373.issue8936@psf.upfronthosting.co.za> Message-ID: <1275978322.02.0.942535651805.issue8936@psf.upfronthosting.co.za> anatoly techtonik added the comment: webbrowser.open("%s:%s" % (HOST,PORT)) File "C:\Python25\lib\webbrowser.py", line 61, in open if browser.open(url, new, autoraise): File "C:\Python25\lib\webbrowser.py", line 518, in open os.startfile(url) WindowsError: [Error -2147217406] Windows Error 0x80041002: '127.0.0.1:8080' I do not mind if new Python would handle this exception correctly, but it doesn't launching wrong browser. If I specify "http://" prefix - the Chrome launched as expected. Note that if "127.0.0.1:8080" is executed from shell (search menu or run dialog) - IE is not started by Vista. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 10:00:07 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 08 Jun 2010 08:00:07 +0000 Subject: [issue8838] Remove codecs.readbuffer_encode() and codecs.charbuffer_encode() In-Reply-To: <1275950926.09.0.370952171389.issue8838@psf.upfronthosting.co.za> Message-ID: <4C0DF883.7000409@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > MAL agreed to remove "t#" parsing format (#8839), whereas charbuffer_encode() main goal was to offer "t#" parsing format to Python object space. charbuffer_encode() is now useless in Python3. bytes() accepts any buffer object (read-only and read/write buffer), so readbuffer_encode() became useless in Python3. > > readbuffer_encode() and charbuffer_encode() were never documented, and are not used by any 3rd party library. > > Can we remove these two functions? Like I said before: We can remore charbuffer_encode() now and perhaps add it again later on when buffers have learned (again) to provide access to a text version of their data. In this case, we'd likely add t# back again as well. Please leave readbuffer_encode() as-is. ---------- title: Remove codecs.readbuffer_encode() and codecs.charbuffer_encode() -> Remove codecs.readbuffer_encode() and codecs.charbuffer_encode() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 10:02:38 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 08 Jun 2010 08:02:38 +0000 Subject: [issue7989] Transition time/datetime C modules to Python In-Reply-To: <1275958729.6.0.0895274034574.issue7989@psf.upfronthosting.co.za> Message-ID: <4C0DF91B.8030206@egenix.com> Marc-Andre Lemburg added the comment: Brett Cannon wrote: > > Brett Cannon added the comment: > > So I see a couple of objections here to the idea that I will try to address. > > First is MAL's thinking that this will undo any C code, which it won't. The idea is that stdlib modules that do not inherently rely on other C code (e.g. sqlite3 does not fall underneath this) would have a pure Python implementation with possible C enhancements. In the case of datetime that code is done, so it won't go anywhere. In this case it would be bringing in a pure Python implementation like the one PyPy maintains. You can look at heapq if you want an existing example of what it looks like to maintain a pure Python and C version of a module. So the proposal is to have something like we have for pickle, with cPickle being the fast version and pickle.py the slow Python one ? Since no CPython would use the Python version, who would be supporting the Python-only version ? ---------- title: Add pure Python implementation of datetime module to CPython -> Transition time/datetime C modules to Python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 10:20:29 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 08 Jun 2010 08:20:29 +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: <1275985229.78.0.299020151087.issue7989@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Oops, sorry. Looks like the Roundup email interface changed the ticket title back to the old one again (I was replying to Brett's comment under the old title). ---------- title: Transition time/datetime C modules to Python -> Add pure Python implementation of datetime module to CPython _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 12:49:38 2010 From: report at bugs.python.org (Larry Hastings) Date: Tue, 08 Jun 2010 10:49:38 +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: <1275994178.84.0.269591995907.issue7839@psf.upfronthosting.co.za> Larry Hastings added the comment: I noticed this a while ago. And FWIW it's not just 3.x; I see this same behavior in 2.6. I've whipped up a test case, attached, which runs in both Python 2 and Python 3. The test runs "sys.interpreter -V" four times: it tries all the combinations of shell=True/False and the cmdline argument as either a list or a string. When shell=True and cmdline is an array, Python runs as an interactive shell. (You have to press Ctrl-D to close it; the test warns you this is happening.) When shell=False and cmdline is a string, Python raises OSError, "[Errno 2] No such file or directory". In the other two cases the code runs correctly, producing the version number of Python. The test would probably be better if I used stdin=PIPE too, so you didn't have to press Ctrl-D. But I couldn't figure out how to make it produce the interactive session stuff when I did that. Anyway, it wouldn't be hard to make this into a proper regression test. My two cents: I assume from the discussion that this is not fixable; that is, it's not possible to have a shell and a string, or no shell and a list. Failing that, the right decision is what R. David discussed on 2010-02-28: ignore the shell argument passed in and infer it ourselves from whether cmdline is a list or a string. I don't buy the security argument--since the invalid combinations of shell and cmdline mean the function doesn't work, existing callers have already made the decision whether they can live with shell=True. We should deprecate the shell argument and update the documentation to make the behavior crystal clear. ---------- nosy: +larry Added file: http://bugs.python.org/file17587/test_subprocess.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 12:51:05 2010 From: report at bugs.python.org (Larry Hastings) Date: Tue, 08 Jun 2010 10:51:05 +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: <1275994265.23.0.886712141673.issue7839@psf.upfronthosting.co.za> Larry Hastings added the comment: I realize we're down to the wire, but would it be too late to fix this in 2.7? It is a genuine bug, and it won't break any correct code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 12:51:25 2010 From: report at bugs.python.org (Larry Hastings) Date: Tue, 08 Jun 2010 10:51:25 +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: <1275994285.58.0.408569276364.issue7839@psf.upfronthosting.co.za> Changes by Larry Hastings : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 13:06:07 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 08 Jun 2010 11:06:07 +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: <1275995167.5.0.973900862348.issue7989@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Even from pypy perspective, a pure python implementation is not ideal because it makes it difficult to implement the C API. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 13:11:47 2010 From: report at bugs.python.org (Larry Hastings) Date: Tue, 08 Jun 2010 11:11:47 +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: <1275995507.79.0.712291403351.issue7839@psf.upfronthosting.co.za> Larry Hastings added the comment: Sorry for spamming updates, but here's two more things to consider. 1) What does it do on Windows? For all I know all four combinations work fine there and we should preserve the existing functionality. 2) All four combinations work fine if you call a program without arguments. I tried it with both "/bin/ls" and sys.executable and it worked like a champ. The problem *only* happens if you specify command-line arguments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 13:34:32 2010 From: report at bugs.python.org (Pavel Denisow) Date: Tue, 08 Jun 2010 11:34:32 +0000 Subject: [issue8938] Mac OS dialogs(Save As..., Load) translation In-Reply-To: <1275996872.25.0.17428013193.issue8938@psf.upfronthosting.co.za> Message-ID: <1275996872.25.0.17428013193.issue8938@psf.upfronthosting.co.za> New submission from Pavel Denisow : We have a problem with using native Mac OS dialogs (Save As..., Load) on Russian Mac: Dialogs are not translated even with file-translation. See attached screenshots. Same code in Linux works perfect. C++ QT project in Mac has translation in native dialogs. Test project on python and PyQT contains not-translated dialogs. For tk and EasyDialogs result is the same - not translated. Mac OS: 10.5.2, Russian locale. Python: 2.5.1 PyQt test project ---------------------------------------- from PyQt4 import QtGui, QtCore app = QtGui.QApplication(sys.argv) QtGui.QFileDialog().getSaveFileName() QtGui.QFileDialog().getOpenFileName() sys.exit(app.exec_()) ---------------------------------------- tk test project ---------------------------------------- from tkCommonDialog import Dialog class OpenDialog(Dialog): command = "tk_getOpenFile" class SaveDialog(Dialog): command = "tk_getSaveFile" OpenDialog().show() SaveDialog().show() ---------------------------------------- EasyDialogs test project ---------------------------------------- import EasyDialogs EasyDialogs.AskFileForSave() EasyDialogs.AskFileForOpen() ---------------------------------------- ---------- assignee: ronaldoussoren components: Macintosh, Unicode files: filedialogs_mac.zip messages: 107314 nosy: Pavel.Denisow, ronaldoussoren priority: normal severity: normal status: open title: Mac OS dialogs(Save As..., Load) translation type: behavior versions: Python 2.5 Added file: http://bugs.python.org/file17588/filedialogs_mac.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 13:34:52 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 08 Jun 2010 11:34:52 +0000 Subject: [issue3173] external strftime for Python? In-Reply-To: <1214189093.82.0.548435251403.issue3173@psf.upfronthosting.co.za> Message-ID: <1275996892.44.0.572744035683.issue3173@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: PyPy also calls the platform's strftime(). ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 13:42:37 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Jun 2010 11:42:37 +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: <1275997357.1.0.0820334208597.issue7839@psf.upfronthosting.co.za> R. David Murray added the comment: Unless we go the proliferating-interfaces route, it does represent a behavior change, and so if accepted would need to go through a deprecation cycle. And if we did go that route, it would be a new feature. So nothing can happen in 2.7, since it is already in the RC stage. By the way, I did not suggest dropping the shell parameter, I argued against doing that. The 'security' I referred to is that when you use a shell you are subject to shell-metacharacter-based attacks (and bugs!) if any elements of the command line come from user input and you don't sanitize them. This problem doesn't exist with shell=False, which is why it is the default. ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 14:27:15 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 08 Jun 2010 12:27:15 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1275995167.5.0.973900862348.issue7989@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: On Tue, Jun 8, 2010 at 2:06 PM, Amaury Forgeot d'Arc wrote: > > Even from pypy perspective, a pure python implementation is not ideal because it makes it difficult to implement the C API. C API must die a shadow of Go ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 14:42:17 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Jun 2010 12:42:17 +0000 Subject: [issue8838] Remove codecs.readbuffer_encode() and codecs.charbuffer_encode() In-Reply-To: <4C0DF883.7000409@egenix.com> Message-ID: <1276000933.3197.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > Please leave readbuffer_encode() as-is. Then please add documentation for it. ---------- title: Remove codecs.readbuffer_encode() and codecs.charbuffer_encode() -> Remove codecs.readbuffer_encode() and codecs.charbuffer_encode() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 14:44:29 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 08 Jun 2010 12:44:29 +0000 Subject: [issue8838] Remove codecs.readbuffer_encode() and codecs.charbuffer_encode() In-Reply-To: <1276000933.3197.0.camel@localhost.localdomain> Message-ID: <4C0E3B2A.80500@egenix.com> Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> Please leave readbuffer_encode() as-is. > > Then please add documentation for it. Will do. ---------- title: Remove codecs.readbuffer_encode() and codecs.charbuffer_encode() -> Remove codecs.readbuffer_encode() and codecs.charbuffer_encode() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 15:14:36 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Jun 2010 13:14:36 +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: <1276002876.44.0.334392966089.issue8939@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Following r81811 (and issue8925), perhaps we should start using e.g. PyUnicode, PyBytes, PyLong, etc. in the C API docs to more closely follow the C API rather than use the type names you see at the Python level. ---------- assignee: haypo components: Documentation messages: 107320 nosy: haypo, lemburg, pitrou priority: normal severity: normal status: open title: Use C type names (PyUnicode etc;) in the C API docs versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 15:14:51 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Jun 2010 13:14:51 +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: <1276002891.85.0.456830904853.issue8939@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 15:23:16 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 08 Jun 2010 13:23:16 +0000 Subject: [issue8940] *HTTPServer need a summary page with API inheritance table In-Reply-To: <1276003396.33.0.469317406109.issue8940@psf.upfronthosting.co.za> Message-ID: <1276003396.33.0.469317406109.issue8940@psf.upfronthosting.co.za> New submission from anatoly techtonik : The abundance of methods and hierarchy depth of various servers from "Internet Protocols and Support" section makes it extremely hard to navigate information. You need a strong OOP background to be able to use this doc effectively, as examples are not intuitive otherwise. Usually you need a decent IDE (such as Eclipse) to get a picture of class hierarchy and a table of all available methods with a mark where they were inherited from. Such table (at least Class Hierarchy view screenshot from Eclipse) should be available in reference for descendant classes. ---------- assignee: docs at python components: Documentation messages: 107321 nosy: docs at python, techtonik priority: normal severity: normal status: open title: *HTTPServer need a summary page with API inheritance table versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 15:30:28 2010 From: report at bugs.python.org (Zsolt Cserna) Date: Tue, 08 Jun 2010 13:30:28 +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: <1276003828.03.0.06057422021.issue7839@psf.upfronthosting.co.za> Zsolt Cserna added the comment: I would say that both string and list should be accepted in args, and depending on the shell parameter, the module should create a list or a string from the specified list/string. We already have a list2cmdline function to convert a list to string, we would only need to create the inverse of this function to convert a string to a list. Executing a program whose parameters are coming from external source (eg. user input) can result security problems if those are not specified as a list and in this case I would be really happy to specify my parameters as a list to Popen and it would do the appropriate conversions as above. ---------- nosy: +csernazs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 16:15:29 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 08 Jun 2010 14:15:29 +0000 Subject: [issue6641] strptime doesn't support %z format ? In-Reply-To: <1249394677.85.0.527199310346.issue6641@psf.upfronthosting.co.za> Message-ID: <1276006529.77.0.872351001582.issue6641@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- dependencies: +datetime lacks concrete tzinfo impl. for UTC stage: -> unit test needed type: behavior -> feature request versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 16:36:39 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 08 Jun 2010 14:36:39 +0000 Subject: [issue7384] curses crash on FreeBSD In-Reply-To: <1259006628.77.0.121355571453.issue7384@psf.upfronthosting.co.za> Message-ID: <1276007799.26.0.507324011602.issue7384@psf.upfronthosting.co.za> Stefan Krah added the comment: Committed in r81669,r81672,r81683 (trunk) and r81830,81831 (py3k). What to do with the releases? To recap, the fix is: 1) Detect if readline is already linked against ncurses and if so, skip any further selection. This must be done. 2) Use the same version of ncurses for readline.so and _curses.so. 1) should be done in any case. 2) could change the behavior for users who previously had readline/ncurses, cursesmodule/ncursesw, but only use the cursesmodule in an application. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 17:08:22 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Jun 2010 15:08:22 +0000 Subject: [issue8850] Remove "w" format of PyParse_ParseTuple() In-Reply-To: <1275099860.74.0.46695580149.issue8850@psf.upfronthosting.co.za> Message-ID: <1276009702.5.0.4058713571.issue8850@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 17:09:59 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 08 Jun 2010 15:09:59 +0000 Subject: [issue8850] Remove "w" format of PyParse_ParseTuple() In-Reply-To: <1275099860.74.0.46695580149.issue8850@psf.upfronthosting.co.za> Message-ID: <1276009799.52.0.936034318773.issue8850@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'd point out that "w#" is mostly useless too. It's supposed to return a read-write buffer, but as the doc says it also doesn't support "mutable objects", since it isn't able to properly lock/pin the buffer; therefore it probably doesn't support anything useful. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 18:09:49 2010 From: report at bugs.python.org (INADA Naoki) Date: Tue, 08 Jun 2010 16:09:49 +0000 Subject: [issue7768] raw_input should encode unicode prompt with std.stdout.encoding. In-Reply-To: <1264309924.17.0.144254143298.issue7768@psf.upfronthosting.co.za> Message-ID: <1276013389.75.0.853151053062.issue7768@psf.upfronthosting.co.za> INADA Naoki added the comment: I agree to close this bug without fix. I hope that Python3 will be mainstream soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 18:14:58 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 08 Jun 2010 16:14:58 +0000 Subject: [issue7768] raw_input should encode unicode prompt with std.stdout.encoding. In-Reply-To: <1264309924.17.0.144254143298.issue7768@psf.upfronthosting.co.za> Message-ID: <1276013698.97.0.454919156036.issue7768@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 18:15:24 2010 From: report at bugs.python.org (Dave Opstad) Date: Tue, 08 Jun 2010 16:15:24 +0000 Subject: [issue8941] utf-32be codec failing on 16-bit python build for 32-bit value In-Reply-To: <1276013724.21.0.174818104611.issue8941@psf.upfronthosting.co.za> Message-ID: <1276013724.21.0.174818104611.issue8941@psf.upfronthosting.co.za> New submission from Dave Opstad : The utf-32 little-endian codec works fine, but the big-endian codec is producing incorrect results: Python 3.1.2 (r312:79360M, Mar 24 2010, 01:33:18) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> str(b'\x00\x00\x01\x00', 'utf-32le') # works '\U00010000' >>> str(b'\x00\x01\x00\x00', 'utf-32be') # doesn't work '\ud800\x02' ---------- components: Unicode messages: 107326 nosy: opstad priority: normal severity: normal status: open title: utf-32be codec failing on 16-bit python build for 32-bit value type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 18:15:32 2010 From: report at bugs.python.org (Jean-Paul Calderone) Date: Tue, 08 Jun 2010 16:15:32 +0000 Subject: [issue8942] __path__ attribute of modules loaded by zipimporter is untested In-Reply-To: <1276013732.57.0.515191754786.issue8942@psf.upfronthosting.co.za> Message-ID: <1276013732.57.0.515191754786.issue8942@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : Packages loaded from zip files have a __path__ sort of like any other package. The zipimport tests don't verify that this attribute has the correct value, though. ---------- components: Tests messages: 107327 nosy: exarkun priority: normal severity: normal status: open title: __path__ attribute of modules loaded by zipimporter is untested _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 18:24:23 2010 From: report at bugs.python.org (Fabio Zadrozny) Date: Tue, 08 Jun 2010 16:24:23 +0000 Subject: [issue8943] Bug in InteractiveConsole In-Reply-To: <1276014263.34.0.524334073977.issue8943@psf.upfronthosting.co.za> Message-ID: <1276014263.34.0.524334073977.issue8943@psf.upfronthosting.co.za> New submission from Fabio Zadrozny : Unable to pickle classes used in the InteractiveConsole. The code attached works in python 2.5 and fails on python 3.1.2. ---------- components: Library (Lib) files: fast_test.py messages: 107328 nosy: fabioz priority: normal severity: normal status: open title: Bug in InteractiveConsole type: behavior versions: Python 3.1 Added file: http://bugs.python.org/file17589/fast_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 18:40:30 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 08 Jun 2010 16:40:30 +0000 Subject: [issue6641] strptime doesn't support %z format ? In-Reply-To: <1249394677.85.0.527199310346.issue6641@psf.upfronthosting.co.za> Message-ID: <1276015230.56.0.759499586588.issue6641@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Attached patch includes issue 5094 patch. ---------- keywords: +patch nosy: +mark.dickinson stage: unit test needed -> commit review Added file: http://bugs.python.org/file17590/issue6641.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 19:35:07 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 08 Jun 2010 17:35:07 +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: <1276018507.62.0.145425768715.issue2651@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: KeyError.patch is out of date. Is anyone motivated enough to update it for py3k? I like the idea, but don't have spare cycles at the moment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 19:59:04 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 08 Jun 2010 17:59:04 +0000 Subject: [issue8902] add datetime.time.now() for consistency In-Reply-To: <1275719789.45.0.168425659941.issue8902@psf.upfronthosting.co.za> Message-ID: <1276019944.53.0.915496597645.issue8902@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Anatoly, msg107191 belongs to issue8903, not here and it is not a use case, but rather a demonstration of how the proposed feature would work. My question is why would an application need current time without current date? I feel providing time.now() may lead so people to call date.today() and time.now() separately instead of datetime.now() leading to interesting bugs. One think I would consider an improvement over the current situation, would be to rename date.today() to date.now(). There are too many ways to spell the same thing: date.today() datetime.today() datetime.now().date() and no easy way to write a "how long ago" function that would work for both date and datetime: def ago(t): t.now() - t ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 20:07:57 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 08 Jun 2010 18:07:57 +0000 Subject: [issue8903] Add module level now() and today() functions to datetime module In-Reply-To: <1275720507.31.0.185559003971.issue8903@psf.upfronthosting.co.za> Message-ID: <1276020477.54.0.488524033701.issue8903@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Note that it is important to keep class methods because in some cases it is convenient to obtain now/today from datetime/date instances instead of importing them from the module. So deprecating class methods is not an option and adding module level functions that are equivalent to existing class methods is not TOOWTDI. ---------- resolution: -> rejected status: open -> pending title: datetime functions -> Add module level now() and today() functions to datetime module type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 20:09:38 2010 From: report at bugs.python.org (Brett Cannon) Date: Tue, 08 Jun 2010 18:09: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: <1276020578.25.0.642954542569.issue7989@psf.upfronthosting.co.za> Brett Cannon added the comment: So yes, cPickle/pickle, cStringIO/StringIO, heapq, etc. are all examples of the approach. One could choose to write the pure Python version first, profile the code, and only write extension code for the hot spots, but obviously that typically doesn't happen. As for who maintains it, that's python-dev, just like every other module that is structured like this. When the stdlib gets more of a clear separation from CPython I suspect the other VM maintainers will contribute more. As for PyPy not specifically needing this, that still doesn't solve the problem that Jython and IronPython have with extension code or any other future VM that doesn't try to come up with a solution for extensions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 20:29:14 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 08 Jun 2010 18:29:14 +0000 Subject: [issue8907] time module documentation differs in trunk and py3k In-Reply-To: <1275752348.33.0.507552521147.issue8907@psf.upfronthosting.co.za> Message-ID: <1276021754.11.0.911361105469.issue8907@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: There seems to be a few legitimate differences such as "int or long" vs. integer, or parenthesis for print. Patch is forthcoming. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 20:34:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 08 Jun 2010 18:34:09 +0000 Subject: [issue8907] time module documentation differs in trunk and py3k In-Reply-To: <1275752348.33.0.507552521147.issue8907@psf.upfronthosting.co.za> Message-ID: <1276022049.91.0.806183097212.issue8907@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: .. also 3.x does not track versionadded from 2.x ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 20:39:07 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 08 Jun 2010 18:39:07 +0000 Subject: [issue8907] time module documentation differs in trunk and py3k In-Reply-To: <1275752348.33.0.507552521147.issue8907@psf.upfronthosting.co.za> Message-ID: <1276022347.86.0.0506147725704.issue8907@psf.upfronthosting.co.za> Mark Dickinson added the comment: r81489 should probably also be svnmerged to py3k before applying this doc change. (As far as I can tell, this is the only outstanding unmerged trunk change.) ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 20:57:13 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 08 Jun 2010 18:57:13 +0000 Subject: [issue8944] test_winreg.test_reflection_functions fails on Windows Server 2003 In-Reply-To: <1276023433.0.0.59191647284.issue8944@psf.upfronthosting.co.za> Message-ID: <1276023433.0.0.59191647284.issue8944@psf.upfronthosting.co.za> New submission from Brian Curtin : The key/subkey used in this test causes a failure when run on Windows Server 2003 x64. ---------- assignee: brian.curtin components: Tests, Windows messages: 107337 nosy: brian.curtin priority: normal severity: normal stage: needs patch status: open title: test_winreg.test_reflection_functions fails on Windows Server 2003 type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 21:11:30 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 08 Jun 2010 19:11:30 +0000 Subject: [issue8945] Bug in **kwds expansion on call? In-Reply-To: <1276024245.06.0.703861128554.issue8945@psf.upfronthosting.co.za> Message-ID: <1276024245.06.0.703861128554.issue8945@psf.upfronthosting.co.za> New submission from Terry J. Reedy : In 2.6, the requirement for **kwds keyword argument expansion in calls (LangRef 5.3.4. Calls) is relaxed from "(subclass of) dictionary" (2.5) to "mapping". The requirement in this context for 'mapping' is not specified. LRef3.2 merely says "The subscript notation a[k] selects the item indexed by k from the mapping a;". Here, .keys seems to be needed in addition to .__getitem__. (.items alone does not make an object a mapping.) In python-list thread "Which objects are expanded by double-star ** operator?", Peter Otten posted 2.6 results for class A(object): def keys(self): return list("ab") def __getitem__(self, key): return 42 class B(dict): def keys(self): return list("ab") def __getitem__(self, key): return 42 def f(**kw): print(kw) f(**A()) # {'a': 42, 'b': 42} b = B(); print(b['a'], b['b']) # I added this # 42, 42 f(**b) # {} I get same with 3.1. It appears .keys() is called in the first case, but not the second, possibly due to an internal optimization. The different of outcome seems like a bug, though one could argue that the doc is so vague that it makes no promise to be broken. ---------- components: Interpreter Core messages: 107338 nosy: tjreedy priority: normal severity: normal status: open title: Bug in **kwds expansion on call? type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 21:57:44 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 08 Jun 2010 19:57:44 +0000 Subject: [issue8832] automate minidom.unlink() with a context manager In-Reply-To: <1274965382.14.0.210712489615.issue8832@psf.upfronthosting.co.za> Message-ID: <1276027064.73.0.219036495005.issue8832@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Any comments? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 22:16:53 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 08 Jun 2010 20:16:53 +0000 Subject: [issue614557] LookupError etc. need API to get the key Message-ID: <1276028213.53.0.600337212199.issue614557@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It looks like issue2651 is the first step for this. See msg66432. I am merging the nosy lists. ---------- assignee: -> belopolsky dependencies: +Strings passed to KeyError do not round trip nosy: +amaury.forgeotdarc, belopolsky, pitrou, rharris stage: -> needs patch type: -> feature request versions: +Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 22:25:08 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Tue, 08 Jun 2010 20:25:08 +0000 Subject: [issue8832] automate minidom.unlink() with a context manager In-Reply-To: <1274965382.14.0.210712489615.issue8832@psf.upfronthosting.co.za> Message-ID: <1276028708.54.0.516883681838.issue8832@psf.upfronthosting.co.za> Fred L. Drake, Jr. added the comment: +1 ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 22:25:46 2010 From: report at bugs.python.org (Dave Opstad) Date: Tue, 08 Jun 2010 20:25:46 +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: <1276028746.19.0.698782351102.issue8946@psf.upfronthosting.co.za> New submission from Dave Opstad : According to the 3.1 documentation, the prototype for PyBuffer_Release is: void PyBuffer_Release(PyObject *obj, Py_buffer *view); However, abstract.h has this prototype: PyAPI_FUNC(void) PyBuffer_Release(Py_buffer *view); The documentation's reference to "obj" should be removed. ---------- assignee: docs at python components: Documentation messages: 107342 nosy: docs at python, opstad priority: normal severity: normal status: open title: PyBuffer_Release signature in 3.1 documentation is incorrect type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 22:29:13 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 08 Jun 2010 20:29:13 +0000 Subject: [issue836035] strftime month name is encoded somehow Message-ID: <1276028953.78.0.4212172152.issue836035@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Is this still an issue in 3.x? With time.strftime() returning unicode, I don't think any encoding issues remain. ---------- assignee: -> belopolsky nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 22:33:47 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 08 Jun 2010 20:33:47 +0000 Subject: [issue887237] Machine integers Message-ID: <1276029227.47.0.170448977491.issue887237@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> belopolsky components: +Extension Modules, ctypes -Library (Lib) nosy: -Alexander.Belopolsky stage: -> patch review versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 22:38:41 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Jun 2010 20:38:41 +0000 Subject: [issue7768] raw_input should encode unicode prompt with std.stdout.encoding. In-Reply-To: <1264309924.17.0.144254143298.issue7768@psf.upfronthosting.co.za> Message-ID: <1276029521.34.0.325920800762.issue7768@psf.upfronthosting.co.za> STINNER Victor added the comment: > I hope that Python3 will be mainstream soon. What do you mean by "mainstream"? Python3 is available in Ubuntu (since Karmic), Fedora 13, Mandriva 2010.0, Gentoo, Debian (only Sid for now), ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 22:51:08 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 08 Jun 2010 20:51:08 +0000 Subject: [issue8947] Provide as_integer_ratio() method to Decimal In-Reply-To: <1276030268.17.0.98739433208.issue8947@psf.upfronthosting.co.za> Message-ID: <1276030268.17.0.98739433208.issue8947@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Here is my use case: recently implemented timedelta * float operation starts with converting float to an int ratio. The same algorithm can be used for decimals, but they don't support as_integer_ratio(). ---------- components: Extension Modules messages: 107345 nosy: belopolsky priority: normal severity: normal status: open title: Provide as_integer_ratio() method to Decimal type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 22:55:25 2010 From: report at bugs.python.org (Michael Foord) Date: Tue, 08 Jun 2010 20:55:25 +0000 Subject: [issue8948] cleanup functions are not executed with unittest.TestCase.debug() In-Reply-To: <1276030525.65.0.633421030518.issue8948@psf.upfronthosting.co.za> Message-ID: <1276030525.65.0.633421030518.issue8948@psf.upfronthosting.co.za> New submission from Michael Foord : Also class / module tearDowns are not executed with TestSuite.debug() ---------- assignee: michael.foord components: Library (Lib) messages: 107346 nosy: michael.foord priority: normal severity: normal status: open title: cleanup functions are not executed with unittest.TestCase.debug() versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 23:07:19 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 08 Jun 2010 21:07:19 +0000 Subject: [issue8945] Bug in **kwds expansion on call? In-Reply-To: <1276024245.06.0.703861128554.issue8945@psf.upfronthosting.co.za> Message-ID: <1276031239.42.0.800256573419.issue8945@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This falls under the usual category of dict subclasses not having their methods called. Especially since the B dict doesn't actually contain anything. ---------- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 23:10:31 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 08 Jun 2010 21:10:31 +0000 Subject: [issue8947] Provide as_integer_ratio() method to Decimal In-Reply-To: <1276030268.17.0.98739433208.issue8947@psf.upfronthosting.co.za> Message-ID: <1276031431.84.0.685201384686.issue8947@psf.upfronthosting.co.za> Mark Dickinson added the comment: This seems like a reasonable request to me; I'd like to see a little bit of convergence between the float and Decimal APIs. One difference between the two types that's worth noting is that the float.as_integer_ratio() method can never take a ridiculous amount of time or memory, whereas Decimal.as_integer_ratio() could: e.g., consider Decimal('1e999999999').as_integer_ratio(). But I don't really see that as a problem. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 23:14:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 08 Jun 2010 21:14:12 +0000 Subject: [issue8832] automate minidom.unlink() with a context manager In-Reply-To: <1274965382.14.0.210712489615.issue8832@psf.upfronthosting.co.za> Message-ID: <1276031652.44.0.294682630993.issue8832@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good to me. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 23:15:48 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Jun 2010 21:15:48 +0000 Subject: [issue8832] automate minidom.unlink() with a context manager In-Reply-To: <1274965382.14.0.210712489615.issue8832@psf.upfronthosting.co.za> Message-ID: <1276031748.43.0.129005673291.issue8832@psf.upfronthosting.co.za> R. David Murray added the comment: The test passes if __exit__ doesn't call unlink. Otherwise the patch looks good to me. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 23:18:45 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 08 Jun 2010 21:18:45 +0000 Subject: [issue8947] Provide as_integer_ratio() method to Decimal In-Reply-To: <1276030268.17.0.98739433208.issue8947@psf.upfronthosting.co.za> Message-ID: <1276031925.31.0.198945973528.issue8947@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 23:23:23 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Jun 2010 21:23:23 +0000 Subject: [issue8949] PyArg_Parse*(): "z" should not accept bytes In-Reply-To: <1276032203.54.0.364398342729.issue8949@psf.upfronthosting.co.za> Message-ID: <1276032203.54.0.364398342729.issue8949@psf.upfronthosting.co.za> New submission from STINNER Victor : "z" is supposed to be the same format than "s" but accepts None.... Except that "z" does also accept bytes. I suppose that "s" was "fixed" between Python2 and Python3, but "z" is not fixed yet. I think that it can be fixed in Python 3.2 without any deprecation process. ---------- components: Interpreter Core messages: 107351 nosy: haypo priority: normal severity: normal status: open title: PyArg_Parse*(): "z" should not accept bytes versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 23:24:15 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Jun 2010 21:24:15 +0000 Subject: [issue8949] PyArg_Parse*(): "z" should not accept bytes In-Reply-To: <1276032203.54.0.364398342729.issue8949@psf.upfronthosting.co.za> Message-ID: <1276032255.14.0.176353402463.issue8949@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- keywords: +patch Added file: http://bugs.python.org/file17591/pyarg_z_no_bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 23:42:48 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 08 Jun 2010 21:42:48 +0000 Subject: [issue8950] In getargs.c, make 'L' code raise TypeError for float arguments. In-Reply-To: <1276033368.49.0.876712618605.issue8950@psf.upfronthosting.co.za> Message-ID: <1276033368.49.0.876712618605.issue8950@psf.upfronthosting.co.za> New submission from Mark Dickinson : Currently all but one of the integer format codes for getargs.c raise TypeError when passed a float. The 'L' code produces a warning rather than raising an error. This was deliberate at the time, because all except the 'L' code already raised a DeprecationWarning in Python 3.1, and were converted to raise TypeError for 3.2. Since the 'L' code didn't raise a warning for float inputs in 3.1, directly raising a TypeError in 3.2 seemed a bit abrupt. However, I'd like to revisit this decision, and make the 'L' code raise a TypeError in 3.2. Note that (1) The 'L' code represents the Py_LONG_LONG type, and isn't used very much; I think the risk of unexpected breakage from this change is fairly small. (2) One of the places that the 'L' code *is* used is when parsing strange C types (like off_t) that are matched with either size_t, long or long long at configure + build time. So one platform might end up parsing off_t types with the 'n' code, while another parses them with the 'L' code. It would be desirable for both platforms to have the same behaviour when passed a float. Any objections to making this change? See also issue 5080. ---------- assignee: mark.dickinson components: Interpreter Core messages: 107352 nosy: haypo, mark.dickinson priority: normal severity: normal status: open title: In getargs.c, make 'L' code raise TypeError for float arguments. type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 23:45:39 2010 From: report at bugs.python.org (Larry Hastings) Date: Tue, 08 Jun 2010 21:45:39 +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: <1276033539.04.0.311365993607.issue7839@psf.upfronthosting.co.za> Larry Hastings added the comment: Zsolt: an excellent idea! That shouldn't change the semantics of the function, and therefore is strictly a bug fix. Which means we could potentially backport it, yes? Obviously we only need to change it between string / list if we're going to have this problem, and that only happens when there are parameters. So the change could be very narrow in scope. Lovely! R. David: Why did you remove Python 2.7 from the list? We see the behavior there too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Jun 8 23:57:42 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Jun 2010 21:57:42 +0000 Subject: [issue8950] In getargs.c, make 'L' code raise TypeError for float arguments. In-Reply-To: <1276033368.49.0.876712618605.issue8950@psf.upfronthosting.co.za> Message-ID: <1276034262.58.0.704700895441.issue8950@psf.upfronthosting.co.za> STINNER Victor added the comment: > One of the places that the 'L' code *is* used is when parsing > strange C types (like off_t) It has unexepected consequences. Example: >>> x=open("x", "w") >>> x.seek(0.0) 0.0 >>> x.seek(-0.0) -0.0 >>> x.seek(0.1) 0.1 >>> x.tell() 0 I think that we should just raise an error in Python 3.2 because I consider this as a bug. It remembers me another bug related to file and float: http://bugs.python.org/issue5080#msg92400 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 00:05:03 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 08 Jun 2010 22:05:03 +0000 Subject: [issue8907] time module documentation differs in trunk and py3k In-Reply-To: <1275752348.33.0.507552521147.issue8907@psf.upfronthosting.co.za> Message-ID: <1276034703.36.0.790370438667.issue8907@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Merged r81489 to py3k (r81840), but this affects datetime module docs, not time. On a closer examination, the differences in time.rst are correct. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 00:11:05 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Jun 2010 22:11:05 +0000 Subject: [issue8951] PyArg_Parse*(): factorize code of 's' and 'z' formats, and 'u' and 'Z' formats In-Reply-To: <1276035065.31.0.617634960026.issue8951@psf.upfronthosting.co.za> Message-ID: <1276035065.31.0.617634960026.issue8951@psf.upfronthosting.co.za> New submission from STINNER Victor : Code of 's' and 'z' formats is *mostly* the same... except a bug (#8949). Code of 'u' and 'Z' formats can also easily be factorized. I don't really understand why the code was duplicated. ---------- components: Interpreter Core files: factorize_getargs_sz_uZ.patch keywords: patch messages: 107356 nosy: haypo priority: normal severity: normal status: open title: PyArg_Parse*(): factorize code of 's' and 'z' formats, and 'u' and 'Z' formats versions: Python 3.2 Added file: http://bugs.python.org/file17592/factorize_getargs_sz_uZ.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 00:12:04 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Jun 2010 22:12:04 +0000 Subject: [issue8949] PyArg_Parse*(): "z" should not accept bytes In-Reply-To: <1276032203.54.0.364398342729.issue8949@psf.upfronthosting.co.za> Message-ID: <1276035124.45.0.685002367161.issue8949@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum, the patch doesn't update the documentation (at least Porting section of the What's new in Python 3.2). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 00:30:41 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Jun 2010 22:30:41 +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: <1276036241.77.0.435177115911.issue8939@psf.upfronthosting.co.za> STINNER Victor added the comment: Big patch: - replace Python types by C Python types (eg. str => PyUnicodeObject* and None => Py_None) - fix "w" / "w*" / "w#" doc: similar to "y" / "y*" / "y#" (and not "s" / "s*" / "s#") - add quotes to the formats, eg. s => "s" - use :ctype: to add links to some terms (eg. Py_BEGIN_ALLOW_THREADS) and use a fixed width font - replace "the default encoding" by "'utf-8' encoding" - replace true by 1, and false by 0 (C API of Python doesn't use stdbool.h but classic int) - use a list for the two modes of "es#" - Py_BuildValue(), "s" and "s#" formats: specify that the Python object is a str 1 and 0 were formatted with ``1`` and ``0``. I don't understand why, so I removed the italic style. Sorry for the length of the patch, but it was easy to work on only one aspect. ---------- keywords: +patch Added file: http://bugs.python.org/file17593/c_api_arg.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 00:32:08 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 08 Jun 2010 22:32:08 +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: <1276036328.31.0.512320980132.issue8946@psf.upfronthosting.co.za> Brian Curtin added the comment: Fixed in r81851 (py3k) and r81852 (release31-maint). Thanks! ---------- assignee: docs at python -> brian.curtin nosy: +brian.curtin resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 00:33:08 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Tue, 08 Jun 2010 22:33:08 +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: <1276036388.08.0.500522361712.issue8939@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 00:41:27 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Jun 2010 22:41:27 +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: <1276036887.74.0.601154262352.issue8939@psf.upfronthosting.co.za> STINNER Victor added the comment: Other changes of the patch: - "u#": remove "Non-Unicode objects are handled by interpreting their read-buffer pointer ...", it's no more true - "es", "es#": remove "... and objects convertible to Unicode into a character buffer", it's no more true - Py_BuildValue(), "K" and "L" formats: specify the name of the C type on Windows (_int64 / unsigned _int64) as done for PyArg_Parse*() long long types If the patch is too long, I can try to split it into smaller parts. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 00:42:23 2010 From: report at bugs.python.org (INADA Naoki) Date: Tue, 08 Jun 2010 22:42:23 +0000 Subject: [issue7768] raw_input should encode unicode prompt with std.stdout.encoding. In-Reply-To: <1264309924.17.0.144254143298.issue7768@psf.upfronthosting.co.za> Message-ID: <1276036943.35.0.793951960477.issue7768@psf.upfronthosting.co.za> INADA Naoki added the comment: >What do you mean by "mainstream"? Python3 is available in Ubuntu (since Karmic), Fedora 13, Mandriva 2010.0, Gentoo, Debian (only Sid for now), ... It means most of Pythonista uses Python3 rather than Python2 and most of libraries supports Python3. Currently, many new Pythonista starts with Python2 because libraries they want support only it, and are suffered by UnicodeError. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 01:02:03 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Jun 2010 23:02:03 +0000 Subject: [issue8839] PyArg_ParseTuple(): remove "t# format In-Reply-To: <1275002949.14.0.769648340098.issue8839@psf.upfronthosting.co.za> Message-ID: <1276038123.97.0.00682322523581.issue8839@psf.upfronthosting.co.za> STINNER Victor added the comment: > t# was meant to provide access to text data, so replacing it with a > parser code that is meant for binary data is not correct. The > closes Python3 gets to t# from Python2 is s# or s*, so please use > those in the NEWS entry and s* in charbuffer_encode(). Done. Patch commited as r81854 in 3.2: it removes also codecs.charbuffer_encode(). Commit blocked in 3.1 (r81855). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 01:13:34 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Jun 2010 23:13:34 +0000 Subject: [issue8838] Remove codecs.readbuffer_encode() and codecs.charbuffer_encode() In-Reply-To: <1275002017.75.0.302568685323.issue8838@psf.upfronthosting.co.za> Message-ID: <1276038814.42.0.999450131558.issue8838@psf.upfronthosting.co.za> STINNER Victor added the comment: r81854 removes codecs.charbuffer_encode() (and t# parsing format) from Python 3.2 (blocked in 3.1: r81855). -- My problem with codecs.readbuffer_encode() is that it does accept byte *and* character strings. If you want to get a byte string, just use bytes(input). If you want to convert a character string to a byte string, use input.encode("utf-8"). But accepting both types may lead to mojibake as we had in Python2. MAL> That's a common misunderstanding. The codec system does not MAL> mandate a specific type combination. Only the helper methods MAL> .encode() and .decode() on bytes and str objects in Python3 do. This is related to #7475: we have to decide if we drop completly this (currently unused) feature (eg. remove codecs.readbuffer_encode()), or if we "reenable" this feature again (reintroduce hex, bz2, rot13, ... codecs). This discussion should occur on the mailing list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 01:13:56 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 08 Jun 2010 23:13:56 +0000 Subject: [issue8839] PyArg_ParseTuple(): remove "t# format In-Reply-To: <1275002949.14.0.769648340098.issue8839@psf.upfronthosting.co.za> Message-ID: <1276038836.7.0.74714317969.issue8839@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 01:18:57 2010 From: report at bugs.python.org (Michael Foord) Date: Tue, 08 Jun 2010 23:18:57 +0000 Subject: [issue8948] cleanup functions are not executed with unittest.TestCase.debug() In-Reply-To: <1276030525.65.0.633421030518.issue8948@psf.upfronthosting.co.za> Message-ID: <1276039137.88.0.667359895288.issue8948@psf.upfronthosting.co.za> Michael Foord added the comment: Committed revision 81853. Still needs porting to py3k (and unittest2). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 01:57:09 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 08 Jun 2010 23:57:09 +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: <1276041429.48.0.541586399034.issue7839@psf.upfronthosting.co.za> R. David Murray added the comment: Because we use the versions field to indicate which versions a patch will be applied to, if it is, and I created this bug as a feature request, and as such it is not a candidate for 2.7. Changing list to string for shell=True is a behavior change (currently excess list elements are passed to the shell...and I don't *know* that that is useless, someone might be exploiting it) and hard to get right. Changing string to list might be possible on unix using shlex, but is a distinctly non-trivial change, would need to be considered carefully with regard to its implications, and I have no idea what it would mean on Windows. Since 2.7 is in RC status, there is no way such a fix will be accepted for 2.7. You can try to make a case for this proposal as a bug fix for 2.7.1, but I'm not sanguine about its chances. Personally I'm -0.5 on such a change. I think it is better to leave the control of the command formatting in the hands of the programmer. Doing such a conversion is too close to guessing for my taste. If you want a wider selection of opinions you can post the issue to python-dev and request feedback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 01:59:47 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 08 Jun 2010 23:59:47 +0000 Subject: [issue8945] Bug in **kwds expansion on call? In-Reply-To: <1276024245.06.0.703861128554.issue8945@psf.upfronthosting.co.za> Message-ID: <1276041587.08.0.774843971851.issue8945@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Might that 'usual' fact be somehow documented? I am hard put to suggest anything since it is a fact I, like others, am not aware of. Is this a general rule for subclasses of builtins? or specific to dicts? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 02:03:07 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Jun 2010 00:03:07 +0000 Subject: [issue8850] Remove "w" format of PyParse_ParseTuple() In-Reply-To: <1275099860.74.0.46695580149.issue8850@psf.upfronthosting.co.za> Message-ID: <1276041787.84.0.232411200155.issue8850@psf.upfronthosting.co.za> STINNER Victor added the comment: See also #8592: 'y' does not check for embedded NUL bytes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 02:04:34 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Jun 2010 00:04:34 +0000 Subject: [issue8592] 'y' does not check for embedded NUL bytes In-Reply-To: <1272737075.21.0.258918022173.issue8592@psf.upfronthosting.co.za> Message-ID: <1276041874.08.0.633853861036.issue8592@psf.upfronthosting.co.za> STINNER Victor added the comment: See also #8850: Remove "w" format of PyParse_ParseTuple(). -- About "y": the parser HAVE TO check for embedded NUL bytes, because the caller doesn't know the size of the buffer (and strlen() would give the wrong size). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 02:15:37 2010 From: report at bugs.python.org (Eric Smith) Date: Wed, 09 Jun 2010 00:15:37 +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: <1276042537.89.0.665237148268.issue7839@psf.upfronthosting.co.za> Eric Smith added the comment: I agree with David. For the issue raised here, at most I would make (list, shell=True) and (str, shell=False) raise errors. There's an issue (that I can't find right now) for creating functions that convert from str->list and list->str for cases such as this. shlex is sort of str->list, but it has issues on Windows. I've mentioned elsewhere that for Windows list->str is not always possible, because there is no standard for the corresponding str->list that each program is responsible for. On Unix-like systems, when the called programs are run they get a pre-parsed list (argv). This list is created by the caller, either directly or through a shell. When a shell is doing this, at least the behavior is somewhat standard. On Windows, the called programs get a string, and they're in charge of parsing it, if they want to. Many programs use the C library to create argv, but exactly how that parsing works changes between runtime vendors and over time within a vendor. There's no solution that will work in all cases. Which is not to suggest that we shouldn't try, just that it will be hard. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 02:17:17 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 09 Jun 2010 00:17:17 +0000 Subject: [issue8945] Bug in **kwds expansion on call? In-Reply-To: <1276024245.06.0.703861128554.issue8945@psf.upfronthosting.co.za> Message-ID: <1276042637.75.0.116609326088.issue8945@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Somewhere, we should document the-facts-of-life for subclassing builtins. 1) For the most part, C code has the pattern if isinstance(obj, some_builtin_type): call the built_type's methods directly using slotted methods otherwise: use slower getattribute style calls 2) A subclasser of a dict needs to actually populate the dict with the values they want used. The built-in dict class is "open for extension and closed for modification" -- the open/closed principle. This is necessary or else a subclasser could easily break the built-in type's invariants and crash python. 3) For the most part, only something like subclassing UserDict gives you full control. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 08:34:08 2010 From: report at bugs.python.org (Andres Freund) Date: Wed, 09 Jun 2010 06:34:08 +0000 Subject: [issue3831] Multiprocessing: Expose underlying pipe in queues In-Reply-To: <1221095639.45.0.136100950642.issue3831@psf.upfronthosting.co.za> Message-ID: <1276065248.55.0.942732814245.issue3831@psf.upfronthosting.co.za> Andres Freund added the comment: As soon as some bytes are signalled as being available one can simply do a normal get(). I don't really see the problem here? Sure, the get() might not be completely non-blocking (especially if the transferred event is more than the size of a pipe-buffer) but I have a hard time seing that as a problem as that should be both rare and only last a short time. My personal use-case is being able to efficiently wait for evens from different queues - using the standard api one currently can only do that by busy looping... The biggest thing I see where you have to be careful here is some stomping herd phenomenon you will get into if you have multiple readers doing a poll(). Namely *all* off those processes will awake and run into .get() which isnt exactly nice, but thats hardly solvable on python level. ---------- nosy: +andresfreund _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 10:12:08 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 09 Jun 2010 08:12:08 +0000 Subject: [issue8932] test_capi fails --without-threads In-Reply-To: <1275920311.66.0.668508833074.issue8932@psf.upfronthosting.co.za> Message-ID: <1276071128.85.0.250569694645.issue8932@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- keywords: +patch Added file: http://bugs.python.org/file17594/issue8932.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 10:14:48 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 09 Jun 2010 08:14:48 +0000 Subject: [issue8832] automate minidom.unlink() with a context manager In-Reply-To: <1274965382.14.0.210712489615.issue8832@psf.upfronthosting.co.za> Message-ID: <1276071288.12.0.227830403532.issue8832@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Thank you all. I updated the unittest, and committed this in: revision: 81856 ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 10:20:34 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 09 Jun 2010 08:20:34 +0000 Subject: [issue8838] Remove codecs.readbuffer_encode() and codecs.charbuffer_encode() In-Reply-To: <1276038814.42.0.999450131558.issue8838@psf.upfronthosting.co.za> Message-ID: <4C0F4ECD.2050400@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > r81854 removes codecs.charbuffer_encode() (and t# parsing format) from Python 3.2 (blocked in 3.1: r81855). > > -- > > My problem with codecs.readbuffer_encode() is that it does accept byte *and* character strings. If you want to get a byte string, just use bytes(input). If you want to convert a character string to a byte string, use input.encode("utf-8"). But accepting both types may lead to mojibake as we had in Python2. The point is to have an interface to the "s#" parser marker from Python. This accepts bytes, objects with a buffer interface and Unicode objects (via the default encoding). It does not accept e.g. lists, tuples or plain integers like bytes() does. > MAL> That's a common misunderstanding. The codec system does not > MAL> mandate a specific type combination. Only the helper methods > MAL> .encode() and .decode() on bytes and str objects in Python3 do. > > This is related to #7475: we have to decide if we drop completly this (currently unused) feature (eg. remove codecs.readbuffer_encode()), or if we "reenable" this feature again (reintroduce hex, bz2, rot13, ... codecs). This discussion should occur on the mailing list. We are not going to drop this design feature of the codec system and we've already had the discussion in 2008. The statement that it is an unused feature is plain wrong. Please don't forget that people are actually using these things in their applications, many of which have not been ported to Python3. We're not just talking about code that you find in CPython or the stdlib. The removed codecs will go back into 3.2. ---------- title: Remove codecs.readbuffer_encode() and codecs.charbuffer_encode() -> Remove codecs.readbuffer_encode() and codecs.charbuffer_encode() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 11:06:25 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 09 Jun 2010 09:06:25 +0000 Subject: [issue8939] Use C type names (PyUnicode etc;) in the C API docs In-Reply-To: <1276036241.77.0.435177115911.issue8939@psf.upfronthosting.co.za> Message-ID: <4C0F598D.4000202@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > Big patch: > - replace Python types by C Python types (eg. str => PyUnicodeObject* and None => Py_None) I was thinking of e.g. "PyUnicode", not "PyUnicodeObject*". > - add quotes to the formats, eg. s => "s" Why do you put the parser codes in double quotes ? > - use :ctype: to add links to some terms (eg. Py_BEGIN_ALLOW_THREADS) and use a fixed width font > - replace "the default encoding" by "'utf-8' encoding" > - replace true by 1, and false by 0 (C API of Python doesn't use stdbool.h but classic int) That's not necessarily correct: true in C means non-zero. Only false equates to 0. You can however, make that change if the function actually does always return 1. In general, most C functions in Python use these integer return values: 1 - success 0 - no success -1 - error Some of them also return a positive integer >1 for success or a negative integer <-1 for error, but those are exceptions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 11:10:01 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 09 Jun 2010 09:10:01 +0000 Subject: [issue8932] test_capi fails --without-threads In-Reply-To: <1275920311.66.0.668508833074.issue8932@psf.upfronthosting.co.za> Message-ID: <1276074601.51.0.247535953837.issue8932@psf.upfronthosting.co.za> Stefan Krah added the comment: Committed in r81857. Blocked for release31-maint (requires additional fixes). ---------- resolution: -> accepted stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 11:28:32 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Jun 2010 09:28:32 +0000 Subject: [issue8939] Use C type names (PyUnicode etc;) in the C API docs In-Reply-To: <4C0F598D.4000202@egenix.com> Message-ID: <201006091128.23447.victor.stinner@haypocalc.com> STINNER Victor added the comment: Le mercredi 09 juin 2010 11:06:25, vous avez ?crit : > > - replace Python types by C Python types (eg. str => PyUnicodeObject* > > and None => Py_None) > > I was thinking of e.g. "PyUnicode", not "PyUnicodeObject*". I don't know PyUnicode, only "unicode" (Python type) or "PyUnicodeObject*" (C Python type). :ctype:`PyUnicodeObject*` creates a link in the HTML documentation. > > - add quotes to the formats, eg. s => "s" > > Why do you put the parser codes in double quotes ? It's easier to search a format: try to search s or b format in the current documentation, you will see :-) I think that it's also more readable and closer to the "real" source code (eg. a call to PyArg_ParseTuple() uses quotes). > > - replace true by 1, and false by 0 (C API of Python doesn't use > > stdbool.h but classic int) > > That's not necessarily correct: true in C means non-zero. Only > false equates to 0. You can however, make that change if the > function actually does always return 1. There are only 2 possible results: 0 or 1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 12:04:03 2010 From: report at bugs.python.org (Tal Einat) Date: Wed, 09 Jun 2010 10:04:03 +0000 Subject: [issue8904] quick example how to fix docs In-Reply-To: <1275733848.36.0.713191812865.issue8904@psf.upfronthosting.co.za> Message-ID: <1276077843.6.0.084165816444.issue8904@psf.upfronthosting.co.za> Tal Einat added the comment: AFAIK submitting patches in general is covered well enough in several places. What I'm missing specifically regarding patches for documentation is instructions on how to preview them before submitting them. Editing reST is easy, but making sure you've done it correctly without knowing how to run it through Sphinx is impossible. I spent quite some time and couldn't figure this one out, and ended up submitting a doc patch without previewing it. To be specific, http://www.python.org/dev/contributing/ points to http://docs.python.org/dev/documenting/index.html which has quite a bit of information on reST but no information on Sphinx, despite the main page clearly stating: "This document describes the style guide for our documentation, the custom reStructuredText markup introduced to support Python documentation and how it should be used, as well as the Sphinx build system." Finally, a simple how-to with concrete, technical steps on how to write, preview and submit a doc patch would really help, especially for those who have never before submitted a patch. A simple video example (e.g. on ShowMeDo) would be fantastic, but even just updated detailed textual instructions would be a great step forward. ---------- nosy: +taleinat status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 12:32:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 09 Jun 2010 10:32:25 +0000 Subject: [issue8832] automate minidom.unlink() with a context manager In-Reply-To: <1274965382.14.0.210712489615.issue8832@psf.upfronthosting.co.za> Message-ID: <1276079545.74.0.251209349679.issue8832@psf.upfronthosting.co.za> ?ric Araujo added the comment: You forgot to close the bug :) Note that if you write ?rNNNN? or ?revision NNNN?, Roundup will make a link out of it. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 12:34:49 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Jun 2010 10:34:49 +0000 Subject: [issue8952] Doc/c-api/arg.rst: fix documentation of number formats In-Reply-To: <1276079688.25.0.118377953399.issue8952@psf.upfronthosting.co.za> Message-ID: <1276079688.25.0.118377953399.issue8952@psf.upfronthosting.co.za> New submission from STINNER Victor : The documentation of PyArg_Parse*() number formats specify that only int / float / complex are accepted, whereas any int / float / complex compatible object is accepted. "compatible" means that it has an __int__() / __float__() / __complex__() method, or nb_int / nb_float of Py_TYPE(obj)->tp_as_number->nb_int is defined (tp_as_number has no nb_complex). I suppose that the following paragraph is also outdated: "It is possible to pass "long" integers (integers whose value exceeds the platform's :const:`LONG_MAX`) however no proper range checking is done --- the most significant bits are silently truncated when the receiving field is too small to receive the value (actually, the semantics are inherited from downcasts in C --- your mileage may vary)." Moreover, "without overflow checking" should be explained (Mark told me that the number is truncated to a power of 2). ---------- assignee: docs at python components: Documentation, Interpreter Core messages: 107379 nosy: docs at python, haypo, mark.dickinson priority: normal severity: normal status: open title: Doc/c-api/arg.rst: fix documentation of number formats versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 12:37:17 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Jun 2010 10:37:17 +0000 Subject: [issue8949] PyArg_Parse*(): "z" should not accept bytes In-Reply-To: <1276032203.54.0.364398342729.issue8949@psf.upfronthosting.co.za> Message-ID: <1276079837.5.0.626056383147.issue8949@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 12:46:58 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Jun 2010 10:46:58 +0000 Subject: [issue8923] Remove unused "errors" argument from _PyUnicode_AsDefaultEncodedString() In-Reply-To: <1275848921.87.0.52681950966.issue8923@psf.upfronthosting.co.za> Message-ID: <1276080418.09.0.77643256484.issue8923@psf.upfronthosting.co.za> STINNER Victor added the comment: > Since Python3 fixes the UTF-8 default encoding, it's better > to enhance PyUnicode_AsUTF8String() to cache the UTF-8 > string in the Unicode object Right, that sounds like a great idea. Attached patch implements that: patch PyUnicode_AsUTF8String() and PyUnicode_AsEncodedString(). Does it look ok? > replace all uses of _PyUnicode_AsDefaultEncodedString() > with PyUnicode_AsUTF8String() I'm waiting for your approval of the first patch before working on the second part. ---------- Added file: http://bugs.python.org/file17595/utf8_defenc.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 12:47:00 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 09 Jun 2010 10:47:00 +0000 Subject: [issue8952] Doc/c-api/arg.rst: fix documentation of number formats In-Reply-To: <1276079688.25.0.118377953399.issue8952@psf.upfronthosting.co.za> Message-ID: <1276080420.18.0.660421615312.issue8952@psf.upfronthosting.co.za> Mark Dickinson added the comment: Yes, most of that paragraph is outdated. We should check exactly what does happen when the "receiving field is too small" (both in practice and in theory). In C, downcasting to an unsigned type is well-defined and will always reduce modulo 2**. The result of downcasting to a signed type is implementation-defined, however; do we actually do that anywhere? If so, it would be nice to fix it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 12:48:48 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 09 Jun 2010 10:48:48 +0000 Subject: [issue8952] Doc/c-api/arg.rst: fix documentation of number formats In-Reply-To: <1276079688.25.0.118377953399.issue8952@psf.upfronthosting.co.za> Message-ID: <1276080528.52.0.0744371433205.issue8952@psf.upfronthosting.co.za> Mark Dickinson added the comment: The other variable of interest here is that some integer formats will accept types with an __index__ method, while others won't. I'm not sure which types fall into each category, right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 12:59:02 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 09 Jun 2010 10:59:02 +0000 Subject: [issue8939] Use C type names (PyUnicode etc;) in the C API docs In-Reply-To: <201006091128.23447.victor.stinner@haypocalc.com> Message-ID: <4C0F73F3.3040609@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > Le mercredi 09 juin 2010 11:06:25, vous avez ?crit : >>> - replace Python types by C Python types (eg. str => PyUnicodeObject* >>> and None => Py_None) >> >> I was thinking of e.g. "PyUnicode", not "PyUnicodeObject*". > > I don't know PyUnicode, only "unicode" (Python type) or "PyUnicodeObject*" (C > Python type). :ctype:`PyUnicodeObject*` creates a link in the HTML > documentation. The "PyUnicode" style is just an abbreviated version of the longer "PyUnicodeObject", that we sometimes use, since writing "Pass a PyUnicodeObject object to this function" looks a bit silly. I don't have a strong opinion about this, though. The longer version is fine as well. >>> - add quotes to the formats, eg. s => "s" >> >> Why do you put the parser codes in double quotes ? > > It's easier to search a format: try to search s or b format in the current > documentation, you will see :-) > > I think that it's also more readable and closer to the "real" source code (eg. > a call to PyArg_ParseTuple() uses quotes). It could lead developers into thinking that they have to use those quotes in their code. Perhaps you should add a note about this typographic addition to docs. >>> - replace true by 1, and false by 0 (C API of Python doesn't use >>> stdbool.h but classic int) >> >> That's not necessarily correct: true in C means non-zero. Only >> false equates to 0. You can however, make that change if the >> function actually does always return 1. > > There are only 2 possible results: 0 or 1. I wouldn't count on this. It may be the case now, but it's both hard to check by reading the code and knowing that only 1 can be returned doesn't buy a developer much. In fact, this has bitten us before with the cmp() function: users starting writing code like this because we documented the return codes as -1, 0, 1: a = b + z * cmp(x, y) Please use "non-zero" instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 13:06:53 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 09 Jun 2010 11:06:53 +0000 Subject: [issue8949] PyArg_Parse*(): "z" should not accept bytes In-Reply-To: <1276079837.6.0.123398824969.issue8949@psf.upfronthosting.co.za> Message-ID: <4C0F75CA.5080103@egenix.com> Marc-Andre Lemburg added the comment: "z" should not accept bytes... why not ? "z" is the same as "s" with the addition that passing None as parameter will result in the pointer to get set to NULL. "s" accepts bytes via the buffer interface, so why should "z" behave differently ? If a function should only accept Unicode or None, then "Z" should be used instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 13:14:00 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 09 Jun 2010 11:14:00 +0000 Subject: [issue8923] Remove unused "errors" argument from _PyUnicode_AsDefaultEncodedString() In-Reply-To: <1276080418.09.0.77643256484.issue8923@psf.upfronthosting.co.za> Message-ID: <4C0F7775.7000208@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> Since Python3 fixes the UTF-8 default encoding, it's better >> to enhance PyUnicode_AsUTF8String() to cache the UTF-8 >> string in the Unicode object > > Right, that sounds like a great idea. Attached patch implements that: patch PyUnicode_AsUTF8String() and PyUnicode_AsEncodedString(). Does it look ok? Looks good. >> replace all uses of _PyUnicode_AsDefaultEncodedString() >> with PyUnicode_AsUTF8String() > > I'm waiting for your approval of the first patch before working on the second part. When replacing uses of _PyUnicode_AsDefaultEncodedString() with PyUnicode_AsUTF8String() you have to take great care to decref the object returned by the latter. Otherwise, we get huge memory leaks. ---------- title: Remove unused "errors" argument from _PyUnicode_AsDefaultEncodedString() -> Remove unused "errors" argument from _PyUnicode_AsDefaultEncodedString() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 13:27:09 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 09 Jun 2010 11:27:09 +0000 Subject: [issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value In-Reply-To: <1276013724.21.0.174818104611.issue8941@psf.upfronthosting.co.za> Message-ID: <1276082829.73.0.412611830099.issue8941@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Also witnessed on 2.x (UCS-2 build): >>> unicode(b'\x00\x01\x00\x00', 'utf-32be') u'\ud800\u0773' >>> unicode(b'\x00\x00\x01\x00', 'utf-32le') u'\U00010000' ---------- nosy: +haypo, lemburg, pitrou priority: normal -> high title: utf-32be codec failing on 16-bit python build for 32-bit value -> utf-32be codec failing on UCS-2 python build for 32-bit value versions: +Python 2.6, Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 13:31:20 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 09 Jun 2010 11:31:20 +0000 Subject: [issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value In-Reply-To: <1276013724.21.0.174818104611.issue8941@psf.upfronthosting.co.za> Message-ID: <1276083080.36.0.57761091609.issue8941@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The following code at the beginning of PyUnicode_DecodeUTF32Stateful is buggy when codec endianness doesn't match the native endianness (not to mention it could also crash if the underlying CPU arch doesn't support unaligned access to 4-byte integers): #ifndef Py_UNICODE_WIDE for (i = pairs = 0; i < size/4; i++) if (((Py_UCS4 *)s)[i] >= 0x10000) pairs++; #endif As a result, the preallocated unicode object isn't long enough and Python writes into memory it shouldn't write into. It can produce hard crashes, such as: >>> l = unicode(b'\x00\x01\x00\x00' * 1024, 'utf-32be') Debug memory block at address p=0xf2b310: 2050 bytes originally requested The 8 pad bytes at p-8 are FORBIDDENBYTE, as expected. The 8 pad bytes at tail=0xf2bb12 are not all FORBIDDENBYTE (0xfb): at tail+0: 0x00 *** OUCH at tail+1: 0xdc *** OUCH at tail+2: 0x00 *** OUCH at tail+3: 0xd8 *** OUCH at tail+4: 0x00 *** OUCH at tail+5: 0xdc *** OUCH at tail+6: 0x00 *** OUCH at tail+7: 0xd8 *** OUCH The block was made by call #61925422603698392 to debug malloc/realloc. Data at p: 00 d8 00 dc 00 d8 00 dc ... 00 dc 00 d8 00 dc 00 d8 Fatal Python error: bad trailing pad byte Abandon ---------- priority: high -> critical type: behavior -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 13:48:34 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 09 Jun 2010 11:48:34 +0000 Subject: [issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value In-Reply-To: <1276013724.21.0.174818104611.issue8941@psf.upfronthosting.co.za> Message-ID: <1276084114.59.0.619243605952.issue8941@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +doerwalter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 14:02:06 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Jun 2010 12:02:06 +0000 Subject: [issue8949] PyArg_Parse*(): "z" should not accept bytes In-Reply-To: <4C0F75CA.5080103@egenix.com> Message-ID: <201006091401.58165.victor.stinner@haypocalc.com> STINNER Victor added the comment: Le mercredi 09 juin 2010 13:06:53, vous avez ?crit : > "s" accepts bytes via the buffer interface No. "s*" and "s#" do accept any buffer compatible object (including bytes and bytearray), but "s" doesn't. I fixed recently the documentation about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 14:03:30 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 09 Jun 2010 12:03:30 +0000 Subject: [issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value In-Reply-To: <1276013724.21.0.174818104611.issue8941@psf.upfronthosting.co.za> Message-ID: <1276085010.78.0.565711537744.issue8941@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a simple patch. A test should be added, though. ---------- keywords: +patch Added file: http://bugs.python.org/file17596/utf32.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 14:14:04 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 09 Jun 2010 12:14:04 +0000 Subject: [issue8939] Use C type names (PyUnicode etc;) in the C API docs In-Reply-To: <1276036241.77.0.435177115911.issue8939@psf.upfronthosting.co.za> Message-ID: <4C0F8589.6090004@netwok.org> ?ric Araujo added the comment: > 1 and 0 were formatted with ``1`` and ``0``. I don't understand why, > so I removed the italic style. This reST construct marks up code. Please revert this change. :) ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 14:15:12 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 09 Jun 2010 12:15:12 +0000 Subject: [issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value In-Reply-To: <1276083080.36.0.57761091609.issue8941@psf.upfronthosting.co.za> Message-ID: <4C0F85C9.5060202@egenix.com> Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > The following code at the beginning of PyUnicode_DecodeUTF32Stateful is buggy when codec endianness doesn't match the native endianness (not to mention it could also crash if the underlying CPU arch doesn't support unaligned access to 4-byte integers): > > #ifndef Py_UNICODE_WIDE > for (i = pairs = 0; i < size/4; i++) > if (((Py_UCS4 *)s)[i] >= 0x10000) > pairs++; > #endif Good catch ! I wonder whether it wouldn't be better to preallocate a Unicode object with size of e.g. size/4 + 16 and then resize the object as necessary in case a surrogate pair needs to be created (won't happen that often in practice). The extra scan for pairs can take long depending on how much data you have to decode and likely doesn't go down well with CPU caches. ---------- title: utf-32be codec failing on UCS-2 python build for 32-bit value -> utf-32be codec failing on UCS-2 python build for 32-bit value _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 14:24:00 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 09 Jun 2010 12:24:00 +0000 Subject: [issue8950] In getargs.c, make 'L' code raise TypeError for float arguments. In-Reply-To: <1276033368.49.0.876712618605.issue8950@psf.upfronthosting.co.za> Message-ID: <1276086240.73.0.727976409779.issue8950@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch. Victor, are you interested in reviewing? ---------- keywords: +patch Added file: http://bugs.python.org/file17597/issue8950.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 14:24:06 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 09 Jun 2010 12:24:06 +0000 Subject: [issue8949] PyArg_Parse*(): "z" should not accept bytes In-Reply-To: <201006091401.58165.victor.stinner@haypocalc.com> Message-ID: <4C0F87DB.2040301@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > Le mercredi 09 juin 2010 13:06:53, vous avez ?crit : >> "s" accepts bytes via the buffer interface > > No. "s*" and "s#" do accept any buffer compatible object (including bytes and > bytearray), but "s" doesn't. > > I fixed recently the documentation about that. Hmm, that sounds like an oversight to me. Why should "s" not accept bytes when "s#" and "s*" do ? The only difference between "s" and "s#" is that you work with NUL-terminated strings as opposed to binary or text data with embedded NULs. Even Unicode objects can contain embedded NULs, so from that perspective there's no difference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 14:26:09 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 09 Jun 2010 12:26:09 +0000 Subject: [issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value In-Reply-To: <1276013724.21.0.174818104611.issue8941@psf.upfronthosting.co.za> Message-ID: <1276086369.26.0.813937739899.issue8941@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 14:30:23 2010 From: report at bugs.python.org (Michael Foord) Date: Wed, 09 Jun 2010 12:30:23 +0000 Subject: [issue8948] cleanup functions are not executed with unittest.TestCase.debug() In-Reply-To: <1276030525.65.0.633421030518.issue8948@psf.upfronthosting.co.za> Message-ID: <1276086623.15.0.667585834307.issue8948@psf.upfronthosting.co.za> Michael Foord added the comment: Typo correction in revision 81859. Also needs merging onto py3k. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 14:35:36 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Jun 2010 12:35:36 +0000 Subject: [issue8950] In getargs.c, make 'L' code raise TypeError for float arguments. In-Reply-To: <1276086240.73.0.727976409779.issue8950@psf.upfronthosting.co.za> Message-ID: <201006091435.28137.victor.stinner@haypocalc.com> STINNER Victor added the comment: Le mercredi 09 juin 2010 14:24:01, vous avez ?crit : > Here's a patch. Victor, are you interested in reviewing? I ran the whole test suite: there is no error. The patch is ok, please commit it in Python 3.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 15:07:45 2010 From: report at bugs.python.org (Jean Jordaan) Date: Wed, 09 Jun 2010 13:07:45 +0000 Subject: [issue8953] Syntax error in http://docs.python.org/library/decimal.html#recipes In-Reply-To: <1276088865.47.0.391393017311.issue8953@psf.upfronthosting.co.za> Message-ID: <1276088865.47.0.391393017311.issue8953@psf.upfronthosting.co.za> New submission from Jean Jordaan : http://docs.python.org/library/decimal.html#recipes has this code: for i in range(places): build(next() if digits else '0') Mismatched parenthesis. ---------- assignee: docs at python components: Documentation messages: 107396 nosy: Jean.Jordaan, docs at python priority: normal severity: normal status: open title: Syntax error in http://docs.python.org/library/decimal.html#recipes versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 15:09:17 2010 From: report at bugs.python.org (Jean Jordaan) Date: Wed, 09 Jun 2010 13:09:17 +0000 Subject: [issue8953] Syntax error in http://docs.python.org/library/decimal.html#recipes In-Reply-To: <1276088865.47.0.391393017311.issue8953@psf.upfronthosting.co.za> Message-ID: <1276088957.31.0.268229966076.issue8953@psf.upfronthosting.co.za> Jean Jordaan added the comment: Aargh, sorry, sent too quick :-( ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 15:22:02 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 09 Jun 2010 13:22:02 +0000 Subject: [issue8953] Syntax error in http://docs.python.org/library/decimal.html#recipes In-Reply-To: <1276088865.47.0.391393017311.issue8953@psf.upfronthosting.co.za> Message-ID: <1276089722.42.0.677211714417.issue8953@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 16:20:44 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 09 Jun 2010 14:20:44 +0000 Subject: [issue8954] wininst regression: errors when building on linux In-Reply-To: <1276093244.44.0.895217979727.issue8954@psf.upfronthosting.co.za> Message-ID: <1276093244.44.0.895217979727.issue8954@psf.upfronthosting.co.za> New submission from anatoly techtonik : 2.5.1 version of distutils was able to correctly build wininst dists from linux. Right now there are errors which I'll describe in more details once I can get some Linux box. ---------- assignee: tarek components: Distutils messages: 107398 nosy: tarek, techtonik priority: normal severity: normal status: open title: wininst regression: errors when building on linux versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 16:23:56 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 09 Jun 2010 14:23:56 +0000 Subject: [issue8954] wininst regression: errors when building on linux In-Reply-To: <1276093244.44.0.895217979727.issue8954@psf.upfronthosting.co.za> Message-ID: <1276093436.97.0.63686856312.issue8954@psf.upfronthosting.co.za> anatoly techtonik added the comment: At least is was reported that compiled binaries contains wrong platform name, i.e. 'linux' and there are errors about inability to look up some compiler options in windows registry while building. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 16:37:02 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 09 Jun 2010 14:37:02 +0000 Subject: [issue8954] wininst regression: errors when building on linux In-Reply-To: <1276093244.44.0.895217979727.issue8954@psf.upfronthosting.co.za> Message-ID: <1276094222.55.0.553639928055.issue8954@psf.upfronthosting.co.za> Brian Curtin added the comment: Where was that reported? ---------- nosy: +brian.curtin stage: -> unit test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 17:12:41 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 09 Jun 2010 15:12:41 +0000 Subject: [issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value In-Reply-To: <1276013724.21.0.174818104611.issue8941@psf.upfronthosting.co.za> Message-ID: <1276096361.9.0.0288036083746.issue8941@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a new patch with tests. > I wonder whether it wouldn't be better to preallocate > a Unicode object with size of e.g. size/4 + 16 and > then resize the object as necessary in case a surrogate > pair needs to be created (won't happen that often in > practice). > > The extra scan for pairs can take long depending on > how much data you have to decode and likely doesn't > go down well with CPU caches. Perhaps, but I think this should measured and be the target of a separate issue. We're in rc phase and we should probably minimize potential disruption. ---------- Added file: http://bugs.python.org/file17598/utf32-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 17:17:25 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 09 Jun 2010 15:17:25 +0000 Subject: [issue1100942] Add datetime.time.strptime and datetime.date.strptime Message-ID: <1276096645.43.0.2408957473.issue1100942@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I have updated Amaury's patch for py3k. I simplified the test for default date values and fixed a documentation nit. (Time fileds are [4:7], not [4:6]). The result is attached as issue1100942.diff. Note that date.strptime accepts some time specs and time.strptime accepts some date specs: >>> time.strptime('1900', '%Y') datetime.time(0, 0) >>> date.strptime('00', '%H') datetime.date(1900, 1, 1) This matches the proposed documentation, but I am not sure is desirable. I am about +0 for making the test more robust by scanning the format string and rejecting date format codes in time.strptime and time format codes in date. This will also allow better diagnostic messages. For example, instead of >>> date.strptime('01', '%M') Traceback (most recent call last): .. ValueError: date.strptime value cannot have a time part we can produce "'%M' is not valid in date format specification." ---------- keywords: +easy, patch Added file: http://bugs.python.org/file17599/issue1100942.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 17:31:30 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 09 Jun 2010 15:31:30 +0000 Subject: [issue8947] Provide as_integer_ratio() method to Decimal In-Reply-To: <1276030268.17.0.98739433208.issue8947@psf.upfronthosting.co.za> Message-ID: <1276097490.26.0.26800306496.issue8947@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 17:44:15 2010 From: report at bugs.python.org (James) Date: Wed, 09 Jun 2010 15:44:15 +0000 Subject: [issue8955] import doesn't notice changes to working directory In-Reply-To: <1276098255.67.0.264247838489.issue8955@psf.upfronthosting.co.za> Message-ID: <1276098255.67.0.264247838489.issue8955@psf.upfronthosting.co.za> New submission from James : Attempting to change the working directory and then import based on that change has no effect. Import seems impossible. Attached is tarball example. As seen below, bar1.py can import foo from src, however bar2.py bar3.py and bar4.py cannot, despite their respective scripts changing their cwd. Below is results of a terminal session. Thanks in advance. james at hostname:~$ tree import_bug/ import_bug/ |-- bar1.py |-- __init__.py |-- src | |-- foo.py | `-- __init__.py `-- test |-- bar2.py |-- bar3.py |-- bar4.py |-- bar5.py `-- __init__.py 2 directories, 9 files james at hostname:~$ cat import_bug/src/foo.py # this is foo.py print('this is foo.py') james at hostname:~$ cat import_bug/bar1.py # this is bar1.py import os print(os.getcwd()) from src import foo print('this is bar1.py') james at hostname:~$ cat import_bug/test/bar2.py # this is bar2.py import os os.chdir(os.path.join(os.path.dirname(__file__), os.pardir)) print(os.getcwd()) from src import foo print('this is bar2.py') james at hostname:~$ python import_bug/bar1.py /home/james this is foo.py this is bar1.py james at hostname:~$ python import_bug/test/bar2.py /home/james/import_bug Traceback (most recent call last): File "import_bug/test/bar2.py", line 7, in from src import foo ImportError: No module named src james at hostname:~$ ---------- components: Library (Lib) files: import_bug.tar messages: 107403 nosy: purpleidea priority: normal severity: normal status: open title: import doesn't notice changes to working directory versions: Python 2.6, Python 3.1 Added file: http://bugs.python.org/file17600/import_bug.tar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 18:36:56 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 09 Jun 2010 16:36:56 +0000 Subject: [issue8941] utf-32be codec failing on UCS-2 python build for 32-bit value In-Reply-To: <1276096361.9.0.0288036083746.issue8941@psf.upfronthosting.co.za> Message-ID: <4C0FC326.6020800@egenix.com> Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Here is a new patch with tests. > >> I wonder whether it wouldn't be better to preallocate >> a Unicode object with size of e.g. size/4 + 16 and >> then resize the object as necessary in case a surrogate >> pair needs to be created (won't happen that often in >> practice). >> >> The extra scan for pairs can take long depending on >> how much data you have to decode and likely doesn't >> go down well with CPU caches. > > Perhaps, but I think this should measured and be the target of a separate issue. We're in rc phase and we should probably minimize potential disruption. Fair enough. Here's a little optimization: - if (qq[iorder[3]] != 0 || qq[iorder[2]] != 0) + if (qq[iorder[2]] != 0 || qq[iorder[3]] != 0) For non-BMP code points, it's more likely that byte 2 will be non-zero. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 18:57:15 2010 From: report at bugs.python.org (Guido van Rossum) Date: Wed, 09 Jun 2010 16:57:15 +0000 Subject: [issue8077] cgi handling of POSTed files is broken In-Reply-To: <1267839820.97.0.586792235494.issue8077@psf.upfronthosting.co.za> Message-ID: <1276102635.71.0.0321536018137.issue8077@psf.upfronthosting.co.za> Guido van Rossum added the comment: The example works for me if I make this change: --- Lib/cgi.py (revision 81862) +++ Lib/cgi.py (working copy) @@ -608,7 +608,7 @@ parser = email.parser.FeedParser() # Create bogus content-type header for proper multipart parsing parser.feed('Content-Type: %s; boundary=%s\r\n\r\n' % (self.type, ib)) - parser.feed(self.fp.read()) + parser.feed(self.fp.read(self.length)) full_msg = parser.close() # Get subparts msgs = full_msg.get_payload() However this seems iffy to me because the content length presumably counts bytes whereas self.fp seems to be a text file, but since most HTTP clients don't close the connection, without some kind of boundary on the read() call it just hangs forever. Also someone pointed out to me offline that this change may be needed, separately (though I haven't confirmed this yet): --- Lib/cgi.py (revision 81862) +++ Lib/cgi.py (working copy) @@ -233,6 +233,7 @@ lines = [] while 1: line = fp.readline() + line = line.decode() if not line: terminator = lastpart # End outer loop break ---------- components: -Documentation nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 18:59:23 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 09 Jun 2010 16:59:23 +0000 Subject: [issue8930] messed up formatting after reindenting In-Reply-To: <1275862117.51.0.974367285734.issue8930@psf.upfronthosting.co.za> Message-ID: <1276102763.91.0.219752796217.issue8930@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've fixed some in r81860. If you see others, please signal them here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 19:25:34 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 09 Jun 2010 17:25:34 +0000 Subject: [issue8949] PyArg_Parse*(): "z" should not accept bytes In-Reply-To: <1276032203.54.0.364398342729.issue8949@psf.upfronthosting.co.za> Message-ID: <1276104334.69.0.251858792876.issue8949@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 19:39:57 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 09 Jun 2010 17:39:57 +0000 Subject: [issue8955] import doesn't notice changes to working directory In-Reply-To: <1276098255.67.0.264247838489.issue8955@psf.upfronthosting.co.za> Message-ID: <1276105197.0.0.909837028194.issue8955@psf.upfronthosting.co.za> R. David Murray added the comment: This is working as designed. Try printing sys.path in your scripts. It is what's in sys.path that matters, not the cwd. (The cwd is put in the path as "" in the specific case of running the python interactive shell...and in certain applications that embed Python because of a bug in those applications.) ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 19:45:29 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 09 Jun 2010 17:45:29 +0000 Subject: [issue5115] Extend subprocess.kill to be able to kill process groups In-Reply-To: <1233370260.58.0.70597374825.issue5115@psf.upfronthosting.co.za> Message-ID: <1276105529.54.0.265390848735.issue5115@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 20:25:36 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 09 Jun 2010 18:25:36 +0000 Subject: [issue8956] Incorrect ValueError message for subprocess.Popen.send_signal() on Windows In-Reply-To: <1276107936.75.0.980203852578.issue8956@psf.upfronthosting.co.za> Message-ID: <1276107936.75.0.980203852578.issue8956@psf.upfronthosting.co.za> New submission from Giampaolo Rodola' : def send_signal(self, sig): """Send a signal to the process """ if sig == signal.SIGTERM: self.terminate() elif sig == signal.CTRL_C_EVENT: os.kill(self.pid, signal.CTRL_C_EVENT) elif sig == signal.CTRL_BREAK_EVENT: os.kill(self.pid, signal.CTRL_BREAK_EVENT) else: raise ValueError("Only SIGTERM is supported on Windows") Just noticed right now while I was reading subprocess source code. I guess that should be "Only SIGTERM, CTRL_C_EVENT or CTRL_BREAK_EVENT are supported on Windows". ---------- components: Library (Lib) messages: 107408 nosy: astrand, giampaolo.rodola priority: normal severity: normal status: open title: Incorrect ValueError message for subprocess.Popen.send_signal() on Windows versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 20:37:25 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 09 Jun 2010 18:37:25 +0000 Subject: [issue8956] Incorrect ValueError message for subprocess.Popen.send_signal() on Windows In-Reply-To: <1276107936.75.0.980203852578.issue8956@psf.upfronthosting.co.za> Message-ID: <1276108645.31.0.245059216912.issue8956@psf.upfronthosting.co.za> Brian Curtin added the comment: Good catch, I forgot to update that message when adding the other signal support. Would you rather see something more generic like "Unsupported signal" rather than start listing all of the signals? Another alternative is to allow any signal through including integers, which are then just passed to os.kill (ints passed to kill get set as the proc exit code). However, we can't do that with 2.7, but could with 3.2. ---------- assignee: -> brian.curtin components: +Windows nosy: +brian.curtin stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 20:49:30 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 09 Jun 2010 18:49:30 +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: <1276109370.72.0.91619218942.issue7839@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 20:51:08 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 09 Jun 2010 18:51:08 +0000 Subject: [issue2267] datetime.datetime operator methods are not subclass-friendly In-Reply-To: <1205176194.96.0.747568659994.issue2267@psf.upfronthosting.co.za> Message-ID: <1276109468.29.0.842124770808.issue2267@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I would like to take another shot at this. The link in Amaury's closing comment no longer works, so here is the relevant post: """ Returning same type as self for arithmetic in subclasses Tim Peters tim.peters at gmail.com Sat Jan 8 02:09:27 CET 2005 [Max M] > """ > I subclass datetime and timedelta > > >>> dt = myDatetime(1970,1,1) > >>> type(dt) > > > >>> td = myTimedelta(hours=1) > >>> type(td) > > > But when I do arithmetic with these classes, they return datetime and > timedelta, ... > >>> new_time = dt + td > >>> new_time > datetime.datetime(1970, 1, 1, 1, 0) > > >>> type(new_time) > Yes, and all builtin Python types work that way. For example, int.__add__ or float.__add__ applied to a subclass of int or float will return an int or float; similarly for a subclass of str. This was Guido's decision, based on that an implementation of any method in a base class has no idea what requirements may exist for invoking a subclass's constructor. For example, a subclass may restrict the values of constructor arguments, or require more arguments than a base class constructor; it may permute the order of positional arguments in the base class constructor; it may even be "a feature" that a subclass constructor gives a different meaning to an argument it shares with the base class constructor. Since there isn't a way to guess, Python does a safe thing instead. > where I want them to return myDatetime and myTimedelta > > So I wondered if there was a simlpler way to coerce the result into my > desired types rather than overwriting the __add__, __sub__ etc. methods? Generally speaking, no. But I'm sure someone will torture you with a framework that purports to make it easy . """ http://mail.python.org/pipermail/python-list/2005-January/925838.html As I explained in my previous post, the same argument, "base class has no idea what requirements may exist for invoking a subclass's constructor", applies to class methods, but they nevertheless consistently construct subclass instances: >>> class d(datetime): pass >>> d.utcfromtimestamp(0) d(1970, 1, 1, 0, 0) >>> d.fromtimestamp(0) d(1969, 12, 31, 19, 0) >>> d.combine(date(1,1,1), time(1,1)) d(1, 1, 1, 1, 1) Similar example for the date class: >>> class Date(date): pass >>> Date.fromordinal(1) Date(1, 1, 1) In my view it is hard to justify that for a Date instance d, and integer days, Date.fromordinal(d.toordinal() + days) happily produces a Date instance, but d + timedelta(days) returns a basic date instance. ---------- assignee: -> belopolsky components: +Extension Modules -Library (Lib) nosy: +mark.dickinson resolution: wont fix -> status: closed -> open versions: +Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 20:55:08 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 09 Jun 2010 18:55:08 +0000 Subject: [issue6457] subprocess.Popen.communicate can lose data from output/error streams when broken input pipe occures In-Reply-To: <1247229365.37.0.486388451669.issue6457@psf.upfronthosting.co.za> Message-ID: <1276109708.39.0.70054518.issue6457@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 21:48:51 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 09 Jun 2010 19:48:51 +0000 Subject: [issue6973] subprocess.Popen.send_signal doesn't check whether the process has terminated In-Reply-To: <1253659668.76.0.344119676181.issue6973@psf.upfronthosting.co.za> Message-ID: <1276112931.18.0.287025323111.issue6973@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I totally agree this should be fixed (there was a similar issue for psutil: http://code.google.com/p/psutil/issues/detail?id=58) but communicate() and wait() should be affected in the same manner. Probably it would make sense to add an is_running() method and decorate send_signal(), kill(), communicate() and wait() methods with a function which makes sure that the process is still running, otherwise raises an exception instead. Maybe it would also makes sense to provide a brand new NoSuchProcess exception class. ---------- nosy: +astrand, brian.curtin, giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 22:06:21 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 09 Jun 2010 20:06:21 +0000 Subject: [issue1578643] various datetime methods fail in restricted mode Message-ID: <1276113981.25.0.966297233022.issue1578643@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I would like to remove datetime module dependency on time module altogether. For example getting timestamp as a float and later break it into sec/usec just to satisfy time module API looks rather inefficient. ---------- assignee: -> belopolsky nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 22:24:41 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 09 Jun 2010 20:24:41 +0000 Subject: [issue8957] strptime('%c', ..) fails to parse output of strftime('%c', ..) in non-English locale In-Reply-To: <1276115080.37.0.388300880324.issue8957@psf.upfronthosting.co.za> Message-ID: <1276115080.37.0.388300880324.issue8957@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : The following code: import locale, time locale.setlocale(locale.LC_ALL, "fr_FR.UTF-8") t = time.localtime() s = time.strftime('%c', t) time.strptime('%c', s) Raises ValueError: time data '%c' does not match format 'Mer 9 jui 16:14:46 2010' in any locale where month follows day in '%c' format. Note that attached C code works as expected on my OSX laptop. I wonder it it would make sense to call platform strptime where available? I wonder if platform support for strptime has improved since 2002 when _strptime.py was introduced. ---------- assignee: belopolsky components: Extension Modules files: strptime-locale-bug.c messages: 107413 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: strptime('%c', ..) fails to parse output of strftime('%c', ..) in non-English locale type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file17601/strptime-locale-bug.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 22:25:05 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 09 Jun 2010 20:25:05 +0000 Subject: [issue8957] strptime('%c', ..) fails to parse output of strftime('%c', ..) in non-English locale In-Reply-To: <1276115080.37.0.388300880324.issue8957@psf.upfronthosting.co.za> Message-ID: <1276115105.78.0.14013709193.issue8957@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17602/strptime-locale-bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 22:31:16 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 09 Jun 2010 20:31:16 +0000 Subject: [issue2267] datetime.datetime operator methods are not subclass-friendly In-Reply-To: <1205176194.96.0.747568659994.issue2267@psf.upfronthosting.co.za> Message-ID: <1276115476.39.0.325748491706.issue2267@psf.upfronthosting.co.za> Mark Dickinson added the comment: If you want to challenge Guido's design decision, I think python-dev would be the place to do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 22:55:12 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 09 Jun 2010 20:55:12 +0000 Subject: [issue7739] time.strftime may hung while trying to open /etc/localtime but does not release GIL In-Reply-To: <1263893036.59.0.158350465414.issue7739@psf.upfronthosting.co.za> Message-ID: <1276116912.75.0.168529945631.issue7739@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Victor, I understand your last comment as wanting to keep the GIL while calling tzset(), but release it around the strftime() call. You still want to apply your patch, right? I think the problem is not with a concurrent tzset() call, but with another thread changing TZ environment variable. See http://sourceware.org/bugzilla/show_bug.cgi?id=4350 ---------- assignee: -> belopolsky nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:03:19 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 09 Jun 2010 21:03:19 +0000 Subject: [issue2267] datetime.datetime operator methods are not subclass-friendly In-Reply-To: <1205176194.96.0.747568659994.issue2267@psf.upfronthosting.co.za> Message-ID: <1276117399.26.0.468914284034.issue2267@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > If you want to challenge Guido's design decision, I think > python-dev would be the place to do it. Do you have a link supporting that it was "Guido's design decision"? This decision must have been made around class/type unification, but I don't remember reading about it in Guido's essays. I don't want to make a fool of myself by coming to python-dev with this unprepared. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:06:01 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 09 Jun 2010 21:06:01 +0000 Subject: [issue2267] datetime.datetime operator methods are not subclass-friendly In-Reply-To: <1205176194.96.0.747568659994.issue2267@psf.upfronthosting.co.za> Message-ID: <1276117561.34.0.179126049684.issue2267@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I also believe something needs to be fixed here in any case. Either Date.fromordinal(..) should return date or Date(..) + timedelta(..) should return Date. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:08:37 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 09 Jun 2010 21:08:37 +0000 Subject: [issue2267] datetime.datetime operator methods are not subclass-friendly In-Reply-To: <1205176194.96.0.747568659994.issue2267@psf.upfronthosting.co.za> Message-ID: <1276117717.16.0.614469735923.issue2267@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Do you have a link [...] Nope. Just going on Tim's description of it as "Guido's decision". I've no idea of the history, and I don't particularly recall any recent relevant python-dev discussions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:17:04 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 21:17:04 +0000 Subject: [issue3297] Python interpreter uses Unicode surrogate pairs only before the pyc is created In-Reply-To: <1215327524.42.0.065323704773.issue3297@psf.upfronthosting.co.za> Message-ID: <1276118224.07.0.883647061649.issue3297@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 2.4, Python 2.5, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:20:21 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 21:20:21 +0000 Subject: [issue1193610] Expat Parser to supply document locator in incremental parse Message-ID: <1276118421.47.0.289283762969.issue1193610@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:20:55 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Wed, 09 Jun 2010 21:20:55 +0000 Subject: [issue8958] 2.7rc1 tarfile.py: `bltn_open(targetpath, "wb")` -> IOError: Is a directory In-Reply-To: <1276118455.66.0.211402542637.issue8958@psf.upfronthosting.co.za> Message-ID: <1276118455.66.0.211402542637.issue8958@psf.upfronthosting.co.za> New submission from Sridhar Ratnakumar : 1. Find an OSX 10.5.8 machine 2. wget http://hntool.googlecode.com/files/hntool-0.1.1.tar.gz 3. $ python2.7 -c "import tarfile as T; t=T.open('hntool-0.1.1.tar.gz'); t.extractall()" Traceback (most recent call last): File "", line 1, in File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 2046, in extractall self.extract(tarinfo, path) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 2083, in extract self._extract_member(tarinfo, os.path.join(path, tarinfo.name)) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 2159, in _extract_member self.makefile(tarinfo, targetpath) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/tarfile.py", line 2198, in makefile target = bltn_open(targetpath, "wb") IOError: [Errno 21] Is a directory: './hntool-0.1.1/hntool' ... Note that, when extracted open via other tools, hntool-0.1.1.tar.gz contains within it ... both a directory named "HnTool" (note the case) and a file called "hntool". ---------- components: Library (Lib) messages: 107419 nosy: srid priority: normal severity: normal status: open title: 2.7rc1 tarfile.py: `bltn_open(targetpath, "wb")` -> IOError: Is a directory type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:20:57 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 21:20:57 +0000 Subject: [issue1193610] Expat Parser to supply document locator in incremental parse Message-ID: <1276118457.84.0.682629691207.issue1193610@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- priority: high -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:23:58 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 21:23:58 +0000 Subject: [issue4947] sys.stdout fails to use default encoding as advertised In-Reply-To: <1231931928.79.0.528374921948.issue4947@psf.upfronthosting.co.za> Message-ID: <1276118638.07.0.48105209517.issue4947@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:25:35 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 21:25:35 +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: <1276118735.92.0.851555057153.issue1856@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:28:01 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 21:28:01 +0000 Subject: [issue5302] Allow package_data globs match directories In-Reply-To: <1234909934.56.0.127417684931.issue5302@psf.upfronthosting.co.za> Message-ID: <1276118881.67.0.94649949755.issue5302@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 Wed Jun 9 23:29:09 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 21:29:09 +0000 Subject: [issue3710] Reference leak in thread._local In-Reply-To: <1219882144.91.0.399316525956.issue3710@psf.upfronthosting.co.za> Message-ID: <1276118949.56.0.984268339381.issue3710@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:34:25 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 21:34:25 +0000 Subject: [issue2620] Multiple buffer overflows in unicode processing In-Reply-To: <1207953338.18.0.167765254153.issue2620@psf.upfronthosting.co.za> Message-ID: <1276119265.14.0.0114916331052.issue2620@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Brett, open and fixed are contradictory? for what version did you reopen this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:36:47 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 21:36:47 +0000 Subject: [issue1753718] base64 "legacy" functions violate RFC 3548 Message-ID: <1276119407.2.0.302066539858.issue1753718@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:37:24 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 21:37:24 +0000 Subject: [issue1767511] SocketServer.DatagramRequestHandler Message-ID: <1276119444.24.0.950394870551.issue1767511@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:39:21 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 21:39:21 +0000 Subject: [issue2020] _sha256 module missing if openssl is not in a "normal" directory. In-Reply-To: <1202312744.16.0.269773483749.issue2020@psf.upfronthosting.co.za> Message-ID: <1276119561.37.0.203592529234.issue2020@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Does this 2.5 issue apply to anything current? ---------- nosy: +tjreedy status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:41:28 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 21:41:28 +0000 Subject: [issue1739842] xmlrpclib can no longer marshal Fault objects Message-ID: <1276119688.02.0.976494998964.issue1739842@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> fixed status: open -> closed versions: +Python 2.6 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:43:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 09 Jun 2010 21:43:07 +0000 Subject: [issue5302] Allow package_data globs match directories In-Reply-To: <1234909934.56.0.127417684931.issue5302@psf.upfronthosting.co.za> Message-ID: <1276119787.82.0.233078192087.issue5302@psf.upfronthosting.co.za> ?ric Araujo added the comment: Terry, I?m undoing your changes. Tarek told me to set these versions, since Distutils2 will be compatible from 2.4 to 3.2. Triaging-ly y?rs ;) ---------- versions: +Python 2.5, Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:44:22 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 21:44:22 +0000 Subject: [issue2401] Solaris: ctypes tests being skipped despite following #1516 In-Reply-To: <1205867491.87.0.489555231909.issue2401@psf.upfronthosting.co.za> Message-ID: <1276119862.2.0.124552178322.issue2401@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Does this apply to any current version? ---------- nosy: +tjreedy resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:57:05 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 21:57:05 +0000 Subject: [issue2148] nis module not supporting group aliases In-Reply-To: <1203510631.66.0.497834646199.issue2148@psf.upfronthosting.co.za> Message-ID: <1276120625.32.0.306176801542.issue2148@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Is this really a bug (discrepancy between nis.cat doc and behavior) or a feature request? ---------- nosy: +tjreedy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Jun 9 23:59:34 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 21:59:34 +0000 Subject: [issue2174] xml.sax.xmlreader does not support the InputSource protocol In-Reply-To: <1203861152.32.0.18277152276.issue2174@psf.upfronthosting.co.za> Message-ID: <1276120774.56.0.125295580478.issue2174@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:00:39 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 22:00:39 +0000 Subject: [issue2175] Expat sax parser silently ignores the InputSource protocol In-Reply-To: <1203861783.69.0.636987169656.issue2175@psf.upfronthosting.co.za> Message-ID: <1276120839.54.0.216725141447.issue2175@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:02:12 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 22:02:12 +0000 Subject: [issue1483] xml.sax.saxutils.prepare_input_source ignores character stream in InputSource In-Reply-To: <1195653795.8.0.542576278207.issue1483@psf.upfronthosting.co.za> Message-ID: <1276120932.87.0.183118775474.issue1483@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Are this and the other issues still problems in 2.7 (rc out now) and 3.1? ---------- nosy: +tjreedy versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:04:49 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 22:04:49 +0000 Subject: [issue2209] mailbox module doesn't support compressed mbox In-Reply-To: <1204283686.29.0.398991298124.issue2209@psf.upfronthosting.co.za> Message-ID: <1276121089.94.0.115834790759.issue2209@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:08:03 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 22:08:03 +0000 Subject: [issue2212] Cookie.BaseCookie has ambiguous unicode handling In-Reply-To: <1204315669.5.0.476777122389.issue2212@psf.upfronthosting.co.za> Message-ID: <1276121283.75.0.360593210224.issue2212@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Sean, I don't understand 'inline' in this context. ---------- nosy: +tjreedy versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:10:52 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 22:10:52 +0000 Subject: [issue2126] BaseHTTPServer.py fails long POST from IE In-Reply-To: <1203167938.11.0.556138107236.issue2126@psf.upfronthosting.co.za> Message-ID: <1276121452.97.0.259671540452.issue2126@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:12:13 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 22:12:13 +0000 Subject: [issue2604] doctest.DocTestCase fails when run repeatedly In-Reply-To: <1207798847.15.0.203205049744.issue2604@psf.upfronthosting.co.za> Message-ID: <1276121533.6.0.519922645257.issue2604@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.4, Python 2.5, Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:13:56 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 22:13:56 +0000 Subject: [issue1738] filecmp.dircmp does exact match only In-Reply-To: <1199482445.72.0.241275927673.issue1738@psf.upfronthosting.co.za> Message-ID: <1276121636.91.0.105707635776.issue1738@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:14:10 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 22:14:10 +0000 Subject: [issue1738] filecmp.dircmp does exact match only In-Reply-To: <1199482445.72.0.241275927673.issue1738@psf.upfronthosting.co.za> Message-ID: <1276121650.04.0.687779123736.issue1738@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 Thu Jun 10 00:15:03 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 22:15:03 +0000 Subject: [issue1874] email parser does not register a defect for invalid Content-Transfer-Encoding on multipart messages In-Reply-To: <1200767841.97.0.882225337338.issue1874@psf.upfronthosting.co.za> Message-ID: <1276121703.87.0.971083125201.issue1874@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:16:33 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 22:16:33 +0000 Subject: [issue2818] pulldom cannot handle xml file with large external entity properly In-Reply-To: <1210512738.34.0.315015103661.issue2818@psf.upfronthosting.co.za> Message-ID: <1276121793.95.0.905763995682.issue2818@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:17:09 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 22:17:09 +0000 Subject: [issue2840] Expat parser locks XML source file if ContentHandler raises an exception In-Reply-To: <1210621474.39.0.327877522239.issue2840@psf.upfronthosting.co.za> Message-ID: <1276121829.79.0.607191176278.issue2840@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:18:50 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Jun 2010 22:18:50 +0000 Subject: [issue8604] Adding an atomic FS write API In-Reply-To: <1272890639.26.0.821067455807.issue8604@psf.upfronthosting.co.za> Message-ID: <1276121930.83.0.648294639533.issue8604@psf.upfronthosting.co.za> STINNER Victor added the comment: Trac has an AtomicFile class which copies file mode, owner, etc. http://trac.edgewall.org/browser/trunk/trac/util/__init__.py?#L145 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:19:08 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 22:19:08 +0000 Subject: [issue2892] improve cElementTree iterparse error handling In-Reply-To: <1210940435.5.0.243679200602.issue2892@psf.upfronthosting.co.za> Message-ID: <1276121948.2.0.782679273265.issue2892@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- type: behavior -> feature request versions: +Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:19:50 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 22:19:50 +0000 Subject: [issue1257] atexit errors should result in nonzero exit code In-Reply-To: <1192046186.55.0.804669715206.issue1257@psf.upfronthosting.co.za> Message-ID: <1276121990.09.0.665996267141.issue1257@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.4, Python 2.5, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:23:37 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 22:23:37 +0000 Subject: [issue2901] "error: can't allocate region" from mmap() when receiving big chunk of data In-Reply-To: <1211069816.05.0.311102248623.issue2901@psf.upfronthosting.co.za> Message-ID: <1276122217.04.0.629727992978.issue2901@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Please test on 2.6 or better, 2.7 (rc already out) and 3.1 to verify there still is a problem. ---------- nosy: +tjreedy status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:29:37 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 22:29:37 +0000 Subject: [issue1730136] tkFont.__eq__ gives type error Message-ID: <1276122577.71.0.129865749327.issue1730136@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree that this change is sensible and verified that it is needed for 3.1 as well. I think it should be applied. ---------- nosy: +tjreedy stage: -> commit review versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:29:49 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 09 Jun 2010 22:29:49 +0000 Subject: [issue1738] filecmp.dircmp does exact match only In-Reply-To: <1199482445.72.0.241275927673.issue1738@psf.upfronthosting.co.za> Message-ID: <1276122589.04.0.352036148025.issue1738@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The patch does not apply to py3k branch. ---------- assignee: -> belopolsky stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:33:36 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 22:33:36 +0000 Subject: [issue3053] test_shutil fails under AIX In-Reply-To: <1212763867.85.0.395528995267.issue3053@psf.upfronthosting.co.za> Message-ID: <1276122816.05.0.865422574937.issue3053@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:37:26 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 22:37:26 +0000 Subject: [issue2657] Curses sometimes fails to initialize terminal In-Reply-To: <1208559068.96.0.196247088071.issue2657@psf.upfronthosting.co.za> Message-ID: <1276123046.46.0.449397155404.issue2657@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Is this an issue with 2.7 or 3.1? ---------- nosy: +tjreedy status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:39:11 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 09 Jun 2010 22:39: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: <1276123151.43.0.127800509324.issue8954@psf.upfronthosting.co.za> anatoly techtonik added the comment: In this SCons thread http://scons.tigris.org/ds/viewMessage.do?dsForumId=1268&dsMessageId=2617686 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:46:21 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Jun 2010 22:46:21 +0000 Subject: [issue8828] Atomic function to rename a file In-Reply-To: <1274917301.93.0.503310941815.issue8828@psf.upfronthosting.co.za> Message-ID: <1276123581.83.0.525381899307.issue8828@psf.upfronthosting.co.za> STINNER Victor added the comment: About the function names: - shutil.atomic_move_file(): only available on some OS - shutil.move_file(): use shutil.atomic_move_file() if available, or fall back to a best effort implementation Implement an atomic function to rename a directory is more complex and should be done in another issue. That's why I added "_file" suffix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:52:36 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Jun 2010 22:52:36 +0000 Subject: [issue8828] Atomic function to rename a file In-Reply-To: <1274917301.93.0.503310941815.issue8828@psf.upfronthosting.co.za> Message-ID: <1276123956.01.0.973687045781.issue8828@psf.upfronthosting.co.za> STINNER Victor added the comment: [atomic_move_file-windows.py]: implementation of atomic_move_file() for Windows, depends on CreateTransaction() and MoveFileTransacted(), only available on Windows Vista, Windows Server 2008, or more recent version. This function *is* atomic. This function is also able to rename a directory! ---------- Added file: http://bugs.python.org/file17603/atomic_move_file-windows.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:57:03 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 09 Jun 2010 22:57:03 +0000 Subject: [issue8784] tarfile/Windows: Don't use mbcs as the default encoding In-Reply-To: <1274491335.43.0.732437213128.issue8784@psf.upfronthosting.co.za> Message-ID: <1276124223.75.0.29436500518.issue8784@psf.upfronthosting.co.za> STINNER Victor added the comment: I created a TAR archive with the 7-zip archiver of file with diacritics in their name (eg. "?" and "?"). Then I opened the archive with WinRAR: the file names were not displayed correctly :-/ 7-zip encodes "?" (U+00e0) as 0x85 (1 byte), and "?" (U+00e9) as 0x82 (1 byte). I don't know this encoding. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 00:58:36 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 09 Jun 2010 22:58:36 +0000 Subject: [issue665194] datetime-RFC2822 roundtripping Message-ID: <1276124316.51.0.0234833695293.issue665194@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: -1 on adding more formatting/parsing methods to datetime. +1 on adding functions to email.utils that work with datetime objects. Adding #5094 as a dependency because RFC 2822 requires timezone information for proper formatting. ---------- dependencies: +datetime lacks concrete tzinfo impl. for UTC stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 01:05:38 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 23:05:38 +0000 Subject: [issue3129] struct allows repeat spec. without a format specifier In-Reply-To: <1213694469.69.0.0950890622628.issue3129@psf.upfronthosting.co.za> Message-ID: <1276124738.71.0.524652191464.issue3129@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I verified that 3.1 has same behavior. Doc says format strings "are built up from format characters" which "may be preceded by an integral repeat count". So I agree that such formats are bugs that should be reported and that ignoring repeat counts of nothing is a bug. While I cannot apply and test the (trivial) patch, I read it and it looks sensible. Pending independent test, I would say apply. I am not familiar with whether it needs to be rebuilt against current code or not. ---------- keywords: +patch nosy: +tjreedy stage: -> commit review versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 01:07:13 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 23:07:13 +0000 Subject: [issue3213] "pydoc -p" should listen to [::] if IPv6 is supported In-Reply-To: <1214525489.78.0.574038651579.issue3213@psf.upfronthosting.co.za> Message-ID: <1276124833.67.0.863123275927.issue3213@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 01:09:12 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 09 Jun 2010 23:09:12 +0000 Subject: [issue8784] tarfile/Windows: Don't use mbcs as the default encoding In-Reply-To: <1276124223.75.0.29436500518.issue8784@psf.upfronthosting.co.za> Message-ID: <4C101F12.7090102@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > I created a TAR archive with the 7-zip archiver of file with diacritics in their name (eg. "?" and "?"). Then I opened the archive with WinRAR: the file names were not displayed correctly :-/ > > 7-zip encodes "?" (U+00e0) as 0x85 (1 byte), and "?" (U+00e9) as 0x82 (1 byte). I don't know this encoding. That's an old DOS code paged used in Europe: CP850 http://en.wikipedia.org/wiki/Code_page_850 ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 01:16:47 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 23:16:47 +0000 Subject: [issue3276] httplib.HTTPConnection._send_request should not blindly assume dicts for headers In-Reply-To: <1215130769.47.0.0230905543783.issue3276@psf.upfronthosting.co.za> Message-ID: <1276125407.07.0.623232365167.issue3276@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is a feature request for now old versions. It would have to be reformulated as a feature request for a 3.2 module. I do not see the dict (mapping now?) requirement being changed. ---------- nosy: +tjreedy resolution: -> out of date status: open -> pending type: -> feature request versions: -Python 2.1.1, Python 2.1.2, Python 2.2, Python 2.2.1, Python 2.2.2, Python 2.2.3, Python 2.3, Python 2.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 01:21:37 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 09 Jun 2010 23:21:37 +0000 Subject: [issue8784] tarfile/Windows: Don't use mbcs as the default encoding In-Reply-To: <4C101F12.7090102@egenix.com> Message-ID: <4C1021FD.8050307@egenix.com> Marc-Andre Lemburg added the comment: Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > STINNER Victor wrote: >> >> STINNER Victor added the comment: >> >> I created a TAR archive with the 7-zip archiver of file with diacritics in their name (eg. "?" and "?"). Then I opened the archive with WinRAR: the file names were not displayed correctly :-/ >> >> 7-zip encodes "?" (U+00e0) as 0x85 (1 byte), and "?" (U+00e9) as 0x82 (1 byte). I don't know this encoding. > > That's an old DOS code paged used in Europe: CP850 > > http://en.wikipedia.org/wiki/Code_page_850 Looks like the cmd.exe on WinXP still uses it. At least on my German WinXP it does for Python 2.3 and older. Starting with Python 2.4, the behavior changed to use CP1252 instead: D:\Python26>python Python 2.6 (r26:66721, Oct 2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on wi 32 Type "help", "copyright", "credits" or "license" for more information. >>> u'??' u'\xe0\xe9' D:\Python25>python Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> u'??' u'\xe1\xe9' D:\Python24>python Python 2.4 (#60, Nov 30 2004, 11:49:19) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> u'??' u'\xe0\xe9' D:\Python23>python Python 2.3.4 (#53, May 25 2004, 21:17:02) [MSC v.1200 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> u'??' u'\x85\x82' >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 01:42:38 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 23:42:38 +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: <1276126958.93.0.402761511433.issue3423@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In 3.1, I get >>> exec("1/0") Traceback (most recent call last): File "", line 1, in exec("1/0") File "", line 1, in ZeroDivisionError: int division or modulo by zero In your example, would you really prefer that the warning message start with "1" (or the 2.x equivalent) instead of "t.py1"? If I were running a multi-file app with warnings turned on, I would prefer the latter. The message "DeprecationWarning: raising a string exception is deprecated" is certainly enough to suggest that one search the file for 'raise'. In any case, this would only be a bug if it disagreed with docs or if this were different from the usual behavior with deprecation warnings. It is too late for new features in 2.x and this does not apply to 3.x. ---------- nosy: +tjreedy resolution: -> rejected status: open -> closed type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 01:45:29 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 23:45:29 +0000 Subject: [issue3430] httplib.HTTPResponse documentations inconsistent In-Reply-To: <1216747880.73.0.0581734704537.issue3430@psf.upfronthosting.co.za> Message-ID: <1276127129.98.0.734644629291.issue3430@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Docs have been considerably updated since 2.5. Please check if this still applies to the 2.7 docs ---------- nosy: +tjreedy status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 01:48:52 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 23:48:52 +0000 Subject: [issue3456] compile python using MinGW In-Reply-To: <1217231208.12.0.680278518143.issue3456@psf.upfronthosting.co.za> Message-ID: <1276127332.55.0.842622793074.issue3456@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.2 -Python 2.6, Python 2.7, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 01:49:10 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 23:49:10 +0000 Subject: [issue3456] compile python using MinGW In-Reply-To: <1217231208.12.0.680278518143.issue3456@psf.upfronthosting.co.za> Message-ID: <1276127350.38.0.573335192768.issue3456@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 01:57:14 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 09 Jun 2010 23:57:14 +0000 Subject: [issue3494] "[Errno 11] Resource temporarily unavailable" while using tracing facility/threads (in linux listdir with unicode path) In-Reply-To: <1217704277.74.0.0700671746724.issue3494@psf.upfronthosting.co.za> Message-ID: <1276127834.38.0.502960729504.issue3494@psf.upfronthosting.co.za> Terry J. Reedy added the comment: "The above fix could be backported." Too late now. ---------- nosy: +tjreedy resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 02:14:24 2010 From: report at bugs.python.org (Greg Hazel) Date: Thu, 10 Jun 2010 00:14:24 +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: <1276128864.16.0.537137296814.issue3423@psf.upfronthosting.co.za> Greg Hazel added the comment: Searching the file for "raise" is sort of pointless, since exec() takes a string which might have come from anywhere, and there might be any number of exec() calls in the module. See: http://codepad.org/7EBMhb0O There are at least two reasonable answers: :1: DeprecationWarning: raising a string exception is deprecated raise 'two' or: t.py:7: DeprecationWarning: raising a string exception is deprecated exec(x) Either one would be fine, but randomly choosing the first line of the module where exec() is called is just nonsense. If you want one that applies to Python 3.x, here you go: http://codepad.org/Mq1eZyoE ---------- status: closed -> open versions: +Python 2.6, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 06:46:16 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 10 Jun 2010 04:46:16 +0000 Subject: [issue8915] Use locale.nl_langinfo in _strptime In-Reply-To: <1275795309.62.0.41465361185.issue8915@psf.upfronthosting.co.za> Message-ID: <1276145176.69.0.301496673293.issue8915@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: See also issue8957. If this happens, I would like to add a pure python implementation strftime. See also issue7989. ---------- assignee: -> belopolsky nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 07:27:36 2010 From: report at bugs.python.org (Atro Tossavainen) Date: Thu, 10 Jun 2010 05:27:36 +0000 Subject: [issue2401] Solaris: ctypes tests being skipped despite following #1516 In-Reply-To: <1276119862.2.0.124552178322.issue2401@psf.upfronthosting.co.za> Message-ID: <201006100527.o5A5RSdT016195@ruuvi.it.helsinki.fi> Atro Tossavainen added the comment: > Does this apply to any current version? Funny you should ask, I've just started building Python 2.6.5 yesterday. I should know in a bit. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 09:06:00 2010 From: report at bugs.python.org (Michael Curran) Date: Thu, 10 Jun 2010 07:06:00 +0000 Subject: [issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7 In-Reply-To: <1276153559.93.0.766128008061.issue8959@psf.upfronthosting.co.za> Message-ID: <1276153559.93.0.766128008061.issue8959@psf.upfronthosting.co.za> New submission from Michael Curran : There seem to be problems with WINFUNCTYPE callbacks causing exceptions, and or getting their return value ignored by the caller, when using Python 2.7 rc1. Two examples provided. Example 1: Providing a WINFUNCTYPE wrapped python function when calling EnumWindows from user32.dll with ctypes, EnumWindows enumerates (calls the python function) for the first 5 windows and then causes a WindowsError, sometimes an access violation (reading, or writing), or even other strange unknown exceptions. This specific testcase is attached to the bug. Run this script in Python 2.7 you should see the WindowsErrors. On Python 2.6 it successfully enumerates through all windows. Example 2: Hooking low-level keyboard input in Windows with SetWindowsHookEx from user32.dll, providing a WINFUNCTYPE wrapped python function as the callback, and then typing some keys, causes the callback to be called but the return value is always ignored, which means the hook never blocks keys completely, even if the value 1 is returned from the callback, to do so. Again, a testcase is attached to the bug. Run this script in Python. It will ask you to type some characters and press enter. On Python 2.6 no characters should be echoed to the screen, but you will hear beeps to let you know the keyboard hook is seeing the keys. On Python 2.7, the keys will be echoed to the screen, and you will also hear the beeps (meaning that the hook was seeing the keys, but was unable to actually block them -- its return value was being ignored). Also in Python 2.7, after the quit message is sent to the hook thread, GetMessageW (in user32.dll) causes a WindowsError exception. This does not happen on Python 2.6. Perhaps it may be related to this entry in the Python 2.7 What's new: The underlying libffi library has been updated to version 3.0.9, containing various fixes for different platforms. (Updated by Matthias Klose; issue 8142.) ---------- assignee: theller components: ctypes files: test_callbackRetval.py messages: 107447 nosy: mdcurran, theller priority: normal severity: normal status: open title: WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7 type: crash versions: Python 2.7 Added file: http://bugs.python.org/file17604/test_callbackRetval.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 09:07:05 2010 From: report at bugs.python.org (Michael Curran) Date: Thu, 10 Jun 2010 07:07:05 +0000 Subject: [issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7 In-Reply-To: <1276153559.93.0.766128008061.issue8959@psf.upfronthosting.co.za> Message-ID: <1276153625.75.0.0673476246923.issue8959@psf.upfronthosting.co.za> Changes by Michael Curran : Added file: http://bugs.python.org/file17605/test_keyHook.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 09:10:25 2010 From: report at bugs.python.org (Michael Curran) Date: Thu, 10 Jun 2010 07:10:25 +0000 Subject: [issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7 In-Reply-To: <1276153559.93.0.766128008061.issue8959@psf.upfronthosting.co.za> Message-ID: <1276153825.8.0.807844926795.issue8959@psf.upfronthosting.co.za> Michael Curran added the comment: I should also note that this has been tested on Windows 7 and XP (32 bit). I have also seen cases where Python has crashed completely, rather than just causing a WindowsError, in these circomstances. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 11:36:19 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 10 Jun 2010 09:36:19 +0000 Subject: [issue8828] Atomic function to rename a file In-Reply-To: <1274917301.93.0.503310941815.issue8828@psf.upfronthosting.co.za> Message-ID: <1276162579.28.0.0773243129484.issue8828@psf.upfronthosting.co.za> anatoly techtonik added the comment: Does it work with FAT32 or network filesystem? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 11:43:47 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 10 Jun 2010 09:43:47 +0000 Subject: [issue8839] PyArg_ParseTuple(): remove "t# format In-Reply-To: <1276038123.97.0.00682322523581.issue8839@psf.upfronthosting.co.za> Message-ID: <4C10B3CF.7000607@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> t# was meant to provide access to text data, so replacing it with a >> parser code that is meant for binary data is not correct. The >> closes Python3 gets to t# from Python2 is s# or s*, so please use >> those in the NEWS entry and s* in charbuffer_encode(). > > Done. Patch commited as r81854 in 3.2: it removes also codecs.charbuffer_encode(). Commit blocked in 3.1 (r81855). Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 11:55:00 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 10 Jun 2010 09:55:00 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1276020578.25.0.642954542569.issue7989@psf.upfronthosting.co.za> Message-ID: <4C10B66F.4060203@egenix.com> Marc-Andre Lemburg added the comment: Brett Cannon wrote: > > Brett Cannon added the comment: > > So yes, cPickle/pickle, cStringIO/StringIO, heapq, etc. are all examples of the approach. One could choose to write the pure Python version first, profile the code, and only write extension code for the hot spots, but obviously that typically doesn't happen. That's what was done for the datetime module. The pure-Python version just never made it into the stdlib, AFAIK. Note that we've just dropped the pure-Python version of the io package as well, so an approach where we keep the pure-Python prototype would be a novelty in Python land and should probably be codified in a PEP. > As for who maintains it, that's python-dev, just like every other module that is structured like this. When the stdlib gets more of a clear separation from CPython I suspect the other VM maintainers will contribute more. I'm not sure whether there would be much interest in this. Unless the core devs are also active in other VM implementations, there's little motivation to maintain two separate implementations of the same thing. Users of CPython will likely only use the C version anyway, so the pure-Python code would also get little real-life testing. Perhaps we should open up python-dev to external VM developers that would have to rely on those pure-Python implementations ?! > As for PyPy not specifically needing this, that still doesn't solve the problem that Jython and IronPython have with extension code or any other future VM that doesn't try to come up with a solution for extensions. Both Jython and IronPython could add bridges to CPython extensions (Jython via the JNI and IronPython via unmanaged code. Still, you're right in that it's unlikely they will move away from being pure-Java or pure-C# implementations, so they do have a need for such pure-Python implementations. ---------- 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 Thu Jun 10 12:35:02 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 10 Jun 2010 10:35:02 +0000 Subject: [issue8922] Improve encoding shortcuts in PyUnicode_AsEncodedString() In-Reply-To: <1275949981.66.0.571681325081.issue8922@psf.upfronthosting.co.za> Message-ID: <4C10BFD2.5000702@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> Note that these shortcut bypass the codec registry logic. > > Yes, but it's already the case without my patch. I don't think that it's really useful to override latin1, utf-8, utf-16, utf-32 or mbcs. I prefer a faster Python :-) Depends on your use case. E.g. utf-32 is hardly ever used in practice, utf-16 is only common on Windows and then only as utf-16-le, I'm not sure about mbcs since that's a meta-codec. In reality, this will likely be the same as cp1252 most of the time. I'm ok on ascii, latin1, utf-8 and mbcs (including the additional normalization, aliasiing and case mapping), but not on the others. >> we have to be careful about adding more such shortcuts. > > I just want to add a shortcut for ISO-8859-1. Fine, even though that name is really not used much in Python code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 12:48:51 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jun 2010 10:48:51 +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: <1276166931.63.0.284106214297.issue7989@psf.upfronthosting.co.za> STINNER Victor added the comment: I like the idea of a pure Python implementation of the datetime module, for different reasons: - it will become the reference implementation - other Python interpreters can use it - it can be used to test another implementation, eg. the current C version - implement/test a new feature is much faster in Python than in C About the last point: I already used _pyio many times to fix a bug or to develop a new feature. _pyio helps to choice the right solution because you can easily write a short patch and so compare different solutions. If other Python interpreters have already their Python implementation, we can just choose the best one, and patch it to add last new features of the C version. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 13:03:04 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 10 Jun 2010 11:03:04 +0000 Subject: [issue7989] Add pure Python implementation of datetime module to CPython In-Reply-To: <1276166931.63.0.284106214297.issue7989@psf.upfronthosting.co.za> Message-ID: <4C10C665.6050005@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > I like the idea of a pure Python implementation of the datetime module, for different reasons: > - it will become the reference implementation > - other Python interpreters can use it > - it can be used to test another implementation, eg. the current C version > - implement/test a new feature is much faster in Python than in C > > About the last point: I already used _pyio many times to fix a bug or to develop a new feature. _pyio helps to choice the right solution because you can easily write a short patch and so compare different solutions. Ah, so that where the Python io module hides. Thanks for the pointer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 13:47:40 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jun 2010 11:47:40 +0000 Subject: [issue8784] tarfile/Windows: Don't use mbcs as the default encoding In-Reply-To: <1274491335.43.0.732437213128.issue8784@psf.upfronthosting.co.za> Message-ID: <1276170460.83.0.595396051352.issue8784@psf.upfronthosting.co.za> STINNER Victor added the comment: I created a tarball (.tar.gz) on Windows with Python 3.1 (which uses "mbcs" encoding). With locale.getpreferredencoding() == 'cp1252', "?" (U+00e9) is encoded 0xe9 (1 byte) and "?" (U+00e0) as 0xe0 (1 byte). WinRAR displays correctly the file names, but 7-zip displays the wrong glyphs. So WinRAR expects CP1252 whereas 7-zip expects CP850. I also tested an archive encoded with UTF-8: WinRAR and 7-zip display the wrong glyph, they decode utf-8 with CP1252 / CP850 :-/ If an archive will be used on UNIX, I think that the archive should use UTF-8 (on Windows and UNIX). But if the archive is read on Windows with WinRAR or 7-zip, the archive should use a codepage. Since mbcs looks to be the least worst choice, it may be used but with "replace" error handler (because it doesn't support "surrogateescape" error handler). -- About the code pages: - chcp command displays "Active code page: 850" - python -c "import locale; print(locale.getpreferredencoding())" displays "cp1252" - python -c "import sys; print(sys.stdout.encoding)" displays "cp850" Python calls GetConsoleOutputCP() to get stdout/stderr encoding (code page), whereas locale.getpreferredencoding() (_locale.getdefaultencoding()) calls GetACP(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 14:02:34 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jun 2010 12:02:34 +0000 Subject: [issue8922] Improve encoding shortcuts in PyUnicode_AsEncodedString() In-Reply-To: <1275848637.97.0.606582513318.issue8922@psf.upfronthosting.co.za> Message-ID: <1276171354.44.0.72252059036.issue8922@psf.upfronthosting.co.za> STINNER Victor added the comment: Commited in 3.2 (r81869), blocked in 3.1 (r81870). -- Oops, I don't know why I wrote utf-16 and utf-32. I don't want to add them to the shortcuts. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 14:02:43 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 10 Jun 2010 12:02:43 +0000 Subject: [issue8885] markerbase declaration errors aren't recoverable In-Reply-To: <1275563651.6.0.351540013915.issue8885@psf.upfronthosting.co.za> Message-ID: <1276171363.23.0.690735213428.issue8885@psf.upfronthosting.co.za> R. David Murray added the comment: "This module is used as a foundation for the HTMLParser and sgmllib modules (indirectly, for htmllib as well). It has no documented public API and should not be used directly." So, #2 is not relevant unless you are talking about a docstring update or comment in ParserBase. Do you have a test case using one of the consumer modules that demonstrates a bug? markupbase has no test suite of its own (which probably should be fixed someday :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 14:04:37 2010 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 10 Jun 2010 12:04:37 +0000 Subject: [issue8924] Error in error message in logging In-Reply-To: <1275850912.41.0.0811394159532.issue8924@psf.upfronthosting.co.za> Message-ID: <1276171477.83.0.629518539239.issue8924@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- assignee: -> vinay.sajip nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 14:49:33 2010 From: report at bugs.python.org (=?utf-8?q?Vojt=C4=9Bch_Rylko?=) Date: Thu, 10 Jun 2010 12:49:33 +0000 Subject: [issue8960] 2.6 README In-Reply-To: <1276174173.81.0.364137552022.issue8960@psf.upfronthosting.co.za> Message-ID: <1276174173.81.0.364137552022.issue8960@psf.upfronthosting.co.za> New submission from Vojt?ch Rylko : In 2.6 README are this paragraphs from 2.5 README: A number of features are not supported in Python 2.5 anymore. Some support code is still present, but will be removed in Python 2.6. The following systems are still supported in Python 2.5, but support will be dropped in 2.6: - Systems using --with-wctype-functions - Win9x, WinME Following Microsoft's closing of Extended Support for Windows 98/ME (July 11, 2006), Python 2.6 will stop supporting these platforms. ---------- assignee: docs at python components: Documentation messages: 107458 nosy: docs at python, vojta.rylko priority: normal severity: normal status: open title: 2.6 README versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 15:48:35 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jun 2010 13:48:35 +0000 Subject: [issue8922] Improve encoding shortcuts in PyUnicode_AsEncodedString() In-Reply-To: <1276171354.44.0.72252059036.issue8922@psf.upfronthosting.co.za> Message-ID: <201006101548.13860.victor.stinner@haypocalc.com> STINNER Victor added the comment: Le jeudi 10 juin 2010 14:02:34, vous avez ?crit : > Commited in 3.2 (r81869), blocked in 3.1 (r81870). This commit introduced a regression: ISO-8859-15 was seen as an alias to ISO-8859-1 because the normalized string was truncated. Fixed in r81871 (blocked in 3.1: r81872). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 15:57:36 2010 From: report at bugs.python.org (=?utf-8?b?VGFtw6FzIEd1bMOhY3Np?=) Date: Thu, 10 Jun 2010 13:57:36 +0000 Subject: [issue8961] compile Python-2.7rc1 on AIX 5.3 with xlc_r In-Reply-To: <1276178256.7.0.316939316511.issue8961@psf.upfronthosting.co.za> Message-ID: <1276178256.7.0.316939316511.issue8961@psf.upfronthosting.co.za> New submission from Tam?s Gul?csi : I'm trying to compile Python2.7rc1 on AIX 5.3 with the following call: FW=/home/kobe/kobed/tgulacsi/freeware CC='xlc_r -q64' CXX='xlC_r -q64' AR='ar -X64' NM='nm -X64' LD='ld -X64' \ LD_LIBRARY_PATH=$FW/lib:$LD_LIBRARY_PATH \ ./configure -C --without-gcc \ CFLAGS="-DHAVE_BROKEN_POSIX_SEMAPHORES -I$FW/include" \ LDFLAGS='-L$FW/lib' \ ARFLAGS='cru' \ --prefix=$FW make The result is attached, as I see sysconfig.get_config_var doesn't have CONFIG_ARGS set. Thanks in advance, Tam?s Gul?csi ---------- components: Build files: python-2.7rc1-aix5.3.log messages: 107460 nosy: tgulacsi priority: normal severity: normal status: open title: compile Python-2.7rc1 on AIX 5.3 with xlc_r versions: Python 2.7 Added file: http://bugs.python.org/file17606/python-2.7rc1-aix5.3.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 16:38:36 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 10 Jun 2010 14:38:36 +0000 Subject: [issue8961] compile Python-2.7rc1 on AIX 5.3 with xlc_r In-Reply-To: <1276178256.7.0.316939316511.issue8961@psf.upfronthosting.co.za> Message-ID: <1276180716.42.0.302090097612.issue8961@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +srid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 17:13:15 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Jun 2010 15:13:15 +0000 Subject: [issue8961] compile Python-2.7rc1 on AIX 5.3 with xlc_r In-Reply-To: <1276178256.7.0.316939316511.issue8961@psf.upfronthosting.co.za> Message-ID: <1276182795.57.0.326525500824.issue8961@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> tarek nosy: +tarek priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 18:05:47 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 10 Jun 2010 16:05:47 +0000 Subject: [issue8950] In getargs.c, make 'L' code raise TypeError for float arguments. In-Reply-To: <1276033368.49.0.876712618605.issue8950@psf.upfronthosting.co.za> Message-ID: <1276185947.16.0.656011623951.issue8950@psf.upfronthosting.co.za> Mark Dickinson added the comment: Committed, r81873. Thanks for reviewing, Victor. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 18:17:44 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 10 Jun 2010 16:17:44 +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: <1276186664.11.0.278787056251.issue8939@psf.upfronthosting.co.za> Mark Dickinson added the comment: FWIW, I prefer PyLongObject* over PyLong. (Though I'm sure I'm guilty of writing PyLong in comments.) ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 18:21:05 2010 From: report at bugs.python.org (Caitlin Kavanaugh) Date: Thu, 10 Jun 2010 16:21:05 +0000 Subject: [issue8962] IOError: [Errno 13] permission denied In-Reply-To: <1276186865.91.0.457294354342.issue8962@psf.upfronthosting.co.za> Message-ID: <1276186865.91.0.457294354342.issue8962@psf.upfronthosting.co.za> New submission from Caitlin Kavanaugh : Hi, I'm new to python, so I'm sorry if my explanation is terribly concise, I'm trying to explain it with fairly limited terminology. I have been attempting to write data out to a file, yet I continually receive the error: IOError: [Errno 13] permission denied '/trained.nn' No matter where or what I try to save the file as, it returns this error with the corresponding file name. My friend insists that I need to use a slash, yet I'm not sure this is the correct syntax. Otherwise, I'm absolutely lost in how to solve this. I tried looking up possible solutions first, but either the terminology was beyond me, or they supplied a piece of code that could fix it. I don't really want a plug and chug solution. I really want to understand this, so any explanation would be greatly appreciated. Thank you! ---------- components: Windows messages: 107463 nosy: Caitlin.Kavanaugh priority: normal severity: normal status: open title: IOError: [Errno 13] permission denied type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 18:29:05 2010 From: report at bugs.python.org (Michael Foord) Date: Thu, 10 Jun 2010 16:29:05 +0000 Subject: [issue8948] cleanup functions are not executed with unittest.TestCase.debug() In-Reply-To: <1276030525.65.0.633421030518.issue8948@psf.upfronthosting.co.za> Message-ID: <1276187345.34.0.808731352112.issue8948@psf.upfronthosting.co.za> Michael Foord added the comment: Committed revision 81875. Committed revision 81874. ---------- resolution: -> accepted stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 18:33:42 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 10 Jun 2010 16:33:42 +0000 Subject: [issue8962] IOError: [Errno 13] permission denied In-Reply-To: <1276186865.91.0.457294354342.issue8962@psf.upfronthosting.co.za> Message-ID: <1276187622.03.0.118166564335.issue8962@psf.upfronthosting.co.za> Mark Dickinson added the comment: Hi, Sorry, but this tracker is for reporting bugs in Python itself, not for getting help with using Python. You might try asking on one of the python mailing lists: http://mail.python.org/mailman/listinfo/python-list or http://mail.python.org/mailman/listinfo/tutor ---------- nosy: +mark.dickinson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 19:19:04 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jun 2010 17:19:04 +0000 Subject: [issue8784] tarfile/Windows: Don't use mbcs as the default encoding In-Reply-To: <1274491335.43.0.732437213128.issue8784@psf.upfronthosting.co.za> Message-ID: <1276190344.13.0.674254471941.issue8784@psf.upfronthosting.co.za> STINNER Victor added the comment: My tests with 7-zip and WinRAR conviced me that it's not a good idea to use utf-8 *by default* on Windows. But since mbcs doesn't support surrogateescape error handler, we should restore the previous behaviour just for this encoding. tarfile_mbcs_errors.patch creates a function choose_errors() which determine the best error handler depending on the encoding and the mode (read or write): - "strict" to write with mbcs - "replace" to read with mbcs - "surrogateescape" otherwise Please, review my changes on the documentation :-) On Windows, patched tarfile works exactly as Python 3.1. ---------- Added file: http://bugs.python.org/file17607/tarfile_mbcs_errors.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 19:27:26 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 10 Jun 2010 17:27:26 +0000 Subject: [issue8784] tarfile/Windows: Don't use mbcs as the default encoding In-Reply-To: <1276190344.13.0.674254471941.issue8784@psf.upfronthosting.co.za> Message-ID: <4C11207A.2060102@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > My tests with 7-zip and WinRAR conviced me that it's not a good idea to use utf-8 *by default* on Windows. But since mbcs doesn't support surrogateescape error handler, we should restore the previous behaviour just for this encoding. > > tarfile_mbcs_errors.patch creates a function choose_errors() which determine the best error handler depending on the encoding and the mode (read or write): > - "strict" to write with mbcs > - "replace" to read with mbcs > - "surrogateescape" otherwise I think you should implement this in a more general way: have the class test whether the codec supports "surrogateescape" and then use it. Otherwise fall back to "strict" for writing and "replace" for reading. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 20:40:58 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 10 Jun 2010 18:40:58 +0000 Subject: [issue8784] tarfile/Windows: Don't use mbcs as the default encoding In-Reply-To: <4C101F12.7090102@egenix.com> Message-ID: <4C1131B6.6080208@v.loewis.de> Martin v. L?wis added the comment: >> 7-zip encodes "?" (U+00e0) as 0x85 (1 byte), and "?" (U+00e9) as 0x82 (1 byte). I don't know this encoding. > > That's an old DOS code paged used in Europe: CP850 There is a good chance that they use it because it is the OEM code page on the system. In any case, I think that both cp850 and cp1252 are inherently incorrect for tarfiles (despite these tools using them). tar is a POSIX thing, and these encodings have nothing to do with POSIX. So using UTF-8 is a reasonable choice, IMO. The other reasonable choice would be ASCII. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 20:52:01 2010 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Thu, 10 Jun 2010 18:52:01 +0000 Subject: [issue8784] tarfile/Windows: Don't use mbcs as the default encoding In-Reply-To: <1274491335.43.0.732437213128.issue8784@psf.upfronthosting.co.za> Message-ID: <1276195921.05.0.32250589087.issue8784@psf.upfronthosting.co.za> Lars Gust?bel added the comment: Maybe I'm going out on a limb here, but I think we should again consider what tarfile users on Windows(!) actually use it for under which circumstances. The following list is probably not exhaustive, but IMHO covers 90%: 1. Download tar archives from a webpage (when no zip is supplied) for viewing or extracting. 2. Create backups for personal use. 3. Create source archives from a project for unix users who hate zipfiles. I am convinced that the tarfile module is not very popular on Windows, because of a simple reason: tar archives are not. Windows users will always prefer zip archives and hence the zipfile module, because it's something they're familiar with. The point I am trying to make is, that, first, we should not choose a default encoding based on what works best with WinRAR, 7-zip and such, because they all act very differently which makes it impossible. Second, we must not overemphasize the encoding issue to a point where portability is in danger. This means that in almost all real-life cases there are no encoding issues. In my whole tarfile maintaining career I cannot remember a single incident of a tar archive that I got from an external source that contained special characters. The only tar archives that contain special characters in my experience are backups. But: these backups are created and later restored on one and the same system. Again, no encoding issues. Long story short, I still vote for utf-8, because it enables Windows users to create backups without losing special characters, and it's ASCII-"compatible" and should be able to read 99% of the files that you get from the internet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 21:02:01 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 10 Jun 2010 19:02:01 +0000 Subject: [issue8950] In getargs.c, make 'L' code raise TypeError for float arguments. In-Reply-To: <1276033368.49.0.876712618605.issue8950@psf.upfronthosting.co.za> Message-ID: <1276196521.78.0.298438823885.issue8950@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 21:07:19 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Jun 2010 19:07:19 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This test failure just happened to me on a py3k checkout: test test_urllibnet failed -- Traceback (most recent call last): File "/home/antoine/py3k/debug/Lib/test/test_urllibnet.py", line 191, in test_data_header time.strptime(datevalue, dateformat) File "/home/antoine/py3k/debug/Lib/_strptime.py", line 461, in _strptime_time return _strptime(data_string, format)[0] File "/home/antoine/py3k/debug/Lib/_strptime.py", line 332, in _strptime (data_string, format)) ValueError: time data 'Thu, 10 Jun 2010 19:03:39 GMT' does not match format '%a, %d %b %Y %H:%M:%S GMT' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/antoine/py3k/debug/Lib/test/test_urllibnet.py", line 193, in test_data_header self.fail('Date value not in %r format', dateformat) TypeError: fail() takes at most 2 arguments (3 given) ---------- assignee: orsenthil components: Library (Lib), Tests messages: 107470 nosy: belopolsky, orsenthil, pitrou priority: normal severity: normal stage: needs patch status: open title: test_urllibnet failure type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 21:30:02 2010 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 10 Jun 2010 19:30:02 +0000 Subject: [issue8924] Error in error message in logging In-Reply-To: <1275850912.41.0.0811394159532.issue8924@psf.upfronthosting.co.za> Message-ID: <1276198202.43.0.125475109141.issue8924@psf.upfronthosting.co.za> Vinay Sajip added the comment: It seems like the logging message will be Unicode (as you have specified that it should be so) but the exception message will be string. Can you confirm whether this is the case? What type is the return value of Formatter.formatException for the specific exception you're getting, in your exact environment? If it's not Unicode, can you see what happens if you use a subclassed Formatter whose formatException decodes the returned value from the base class formatException with the appropriate encoding, and return Unicode from your overridden formatException message? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 21:39:58 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 10 Jun 2010 19:39:58 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276198798.69.0.838648499931.issue8963@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: How do I enable `network' resource? I am getting $ ./python.exe -m test.regrtest test_urllibnet test_urllibnet test_urllibnet skipped -- Use of the `network' resource not enabled 1 test skipped: test_urllibnet Those skips are all expected on darwin. Same on Linux ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 21:45:46 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Jun 2010 19:45:46 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276198798.69.0.838648499931.issue8963@psf.upfronthosting.co.za> Message-ID: <1276199141.3139.2.camel@localhost.localdomain> Antoine Pitrou added the comment: > How do I enable `network' resource? Use the "-unetwork" flag to regrtest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 21:48:03 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 10 Jun 2010 19:48:03 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276199283.95.0.0209037245511.issue8963@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: $ ./python.exe -m test.regrtest -unetwork test_urllibnet test_urllibnet 1 test OK. Also the arguments to strptime from reported error message work fine: >>> import time >>> time.strptime('Thu, 10 Jun 2010 19:03:39 GMT', '%a, %d %b %Y %H:%M:%S GMT') time.struct_time(tm_year=2010, tm_mon=6, tm_mday=10, tm_hour=19, tm_min=3, tm_sec=39, tm_wday=3, tm_yday=161, tm_isdst=-1) >>> from datetime import * >>> datetime.strptime('Thu, 10 Jun 2010 19:03:39 GMT', '%a, %d %b %Y %H:%M:%S GMT') datetime.datetime(2010, 6, 10, 19, 3, 39) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 21:48:54 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 10 Jun 2010 19:48:54 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276199334.98.0.0344997699436.issue8963@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: What is your locale? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 21:51:28 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Jun 2010 19:51:28 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276199334.98.0.0344997699436.issue8963@psf.upfronthosting.co.za> Message-ID: <1276199484.3139.3.camel@localhost.localdomain> Antoine Pitrou added the comment: > What is your locale? $ locale LANG=fr_FR.utf8 LC_CTYPE="fr_FR.utf8" LC_NUMERIC="fr_FR.utf8" LC_TIME="fr_FR.utf8" LC_COLLATE="fr_FR.utf8" LC_MONETARY="fr_FR.utf8" LC_MESSAGES="fr_FR.utf8" LC_PAPER="fr_FR.utf8" LC_NAME="fr_FR.utf8" LC_ADDRESS="fr_FR.utf8" LC_TELEPHONE="fr_FR.utf8" LC_MEASUREMENT="fr_FR.utf8" LC_IDENTIFICATION="fr_FR.utf8" LC_ALL= ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 22:02:09 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Jun 2010 20:02:09 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276200129.98.0.272835458624.issue8963@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Strangely, it also works here from the prompt: >>> import time >>> time.strptime('Thu, 10 Jun 2010 19:03:39 GMT', '%a, %d %b %Y %H:%M:%S GMT') time.struct_time(tm_year=2010, tm_mon=6, tm_mday=10, tm_hour=19, tm_min=3, tm_sec=39, tm_wday=3, tm_yday=161, tm_isdst=-1) >>> import locale >>> locale.getlocale(locale.LC_TIME) (None, None) Apparently, something sets the locale before running the test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 22:02:24 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 10 Jun 2010 20:02:24 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276200144.91.0.125399459828.issue8963@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I still cannot reproduce the failure, but please, try the attached patch. ---------- keywords: +patch Added file: http://bugs.python.org/file17608/issue8963.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 22:06:14 2010 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Thu, 10 Jun 2010 20:06:14 +0000 Subject: [issue8958] 2.7rc1 tarfile.py: `bltn_open(targetpath, "wb")` -> IOError: Is a directory In-Reply-To: <1276118455.66.0.211402542637.issue8958@psf.upfronthosting.co.za> Message-ID: <1276200374.61.0.736003480634.issue8958@psf.upfronthosting.co.za> Lars Gust?bel added the comment: Unfortunately I do not have access to an OS X machine. Is this problem specific to 2.7rc1 or are other versions affected as well? I thought the OS X filesystem was case sensitive ... ---------- nosy: +lars.gustaebel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 22:06:32 2010 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Thu, 10 Jun 2010 20:06:32 +0000 Subject: [issue8958] 2.7rc1 tarfile.py: `bltn_open(targetpath, "wb")` -> IOError: Is a directory In-Reply-To: <1276118455.66.0.211402542637.issue8958@psf.upfronthosting.co.za> Message-ID: <1276200392.42.0.670982774168.issue8958@psf.upfronthosting.co.za> Changes by Lars Gust?bel : ---------- assignee: -> lars.gustaebel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 22:13:53 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Jun 2010 20:13:53 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276200833.94.0.372591710664.issue8963@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The culprit seems to be test_bad_address. If I disable this test, or replace the bad URL by a good one, everything works fine. It seems that failing to resolve the domain name changes the current locale... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 22:20:21 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Jun 2010 20:20:21 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276201221.36.0.622994994986.issue8963@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch is not sufficient, since other failures can then occur if test_strptime gets run after test_urllibnet: ====================================================================== ERROR: test_twelve_noon_midnight (test.test_strptime.Strptime12AMPMTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/debug/Lib/test/test_strptime.py", line 389, in test_twelve_noon_midnight eq(time.strptime('12 PM', '%I %p')[3], 12) File "/home/antoine/py3k/debug/Lib/_strptime.py", line 461, in _strptime_time return _strptime(data_string, format)[0] File "/home/antoine/py3k/debug/Lib/_strptime.py", line 335, in _strptime data_string[found.end():]) ValueError: unconverted data remains: PM ====================================================================== FAIL: test_pattern (test.test_strptime.TimeRETests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/debug/Lib/test/test_strptime.py", line 124, in test_pattern pattern_string) AssertionError: did not find abbreviated weekday in pattern string '(?Plun\.|mar\.|mer\.|jeu\.|ven\.|sam\.|dim\.)\s+(?Pmercredi|vendredi|dimanche|samedi|lundi|mardi|jeudi)\s+(?P3[0-1]|[1-2]\d|0[1-9]|[1-9]| [1-9])' ====================================================================== FAIL: test_hour (test.test_strptime.StrptimeTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/debug/Lib/test/test_strptime.py", line 266, in test_hour (strf_output, strp_output[3], self.time_tuple[3])) AssertionError: testing of '%I %p' directive failed; '08 ' -> 8 != 20 ---------------------------------------------------------------------- ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 22:22:28 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 10 Jun 2010 20:22:28 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276201348.99.0.921364377528.issue8963@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: BTW, looking at test_bad_address(), I wonder why it puts extra dots in the url? The comment above it suggests that the intent is to use a name within RFC 2606 .invalid TLD. Not likely to be a problem in your case, but using made up TLD is not a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 22:25:16 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 10 Jun 2010 20:25:16 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276201516.24.0.834234994767.issue8963@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > The patch is not sufficient, since other > failures can then occur if test_strptime gets > run after test_urllibnet This looks like a bug in support.run_with_locale decorator. It is described as #======================================================================= # Decorator for running a function in a different locale, correctly resetting # it afterwards. but apparently does not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 22:27:50 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Jun 2010 20:27:50 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276201670.09.0.903361171134.issue8963@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, so what it boils down to is the following behaviour: >>> import locale, socket >>> sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) >>> locale.getlocale(locale.LC_TIME) (None, None) >>> sock.connect(("invalidhost", 80)) Traceback (most recent call last): File "", line 1, in socket.gaierror: [Errno -2] Nom ou service inconnu >>> locale.getlocale(locale.LC_TIME) ('fr_FR', 'UTF8') ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 22:28:13 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Jun 2010 20:28:13 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276201693.84.0.890540132529.issue8963@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- versions: +Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 22:44:12 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Jun 2010 20:44:12 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276202652.21.0.90181455378.issue8963@psf.upfronthosting.co.za> Antoine Pitrou added the comment: In setipaddr() in socketmodule.c, the following line appears to change the current locale when DNS lookup fails: error = getaddrinfo(name, NULL, &hints, &res); This is checked by making a call to setlocale(LC_TIME, NULL) before and after the aforementioned line. This is with the following libc: $ rpm -qv glibc glibc-2.11.1-8mnb2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 23:10:36 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 10 Jun 2010 21:10:36 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276204236.25.0.83983441506.issue8963@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This looks like a glibc bug to me. I suspect an unauthorized redhat change; I hope Ulrich Drepper would have never accepted a glibc that causes getaddrinfo to implicitly call setlocale - see http://sources.redhat.com/ml/libc-alpha/2004-03/msg00161.html You might experiment with disabling IDN support in getaddrinfo. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 23:11:35 2010 From: report at bugs.python.org (Frederic Torres) Date: Thu, 10 Jun 2010 21:11:35 +0000 Subject: [issue8964] Method _sys_version() module Lib\platform.py does parse correctly IronPython 2.x version In-Reply-To: <1276204295.1.0.731236969654.issue8964@psf.upfronthosting.co.za> Message-ID: <1276204295.1.0.731236969654.issue8964@psf.upfronthosting.co.za> New submission from Frederic Torres : Method _sys_version() module Lib\platform.py does parse correctly IronPython 2.x version The format of sys.version now start with a version number and ( 2.6.1 (IronPython 2.6.1 (2.6.10920.0) on .NET 4.0.30319.1) File: Lib\platform.py Function: def _sys_version(sys_version=None): Line: 1326 ---------- components: Library (Lib) messages: 107487 nosy: fredericaltorres, lemburg priority: normal severity: normal status: open title: Method _sys_version() module Lib\platform.py does parse correctly IronPython 2.x version type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 23:14:11 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jun 2010 21:14:11 +0000 Subject: [issue8784] tarfile/Windows: Don't use mbcs as the default encoding In-Reply-To: <1274491335.43.0.732437213128.issue8784@psf.upfronthosting.co.za> Message-ID: <1276204451.08.0.740302215732.issue8784@psf.upfronthosting.co.za> STINNER Victor added the comment: > 2. Create backups for personal use. What? Really? I'm sure that all Windows users will use ZIP or maybe RAR, but never the geek choice. > 1. Download tar archives from a webpage (when no zip is supplied) for viewing or extracting. Tarballs come from UNIX/BSD world which use UTF-8 by default since some years ago. > 3. Create source archives from a project for unix users who hate zipfiles. In this case, UTF-8 is also better. -- Did I mentionned that 7-zip is only able to create TAR archive? I mean uncompressed archive. Who will use that? (not me ;-)) WinRAR is unable to create tarballs, even (uncompressed) .tar archive. -- If the maintainer of the tarfile module agrees that UTF-8 is the best choice, I will commit my initial patch. I would prefer to commit tarfile_windows_utf8.patch because it changes 4 lines, whereas tarfile_mbcs_errors.patch changes... much more code :-) tarfile_windows_utf8.patch is not complete: the documentation should also be updated: .. data:: ENCODING The default character encoding i.e. the value from either :func:`sys.getfilesystemencoding` or :func:`sys.getdefaultencoding`. => .. data:: ENCODING The default character encoding: ``'utf-8'`` on Windows, :func:`sys.getfilesystemencoding` otherwise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 23:15:26 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 10 Jun 2010 21:15:26 +0000 Subject: [issue8964] Method _sys_version() module Lib\platform.py does parse correctly IronPython 2.x version In-Reply-To: <1276204295.1.0.731236969654.issue8964@psf.upfronthosting.co.za> Message-ID: <4C1155EA.809@egenix.com> Marc-Andre Lemburg added the comment: Frederic Torres wrote: > > New submission from Frederic Torres : > > Method _sys_version() module Lib\platform.py does parse correctly IronPython 2.x version > > The format of sys.version now start with a version number and ( > 2.6.1 (IronPython 2.6.1 (2.6.10920.0) on .NET 4.0.30319.1) > > File: Lib\platform.py > Function: def _sys_version(sys_version=None): > Line: 1326 I assume you meant: doesn't correctly parse the version number. Could you provide a complete example formatted as Python string, e.g. print repr(sys.version) ?! Thanks, -- Marc-Andre Lemburg eGenix.com ________________________________________________________________________ 2010-07-19: EuroPython 2010, Birmingham, UK 38 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/ ---------- title: Method _sys_version() module Lib\platform.py does parse correctly IronPython 2.x version -> Method _sys_version() module Lib\platform.py does parse correctly IronPython 2.x version _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 23:17:28 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Jun 2010 21:17:28 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276204648.96.0.43670779817.issue8963@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've reported the bug upstream at Mandriva: https://qa.mandriva.com/show_bug.cgi?id=59736 It would be nice to know whether other distributions with a Redhat lineage are affected. Can someone with such a distribution the code in msg107484? In the end, I'm not sure it's Python's task to workaround such bug. However, the bug in error reporting should be fixed. ---------- assignee: orsenthil -> nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 23:20:39 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jun 2010 21:20:39 +0000 Subject: [issue8784] tarfile/Windows: Don't use mbcs as the default encoding In-Reply-To: <1274491335.43.0.732437213128.issue8784@psf.upfronthosting.co.za> Message-ID: <1276204839.39.0.615183262485.issue8784@psf.upfronthosting.co.za> STINNER Victor added the comment: Updated version of the utf-8 patch: - Use also UTF-8 for Windows CE - Update the documentation - Prepare the NEWS entry ---------- Added file: http://bugs.python.org/file17609/tarfile_windows_utf8-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 23:24:06 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Jun 2010 21:24:06 +0000 Subject: [issue8784] tarfile/Windows: Don't use mbcs as the default encoding In-Reply-To: <1274491335.43.0.732437213128.issue8784@psf.upfronthosting.co.za> Message-ID: <1276205046.82.0.76311087361.issue8784@psf.upfronthosting.co.za> Antoine Pitrou added the comment: FWIW, I agree with Lars: the main use of tar files under Windows is when they come from other systems. Windows users almost never generate tar files by themselves; they will generate zip, rar or 7z files instead. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 23:29:28 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Thu, 10 Jun 2010 21:29:28 +0000 Subject: [issue8958] 2.7rc1 tarfile.py: `bltn_open(targetpath, "wb")` -> IOError: Is a directory In-Reply-To: <1276200374.61.0.736003480634.issue8958@psf.upfronthosting.co.za> Message-ID: <5F483897-20C8-4065-A15A-061CD6A43F08@activestate.com> Sridhar Ratnakumar added the comment: On 2010-06-10, at 1:06 PM, Lars Gust?bel wrote: > Is this problem specific to 2.7rc1 Yes. > or are other versions affected as well? Nope, at least ... I know that 2.6 doesn't have this problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 23:31:15 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jun 2010 21:31:15 +0000 Subject: [issue8958] 2.7rc1 tarfile.py: `bltn_open(targetpath, "wb")` -> IOError: Is a directory In-Reply-To: <1276118455.66.0.211402542637.issue8958@psf.upfronthosting.co.za> Message-ID: <1276205475.19.0.712759095775.issue8958@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 23:37:39 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 10 Jun 2010 21:37:39 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276205859.6.0.103092649585.issue8963@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It looks like your libc calls setlocale(LC_ALL, "") on error. This may or may not be right and not python's problem in any case. What is worth to investigate, however is why @run_with_locale decorator fails to restore the locale after it was modified by libc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Jun 10 23:51:51 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Thu, 10 Jun 2010 21:51:51 +0000 Subject: [issue8961] compile Python-2.7rc1 on AIX 5.3 with xlc_r In-Reply-To: <1276178256.7.0.316939316511.issue8961@psf.upfronthosting.co.za> Message-ID: <1276206711.48.0.338712493081.issue8961@psf.upfronthosting.co.za> Sridhar Ratnakumar added the comment: FYI, I cannot reproduce this on AIX 5.1: bash-2.04$ i/bin/python ActivePython 2.7.0c1.0 (ActiveState Software Inc.) based on Python 2.7rc1 (r27rc1:81772, Jun 5 2010, 23:20:01) [C] on aix5 Type "help", "copyright", "credits" or "license" for more information. >>> import sysconfig >>> sysconfig.get_config_var("CONFIG_ARGS") "'--prefix=/home/apy/tmp/issue8961/ActivePython-2.7.0c1.0-aix-powerpc64/i' '--without-cxx' '--disable-ipv6' 'CC=xlc_r'" >>> ^D bash-2.04$ i/bin/python -m platform AIX-1-000C763E4C00-powerpc-64bit ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 00:15:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 10 Jun 2010 22:15:23 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276208123.35.0.0941936508735.issue8963@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Antoine, Would s/LC_TIME/LC_ALL/ in my patch fix your problem? I could not find an affected system, but I simulated the problem by adding locale.setlocale(locale.LC_ALL, "") call in the test. I think the patch is worth applying. It fixes the typo in the except clause and makes the test independent of the locale settings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 00:24:49 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 10 Jun 2010 22:24:49 +0000 Subject: [issue8963] test_urllibnet failure In-Reply-To: <1276196839.19.0.231590602267.issue8963@psf.upfronthosting.co.za> Message-ID: <1276208689.25.0.2988011918.issue8963@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Would s/LC_TIME/LC_ALL/ in my patch fix your problem? As I explained, this wouldn't fix the later failures in test_strptime. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 00:39:39 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 10 Jun 2010 22:39:39 +0000 Subject: [issue8965] test_imp fails on OSX when LANG is set In-Reply-To: <1276209579.85.0.692160054001.issue8965@psf.upfronthosting.co.za> Message-ID: <1276209579.85.0.692160054001.issue8965@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : $ LANG=C ./python.exe -m test.regrtest test_imp test_imp test test_imp failed -- Traceback (most recent call last): File "Lib/test/test_imp.py", line 109, in test_issue5604 self.assertEqual(fs_encoding, 'utf-8') AssertionError: 'ascii' != 'utf-8' - ascii+ utf-8 1 test failed: test_imp Same with LC_ALL=C. Passes on Linux. ---------- assignee: ronaldoussoren components: Macintosh messages: 107498 nosy: belopolsky, ronaldoussoren priority: normal severity: normal status: open title: test_imp fails on OSX when LANG is set type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 01:03:27 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jun 2010 23:03:27 +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: <1276211007.74.0.406425558952.issue8966@psf.upfronthosting.co.za> New submission from STINNER Victor : ctypes doesn't have strict separation between bytes and characters, whereas Python3 splitted str/unicode of Python2 into bytes/str which a strict separation. The result is that sometimes it works (no error), sometimes it fails (the first time that the user inserts a non-ASCII character). I wrote 3 patches: - ctypes_s_set.patch: fix s_set(), return an unicode string instead of a bytes string - ctypes_conversion.patch: remove ctypes.set_conversion_mode() and all code using it (remove the implicit conversions) - ctypes_tests.patch: fix all tests according the changes introduced by the two previous patches ctypes_s_set.patch is trivial and fixes a real bug. ctypes_conversion.patch does basically remove code. ctypes_tests.patch is the biggest part because the test suite is mostly based on the implicit conversion. Except the parts removing the calls to ctypes.set_conversion_mode() and the tests testing the implicit conversion, ctypes_tests.patch can be commited alone because it improves the test suite (use the right types). ---------- assignee: theller components: Unicode, ctypes files: ctypes_conversion.patch keywords: patch messages: 107499 nosy: haypo, theller priority: normal severity: normal status: open title: ctypes: remove implicit conversion between unicode and bytes versions: Python 3.2 Added file: http://bugs.python.org/file17610/ctypes_conversion.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 01:03:41 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jun 2010 23:03:41 +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: <1276211021.41.0.490606368919.issue8966@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file17611/ctypes_conversion.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 01:03:51 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jun 2010 23:03: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: <1276211031.89.0.277007762165.issue8966@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file17612/ctypes_s_set.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 01:03:59 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jun 2010 23:03:59 +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: <1276211039.89.0.810605598165.issue8966@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file17613/ctypes_tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 01:04:03 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jun 2010 23:04:03 +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: <1276211043.71.0.990157612987.issue8966@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file17610/ctypes_conversion.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 01:09:36 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 10 Jun 2010 23:09:36 +0000 Subject: [issue8965] test_imp fails on OSX when LANG is set In-Reply-To: <1276209579.85.0.692160054001.issue8965@psf.upfronthosting.co.za> Message-ID: <1276211376.07.0.508020930228.issue8965@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Is this check needed on darwin? Why not simply set fs_encoding = 'utf-8'? ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 01:16:42 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 10 Jun 2010 23:16:42 +0000 Subject: [issue1452] subprocess's popen.stdout.seek(0) doesn't raise an error In-Reply-To: <1195225008.73.0.984849336269.issue1452@psf.upfronthosting.co.za> Message-ID: <1276211802.14.0.286753447801.issue1452@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- type: -> feature request versions: +Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 01:27:40 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 10 Jun 2010 23:27:40 +0000 Subject: [issue8965] test_imp fails on OSX when LANG is set In-Reply-To: <1276209579.85.0.692160054001.issue8965@psf.upfronthosting.co.za> Message-ID: <1276212460.38.0.449959485871.issue8965@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I haven't looked at the actual test yet, but the filesystem encoding on OSX is UTF-8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 01:38:48 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 10 Jun 2010 23:38:48 +0000 Subject: [issue3453] PyType_Ready doesn't ensure that all bases are ready In-Reply-To: <1217171645.31.0.486361917431.issue3453@psf.upfronthosting.co.za> Message-ID: <1276213128.43.0.430857867359.issue3453@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: My knowledge may be out of date, but I thought multiple inheritance was only supported at the python level. If this is still the case, then no initialization check is needed. (You cannot get an uninitialized type at python level.) An extra defensive assert is usually not a bad thing in the code, but in this particular case one would need a loop with checks and it does not seem justified. -1 ---------- nosy: +belopolsky stage: -> needs patch type: -> feature request versions: +Python 3.2 -Python 2.4, Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 01:43:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 10 Jun 2010 23:43:20 +0000 Subject: [issue1516] make _ctypes work with non-gcc compilers In-Reply-To: <1196297579.57.0.775741892495.issue1516@psf.upfronthosting.co.za> Message-ID: <1276213400.32.0.0648956561704.issue1516@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 Fri Jun 11 01:53:05 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 10 Jun 2010 23:53:05 +0000 Subject: [issue8965] test_imp fails on OSX when LANG is set In-Reply-To: <1276209579.85.0.692160054001.issue8965@psf.upfronthosting.co.za> Message-ID: <1276213985.23.0.467416392837.issue8965@psf.upfronthosting.co.za> STINNER Victor added the comment: Oooh. That's my fault. I introduced this regression in issue #8610 (commit r81190). Can you try attached patch please? The file system encoding is hardcoded to 'utf-8' on Mac OS X (it should not depend on the locale). ---------- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file17614/initfsencoding_apple.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 02:01:24 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 11 Jun 2010 00:01:24 +0000 Subject: [issue4113] Add custom __repr__ to functools.partial In-Reply-To: <1223898315.71.0.950281538816.issue4113@psf.upfronthosting.co.za> Message-ID: <1276214484.3.0.91208270055.issue4113@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I understand that the latest RFE in this issue is to provide a custom __repr__ to functools.partial. Something along the lines of class partial(functools.partial): def __repr__(self): return "functools.partial(%r, %s)" % (self.func, ', '.join(repr(a) for a in self.args) >>> def f(x, y, z): ... pass >>> partial(f, 1, 2) functools.partial(, 1, 2) Looks like a reasonable proposal, but coding this in C is a chore. (The prototype above does not process keywords, so complete implementation is more involved.) ---------- keywords: +easy -patch nosy: +belopolsky stage: -> needs patch title: functools.partial(), no __name__; wrong __doc__ -> Add custom __repr__ to functools.partial _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 02:01:30 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 11 Jun 2010 00:01:30 +0000 Subject: [issue4113] Add custom __repr__ to functools.partial In-Reply-To: <1223898315.71.0.950281538816.issue4113@psf.upfronthosting.co.za> Message-ID: <1276214490.36.0.782498549145.issue4113@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 02:09:15 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jun 2010 00:09:15 +0000 Subject: [issue8967] Create PyErr_GetWindowsMessage() function In-Reply-To: <1276214955.6.0.858876193041.issue8967@psf.upfronthosting.co.za> Message-ID: <1276214955.6.0.858876193041.issue8967@psf.upfronthosting.co.za> New submission from STINNER Victor : PyErr_SetExcFromWindowsErrWithFilenameObject() and PyErr_SetFromErrnoWithFilenameObject() have the same code to read the localized error message. The code can be factorized in a new function PyErr_GetWindowsMessage(). About the patch: - free s_buf just after the call to PyUnicode_FromUnicode(), don't wait until the end of the function - free s_buf if s_buf is not NULL and len==0. I suppose that this case is impossible, if len==0, s_buf is set to NULL or leaved unchanged (so it's also equal to NULL) I wrote the function to raise an UnicodeDecodeError with a Windows error message. ---------- components: Interpreter Core, Unicode, Windows files: pyerr_getwindowsmessage.patch keywords: patch messages: 107505 nosy: haypo priority: normal severity: normal status: open title: Create PyErr_GetWindowsMessage() function versions: Python 3.2 Added file: http://bugs.python.org/file17615/pyerr_getwindowsmessage.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 02:11:03 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 11 Jun 2010 00:11:03 +0000 Subject: [issue8965] test_imp fails on OSX when LANG is set In-Reply-To: <1276209579.85.0.692160054001.issue8965@psf.upfronthosting.co.za> Message-ID: <1276215063.75.0.328784696326.issue8965@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Victor, Your patch works for me and makes sense even though I don't really know where Py_FileSystemDefaultEncoding is set on Darwin. :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 02:16:26 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 11 Jun 2010 00:16:26 +0000 Subject: [issue8965] test_imp fails on OSX when LANG is set In-Reply-To: <1276209579.85.0.692160054001.issue8965@psf.upfronthosting.co.za> Message-ID: <1276215386.41.0.164324469891.issue8965@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: On the second thought, test_imp is not the right place to test this. Can you add a sys module test for this issue? ---------- stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 02:17:13 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 11 Jun 2010 00:17:13 +0000 Subject: [issue5753] CVE-2008-5983 python: untrusted python modules search path In-Reply-To: <1239709179.65.0.173847743531.issue5753@psf.upfronthosting.co.za> Message-ID: <1276215433.76.0.151174835837.issue5753@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Demo/embed/demo.c calls PySys_SetArgv(), which may be where some people are copying their code from. I've updated it to use PySys_SetArgvEx() and added an explanatory comment in rev. 81881. ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 02:27:43 2010 From: report at bugs.python.org (Ilya Sandler) Date: Fri, 11 Jun 2010 00:27:43 +0000 Subject: [issue8968] token type constants are not documented In-Reply-To: <1276216063.7.0.11813766705.issue8968@psf.upfronthosting.co.za> Message-ID: <1276216063.7.0.11813766705.issue8968@psf.upfronthosting.co.za> New submission from Ilya Sandler : the token module defines constants for token types e.g NAME = 1 NUMBER = 2 STRING = 3 NEWLINE = 4 etc. These constants are very useful for any code which needs to tokenize python source, yet they are not listed in the documentation. Is this a documentation bug? ---------- assignee: docs at python components: Documentation messages: 107509 nosy: docs at python, isandler priority: normal severity: normal status: open title: token type constants are not documented versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 02:30:22 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 11 Jun 2010 00:30:22 +0000 Subject: [issue1402289] Allow mappings as globals (was: Fix dictionary subclass ...) Message-ID: <1276216222.79.0.741164769612.issue1402289@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- stage: -> patch review type: -> feature request versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 02:33:08 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jun 2010 00:33:08 +0000 Subject: [issue8969] Windows: use (mbcs in) strict mode to encode/decode filenames, and enable os.fsencode() In-Reply-To: <1276216388.28.0.366593840574.issue8969@psf.upfronthosting.co.za> Message-ID: <1276216388.28.0.366593840574.issue8969@psf.upfronthosting.co.za> New submission from STINNER Victor : mbcs encoding doesn't support surrogateescape (see #850997), and mbcs should only be used in strict mode to encode/decode filenames. os.fsencode() should also be enabled on Windows. First I tried to disable this function on Windows to avoid the evil mbcs encoding, but mbcs encoding *is* used by some modules written in C (functions using PyUnicode_FSConverter(): encode the filename to bytes with mbcs encoding on Windows). Eg. _ssl module use PyUnicode_FSConverter() to get filenames because the underlying library, OpenSSL, requires bytes for the filenames (C type: char*). Enable os.fsencode() on Windows helps some tests (eg. fix test_ssl). Use "strict" error handler, instead of "surrogateescape", to encode/decode filenames with mbcs encoding, does nothing yet because mbcs codec ignore the errors argument. These changes prepare the work on mbcs codec: see #850997. Note: os.fsencode() was introduced by #8514. ---------- components: Interpreter Core, Library (Lib), Unicode, Windows files: fsencode_mbcs.patch keywords: patch messages: 107510 nosy: haypo priority: normal severity: normal status: open title: Windows: use (mbcs in) strict mode to encode/decode filenames, and enable os.fsencode() versions: Python 3.2 Added file: http://bugs.python.org/file17616/fsencode_mbcs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 02:33:51 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jun 2010 00:33:51 +0000 Subject: [issue8969] Windows: use (mbcs in) strict mode to encode/decode filenames, and enable os.fsencode() In-Reply-To: <1276216388.28.0.366593840574.issue8969@psf.upfronthosting.co.za> Message-ID: <1276216431.87.0.928697475347.issue8969@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +lemburg, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 02:43:45 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jun 2010 00:43:45 +0000 Subject: [issue8965] test_imp fails on OSX when LANG is set In-Reply-To: <1276209579.85.0.692160054001.issue8965@psf.upfronthosting.co.za> Message-ID: <1276217025.66.0.838420967524.issue8965@psf.upfronthosting.co.za> STINNER Victor added the comment: Patch commited as r81883 (blocked in 3.1: r81884). > Can you add a sys module test for this issue? Ok, I added a test to test_sys: r81885 (blocked in 3.1: r81886). > I don't really know where Py_FileSystemDefaultEncoding > is set on Darwin. :-) In Python/bltinmodule.c. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 02:47:36 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jun 2010 00:47:36 +0000 Subject: [issue8965] test_imp fails on OSX when LANG is set In-Reply-To: <1276209579.85.0.692160054001.issue8965@psf.upfronthosting.co.za> Message-ID: <1276217256.28.0.174701719484.issue8965@psf.upfronthosting.co.za> STINNER Victor added the comment: Hum. To avoid regression, we should maybe have a test with the C locale. @belopolsky: Can you try test_sys.patch on Mac OS X? ---------- Added file: http://bugs.python.org/file17617/test_sys.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 02:54:18 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jun 2010 00:54:18 +0000 Subject: [issue850997] mbcs encoding ignores errors Message-ID: <1276217658.82.0.222857589843.issue850997@psf.upfronthosting.co.za> STINNER Victor added the comment: I worked again on the patch. I opened new issues to prepare the new mbcs codec: - #8966: ctypes: remove implicit conversion between unicode and bytes - #8967: Create PyErr_GetWindowsMessage() function - #8969: Windows: use (mbcs in) strict mode to encode/decode filenames, and enable os.fsencode() #8967 can be used to get the translated message of a mbcs encode error. PyErr_GetWindowsMessage() returns a PyUnicodeObject, whereas make_translate_exception() and PyUnicodeTranslateError_SetReason() expect a "char*". Another patch is requied: translate_reason_unicode.patch (attached to this issue, not tested). But I don't think that the message is very important for now :-) #8784 (tarfile/Windows: Don't use mbcs as the default encoding) is still open. ---------- Added file: http://bugs.python.org/file17618/translate_reason_unicode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 03:03:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 11 Jun 2010 01:03:18 +0000 Subject: [issue8965] test_imp fails on OSX when LANG is set In-Reply-To: <1276209579.85.0.692160054001.issue8965@psf.upfronthosting.co.za> Message-ID: <1276218198.84.0.613763592486.issue8965@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Nope. $ ./python.exe -m test.regrtest test_sys test test_sys failed -- Traceback (most recent call last): File "Lib/test/test_sys.py", line 877, in test_getfilesystemencoding self.assertEqual(fs_encoding, 'utf-8') AssertionError: b'utf-8\n' != 'utf-8' Should be easy to fix, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 03:08:03 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 11 Jun 2010 01:08:03 +0000 Subject: [issue8965] test_imp fails on OSX when LANG is set In-Reply-To: <1276209579.85.0.692160054001.issue8965@psf.upfronthosting.co.za> Message-ID: <1276218483.23.0.616879179663.issue8965@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17619/issue8965-test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 03:08:27 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 11 Jun 2010 01:08:27 +0000 Subject: [issue5753] CVE-2008-5983 python: untrusted python modules search path In-Reply-To: <1239709179.65.0.173847743531.issue5753@psf.upfronthosting.co.za> Message-ID: <1276218507.73.0.825822189654.issue5753@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Since the function was also added to 2.6, the 2.6 What's New should mention it; added in rev81887. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 03:13:45 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 11 Jun 2010 01:13:45 +0000 Subject: [issue8965] test_imp fails on OSX when LANG is set In-Reply-To: <1276209579.85.0.692160054001.issue8965@psf.upfronthosting.co.za> Message-ID: <1276218825.02.0.0736501792149.issue8965@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17620/issue8965-test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 03:13:55 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 11 Jun 2010 01:13:55 +0000 Subject: [issue8965] test_imp fails on OSX when LANG is set In-Reply-To: <1276209579.85.0.692160054001.issue8965@psf.upfronthosting.co.za> Message-ID: <1276218835.89.0.146450924629.issue8965@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17619/issue8965-test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 03:18:19 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 11 Jun 2010 01:18:19 +0000 Subject: [issue8965] test_imp fails on OSX when LANG is set In-Reply-To: <1276209579.85.0.692160054001.issue8965@psf.upfronthosting.co.za> Message-ID: <1276219099.96.0.990386590454.issue8965@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Sorry for extra traffic. I thought my patch introduced an indentation error, but it looks like you truly don't check sys.getfilesystemencoding() output if not on darwin. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 03:22:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 11 Jun 2010 01:22:56 +0000 Subject: [issue8965] test_imp fails on OSX when LANG is set In-Reply-To: <1276209579.85.0.692160054001.issue8965@psf.upfronthosting.co.za> Message-ID: <1276219376.32.0.901712112002.issue8965@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Added file: http://bugs.python.org/file17621/issue8965-test-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 03:28:53 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 11 Jun 2010 01:28:53 +0000 Subject: [issue850997] mbcs encoding ignores errors Message-ID: <1276219733.04.0.968271940863.issue850997@psf.upfronthosting.co.za> STINNER Victor added the comment: New version of the patch: - decode_mbcs() calls raise_translate_exception() to set the error (in the previous patch, I'm not sure that the error was set) - include #8784 patch (tarfile uses utf-8 as the default encoding) - ctypes: use mbcs is strict mode instead of ignore mode. This is just a workaround, the real fix is to remove the implicit conversion between bytes and characters: see #8966 The patch requires #8969 patch (use mbcs in strict mode to encode/decode filenames). ---------- Added file: http://bugs.python.org/file17622/mbcs_errors-py3k-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 03:45:46 2010 From: report at bugs.python.org (Mark Nottingham) Date: Fri, 11 Jun 2010 01:45:46 +0000 Subject: [issue8885] markerbase declaration errors aren't recoverable In-Reply-To: <1275563651.6.0.351540013915.issue8885@psf.upfronthosting.co.za> Message-ID: <1276220746.31.0.662114041909.issue8885@psf.upfronthosting.co.za> Mark Nottingham added the comment: I'm using it from HTMLParser; try to parse a document with the DTD given when error is something like: def error(self, msg): self.errors += 1 and it will loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 03:49:00 2010 From: report at bugs.python.org (Mark Nottingham) Date: Fri, 11 Jun 2010 01:49:00 +0000 Subject: [issue8885] markerbase declaration errors aren't recoverable In-Reply-To: <1275563651.6.0.351540013915.issue8885@psf.upfronthosting.co.za> Message-ID: <1276220940.01.0.0690465961305.issue8885@psf.upfronthosting.co.za> Mark Nottingham added the comment: Attaching test case. ---------- Added file: http://bugs.python.org/file17623/testcase_8885.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 04:21:48 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 11 Jun 2010 02:21:48 +0000 Subject: [issue8870] --user-access-control=force produces invalid installer on Vista In-Reply-To: <1275417481.6.0.247175279763.issue8870@psf.upfronthosting.co.za> Message-ID: <1276222908.97.0.635513914565.issue8870@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- superseder: -> friendly errors for UAC misbehavior in windows installers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 04:37:56 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 11 Jun 2010 02:37:56 +0000 Subject: [issue8903] Add module level now() and today() functions to datetime module In-Reply-To: <1275720507.31.0.185559003971.issue8903@psf.upfronthosting.co.za> Message-ID: <1276223876.5.0.119131670429.issue8903@psf.upfronthosting.co.za> R. David Murray added the comment: I actually agree with Anatoly here. I find it much more intuitive to do import datetime timestamp = datetime.now() than to do timestamp = datetime.datetime.now() I always have to remember that 'now' is a class method, often after getting a "datetime module has no attribute 'now'" message. In most standard library modules a function like that would be, well, a function. I can't imagine code where I'd find it more convenient to get 'now' from the class, and if I saw code like timestamp = othertimestamp.now() I'd run screaming. Personally I think the class methods would be better off deprecated in favor of module level functions. However, all that said, the datetime API is what it is, and I'm not sure it is worth going through a deprecation cycle for this. (Though othertimestamp.now() really does give me the heebie jeebies.) ---------- nosy: +r.david.murray status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 04:44:13 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 11 Jun 2010 02:44:13 +0000 Subject: [issue3129] struct allows repeat spec. without a format specifier In-Reply-To: <1213694469.69.0.0950890622628.issue3129@psf.upfronthosting.co.za> Message-ID: <1276224253.01.0.019574896515.issue3129@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Looks reasonable to me as well. Code patch applies cleanly, but tests don't. I'll get it ready for commit. ---------- assignee: -> belopolsky nosy: +belopolsky resolution: -> accepted versions: -Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 05:06:27 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 11 Jun 2010 03:06:27 +0000 Subject: [issue3129] struct allows repeat spec. without a format specifier In-Reply-To: <1213694469.69.0.0950890622628.issue3129@psf.upfronthosting.co.za> Message-ID: <1276225587.59.0.659271794993.issue3129@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching an updated patch, but it fails one of the old tests. Need to investigate this some more. ---------- resolution: accepted -> Added file: http://bugs.python.org/file17624/issue3129.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 05:21:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 11 Jun 2010 03:21:59 +0000 Subject: [issue3129] struct allows repeat spec. without a format specifier In-Reply-To: <1213694469.69.0.0950890622628.issue3129@psf.upfronthosting.co.za> Message-ID: <1276226519.35.0.446708615504.issue3129@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Attached patch works and passes the tests. The failing test was clearly wrong. I am still not sure that it is right to raise TypeError rather than struct.error on invalid offset in pack_into, but this is a separate issue. ---------- Added file: http://bugs.python.org/file17625/issue3129.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 05:22:06 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 11 Jun 2010 03:22:06 +0000 Subject: [issue3129] struct allows repeat spec. without a format specifier In-Reply-To: <1213694469.69.0.0950890622628.issue3129@psf.upfronthosting.co.za> Message-ID: <1276226526.36.0.00416789585157.issue3129@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file17624/issue3129.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 06:01:01 2010 From: report at bugs.python.org (Michael Curran) Date: Fri, 11 Jun 2010 04:01:01 +0000 Subject: [issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7 In-Reply-To: <1276153559.93.0.766128008061.issue8959@psf.upfronthosting.co.za> Message-ID: <1276228861.24.0.997420058265.issue8959@psf.upfronthosting.co.za> Michael Curran added the comment: Issue does not occure using Python 3.1.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 06:02:57 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 11 Jun 2010 04:02:57 +0000 Subject: [issue8903] Add module level now() and today() functions to datetime module In-Reply-To: <1276223876.5.0.119131670429.issue8903@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Thu, Jun 10, 2010 at 10:37 PM, R. David Murray wrote: > > R. David Murray added the comment: > > I actually agree with Anatoly here. ?I find it much more intuitive to do > > ?import datetime > > ? timestamp = datetime.now() > > than to do > > ? timestamp = datetime.datetime.now() > Given the unfortunate name clash between the class and the module, I never do "import datetime" and instead doe "from datetime import datetime, date". I find it very convenient that importing datetime class brings in all related functions and I don't need to import factory functions separately. Also, ISTM that the datetime module was designed to allow easy extension by subclassing. The factory methods are written so that they work for subclasses: ... pass >>> Date.today() Date(2010, 6, 10) Writing a separate module level today() for the subclass would be quite awkward. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 06:23:25 2010 From: report at bugs.python.org (=?utf-8?b?VGFtw6FzIEd1bMOhY3Np?=) Date: Fri, 11 Jun 2010 04:23:25 +0000 Subject: [issue8961] compile Python-2.7rc1 on AIX 5.3 with xlc_r In-Reply-To: <1276178256.7.0.316939316511.issue8961@psf.upfronthosting.co.za> Message-ID: <1276230205.44.0.65219434614.issue8961@psf.upfronthosting.co.za> Tam?s Gul?csi added the comment: srid, You must be right, but the question is: How can I compile Python-2.7rc1 on AIX 5.3? I'd never said that this is a Python fault... I downloaded and extracted a fresh tarball, but the result is the same with the given ./configure call. So the problem is with the call: LDFLAGS='$FW/lib' just keeps '$' in it, it should be LDFLAGS="$FW/lib". Sorry for the false alarm, although the error message was quite far from the cause. Thanks for everybody, Tam?s Gul?csi make fails when trying to compile the modules with the freshly linked ./python - I've attached a list of sysconfig._CONFIG_VARS. Tam?s Gul?csi ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 06:23:40 2010 From: report at bugs.python.org (=?utf-8?b?VGFtw6FzIEd1bMOhY3Np?=) Date: Fri, 11 Jun 2010 04:23:40 +0000 Subject: [issue8961] compile Python-2.7rc1 on AIX 5.3 with xlc_r In-Reply-To: <1276178256.7.0.316939316511.issue8961@psf.upfronthosting.co.za> Message-ID: <1276230220.63.0.467610678009.issue8961@psf.upfronthosting.co.za> Changes by Tam?s Gul?csi : ---------- type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 06:59:47 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 11 Jun 2010 04:59:47 +0000 Subject: [issue8968] token type constants are not documented In-Reply-To: <1276216063.7.0.11813766705.issue8968@psf.upfronthosting.co.za> Message-ID: <1276232387.19.0.73185328496.issue8968@psf.upfronthosting.co.za> ?ric Araujo added the comment: It is. Constants should be documented in the regular doc, not only by introspection or reading the source. See the doc for tokenize: ?All constants from the token module are also exported from tokenize, as are two additional token type values?. Thanks for the report. Would you mind writing a patch? ---------- nosy: +merwok 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 Jun 11 07:48:44 2010 From: report at bugs.python.org (Michael Curran) Date: Fri, 11 Jun 2010 05:48:44 +0000 Subject: [issue8959] WINFUNCTYPE wrapped ctypes callbacks not functioning correctly in Python 2.7 In-Reply-To: <1276153559.93.0.766128008061.issue8959@psf.upfronthosting.co.za> Message-ID: <1276235324.16.0.0487815303822.issue8959@psf.upfronthosting.co.za> Michael Curran added the comment: The issue does not occure with Python 2.7 beta 1, but does occure in Python 2.7 beta 2. So, with this in mind, its probably more likely that it may have been caused by the following change: "- On Windows, ctypes does no longer check the stack before and after calling a foreign function. This allows to use the unmodified libffi library." I had previously thought it could have been the libffi upgrade, but this seems to have happened in Beta 1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 08:00:20 2010 From: report at bugs.python.org (Tal Einat) Date: Fri, 11 Jun 2010 06:00:20 +0000 Subject: [issue8820] IDLE not launching correctly In-Reply-To: <1274842084.45.0.257196773636.issue8820@psf.upfronthosting.co.za> Message-ID: <1276236020.52.0.0577239019318.issue8820@psf.upfronthosting.co.za> Tal Einat added the comment: Joseph, please mention which version of Python you are trying this with. If 2.6.4, please try with 2.6.5 to see if it still happens. ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 08:35:25 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 11 Jun 2010 06:35:25 +0000 Subject: [issue8903] Add module level now() and today() functions to datetime module In-Reply-To: <1275720507.31.0.185559003971.issue8903@psf.upfronthosting.co.za> Message-ID: <1276238125.4.0.382056752839.issue8903@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, I concur with the rejection. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 08:44:45 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 11 Jun 2010 06:44:45 +0000 Subject: [issue8903] Add module level now() and today() functions to datetime module In-Reply-To: <1275720507.31.0.185559003971.issue8903@psf.upfronthosting.co.za> Message-ID: <1276238685.31.0.348601078753.issue8903@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 09:21:37 2010 From: report at bugs.python.org (Rick Johnson) Date: Fri, 11 Jun 2010 07:21:37 +0000 Subject: [issue8970] Tkinter Litmus Test In-Reply-To: <1276240896.62.0.886214435094.issue8970@psf.upfronthosting.co.za> Message-ID: <1276240896.62.0.886214435094.issue8970@psf.upfronthosting.co.za> New submission from Rick Johnson : There has been much discussion in the past and recently on c.l.p about how many python programmers *actually* use Tkinter. Recently i have been involved in a lengthy discussion on c.l.p about whether or not we should remove Tkinter, replace Tkinter, or fix Tkinter. However i feel a decision this important cannot be made from pydev, c.l.p, or anywhere. I believe the only proper way to proceed is to get a *real* vote from *real* python programmers out in the trenches. But how do we do that you may ask? Well thats a good question. Not every Python programmer lives on c.l.p, or any *one* place. The only way to truly reach everyone is thru Python itself in form of a Warning message. So i propose that an import warning be added to the next possible releases of Python 3.x and Python 3.x. This warning will be triggered upon importing Tkinter and should also be shown when starting IDLE. The message should read loosely as follows... """ ------------------------------------------------- ModuleRemovalWarning: Tkinter (and dependencies) ------------------------------------------------- The Tkinter module (Python's GUI module) is currently being considered for removal from the python stdlib FOREVER. We are providing this warning so that you can give the python devlopment team (and the wider community) your input on the subject. If you feel that Tkinter should or should not be removed we strongly incurage you to voice your opinion. You can do by casting your vote at "www.savetkinter.com". Whether your a complete noobie or a seasoned Pythonista we need to hear everyone. Voting will end on MM-DD-YYYY, so make sure your vote is counted! """ ---------- components: IDLE, Tkinter messages: 107531 nosy: rantingrick priority: normal severity: normal status: open title: Tkinter Litmus Test type: feature request versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 09:27:43 2010 From: report at bugs.python.org (Rick Johnson) Date: Fri, 11 Jun 2010 07:27:43 +0000 Subject: [issue8971] Tkinter Litmus Test In-Reply-To: <1276241262.66.0.609835750644.issue8971@psf.upfronthosting.co.za> Message-ID: <1276241262.66.0.609835750644.issue8971@psf.upfronthosting.co.za> New submission from Rick Johnson : There has been much discussion in the past and recently on c.l.p about how many python programmers *actually* use Tkinter. Recently i have been involved in a lengthy discussion on c.l.p about whether or not we should remove Tkinter, replace Tkinter, or fix Tkinter. However i feel a decision this important cannot be made from pydev, c.l.p, or anywhere. I believe the only proper way to proceed is to get a *real* vote from *real* python programmers out in the trenches. But how do we do that you may ask? Well thats a good question. Not every Python programmer lives on c.l.p, or any *one* place. The only way to truly reach everyone is through Python itself in form of a Warning message. So i propose that an import warning be added to the next possible releases of Python 2.x and Python 3.x. This warning will be triggered upon importing Tkinter and should also be shown when starting IDLE. The message should read loosely as follows... """ ------------------------------------------------- ModuleRemovalWarning: Tkinter (and dependencies) ------------------------------------------------- The Tkinter module (Python's GUI module) is currently being considered for removal from the python stdlib FOREVER. We are providing this warning so that you can give the python development team (and the wider community) your feedback on the subject. If you feel that Tkinter should or should not be removed we strongly encourage you to voice your opinion. You can do by casting your vote at "www.savetkinter.com". We need to hear everyone whether your a complete newbie or a seasoned Pythonista. Voting will end on MM-DD-YYYY so make sure your vote is counted! """ ---------- components: IDLE, Tkinter messages: 107532 nosy: rantingrick priority: normal severity: normal status: open title: Tkinter Litmus Test type: feature request versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 09:32:20 2010 From: report at bugs.python.org (Rick Johnson) Date: Fri, 11 Jun 2010 07:32:20 +0000 Subject: [issue8970] Tkinter Litmus Test In-Reply-To: <1276240896.62.0.886214435094.issue8970@psf.upfronthosting.co.za> Message-ID: <1276241540.79.0.822912102858.issue8970@psf.upfronthosting.co.za> Changes by Rick Johnson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 09:51:31 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 11 Jun 2010 07:51: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: <1276242691.42.0.576088569804.issue8954@psf.upfronthosting.co.za> anatoly techtonik added the comment: $ python setup.py build bdist_wininst running build running build_py running bdist_wininst installing to build/bdist.linux-i686/wininst running install_lib creating build/bdist.linux-i686/wininst creating build/bdist.linux-i686/wininst/PURELIB copying build/lib.linux-i686-2.6/wget.py -> build/bdist.linux-i686/wininst/PURELIB running install_egg_info Writing build/bdist.linux-i686/wininst/PURELIB/wget-0.6.egg-info creating '/tmp/tmpQQZI5O.zip' and adding '.' to it adding 'PURELIB/wget-0.6.egg-info' adding 'PURELIB/wget.py' creating dist Warning: Can't read registry to find the necessary compiler setting Make sure that Python modules _winreg, win32api or win32con are installed. removing 'build/bdist.linux-i686/wininst' (and everything under it) $ ls dist wget-0.6.linux-i686.exe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 09:52:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 11 Jun 2010 07:52:07 +0000 Subject: [issue8970] Tkinter Litmus Test In-Reply-To: <1276240896.62.0.886214435094.issue8970@psf.upfronthosting.co.za> Message-ID: <1276242727.63.0.501152276386.issue8970@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> duplicate superseder: -> Tkinter Litmus Test _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 10:22:52 2010 From: report at bugs.python.org (Peter Landgren) Date: Fri, 11 Jun 2010 08:22:52 +0000 Subject: [issue8924] Error in error message in logging In-Reply-To: <1275850912.41.0.0811394159532.issue8924@psf.upfronthosting.co.za> Message-ID: <1276244572.41.0.637828593498.issue8924@psf.upfronthosting.co.za> Peter Landgren added the comment: Answer to your first question: - The variable s is of type 'unicode' - The variable record.exc_text, which is what Formatter.formatException returns, is of type 'str' For your second question; I'm not a python expert, so I can't follow you there. I don't know what to do to test this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 10:36:28 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 11 Jun 2010 08:36:28 +0000 Subject: [issue8954] wininst regression: errors when building on linux In-Reply-To: <1276093244.44.0.895217979727.issue8954@psf.upfronthosting.co.za> Message-ID: <1276245388.6.0.907340070213.issue8954@psf.upfronthosting.co.za> ?ric Araujo added the comment: The error comes from the msvccompiler module, which shouldn?t get used on non-Windows platforms unless I?m mistaken. Reading the module, I?m not sure at all this command was meant to be run on not-Windows OSes. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 10:48:01 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 11 Jun 2010 08:48:01 +0000 Subject: [issue8954] wininst regression: errors when building on linux In-Reply-To: <1276093244.44.0.895217979727.issue8954@psf.upfronthosting.co.za> Message-ID: <1276246081.12.0.034793310042.issue8954@psf.upfronthosting.co.za> anatoly techtonik added the comment: It did run ok on non-Windows OSes with previous Python versions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 10:54:31 2010 From: report at bugs.python.org (=?utf-8?b?SHJ2b2plIE5pa8WhacSH?=) Date: Fri, 11 Jun 2010 08:54:31 +0000 Subject: [issue2892] improve cElementTree iterparse error handling In-Reply-To: <1210940435.5.0.243679200602.issue2892@psf.upfronthosting.co.za> Message-ID: <1276246471.53.0.74986551959.issue2892@psf.upfronthosting.co.za> Hrvoje Nik?i? added the comment: Here is a small test case that demonstrates the problem, expected behavior and actual behavior: {{{ for ev in xml.etree.cElementTree.iterparse(StringIO('rubbish'), events=('start', 'end')): print ev }}} The above code should first print the two events (start and end), and then raise the exception. In Python 2.7 it runs like this: {{{ >>> for ev in xml.etree.cElementTree.iterparse(StringIO('rubbish'), events=('start', 'end')): ... print ev ... Traceback (most recent call last): File "", line 1, in File "", line 84, in next cElementTree.ParseError: junk after document element: line 1, column 7 }}} Expected behavior, obtained with my patch, is that it runs like this: {{{ >>> for ev in my_iterparse(StringIO('rubbish'), events=('start', 'end')): ... print ev ... ('start', ) ('end', ) Traceback (most recent call last): File "", line 1, in File "", line 26, in __iter__ cElementTree.ParseError: junk after document element: line 1, column 7 }}} The difference is, of course, only visible when printing events. A side-effect-free operation, such as building a list using list(iterparse(...)) would behave exactly the same before and after the change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 12:48:03 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 11 Jun 2010 10:48:03 +0000 Subject: [issue8362] Add Misc/maintainers.rst to 2.x branch In-Reply-To: <1270901679.67.0.500277129776.issue8362@psf.upfronthosting.co.za> Message-ID: <1276253283.63.0.265763717596.issue8362@psf.upfronthosting.co.za> ?ric Araujo added the comment: I am willing to maintain the maintainers file for 2.x with due diligence for the coming years. I think it has proven useful, and would like to see it in 2.6 up to 3.2 (all current four branches, since it?s arguably a documentation issue). Do I need to find a unique committer willing to work with me for this to be accepted? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 12:51:53 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 11 Jun 2010 10:51:53 +0000 Subject: [issue8188] Unified hash for numeric types. In-Reply-To: <1269117270.13.0.417099891076.issue8188@psf.upfronthosting.co.za> Message-ID: <1276253513.16.0.319751883292.issue8188@psf.upfronthosting.co.za> Mark Dickinson added the comment: Committed the Decimal-to-Fraction comparisons in r81893. All numeric types should now compare nicely with each other. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 12:52:59 2010 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Fri, 11 Jun 2010 10:52:59 +0000 Subject: [issue8958] 2.7rc1 tarfile.py: `bltn_open(targetpath, "wb")` -> IOError: Is a directory In-Reply-To: <1276118455.66.0.211402542637.issue8958@psf.upfronthosting.co.za> Message-ID: <1276253579.62.0.521555756926.issue8958@psf.upfronthosting.co.za> Lars Gust?bel added the comment: I found the problem. As of r76780 the default for the TarFile.errorlevel argument changed from 0 (suppress errors and write them to the debug log instead) to 1 (raise exceptions for fatal extraction errors). This change was not backported to the 2.6 branch back then (it was blocked in r76781). This means, that Python 2.6 does not succeed either, but the error is simply suppressed. Ergo, this is no regression but a simple filesystem issue. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 14:22:45 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 11 Jun 2010 12:22:45 +0000 Subject: [issue8971] Tkinter Litmus Test In-Reply-To: <1276241262.66.0.609835750644.issue8971@psf.upfronthosting.co.za> Message-ID: <1276258965.82.0.997245502054.issue8971@psf.upfronthosting.co.za> R. David Murray added the comment: Everyone who uses IDLE uses TKInter, and a lot of people use IDLE. In any case, any such proposal should be discussed on python-ideas first, followed by python-dev if you actually get a consensus about it. ---------- nosy: +r.david.murray resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 14:38:18 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 11 Jun 2010 12:38:18 +0000 Subject: [issue8947] Provide as_integer_ratio() method to Decimal In-Reply-To: <1276030268.17.0.98739433208.issue8947@psf.upfronthosting.co.za> Message-ID: <1276259898.17.0.886338891003.issue8947@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file17626/issue8947.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 14:56:38 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 11 Jun 2010 12:56:38 +0000 Subject: [issue8947] Provide as_integer_ratio() method to Decimal In-Reply-To: <1276030268.17.0.98739433208.issue8947@psf.upfronthosting.co.za> Message-ID: <1276260998.68.0.705826474514.issue8947@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated patch, taking into account comments from merwok and exarkun on #python-dev: - remove doctests for infinity and nan, replace with a sentence explaining what happens for such inputs. - replace 'snAN' with saner spelling 'snan'. ---------- Added file: http://bugs.python.org/file17627/issue8947_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 15:11:08 2010 From: report at bugs.python.org (shypike) Date: Fri, 11 Jun 2010 13:11:08 +0000 Subject: [issue8972] subprocess.list2cmdline doesn't quote the & character In-Reply-To: <1276261868.23.0.953588591338.issue8972@psf.upfronthosting.co.za> Message-ID: <1276261868.23.0.953588591338.issue8972@psf.upfronthosting.co.za> New submission from shypike : subprocess.py/list2cmdline should also put double quotes around strings that contain ampersands (&), but no spaces. If not, the Windows command processor will split the command into two separate parts. In short, '&' needs the same treatment as '|'. ---------- components: Windows messages: 107544 nosy: shypike priority: normal severity: normal status: open title: subprocess.list2cmdline doesn't quote the & character type: behavior versions: Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 15:32:59 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 11 Jun 2010 13:32:59 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1276263179.23.0.820790642889.issue5094@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'm not sure if I missed this in the earlier discussion: is there a reason to prevent subclassing of timezone? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 16:23:08 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 11 Jun 2010 14:23:08 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1276266188.13.0.874761314411.issue5094@psf.upfronthosting.co.za> Mark Dickinson added the comment: Some comments from playing with this patch (without having looked at the implementation): - As noted above, the 'timezone' class can't be subclassed. Is this deliberate? I notice that Brett said "let users subclass as needed to add DST support" in msg107008. - If I try to do timezone(timedelta(hours=24)), I get an error message: "ValueError: offset must be a timedelta between timedelta(1) and -timedelta(1)." and I have to think for a bit to remember that 'timedelta(1)' means 'timedelta(days=1)'. Any chance of making this more explicit: e.g. "between timedelta(hours=-24) and timedelta(hours=24)"? - The existing docs say, at one point: "if utcoffset does not return None, dst() should not return None either." And yet it seems that this is exactly what happens for timezone instances: utcoffset doesn't return None, but dst does. Was there a reason for the explicit restriction in the docs, and are we sure that that reason is no longer valid? - I find it strange that mytimezone.utcoffset(1+3j) works; similarly for tzname and dst. Perhaps it should be checked at least that the argument is a datetime. Similarly for tzname and dst. - And it also seems clunky that an argument *has* to be supplied for utcoffset, tzname and dst, only to be ignored. Would it be possible to make the argument optional? - Any chance of a nice __str__ implementation for timezone instances? (And/or possibly a nice __repr__ as well)? - The docs for tzname are misleading: they claim that the default name has the form "UTCsHHMM". This isn't true for UTC+0, whose name seems to be just "UTC". It actually wouldn't seem unreasonable to have this print as "UTC+0000", just for consistency (and for ease of parsing for anyone on the receiving end of such a string). Or the docs could be fixed. - I'm very confused about utcoffset: why can't I supply a UTC datetime (i.e. an aware datetime with tzinfo = timezone.utc) to this? I suspect I'm misunderstanding something here... - In the docs, replace "timezeone" with "timezone" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 16:30:33 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 11 Jun 2010 14:30:33 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1276266633.59.0.973504285798.issue5094@psf.upfronthosting.co.za> Mark Dickinson added the comment: One more: there's a footnote marked in the docs (line 36 of datetime.rst), but no corresponding footnote as far as I can see. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 16:39:12 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 11 Jun 2010 14:39:12 +0000 Subject: [issue5094] datetime lacks concrete tzinfo impl. for UTC In-Reply-To: <1233190363.25.0.24659427347.issue5094@psf.upfronthosting.co.za> Message-ID: <1276267152.45.0.987073831205.issue5094@psf.upfronthosting.co.za> Mark Dickinson added the comment: And another minor doc issue: the docs still say: "The datetime module does not supply any concrete subclasses of tzinfo." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 16:43:32 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 11 Jun 2010 14:43:32 +0000 Subject: [issue6641] strptime doesn't support %z format ? In-Reply-To: <1249394677.85.0.527199310346.issue6641@psf.upfronthosting.co.za> Message-ID: <1276267412.96.0.49853193961.issue6641@psf.upfronthosting.co.za> Mark Dickinson added the comment: It's a little awkward to review this patch independently of the issue 5094 patch. Can we work on issue 5094 first, and then come back to this one? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 16:55:38 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 11 Jun 2010 14:55:38 +0000 Subject: [issue3129] struct allows repeat spec. without a format specifier In-Reply-To: <1213694469.69.0.0950890622628.issue3129@psf.upfronthosting.co.za> Message-ID: <1276268138.35.0.261316890245.issue3129@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks for the patch; I'll take a look. ---------- assignee: belopolsky -> mark.dickinson nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 16:58:50 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 11 Jun 2010 14:58:50 +0000 Subject: [issue1697943] msgfmt cannot cope with BOM Message-ID: <1276268330.22.0.732307303437.issue1697943@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Jun 11 17:11:29 2010 From: report at bugs.python.org (Tal Einat) Date: Fri, 11 Jun 2010 15:11:29 +0000 Subject: [issue8515] idle "Run Module" (F5) does not set __file__ variable In-Reply-To: <1272071890.53.0.295001627395.issue8515@psf.upfronthosting.co.za> Message-ID: <1276269089.89.0.608423270885.issue8515@psf.upfronthosting.co.za> Tal Einat added the comment: I believe IDLE runs modules via execfile(), so I would expect the behavior to be similar, and execfile() does not set __file__. Doing "Run Module" is also IMO equivalent to doing execfile(), so this behavior retains consistency. However, I would expect __file__ to be set when running IDLE -r