[issue7846] Fnmatch cache is never cleared during usage

2011-07-01 Thread Tom Rini
Tom Rini added the comment: So yes, we have some code that was doing, roughly: if any(fnmatchcase(key, pat) for pat in pattern): refs.add(key) on 200-300 elements, a lot. That said, many of them were not globs so we've worked around this to only use fnmatchcase on globs and just key in set

[issue12457] type() returns incorrect type for nested classes

2011-07-01 Thread Peter Williams
Peter Williams added the comment: The class I was pickling was a top level class but a field inside that class had an instance of a nested class set as its value. The error message produced indicated that the reason for failure was the inability of pickle to find the class definition and (I

[issue12469] test_faulthandler failures on FreeBSD 6

2011-07-01 Thread STINNER Victor
STINNER Victor added the comment: > What happens if you create the thread after having registered > the SIGBUS handler? I reverted my commit and created the thread after the call to faulthandler.register(). It changes nothing, the signal handler is still called "later" sometimes. > On FreeBS

[issue12469] test_faulthandler failures on FreeBSD 6

2011-07-01 Thread STINNER Victor
STINNER Victor added the comment: On FreeBSD 6, os.kill(os.getpid(), signum) calls immediatly the signal handler before the creation of the first thread (which was the case by default before my commit 024827a9db64), whereas the signal handler is called "later" (when exactly?) after the creati

[issue12472] Build failure on IRIX

2011-07-01 Thread Charles-François Natali
Charles-François Natali added the comment: You can't include both and on IRIX... Nice one! A couple suggestions (in this order): 1) try putting "#include " before "#include "Python.h"" 2) try this: 20 #undef select 21 #include 3) fix the header yourself (remove the static storage class fro

[issue12469] test_faulthandler failures on FreeBSD 6

2011-07-01 Thread Charles-François Natali
Charles-François Natali added the comment: What happens if you create the thread after having registered the SIGBUS handler? -- ___ Python tracker ___ _

[issue12472] Build failure on IRIX

2011-07-01 Thread kais58
kais58 added the comment: In file included from ./Modules/signalmodule.c:23: /usr/include/sys/time.h:186: error: static declaration of 'select' follows non-static declaration /usr/include/unistd.h:479: error: previous declaration of 'select' was here make: *** [Modules/signalmodule.o] Error 1

[issue12472] Build failure on IRIX

2011-07-01 Thread Charles-François Natali
Charles-François Natali added the comment: Ok, what happens if you change, in Modules/signalmodule.c 20 #ifdef HAVE_SYS_TIME_H 21 #include 22 #endif to 21 #include and rebuild Python? -- ___ Python tracker

[issue10898] posixmodule.c redefines FSTAT

2011-07-01 Thread Alan Hourihane
Alan Hourihane added the comment: I've had to split the three #undef's up to just before they're used. -- ___ Python tracker ___ ___

[issue12472] Build failure on IRIX

2011-07-01 Thread kais58
kais58 added the comment: ./test.c: In function 'main': ./test.c:5: warning: unused variable 'tv' is what it gives back. -- ___ Python tracker ___ _

[issue12472] Build failure on IRIX

2011-07-01 Thread Charles-François Natali
Charles-François Natali added the comment: That's because struct timeval is not defined by on IRIX, or it doesn't get included in Modules/signalmodule.c. Can you try to compile the following code with the same compiler/options? """ #include int main(int argc, char *argv[]) { struct tim

[issue10898] posixmodule.c redefines FSTAT

2011-07-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hum, can you propose something? -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubsc

[issue10898] posixmodule.c redefines FSTAT

2011-07-01 Thread Alan Hourihane
Alan Hourihane added the comment: No, that patch still doesn't work. -- resolution: fixed -> accepted ___ Python tracker ___ ___ Pyth

[issue12468] longjmp causes uninitialized stack frame

2011-07-01 Thread Charles-François Natali
Charles-François Natali added the comment: longjmp() is used in only two places: ./Modules/fpectlmodule.c:longjmp(PyFPE_jbuf, 1); ./Modules/readline.c:longjmp(jbuf, 1); Both use it to jump out of a signal handler, which can lead to undefined behaviour (see https://www.securecodin

[issue12472] Build failure on IRIX

2011-07-01 Thread kais58
New submission from kais58 : I'm trying to build Python 2.7.2 on IRIX 6.5.30 and get the attached error in ./Modules/signalmodule.c -- components: None files: error.txt messages: 139609 nosy: kais58 priority: normal severity: normal status: open title: Build failure on IRIX type: compil

[issue6721] Locks in python standard library should be sanitized on fork

2011-07-01 Thread Charles-François Natali
Charles-François Natali added the comment: >> - how do you find the correct order to acquire locks in the parent process? > > One option is to use the import graph to determine call order of atfork > handlers. > If a current std library does not fit into this scheme we can possibly fix it > wh

[issue12471] wrong TypeError message on '%i' formatting

2011-07-01 Thread Renaud Blanch
New submission from Renaud Blanch : The TypeError message is erroneous when attempting to format a non number object with a '%i' string (notice the '%d' in the error message): >>> '%i' % 's' Traceback (most recent call last): File "", line 1, in TypeError: %d format: a number

[issue12470] Fix cut&paste typo in test_shutil

2011-07-01 Thread Sandro Tosi
New submission from Sandro Tosi : There is a cut & paste typo in test_shutil file, this patch fixes it. -- components: Tests files: shutil_tests_cut_paste_typo.patch keywords: patch messages: 139606 nosy: sandro.tosi priority: normal severity: normal stage: patch review status: open titl

[issue10898] posixmodule.c redefines FSTAT

2011-07-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, sorry. Can you check with the changeset I've just pushed (it's on branch 2.7)? If ok, I'll port it to 3.2/3.x and close again. -- resolution: accepted -> fixed ___ Python tracker

[issue10898] posixmodule.c redefines FSTAT

2011-07-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 45b27448f95c by Antoine Pitrou in branch '2.7': Really fix issue #10898: posixmodule.c redefines FSTAT http://hg.python.org/cpython/rev/45b27448f95c -- nosy: +python-dev ___ Python tracker

[issue12191] Add shutil.chown to allow to use user and group name (and not only uid/gid)

2011-07-01 Thread Sandro Tosi
Sandro Tosi added the comment: I've applied some of the suggestions Victor made (and also refresh to be cleanly applicable on default). -- Added file: http://bugs.python.org/file22540/shutil_chown-default-v4.patch ___ Python tracker

[issue11870] test_3_join_in_forked_from_thread() of test_threading hangs 1 hour on "x86 Ubuntu Shared 3.x"

2011-07-01 Thread Charles-François Natali
Charles-François Natali added the comment: > The initial problem was test_3_join_in_forked_from_thread() and the hangs > does still happen: > Yes, the patch was there to fix test_2_join_in_forked_from_thread. > [324/356] test_threading > Timeout (1:00:00)! > Thread 0x404248c0: >  File "/srv/b

[issue10898] posixmodule.c redefines FSTAT

2011-07-01 Thread Alan Hourihane
Alan Hourihane added the comment: Hi Antoine, Unfortunately the #undef is too early and later #includes redefine it. We should move the #undef closer to the code that actually uses them. -- resolution: fixed -> accepted status: closed -> open ___ P

[issue12469] test_faulthandler failures on FreeBSD 6

2011-07-01 Thread STINNER Victor
STINNER Victor added the comment: By the way, the failures: Re-running test 'test_faulthandler' in verbose mode test_disable (test.test_faulthandler.FaultHandlerTests) ... ok test_dump_traceback (test.test_faulthandler.FaultHandlerTests) ... ok test_dump_traceback_file (test.test_faulthandler.F

[issue6721] Locks in python standard library should be sanitized on fork

2011-07-01 Thread Nir Aides
Nir Aides added the comment: > - what would be the API of this atfork() mechanism (with an example of how it > would be used in the library)? The atfork API is defined in POSIX and Gregory P. Smith proposed a Python one above that we can look into. http://pubs.opengroup.org/onlinepubs/0096953

[issue12469] test_faulthandler failures on FreeBSD 6

2011-07-01 Thread STINNER Victor
STINNER Victor added the comment: Debug session with gdb: --- [vstinner@buildbot-freebsd ~/cpython]$ gdb -args ./python x.py GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public

[issue11873] test_regexp() of test_compileall fails occassionally

2011-07-01 Thread R. David Murray
R. David Murray added the comment: I'm going to be an optimist and close this again. -- status: open -> closed ___ Python tracker ___ ___

[issue12469] test_faulthandler failures on FreeBSD 6

2011-07-01 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue12392] pthread_kill() doesn't work on the main thread on FreeBSD6

2011-07-01 Thread STINNER Victor
STINNER Victor added the comment: This issue introduced regressions in the faulthandler module: see issue #12469. -- ___ Python tracker ___ _

[issue12469] test_faulthandler failures on FreeBSD 6

2011-07-01 Thread STINNER Victor
New submission from STINNER Victor : test_faulthandler fails on the FreeBSD 6 buildbot since my commit 024827a9db64990865d29f9d525694f51197e770: Issue #12392: fix thread initialization on FreeBSD 6 On FreeBSD6, pthread_kill() doesn't work on the main thread before the creation of the first thr

[issue11873] test_regexp() of test_compileall fails occassionally

2011-07-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6fdb1f000d36 by R David Murray in branch '3.2': #11873: another try at fixing the regex, courtesy of Victor Stinner http://hg.python.org/cpython/rev/6fdb1f000d36 New changeset 775356b583d1 by R David Murray in branch 'default': merge #11873: anothe

[issue12213] BufferedRandom, BufferedRWPair: issues with interlaced read-write

2011-07-01 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: normal -> critical type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue12456] Hangs in concurrent.futures

2011-07-01 Thread Ross Lagerwall
Ross Lagerwall added the comment: Yes, the patch does appear to fix the issue. Thanks -- ___ Python tracker ___ ___ Python-bugs-list

[issue12468] longjmp causes uninitialized stack frame

2011-07-01 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: +skrah ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue12460] SocketServer.shutdown() does not have "timeout=None" parameter

2011-07-01 Thread Santoso Wijaya
Changes by Santoso Wijaya : -- nosy: +santa4nt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue12463] Calling SocketServer.shutdown() when server_forever() was not called will hang

2011-07-01 Thread Santoso Wijaya
Changes by Santoso Wijaya : -- nosy: +santa4nt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread Santoso Wijaya
Changes by Santoso Wijaya : -- nosy: +santa4nt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue12460] SocketServer.shutdown() does not have "timeout=None" parameter

2011-07-01 Thread R. David Murray
R. David Murray added the comment: Well, it's not applicable to 2.x, since it is a feature request. As such it could only go into 3.3. I don't have an opinion on the merits of the suggestion. -- nosy: +r.david.murray versions: +Python 3.3 -Python 2.6, Python 2.7 ___

[issue12468] longjmp causes uninitialized stack frame

2011-07-01 Thread Eric V. Smith
Eric V. Smith added the comment: Do you have a python code snippet which triggers this? -- nosy: +eric.smith ___ Python tracker ___ _

[issue12468] longjmp causes uninitialized stack frame

2011-07-01 Thread Kiril Mikos
New submission from Kiril Mikos : *** longjmp causes uninitialized stack frame ***: /usr/bin/python2.7 terminated === Backtrace: = /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7f2415de61d7] /lib/x86_64-linux-gnu/libc.so.6(+0xfe169)[0x7f2415de6169] /lib/x86_64-linux-gnu/libc.

[issue11873] test_regexp() of test_compileall fails occassionally

2011-07-01 Thread R. David Murray
R. David Murray added the comment: I guess I'm just really bad at regexes. http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/4885/steps/test/logs/stdio -- status: closed -> open ___ Python tracker

[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-07-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Latest patch looks ok to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue12215] TextIOWrapper: issues with interlaced read-write

2011-07-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue12213] BufferedRandom, BufferedRWPair: issues with interlaced read-write

2011-07-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue12346] Python source code build fails with old mercurial

2011-07-01 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue12456] Hangs in concurrent.futures

2011-07-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: This patch should fix the issue. Can you confirm? -- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file22539/cfshutdown.patch ___ Python tracker

[issue12457] type() returns incorrect type for nested classes

2011-07-01 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread Daniel Urban
Changes by Daniel Urban : -- nosy: +durban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue12346] Python source code build fails with old mercurial

2011-07-01 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue12291] file written using marshal in 3.2 can be read by 2.7, but not 3.2 or 3.3

2011-07-01 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue9253] argparse: optional subparsers

2011-07-01 Thread Dan Sully
Changes by Dan Sully : -- nosy: +dsully ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/m

[issue11873] test_regexp() of test_compileall fails occassionally

2011-07-01 Thread R. David Murray
R. David Murray added the comment: Yeah, that's why I had reopened the issue...hopefully it is fixed now. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue11873] test_regexp() of test_compileall fails occassionally

2011-07-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset f8ece8c93918 by R David Murray in branch '3.2': #11873: fix test regex so it covers windows os.sep as well. http://hg.python.org/cpython/rev/f8ece8c93918 New changeset e543c0ddec63 by R David Murray in branch 'default': merge #11873: fix test regex

[issue6721] Locks in python standard library should be sanitized on fork

2011-07-01 Thread Charles-François Natali
Charles-François Natali added the comment: > Well, I ping my view that we should: > Could you please detail the following points: - what would be the API of this atfork() mechanism (with an example of how it would be used in the library)? - how do you find the correct order to acquire locks in

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue11870] test_3_join_in_forked_from_thread() of test_threading hangs 1 hour on "x86 Ubuntu Shared 3.x"

2011-07-01 Thread STINNER Victor
STINNER Victor added the comment: The initial problem was test_3_join_in_forked_from_thread() and the hangs does still happen: [324/356] test_threading Timeout (1:00:00)! Thread 0x404248c0: File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/subprocess.py", line 1498 in _communicate_wi

[issue12363] test_signal.test_without_siginterrupt() sporadic failures on FreeBSD 6.4

2011-07-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3f30cfe51315 by Victor Stinner in branch '3.2': Issue #12363: increase the timeout of siginterrupt() tests http://hg.python.org/cpython/rev/3f30cfe51315 New changeset 423268537083 by Victor Stinner in branch 'default': (merge 3.2) Issue #12363: inc

[issue12231] regrtest: add -k and -K options to filter tests by function/file names

2011-07-01 Thread STINNER Victor
STINNER Victor added the comment: regrtest_regex-2.patch: minor update, just ensure that the patch applies correctly on the default branch. -- Added file: http://bugs.python.org/file22538/regrtest_regex-2.patch ___ Python tracker

[issue12400] regrtest: always run tests in verbose mode, but hide the output on success

2011-07-01 Thread STINNER Victor
STINNER Victor added the comment: Ok, no more regression / bug related to this issue, let close it. -- resolution: -> fixed status: open -> closed versions: -Python 2.7, Python 3.2 ___ Python tracker ___

[issue12363] test_signal.test_without_siginterrupt() sporadic failures on FreeBSD 6.4

2011-07-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8250f04d5a41 by Victor Stinner in branch '3.2': Issue #12363: improve siginterrupt() tests http://hg.python.org/cpython/rev/8250f04d5a41 -- ___ Python tracker ___

[issue12455] urllib2 forces title() on header names, breaking some requests

2011-07-01 Thread Cal Leeming
Cal Leeming added the comment: Thats full understandable that the default won't change. I'll put this in my todo list to write a patch in a week or two. On 1 Jul 2011 08:45, "R. David Murray" wrote: > > R. David Murray added the comment: > > Quoting http://tools.ietf.org/html/rfc2068#section-4

[issue12467] test_threading.test_6_daemon_threads(): Assertion failed: PyUnicode_Check(*filename), file ..\Python\_warnings.c, line 501

2011-07-01 Thread STINNER Victor
New submission from STINNER Victor : == FAIL: test_6_daemon_threads (test.test_threading.ThreadJoinOnShutdown) -- Traceback (most recent call last): File "D:\

[issue11870] test_3_join_in_forked_from_thread() of test_threading hangs 1 hour on "x86 Ubuntu Shared 3.x"

2011-07-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset ff36b8cadfd6 by Victor Stinner in branch '2.7': Issue #11870: Skip test_threading.test_2_join_in_forked_process() on platforms http://hg.python.org/cpython/rev/ff36b8cadfd6 -- ___ Python tracker

[issue12466] test_subprocess.test_close_fds() sporadic failures on Mac OS X Tiger

2011-07-01 Thread STINNER Victor
New submission from STINNER Victor : == FAIL: test_close_fds (test.test_subprocess.POSIXProcessTestCase) -- Traceback (most recent call last): File "/Users/db

[issue11870] test_3_join_in_forked_from_thread() of test_threading hangs 1 hour on "x86 Ubuntu Shared 3.x"

2011-07-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0ed5e6ff10f8 by Victor Stinner in branch '3.2': Issue #11870: Skip test_threading.test_2_join_in_forked_process() on platforms http://hg.python.org/cpython/rev/0ed5e6ff10f8 New changeset f43dee86fffd by Victor Stinner in branch 'default': (merge 3.

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread STINNER Victor
STINNER Victor added the comment: Tim Lesher on python-dev: "On the Windows side, Sleep(-1) as "infinite" is correct and documented: http://msdn.microsoft.com/en-us/library/ms686298(v=vs.85).aspx" Wine defines INFINITE using "#define INFINITE 0x": http://source.winehq.org/source/includ

[issue12465] gc.get_referents can be used to crash Python

2011-07-01 Thread Evgeny Kapun
New submission from Evgeny Kapun : This code crashes Python: import gc gc.get_referents(object.__dict__)[0].clear() gc.get_referents(type.__dict__)[0].clear() type("A", (), {})() -- components: Interpreter Core messages: 139572 nosy: abacabadabacaba priority: normal severity: normal sta

[issue12464] tempfile.TemporaryDirectory.cleanup follows symbolic links

2011-07-01 Thread Evgeny Kapun
New submission from Evgeny Kapun : TemporaryDirectory.cleanup follows symbolic links to directories and tries to clean them as well. Try this (on Linux): import os, tempfile with tempfile.TemporaryDirectory() as d: os.symlink("/proc", d + "/test") -- components: Library (Lib) m

[issue12460] SocketServer.shutdown() does not have "timeout=None" parameter

2011-07-01 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http:

[issue12462] time.sleep(1): call PyErr_CheckSignals() if the sleep was interrupted

2011-07-01 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue12462] time.sleep(1): call PyErr_CheckSignals() if the sleep was interrupted

2011-07-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 583be15e22ca by Victor Stinner in branch 'default': Issue #12462: time.sleep() now calls immediatly the (Python) signal handler if http://hg.python.org/cpython/rev/583be15e22ca -- nosy: +python-dev ___ P

[issue12442] shutil.disk_usage()

2011-07-01 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- resolution: -> fixed stage: patch review -> commit review status: open -> closed ___ Python tracker ___ ___

[issue12442] shutil.disk_usage()

2011-07-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2fc102ebaf73 by Giampaolo Rodola' in branch 'default': Issue #12442: add shutil.disk_usage() http://hg.python.org/cpython/rev/2fc102ebaf73 -- nosy: +python-dev ___ Python tracker

[issue12462] time.sleep(1): call PyErr_CheckSignals() if the sleep was interrupted

2011-07-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > My new patch is more explicit: only add a special case for the select > implementation, if errno is EINTR. Looks good to me! -- ___ Python tracker _

[issue12462] time.sleep(1): call PyErr_CheckSignals() if the sleep was interrupted

2011-07-01 Thread STINNER Victor
STINNER Victor added the comment: The sleep implementation of floatsleep() doesn't call PyErr_SetFromErrno() if errno is EINTR, whereas EINTR indicates that select() was interrupted. I agree that PyErr_CheckSignals() is overkill in the Windows implementation. My new patch is more explicit: on

[issue10647] scrollbar crash in non-US locale format settings

2011-07-01 Thread Hans Bering
Hans Bering added the comment: I have been able to reproduce this problem with a current Python 3.2 + tcl/tk on Ubuntu. I have attached a script which should crash with the following output & stacktrace (you might have to find & set a suitable locale depending on your OS): locale = ('de_DE',

[issue12463] Calling SocketServer.shutdown() when server_forever() was not called will hang

2011-07-01 Thread Марк Коренберг
New submission from Марк Коренберг : Why not to call self.__is_shut_down.set() in constructor ? In reality, if event loop was not started, it mean that server is shut down. -- components: Library (Lib) messages: 139565 nosy: mmarkk priority: normal severity: normal status: open title: C

[issue12462] time.sleep(1): call PyErr_CheckSignals() if the sleep was interrupted

2011-07-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: You don't *need* to call PyErr_CheckSignals() explicitly, PyErr_SetFromErrno() does it for you. -- ___ Python tracker ___

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread STINNER Victor
STINNER Victor added the comment: See also #12462, I found something weird in the signal handling of floatsleep(). -- ___ Python tracker ___

[issue12462] time.sleep(1): call PyErr_CheckSignals() if the sleep was interrupted

2011-07-01 Thread STINNER Victor
New submission from STINNER Victor : While reading floatsleep() (time.sleep) code for issue #12459, I noticed that the Python signal handler is not called in floatsleep() if a signal interrupted the sleep. Well, it just "works" because the bytecode evaluation loop will call PyErr_CheckSignals(

[issue12461] it's not clear how the shutil.copystat() should work on symlinks

2011-07-01 Thread Марк Коренберг
New submission from Марк Коренберг : According to http://hg.python.org/cpython/file/588fe0fc7160/Lib/shutil.py it uses utimes(), stat() ans so on, For some people, it's preferable to use lutimes() and lstat(),but for some people it's not. For example, in old implementation, exception will rais

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread STINNER Victor
STINNER Victor added the comment: > According to Google Code Search, deliberate uses of sleep(-1) > are almost non-existent: The search gives two results, in pycaf and a plone installer (in "compilezpy.py"). I don't know what is the expected behaviour: "infinite" sleep? wait for a SIGINT sign

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree with the ValueError suggestion. Since it would slightly change existing behaviour, it can only be done in a feature release (3.3). According to Google Code Search, deliberate uses of sleep(-1) are almost non-existent: http://www.google.com/codesearch#

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread STINNER Victor
STINNER Victor added the comment: I think that time.sleep() should behave as select.select() (issue #11757, commit 3982be773b54) and signal.sigtimedwait(): raise a ValueError if the timeout is negative. A good reason to always raise an error is that floatsleep() has different implementations.

[issue12460] SocketServer.shutdown() does not have "timeout=None" parameter

2011-07-01 Thread Марк Коренберг
New submission from Марк Коренберг : Suppose i'm trying to correctly terminate thread with socketserver during application termination. I do not want to wait too long (also do not want to hang), I want to protect against long-lived operations in SimpleServer so something like myserver.shutdow

[issue11197] information leakage with SimpleHTTPServer

2011-07-01 Thread Huzaifa Sidhpurwala
Huzaifa Sidhpurwala added the comment: This should have been lynx localhost:8000/../../../../../../../../etc/passwd v/s lynx http://localhost:8000/../../../../../../../../etc/passwd -- ___ Python tracker __

[issue12450] Use the Grisu algorithms to convert floats to strings

2011-07-01 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Agreed. If some volunteer wants to work on it, I suggest to make an extension module first, so that everybody can try and compare with the current routines. -- ___ Python tracker

[issue11197] information leakage with SimpleHTTPServer

2011-07-01 Thread Huzaifa Sidhpurwala
Huzaifa Sidhpurwala added the comment: It seems python was being blamed for what is essentially the fault of lynx. The following would translate into browsing files locally from the system and not from the web: lynx http://localhost:8000/../../../../../../../../etc/passwd The correct syntax

[issue12442] shutil.disk_usage()

2011-07-01 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Agreed. New patch removes the percentage and fixes computations on posix as recommended by Charles-François: free = st.f_bavail * st.f_bsize total = st.f_blocks * st.f_frsize used = (total - st.f_bfree * st.f_bsize) -- Added file: http://bugs.pyth

[issue12450] Use the Grisu algorithms to convert floats to strings

2011-07-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: I concur with Mark. This is a very challenging area and no change would be warranted without keeping the current accuracy guarantees, definitive speed improvement, extensive tests, and consideration of the impact on users of having float reprs change yet

[issue12459] time.sleep(-1.0) behaviour

2011-07-01 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger nosy: +rhettinger priority: normal -> low ___ Python tracker ___ ___ Python

[issue12455] urllib2 forces title() on header names, breaking some requests

2011-07-01 Thread R. David Murray
R. David Murray added the comment: Quoting http://tools.ietf.org/html/rfc2068#section-4.2: Field names are case-insensitive. Which is only logical, since they are modeled on email headers, and email header names are case insensitive. So, the server in question is broken, yes, but that doe

[issue12457] type() returns incorrect type for nested classes

2011-07-01 Thread R. David Murray
R. David Murray added the comment: Inner classes can't be pickled (see the pickle docs for what can be pickled). Whether or not there is a bug in the repr of the inner class is an interesting question. -- nosy: +r.david.murray type: crash -> behavior _

[issue12450] Use the Grisu algorithms to convert floats to strings

2011-07-01 Thread Mark Dickinson
Mark Dickinson added the comment: [Amaury] "It would be interesting to see if it is better/faster than the current dtoa." I agree that it would be interesting to compare. [Eric] "maybe we can say we we can live with 99.5% shortest repr coverage" Please no! As you say, we'd still need the fal