[issue14523] IDLE's subprocess startup error

2012-04-08 Thread R. David Murray
R. David Murray added the comment: I'm sorry, but the bug tracker isn't a good place to get help. You'll have better luck getting assistance for this on the python-list mailing list (see mail.python.org). -- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected

[issue12537] mailbox's _become_message is very fragile

2012-04-08 Thread R. David Murray
R. David Murray added the comment: David, thanks for your assistance. I didn't wind up using your patch, but the work you did was valuable in preparing the patch I committed. What I did was turn your 'detect the attributes' recipe into a unit test. I then applied your patch, but it didn't q

[issue12537] mailbox's _become_message is very fragile

2012-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5c1c402a63e5 by R David Murray in branch 'default': #12537: in mailbox avoid depending on knowledge of email package internals http://hg.python.org/cpython/rev/5c1c402a63e5 -- nosy: +python-dev ___ Pytho

[issue14502] Document better what happens on releasing an unacquired lock

2012-04-08 Thread R. David Murray
R. David Murray added the comment: I think dummy_threading should be fixed (but only in 3.3, just in case it causes any backward compatibility issues with someone's code). Logging I'd leave to Vinay to decide about. I'm assuming that if any of the others devs nosy on this issue disagree with

[issue14533] Modify regrtest to make test_main optional

2012-04-08 Thread R. David Murray
R. David Murray added the comment: I can't imagine when you'd *not* want setUpModule/tearDownModule to run, so that's a reasonable conversion path. The other path for reap_children and reap_threads would be to apply them to the individual classes that require them within the test module. Wh

[issue14526] Python-2.6.8rc2 test never finishes ia64-hp-hpux11.31

2012-04-08 Thread Paul A.
Paul A. added the comment: On Sun, Apr 08, 2012 at 04:16:39PM +, R. David Murray wrote: > > R. David Murray added the comment: > > Can you clarify? In what sense has the 2.7.3 rc regressed? Shouldn't have left that out -- I was referring to the crash in that other bug I opened. I don't

[issue14502] Document better what happens on releasing an unacquired lock

2012-04-08 Thread Jim Jewett
Jim Jewett added the comment: On Fri, Apr 6, 2012 at 10:32 PM, R. David Murray wrote: > R. David Murray added the comment: > I, on the other hand, would prefer if it were made part of the API contract > that an > error is raised, and to fix any stdlib implementations *of that API* that > d

[issue7978] SocketServer doesn't handle syscall interruption

2012-04-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > To support 3.2 and 2.7: > (1) select.error must be caught as in the original patch, > (2) e.args[0] must be used - select.error doesn't have 'errno' > attribute. > Should I prepare the patch for 3.2 and 2.7? It shouldn't be necessary, I've just committed f

[issue7978] SocketServer doesn't handle syscall interruption

2012-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset f8e7fcd581ff by Antoine Pitrou in branch '3.2': Fix the patch for issue #7978: select() raises select.error before 3.3, not OSError. http://hg.python.org/cpython/rev/f8e7fcd581ff New changeset 4298d6e79ecb by Antoine Pitrou in branch '2.7': Fix th

[issue14531] Backtrace should not attempt to open file

2012-04-08 Thread STINNER Victor
STINNER Victor added the comment: The filename is retrieved from: traceback->frame->f_code->co_filename. co_filename is an arbitrary string. Example: >>> exec(compile("1+a", "/etc/passwd", "exec")) Traceback (most recent call last): File "", line 1, in File "/etc/passwd", line 1, in

[issue14533] Modify regrtest to make test_main optional

2012-04-08 Thread Michael Foord
Michael Foord added the comment: Looks good to me. Note that if module level setup and teardown is needed for running tests then it should be possible to do this with setUpModule and tearDownModule functions (unless those should *only* be done when running under regrtest). -- __

[issue7978] SocketServer doesn't handle syscall interruption

2012-04-08 Thread Jerzy Kozera
Jerzy Kozera added the comment: I forgot to mention my patch is 3.3-only, sorry - it depends on changes from #12555 (http://hg.python.org/cpython/rev/41a1de81ef2b#l18.21 to be precise). To support 3.2 and 2.7: (1) select.error must be caught as in the original patch, (2) e.args[0] must be us

[issue14531] Backtrace should not attempt to open file

2012-04-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue12338] multiprocessing.util._eintr_retry doen't recalculate timeouts

2012-04-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Note that socketserver's timeout is not really important: it's just used for a polling loop, with a default of 0.5 seconds. -- ___ Python tracker

[issue12338] multiprocessing.util._eintr_retry doen't recalculate timeouts

2012-04-08 Thread STINNER Victor
STINNER Victor added the comment: > SocketServer has been changed to restart select() on EINTR, > but it doesn't recompute the timeout. See issue #7978. -- ___ Python tracker _

[issue12338] multiprocessing.util._eintr_retry doen't recalculate timeouts

2012-04-08 Thread STINNER Victor
STINNER Victor added the comment: SocketServer has been changed to restart select() on EINTR, but it doesn't recompute the timeout. -- ___ Python tracker ___ __

[issue7978] SocketServer doesn't handle syscall interruption

2012-04-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- type: enhancement -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: htt

[issue7978] SocketServer doesn't handle syscall interruption

2012-04-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > You must recompute the timeout when select() is interrupted: see issue > #12338. Ah, right. It's a minor issue, though. I would suggest opening a separate issue for it. The patch is now committed to all 3 branches (I'm finally convinced this is a bug worth

[issue7978] SocketServer doesn't handle syscall interruption

2012-04-08 Thread STINNER Victor
STINNER Victor added the comment: You must recompute the timeout when select() is interrupted: see issue #12338. -- ___ Python tracker ___ ___

[issue14533] Modify regrtest to make test_main optional

2012-04-08 Thread R. David Murray
New submission from R. David Murray : The attached patch makes 'test_main' optional for stdlib tests. If a test module does not have a 'test_main', regrtest will use the unittest loadTestsFromModule loader to load the tests. This moves us further in the direction of using normal unittest faci

[issue7978] SocketServer doesn't handle syscall interruption

2012-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset d941d1fcc6e6 by Antoine Pitrou in branch '2.7': Issue #7978: socketserver now restarts the select() call when EINTR is returned. http://hg.python.org/cpython/rev/d941d1fcc6e6 -- ___ Python tracker

[issue7978] SocketServer doesn't handle syscall interruption

2012-04-08 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5493d44b56d8 by Antoine Pitrou in branch '3.2': Issue #7978: socketserver now restarts the select() call when EINTR is returned. http://hg.python.org/cpython/rev/5493d44b56d8 New changeset 97a0c6230ece by Antoine Pitrou in branch 'default': Issue #

[issue14522] Avoid using DuplicateHandle() on sockets in multiprocessing.connection

2012-04-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > multiprocessing.reduction still appears to use DuplicateHandle to copy > sockets. It's probably a separate issue, then. This one is about multiprocessing.connection :) -- status: open -> closed ___ Python tracke

[issue14528] Document whether strings implement __iter__

2012-04-08 Thread Chris Jerdonek
Chris Jerdonek added the comment: Is there a mechanism for suggesting improvements to the documentation (e.g. for pedagogical reasons)? I tried to classify this as an enhancement request rather than as a bug. -- ___ Python tracker

[issue14531] Backtrace should not attempt to open file

2012-04-08 Thread Edward Yang
Edward Yang added the comment: "" is a valid name of a file on Unix systems. So the fix is not so clear. ezyang@javelin:~$ python Python 2.7.2+ (default, Oct 4 2011, 20:03:08) [GCC 4.6.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> a Traceback (most re

[issue14531] Backtrace should not attempt to open file

2012-04-08 Thread Ned Deily
Ned Deily added the comment: That does seem like silly behavior. On the other hand, the only ill effect is likely the time required to execute the series of open calls which, in the interactive case, would not even be noticed on most systems. Would you be interested in writing a patch? ---

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +sbt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.or

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-08 Thread Jon Oberheide
New submission from Jon Oberheide : The multiprocessing module performs a time-dependent comparison of the HMAC digest used for authentication: def deliver_challenge(connection, authkey): import hmac assert isinstance(authkey, bytes) message = os.urandom(MESSAGE_LENGTH) connecti

[issue14528] Document whether strings implement __iter__

2012-04-08 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, I agree with Georg, this isn't a bug, not even a documentation bug. A type is free to implement iteration either by way of __iter__ or by way of __getitem__. How it chooses to do so is an implementation detail (and different implementations have m

[issue14521] math.copysign(1., float('nan')) returns -1.

2012-04-08 Thread mattip
mattip added the comment: You are correct, the patch should use fabs I would go with a standard, cross-platform definition of Py_NAN so that pickled objects could be opened by other platforms. Would this patch be better? It's more complicated as I needed to cast the repr of Py_NAN to a unsigne

[issue12805] Optimizations for bytes.join() et. al

2012-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Main note: the patched test adds a space to the separator, but that is not > enough to account for the difference. Sorry, I copied the wrong line. $ ./python -m timeit -s "seq=[bytes([i]*10) for i in range(256)]" "b' '.join(seq)" 10 loops, best of 3:

[issue14531] Backtrace should not attempt to open file

2012-04-08 Thread Edward Yang
New submission from Edward Yang : When generating a backtrace from an interactive Python session (e.g. the input is from , Python attempts to actually find a file named , to somewhat hilarious consequences. See the strace'd Python session below: >>> foo open("/etc/default/apport", O_RDONLY|O_

[issue12805] Optimizations for bytes.join() et. al

2012-04-08 Thread Terry J. Reedy
Terry J. Reedy added the comment: Side note: Windows requires that args be quoted with ", not ', to work properly, at least with these args. Main note: the patched test adds a space to the separator, but that is not enough to account for the difference. c:\Programs\Python32>python -m timeit

[issue12805] Optimizations for bytes.join() et. al

2012-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Regardless of whether optimization (which is negligible in this case), I > don't know whether to consider such side effect desirable or undesirable. After some thought, I realized that this is an erroneous behavior. -- ___

[issue12805] Optimizations for bytes.join() et. al

2012-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > Honestly, I don't think there's much point in these optimizations. The first > one ("The sequence length and separator length are both 0") is probably > useless. This optimization changes the behavior. ... def __repr__(self): return 'B(' + super().__

[issue14530] distutils's build_wininst command fails to correctly interpret the data_files argument

2012-04-08 Thread Mario Vilas
New submission from Mario Vilas : I tried the following: setup( data_files = [(sys.prefix_exec, os.path.join('Win32', 'BeaEngine.dll'))] # (... rest of the setup call here...) ) This works perfectly when running the "python setup.py install". But when generating an installer (not MSI

[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True

2012-04-08 Thread Andrew Svetlov
Andrew Svetlov added the comment: If fylesystem doesn't support unicode (only Windows directly does as I know) str filename should to be converted by `sys.getfilesystemencoding()`. `os.exec` family already does it as well as other fs functions — but they are supports bytes also. Mayby depreca

[issue14529] distutils's build_msi command ignores the data_files argument

2012-04-08 Thread Mario Vilas
New submission from Mario Vilas : When creating an MSI installer on Python 2.7 (Windows, both in 32 and 64 bits) the data_files argument of the setup function is completely ignored. This results in broken installations. -- assignee: eric.araujo components: Distutils messages: 157799 no

[issue14520] Buggy Decimal.__sizeof__

2012-04-08 Thread Martin v . Löwis
Martin v. Löwis added the comment: There are really two options: a) if an object is a container, and the contained is accessible to reflection (preferably through gc.get_referents), then the container shouldn't account for the size of the contained. b) if the contained is not accessible (exce

[issue14288] Make iterators pickleable

2012-04-08 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailin

[issue14522] Avoid using DuplicateHandle() on sockets in multiprocessing.connection

2012-04-08 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: multiprocessing.reduction still appears to use DuplicateHandle to copy sockets. I propose adding a pair of custom functions to _multiprocessing, that "pickles" and "unpickles" handles. It can detect socket handles as being different from e.g. pipe han

[issue14521] math.copysign(1., float('nan')) returns -1.

2012-04-08 Thread Mark Dickinson
Mark Dickinson added the comment: Hmm. I don't see this as a bug: the sign of a nan isn't really all that meaningful anyway, and this doesn't (AFAIK) contradict any documentation. On the other hand, given that most other aspects of floating-point are now reasonably portable across platforms

[issue14527] How to link with an external libffi?

2012-04-08 Thread Paul A.
Paul A. added the comment: On Sun, Apr 08, 2012 at 05:58:29AM +, Ross Lagerwall wrote: > > Ross Lagerwall added the comment: > > If it is in a non-standard location, try setting the environment variables: > > LDFLAGS linker flags, e.g. -L if you have libraries in a > nonstandard dir

[issue14526] Python-2.6.8rc2 test never finishes ia64-hp-hpux11.31

2012-04-08 Thread R. David Murray
R. David Murray added the comment: Can you clarify? In what sense has the 2.7.3 rc regressed? -- ___ Python tracker ___ ___ Python-b

[issue14526] Python-2.6.8rc2 test never finishes ia64-hp-hpux11.31

2012-04-08 Thread Paul A.
Paul A. added the comment: On Sun, Apr 08, 2012 at 02:13:39AM +, R. David Murray wrote: > > R. David Murray added the comment: > > Oh, wait, I see you are testing the security RC. Is this a new problem, or > does it also occur with the previous released version of 2.6? Yes... I'm not o

[issue14525] ia64-hp-hpux11.31 won't compile Python-2.6.8rc2 without -D_TERMIOS_INCLUDED

2012-04-08 Thread Paul A.
Paul A. added the comment: On Sun, Apr 08, 2012 at 02:06:46AM +, R. David Murray wrote: > > R. David Murray added the comment: > > Can you suggest a patch? As I said on the other issue I don't believe any > core developers have access to hpux. Sure, once I figure out what that patch wi

[issue14524] Python-2.7.3rc2/Modules/_ctypes/libffi/src/dlmalloc.c won't compile on ia64-hp-hpux11.31 without -DHAVE_USR_INCLUDE_MALLOC_H

2012-04-08 Thread Paul A.
Paul A. added the comment: On Sun, Apr 08, 2012 at 02:01:05AM +, R. David Murray wrote: > > R. David Murray added the comment: > > Is this a bug report about configure, or a bug report about a crash during > compilation after you've adjusted the configure parameters? It seems like > yo

[issue12805] Optimizations for bytes.join() et. al

2012-04-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Honestly, I don't think there's much point in these optimizations. The first one ("The sequence length and separator length are both 0") is probably useless. -- ___ Python tracker

[issue6972] zipfile.ZipFile overwrites files outside destination path

2012-04-08 Thread R. David Murray
R. David Murray added the comment: To clarify what Serhiy said about the patches, the link to the patch works, but the Reitveld review button isn't working. I get 'No issue exists with that id (6972)'. -- nosy: +loewis ___ Python tracker

[issue14521] math.copysign(1., float('nan')) returns -1.

2012-04-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Interpreter Core -None nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list m

[issue10576] Add a progress callback to gcmodule

2012-04-08 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: A new patch, taking Antoine's review and comments into account. -- Added file: http://bugs.python.org/file25158/gccallback.patch ___ Python tracker ___

[issue14423] Getting the starting date of iso week from a week number and a year.

2012-04-08 Thread Esben Agerbæk Black
Changes by Esben Agerbæk Black : Added file: http://bugs.python.org/file25157/isodates.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue14528] Document whether strings implement __iter__

2012-04-08 Thread Chris Jerdonek
Chris Jerdonek added the comment: Okay, then that also might be worth mentioning. As it stands now, the emphasis in the section on iterator types is on __iter__() (e.g. it is the main focus of the introduction), whereas iter() is barely mentioned (only in the sections on dicts and file objec

[issue14528] Document whether strings implement __iter__

2012-04-08 Thread Georg Brandl
Georg Brandl added the comment: "behaves like a list" is misleading. If you mean checking for iterable-ness, calling iter() on the object is the way to do it. -- ___ Python tracker __

[issue14528] Document whether strings implement __iter__

2012-04-08 Thread Chris Jerdonek
Chris Jerdonek added the comment: It is not "so important." I just feel that the change should be acknowledged somewhere -- insofar as the existing user documentation on iterator types already discusses __iter__(). As it stands now, the Python 2 documentation is a bit misleading because it

[issue14528] Document whether strings implement __iter__

2012-04-08 Thread Georg Brandl
Georg Brandl added the comment: Why is it so important if strings implement __iter__? They are iterable in both versions, since iteration falls back on __getitem__ if no __iter__ is defined. For user code it is irrelevant which of the iteration protocols is present. -- nosy: +georg

[issue14528] Document whether strings implement __iter__

2012-04-08 Thread Chris Jerdonek
New submission from Chris Jerdonek : While converting code from Python 2 to Python 3, I came across the "gotcha" that strings implement __iter__ in Python 3 but not in Python 2. Looking through the documentation, I don't seem to see anything like this mentioned in the library portion of either

[issue14222] Use time.steady() to implement timeout

2012-04-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The "not subject to adjustment" property is more desirable than not. > The "undefined reference point" property isn't harmful in this context > (the start time isn't exposed). So you're closing the issue while you're in agreement with it? -- __

[issue14455] plistlib unable to read json and binary plist files

2012-04-08 Thread d9pouces
d9pouces added the comment: Here is the new patch, allowing read and write binary, json and xml plist files. It includes both the plistlib.py and test/test_plistlib.py patches. JSON format does not allow dates and data, so XML is used by default to write files. I use the json library to write

[issue2193] Cookie Colon Name Bug

2012-04-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Ping. -- nosy: +storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue14521] math.copysign(1., float('nan')) returns -1.

2012-04-08 Thread mattip
mattip added the comment: I was going to add a test for this to Lib/test/test_math.py, but found this comment: # copysign(INF, NAN) may be INF or it may be NINF, since # we don't know whether the sign bit of NAN is set on any # given platform. I would try to claim this