[issue11241] ctypes: subclassing an already subclassed ArrayType generates AttributeError
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: In the patch, _length_ is searched in the class and its base class. But what happens with a third level? class my_array3(my_array2): pass -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11241 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11865] typo in Py_AddPendingCall document
New submission from Zhiping Deng kofreesty...@gmail.com: http://docs.python.org/c-api/init.html?highlight=py_addpendingcall#Py_AddPendingCall void Py_AddPendingCall(int (*func)(void *, void *arg)) which should be void Py_AddPendingCall(int (*func)(void *), void *arg) -- assignee: docs@python components: Documentation messages: 133953 nosy: Zhiping.Deng, docs@python priority: normal severity: normal status: open title: typo in Py_AddPendingCall document versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11865 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11865] typo in Py_AddPendingCall document
Roundup Robot devnull@devnull added the comment: New changeset fc2def15ab11 by Ezio Melotti in branch '2.7': #11865: fix typo in init.rst. http://hg.python.org/cpython/rev/fc2def15ab11 New changeset 6e090d78857c by Ezio Melotti in branch '3.1': #11865: fix typo in init.rst. http://hg.python.org/cpython/rev/6e090d78857c New changeset ce804653c752 by Ezio Melotti in branch '3.2': #11865: Merge with 3.1. http://hg.python.org/cpython/rev/ce804653c752 New changeset d8dd02f6db1a by Ezio Melotti in branch 'default': #11865: Merge with 3.2. http://hg.python.org/cpython/rev/d8dd02f6db1a -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11865 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11865] typo in Py_AddPendingCall document
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed, thanks for the report! -- assignee: docs@python - ezio.melotti nosy: +ezio.melotti resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11865 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11835] python (x64) ctypes incorrectly pass structures parameter
Changes by Christoph Gohlke cgoh...@uci.edu: -- nosy: +cgohlke ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11835 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11849] ElementTree memory leak
kaifeng cafe...@gmail.com added the comment: Found a minor defect of Python 3.2 / 3.3: line 1676 of xml/etree/ElementTree.py was: del self.target, self._parser # get rid of circular references should be: del self.target, self._target, self.parser, self._parser # get rid of circular references While it doesn't help this issue... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11849 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11768] test_signals() of test_threadsignals failure on Mac OS X
STINNER Victor victor.stin...@haypocalc.com added the comment: It looks like pthread_mutex_lock() and pthread_mutex_unlock() are not reentrant on some platforms (in some implementations of the pthread API). Antoine: if I understand correctly your patch, if we have a pending signal, all next signals will be simply ignored. I think that this issue is not specific to Mac OS X: signal_handler() can be called twice at the same time in two different threads or in the same thread (reentrant call). pthread_sigmask() can be used to avoid reentrant call, but it has no effect on the second case: signal_handler() called twice at the same time in two different threads. Note: SA_NODEFER flag of sigaction() has no effect on this issue because signal_handler() is called twice to handle two different signals (SIGUSR1 and SIGUSR2). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11768] test_signals() of test_threadsignals failure on Mac OS X
Antoine Pitrou pit...@free.fr added the comment: Antoine: if I understand correctly your patch, if we have a pending signal, all next signals will be simply ignored. I don't think so, please re-read. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11768] test_signals() of test_threadsignals failure on Mac OS X
STINNER Victor victor.stin...@haypocalc.com added the comment: pthread_sigmask() can be used to avoid reentrant call, but it has no effect on the second case: signal_handler() called twice at the same time in two different threads. Same problem if we use sa_mask field of sigaction() (e.g. use sigfillset(context.sa_mask); in PyOS_setsig()). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11768] test_signals() of test_threadsignals failure on Mac OS X
STINNER Victor victor.stin...@haypocalc.com added the comment: I don't think so, please re-read. Oh, I thought that Py_AddPendingCall() was used to store the pending signal. But no, it asks Python main loop to check which signal has been trigerred, and we can only do it once for all signals. Attached patch should fix this issue: - signal_handler() and PyErr_SetInterrupt() only call Py_AddPendingCall() on the first signal (if is_tripped is zero): it should fix the deadlock and it is a micro optimization (win-win !) - PyErr_SetInterrupt() uses the wake up API (write \0 into wakeup_fd, API introduced by issue #1583) - Remove debug code in test_threadsignals Python 2.7 (and 2.6?) should also be patched: signal.set_wakeup_fd() and PySignal_SetWakeupFd() were introduced in 2.6, but there is no versionadded tag = signal_versionadded.patch -- keywords: +patch Added file: http://bugs.python.org/file21702/signal_reentrant.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11768] signal_handler() is not reentrant: deadlock in Py_AddPendingCall()
Changes by STINNER Victor victor.stin...@haypocalc.com: -- title: test_signals() of test_threadsignals failure on Mac OS X - signal_handler() is not reentrant: deadlock in Py_AddPendingCall() ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11768] test_signals() of test_threadsignals failure on Mac OS X
STINNER Victor victor.stin...@haypocalc.com added the comment: Le lundi 18 avril 2011 à 10:40 +, STINNER Victor a écrit : Attached patch should fix this issue: - signal_handler() and PyErr_SetInterrupt() only call Py_AddPendingCall() on the first signal (if is_tripped is zero): it should fix the deadlock and it is a micro optimization (win-win !) Tested on OSX: yes, it does fix this issue. Should I apply the fix on 2.7, 3.1, 3.2 and 3.3? (or only 3.3) -- title: signal_handler() is not reentrant: deadlock in Py_AddPendingCall() - test_signals() of test_threadsignals failure on Mac OS X ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11768] test_signals() of test_threadsignals failure on Mac OS X
Changes by STINNER Victor victor.stin...@haypocalc.com: Added file: http://bugs.python.org/file21703/signal_versionadded.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11768] signal_handler() is not reentrant: deadlock in Py_AddPendingCall()
Changes by STINNER Victor victor.stin...@haypocalc.com: -- title: test_signals() of test_threadsignals failure on Mac OS X - signal_handler() is not reentrant: deadlock in Py_AddPendingCall() ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11861] 2to3 fails with a ParseError
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This file has a SyntaxError! A comma is certainly missing at the end of line 47 -- nosy: +amaury.forgeotdarc resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11861 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11866] race condition in threading._newname()
New submission from Peter Saveliev svinota.savel...@gmail.com: The _newname() function has no locking. It is called from the new thread constructor. Such constructor is executed within parent thread. So, when several threads create new threads simultaneously, there can be race condition, leading to the same name for two (or even more) threads. 8 import threading import dis dis.dis(threading._newname) 403 0 LOAD_GLOBAL 0 (_counter) 3 LOAD_CONST 1 (1) 6 BINARY_ADD 7 STORE_GLOBAL 0 (_counter) 404 10 LOAD_FAST0 (template) 13 LOAD_GLOBAL 0 (_counter) 16 BINARY_MODULO 17 RETURN_VALUE 8 The race condition can be achieved between BINARY_ADD and STORE_GLOBAL. Several threads can do BINARY_ADD before the first one will do STORE_GLOBAL. All racing threads will get the same name. 8 $ for i in `seq 0 100`; do python thread_test.py |\ awk -F Thread- '{print $2}' |\ grep -vE '^$' |\ sort |\ uniq -c -d; done 2 35 2 12 ... 8 As you see, there are cases when several threads can get same name. Proposals: use thread-safe increment counter (with atomic get-increment) like itertools.counter() (that does not release GIL) -- components: Extension Modules files: thread_test.py messages: 133963 nosy: Peter.Saveliev priority: normal severity: normal status: open title: race condition in threading._newname() type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file21704/thread_test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11866 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11768] signal_handler() is not reentrant: deadlock in Py_AddPendingCall()
Antoine Pitrou pit...@free.fr added the comment: Well, since it is a bugfix, you should apply it to all versions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11862] urlparse.ParseResult to have meaningful __str__
Tomasz Melcer li...@o2.pl added the comment: If __str__ is meant to be a user-understandable way of expressing an URL, the best way to do that is to show it the same way user sees it in usually. This is now done by .geturl() call. This way I wouldn't have to remember to serialize it in cases where I want to display an URL to user: url = urlparse.urlparse(sys.args[1]) ... print Downloading {1}.format(url) would mean: show me that URL. And if you would like to display its internal representation as a record of scheme/host/path/..., you always have __repr__. Currently both __str__ and __repr__ return `ParsedResult(scheme=http, netloc='example.com', ...)` -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11862 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5115] Extend subprocess.kill to be able to kill process groups
Changes by Ernst Sjöstrand ern...@gmail.com: -- nosy: +Ernst.Sjöstrand ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5115 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5115] Extend subprocess.kill to be able to kill process groups
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- versions: +Python 3.3 -Python 3.0 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5115 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11862] urlparse.ParseResult to have meaningful __str__
Senthil Kumaran sent...@uthcode.com added the comment: Tomasz, I think, you misunderstood the purpose of urlparse library. urlparse is for parsing the URL and into its components. The url could be a mailto:, svn+ssh or http,https. The requirement for parsing comes when you are designing systems which take up URL and you need to do parse it for certain purposes for your application and then do action based on the parsed result. That is why there are parse,unparse,split, unsplit functions provided. If you have to get the original url back it is reverse call, send the parsed result to urlunparse. The urllib, which provides facilties for doing http at higher level provides you geturl (which is getting the url from the header values). I don't see the use of __str__ or __unicode__ for parse library. I am closing this report as Invalid. Thank you. -- resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11862 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11867] Make test_mailbox deterministic
Changes by R. David Murray rdmur...@bitdance.com: -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11867 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11828] startswith and endswith don't accept None as slice index
Changes by R. David Murray rdmur...@bitdance.com: -- priority: - normal ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11828 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11241] ctypes: subclassing an already subclassed ArrayType generates AttributeError
Meador Inge mead...@gmail.com added the comment: But what happens with a third level? That doesn't work. I have a test case for that, but the test case has a typo that caused it to pass. I will fix the test case and the code. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11241 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11492] email.header.Header doesn't fold headers correctly
Roundup Robot devnull@devnull added the comment: New changeset 51a551acb60d by R David Murray in branch '3.2': #11492: rewrite header folding algorithm. Less code, more passing tests. http://hg.python.org/cpython/rev/51a551acb60d New changeset fcd20a565b95 by R David Murray in branch 'default': Merge: #11492: rewrite header folding algorithm. Less code, more passing tests. http://hg.python.org/cpython/rev/fcd20a565b95 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11492 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11492] email.header.Header doesn't fold headers correctly
Changes by R. David Murray rdmur...@bitdance.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11492 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11768] signal_handler() is not reentrant: deadlock in Py_AddPendingCall()
Roundup Robot devnull@devnull added the comment: New changeset 319f7af9ee5e by Victor Stinner in branch '3.1': Issue #11768: The signal handler of the signal module only calls http://hg.python.org/cpython/rev/319f7af9ee5e New changeset 28ab8c6ad8f9 by Victor Stinner in branch '3.2': (Merge 3.1) Issue #11768: The signal handler of the signal module only calls http://hg.python.org/cpython/rev/28ab8c6ad8f9 New changeset fdcbc8453304 by Victor Stinner in branch 'default': (Merge 3.2) Issue #11768: The signal handler of the signal module only calls http://hg.python.org/cpython/rev/fdcbc8453304 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11768] signal_handler() is not reentrant: deadlock in Py_AddPendingCall()
Roundup Robot devnull@devnull added the comment: New changeset 7d355c2ff3d4 by Victor Stinner in branch '2.7': (Merge 3.1) Issue #11768: The signal handler of the signal module only calls http://hg.python.org/cpython/rev/7d355c2ff3d4 New changeset ebd080593351 by Victor Stinner in branch '2.7': Issue #11768: signal.set_wakeup_fd() and PySignal_SetWakeupFd() added in 2.6 http://hg.python.org/cpython/rev/ebd080593351 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8769] Straightforward usage of email package fails to round-trip
R. David Murray rdmur...@bitdance.com added the comment: This is fixed in 3.2/3.3 by the fix for issue 11492. The suggested fix for 2.7 is more radical than I'm comfortable with for a point release. I'm open to argument on that, but in the meantime I'm closing the issue with 11492 as the superseder. -- resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - email.header.Header doesn't fold headers correctly ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8769 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11768] signal_handler() is not reentrant: deadlock in Py_AddPendingCall()
STINNER Victor victor.stin...@haypocalc.com added the comment: The deadlock is fixed. Reopen the issue if you still see test_threadsignals hang on a buildbot. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11768 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1372770] email.Header should preserve original FWS
R. David Murray rdmur...@bitdance.com added the comment: As of the fix for issue 11492, the email package only uses continuation_ws when folding RFC2047 encoded words. So I consider this issue fixed. (I have, by the way, come around to the view that we should never be introducing or deleting whitespace except when RFC 2047 encoding/decoding...we are still deleting it in a couple places, and I will address that by and by). -- components: +Library (Lib) -Extension Modules resolution: - duplicate stage: test needed - committed/rejected status: open - closed superseder: - email.header.Header doesn't fold headers correctly ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1372770 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5612] whitespace folding in the email package could be better ; -)
R. David Murray rdmur...@bitdance.com added the comment: This now works correctly in 3.2/3.3 (see issue 11492). Note that the whitespace compression is too deeply embeded in the 2.7 email package for there to be any way to fix it there. -- resolution: - duplicate stage: test needed - committed/rejected status: open - closed superseder: - email.header.Header doesn't fold headers correctly ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5612 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11828] startswith and endswith don't accept None as slice index
Torsten Becker torsten.bec...@gmail.com added the comment: I pushed my changes to a hg repository, they are in the two branches startswith-slices-issue11828-2.7 and startswith-slices-issue11828-3.1. -- hgrepos: +21 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11828 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11828] startswith and endswith don't accept None as slice index
Changes by Torsten Becker torsten.bec...@gmail.com: Added file: http://bugs.python.org/file21706/2b48fd451c85.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11828 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11828] startswith and endswith don't accept None as slice index
Changes by Torsten Becker torsten.bec...@gmail.com: -- hgrepos: +22 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11828 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11828] startswith and endswith don't accept None as slice index
Changes by Torsten Becker torsten.bec...@gmail.com: Removed file: http://bugs.python.org/file21706/2b48fd451c85.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11828 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8407] expose signalfd(2) and sigprocmask(2) in the signal module
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8407 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8407] expose signalfd(2) and sigprocmask(2) in the signal module
STINNER Victor victor.stin...@haypocalc.com added the comment: sigprocmask or (better) pthread_sigmask is required to fix #11859 bug. --- Python has a test for broken pthread_sigmask. Extract of configure.in: AC_MSG_CHECKING(if PTHREAD_SCOPE_SYSTEM is supported) AC_CACHE_VAL(ac_cv_pthread_system_supported, [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include pthread.h void *foo(void *parm) { return NULL; } main() { pthread_attr_t attr; pthread_t id; if (pthread_attr_init(attr)) exit(-1); if (pthread_attr_setscope(attr, PTHREAD_SCOPE_SYSTEM)) exit(-1); if (pthread_create(id, attr, foo, NULL)) exit(-1); exit(0); }]])], [ac_cv_pthread_system_supported=yes], [ac_cv_pthread_system_supported=no], [ac_cv_pthread_system_supported=no]) ]) AC_MSG_RESULT($ac_cv_pthread_system_supported) if test $ac_cv_pthread_system_supported = yes; then AC_DEFINE(PTHREAD_SYSTEM_SCHED_SUPPORTED, 1, [Defined if PTHREAD_SCOPE_SYSTEM supported.]) fi AC_CHECK_FUNCS(pthread_sigmask, [case $ac_sys_system in CYGWIN*) AC_DEFINE(HAVE_BROKEN_PTHREAD_SIGMASK, 1, [Define if pthread_sigmask() does not work on your system.]) ;; esac]) Extract of Python/thread_pthread.h: /* On platforms that don't use standard POSIX threads pthread_sigmask() * isn't present. DEC threads uses sigprocmask() instead as do most * other UNIX International compliant systems that don't have the full * pthread implementation. */ #if defined(HAVE_PTHREAD_SIGMASK) !defined(HAVE_BROKEN_PTHREAD_SIGMASK) # define SET_THREAD_SIGMASK pthread_sigmask #else # define SET_THREAD_SIGMASK sigprocmask #endif --- Because today more and more programs rely on threads, it is maybe not a good idea to provide a binding of sigprocmask(). I would prefer to only add pthread_sigmask() which has a determistic behaviour with threads. So only compile signal.pthread_sigmask() if pthread API is present and pthread_sigmask is not broken. --- About the patch: the doc should explain that the signal masks are inherited for child processes (fork() and execve()). I don't know if this behaviour is specific to Linux or not. If we only use pthread_sigmask(), the doc is wrong: Set the signal mask for the process. It's not for the process but only for the current thread. How does it work if I change the signal mask of the main thread and then I create a new thread: the signal mask is inherited, or a default mask is used instead? --- The new faulthandler uses a thread to implement a timeout: the thread uses pthread_sigmask() or sigprocmask() to ignore all signals. If I don't set the signal mask, some tests fail: check that a system call (like reading from a pipe) can be interrupted by signal. The problem is that signal may be send to the faulthandler thread, instead of the main thread. Hum, while I'm writing this, I realize that I should maybe not fallback to sigprocmask() because it may mask signals for the whole process (all threads)! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8407 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11868] Minor word-choice improvement in devguide lifecycle of a patch opening paragraph
New submission from Carl Meyer c...@dirtcircle.com: The opening paragraph of the lifecycle of a patch devguide page contains a confusing parenthetical aside implying that an svn-like workflow would mean never *saving* anything to your working copy and using hg diff to generate a patch. This is obviously wrong given the usual meaning of save: if you never save anything to your working copy, hg diff will be empty. Patch attached with proposed alternative wording. -- components: Devguide files: svn-like-wording.diff keywords: patch messages: 133978 nosy: carljm priority: normal severity: normal status: open title: Minor word-choice improvement in devguide lifecycle of a patch opening paragraph versions: 3rd party Added file: http://bugs.python.org/file21707/svn-like-wording.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11868 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11785] email subpackages documentation problems
Éric Araujo mer...@netwok.org added the comment: Sure, +1 on using the submodule name in the module or currentmodule directive. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11785 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11849] ElementTree memory leak
Charles-Francois Natali neolo...@free.fr added the comment: kaifeng cafe...@gmail.com added the comment: I added 'malloc_trim' to the test code and rerun the test with Python 2.5 / 3.2 on CentOS 5.3. The problem still exists. Well, malloc_trim can fail, but how did you add it ? Did you use patch to apply the diff ? Also, could you post the output of a ltrace -e malloc_trim python test script For info, the sample outputs I posted above come from a RHEL6 box. Anyway, I'm 99% sure this isn't a leak but a malloc issue (valgrind --tool=memcheck could confirm this if you want to try, I could be wrong, it wouldn't be the first time ;-) ). By the way, look at what I just found: http://mail.gnome.org/archives/xml/2008-February/msg3.html Antoine Pitrou pit...@free.fr added the comment: That's an interesting thing, perhaps you want to open a feature request as a separate issue? Dunno. Memory management is a domain which belongs to the operating system/libc, and I think applications should mess with it (apart from specific cases) . I don't have time to look at this precise problem in greater detail right now, but AFAICT, this looks either like a glibc bug, or at least a corner case with default malloc parameters (M_TRIM_THRESHOLD and friends), affecting only RHEL and derived distributions. malloc_trim should be called automatically by free if the amount of memory that could be release is above M_TRIM_THRESHOLD. Calling it systematically can have a non-negligible performance impact. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11849 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10932] distutils.core.setup - data_files misbehaviour ?
Éric Araujo mer...@netwok.org added the comment: The “remote hg repo” is supposed to be the URI of a clone (not of a changeset) of cpython (not distutils2), so the repos you added don’t work. Can you remove them and add a patch file instead? Thanks. The first changeset looks good; I don’t understand the second one. I'm not sure if I should modify test_command_sdist.py for the failing tests of manifest contents Hm. It looks like the tests were in contradiction with the docs. The safest way here is to fix the behavior in packaging/d2 and mention the bug in the distutils docs. (since it is mentioned not to edit). It’s a comment aimed at software developers reading the generated MANIFEST file, not at distutils2 hackers working on the tests :) See #8688. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10932 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11858] configparser.ExtendedInterpolation and section case
Changes by Łukasz Langa luk...@langa.pl: -- assignee: - lukasz.langa ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11858 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11858] configparser.ExtendedInterpolation and section case
Łukasz Langa luk...@langa.pl added the comment: Thanks for the catch. I'll add some tests and push it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11858 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11826] Leak in atexitmodule
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: It's the very first usage of PyModuleDef::m_free. Martin, do you agree with the path? -- nosy: +amaury.forgeotdarc, loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11826 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9319] imp.find_module('test/badsyntax_pep3120') causes segfault
Andreas Stührk andy-pyt...@hammerhartes.de added the comment: How about applying the workaround patch to Python 3.2? An unprecise error message is way better than a segfault. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9319 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue828450] sdist generates bad MANIFEST on Windows
Éric Araujo mer...@netwok.org added the comment: Thanks for the patch. Follow the “review” link above to find my review. +1 on making the smallest possible change. The paths inside the Filelist/Manifest objects can continue to use os.sep, we only care about write_file for this bug. Oh, and also read_file: can you add tests for MANIFEST reading? It will be a bit more complicated: write a MANIFEST file with /-separated paths, set os.sep to \\, check that sdist works. You should learn a lot about our tests helpers (mostly TempdirManager). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue828450 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10946] bdist doesn’t pass --skip-build on to subcommands
Éric Araujo mer...@netwok.org added the comment: Could you please at least describe the test that you mentioned (link doesn't work). I still have a local copy \o/. Yannick’s patch looks like this: def test_skip_build(self): pkg_pth, dist = self.create_dist() # With the skip_build option, command.build is not called. cmd = bdist(dist) cmd.skip_build = True cmd.ensure_finalized() cmd.run() self.assertFalse(dist.have_run['build']) # Without skip_build option, command.build is called. cmd = bdist(dist) cmd.skip_build = False cmd.ensure_finalized() cmd.run() self.assertTrue(dist.have_run['build']) I added line that passes skip_build from bdist.py to its subcommands and it worked for me (at least for simple cases) What about non-simple cases? They need to work too. - base.py is not called. (Assuming you meant “build is not called”) Using set_undefined_options in install_* is definitely not safe, because it fails if parent process has not set skip_build. Really? Also, what is “parent process”? Do you mean that it fails if the command used as source in set_undefined_options does not define the skip_build option in its user_options? I’m not sure it’d be good to make the install_* skip_build option depend on (== set_undefined_options from) bdist’s skip_build. I’ve written a bit of code to make testing interaction between commands easier (for example, to test that “setup.py build bdist --skip-build install” runs the second install command without skip_build set to True), I should put it in the main repo so that it can be used for this bug. Getting good test coverage before we change code is absolute requisite for those dark areas. Removing the easy keyword :) Anyway test_skip_build() is still broken and needs a fix. Okay, so maybe fix that first. -- keywords: -easy stage: needs patch - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10946 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11731] Simplify email API via 'policy' objects
Roundup Robot devnull@devnull added the comment: New changeset 2f3fda9d3906 by R David Murray in branch 'default': #11731: simplify/enhance parser/generator API by introducing policy objects. http://hg.python.org/cpython/rev/2f3fda9d3906 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11731 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11868] Minor word-choice improvement in devguide lifecycle of a patch opening paragraph
Ned Deily n...@acm.org added the comment: Thanks for the improvement. Applied in changeset cc43ed7af5f2. -- nosy: +ned.deily resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11868 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11869] Include information about the bug tracker Rietveld code review tool
New submission from Ned Deily n...@acm.org: As far as I can see, the developer's guide does not mention at all the new Rietveld code review tool integration with the Python bug tracker. The guide should describe how the tool is expected to be used both by core developers reviewing submitted patches and by patch submitters. -- components: Devguide messages: 133989 nosy: ned.deily priority: normal severity: normal status: open title: Include information about the bug tracker Rietveld code review tool ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11869 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11870] test_3_join_in_forked_from_thread() of test_threading hangs 1 hour on x86 Ubuntu Shared 3.x
New submission from STINNER Victor victor.stin...@haypocalc.com: test_3_join_in_forked_from_thread() of test_threading failed on x86 Ubuntu Shared 3.x buildbot: --- [201/354] test_threading [41179 refs] [40407 refs] [40407 refs] [40407 refs] Timeout (1:00:00)! Thread 0x404218c0: File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/subprocess.py, line 466 in _eintr_retry_call File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/subprocess.py, line 1486 in _try_wait File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/subprocess.py, line 1528 in wait File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_threading.py, line 455 in _run_and_join File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_threading.py, line 518 in test_3_join_in_forked_from_thread File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/case.py, line 387 in _executeTestPart File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/case.py, line 442 in run File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/case.py, line 494 in __call__ File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py, line 105 in run File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py, line 67 in __call__ File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py, line 105 in run File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/unittest/suite.py, line 67 in __call__ File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support.py, line 1078 in run File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support.py, line 1166 in _run_suite File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/support.py, line 1192 in run_unittest File /srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_threading.py, line 728 in test_main File ./Lib/test/regrtest.py, line 1041 in runtest_inner File ./Lib/test/regrtest.py, line 835 in runtest File ./Lib/test/regrtest.py, line 659 in main File ./Lib/test/regrtest.py, line 1619 in module make: *** [buildbottest] Error 1 program finished with exit code 2 elapsedTime=4426.776675 http://www.python.org/dev/buildbot/all/builders/x86%20Ubuntu%20Shared%203.x/builds/3577/steps/test/logs/stdio --- Code of the test: -- def _run_and_join(self, script): script = if 1: import sys, os, time, threading # a thread, which waits for the main program to terminate def joiningfunc(mainthread): mainthread.join() print('end of thread') # stdout is fully buffered because not a tty, we have to flush # before exit. sys.stdout.flush() \n + script p = subprocess.Popen([sys.executable, -c, script], stdout=subprocess.PIPE) rc = p.wait() ~~~ HANG HERE data = p.stdout.read().decode().replace('\r', '') p.stdout.close() self.assertEqual(data, end of main\nend of thread\n) self.assertFalse(rc == 2, interpreter was blocked) self.assertTrue(rc == 0, Unexpected error) @unittest.skipUnless(hasattr(os, 'fork'), needs os.fork()) def test_3_join_in_forked_from_thread(self): # Like the test above, but fork() was called from a worker thread # In the forked process, the main Thread object must be marked as stopped. # Skip platforms with known problems forking from a worker thread. # See http://bugs.python.org/issue3863. if sys.platform in ('freebsd4', 'freebsd5', 'freebsd6', 'netbsd5', 'os2emx'): raise unittest.SkipTest('due to known OS bugs on ' + sys.platform) script = if 1: main_thread = threading.current_thread() def worker(): childpid = os.fork() if childpid != 0: os.waitpid(childpid, 0) sys.exit(0) t = threading.Thread(target=joiningfunc, args=(main_thread,)) print('end of main') t.start() t.join() # Should not block: main_thread is already stopped w = threading.Thread(target=worker) w.start() self._run_and_join(script) -- -- components: Tests messages: 133990 nosy: haypo priority: normal severity: normal status: open title: test_3_join_in_forked_from_thread() of test_threading hangs 1 hour on x86 Ubuntu Shared 3.x versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11870 ___ ___ Python-bugs-list mailing list Unsubscribe:
[issue11869] Include information about the bug tracker Rietveld code review tool
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11869 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11779] test_mmap timeout (1 hour) on AMD64 Snow Leopard 3.x buildbot
STINNER Victor victor.stin...@haypocalc.com added the comment: Hum, it does still fail with a timeout of 1 hour: --- [ 41/354] test_mmap Timeout (1:00:00)! Thread 0x7fff70439ca0: File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/test_mmap.py, line 685 in test_large_offset File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/case.py, line 387 in _executeTestPart File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/case.py, line 442 in run File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/case.py, line 494 in __call__ File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/suite.py, line 105 in run File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/suite.py, line 67 in __call__ File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/suite.py, line 105 in run File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/unittest/suite.py, line 67 in __call__ File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/support.py, line 1078 in run File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/support.py, line 1166 in _run_suite File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/support.py, line 1192 in run_unittest File /Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/test_mmap.py, line 706 in test_main File ./Lib/test/regrtest.py, line 1041 in runtest_inner File ./Lib/test/regrtest.py, line 835 in runtest File ./Lib/test/regrtest.py, line 659 in main File ./Lib/test/regrtest.py, line 1619 in module make: *** [buildbottest] Error 1 program finished with exit code 2 elapsedTime=4261.520698 --- http://www.python.org/dev/buildbot/all/builders/AMD64%20Snow%20Leopard%203.x/builds/62/steps/test/logs/stdio -- resolution: out of date - status: closed - open title: test_mmap timeout (30 min) on AMD64 Snow Leopard 3.x buildbot - test_mmap timeout (1 hour) on AMD64 Snow Leopard 3.x buildbot ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11779 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11863] Enforce PEP 11 - remove support for legacy systems
Changes by Brett Cannon br...@python.org: -- nosy: +brett.cannon ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11863 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result
Sijin Joseph sijinjos...@gmail.com added the comment: From reading http://support.microsoft.com/kb/899147 it does look like the .dll extension needs to have the Read Execute permission in order to have code from the .dll be executed. It's odd that there isn't documentation that's easily searchable to confirm this. Also what about scripts, .vbs, .ps1 etc. Should those be considered executables as well? -- nosy: +sijinjoseph ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10888 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10888] os.stat(filepath).st_mode gives wrong 'executable permission' result
Martin v. Löwis mar...@v.loewis.de added the comment: Jeroen: I'm tempted to close this issue with no change. The code, as it stands, models what Microsoft does in it's CRT (see crt/src/stat.c:__tdtoxmode). There is also a straight-forward motivation to this: this is the list of extensions that you can pass to system() and friends (i.e. ultimately to CreateProcess, if cmd.exe can get involved). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10888 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11800] regrtest --timeout: apply the timeout on a function, not on the whole file
STINNER Victor victor.stin...@haypocalc.com added the comment: A timeout of 60 minutes looks to be fine. Today I debuged a thread+signal issue which gave me an headache, so I prefer to close this issue: only add create thread per file, and not a thread per function. -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11800 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11871] test_default_timeout() of test_threading.BarrierTests failure: BrokenBarrierError
New submission from STINNER Victor victor.stin...@haypocalc.com: While trying to reproduce issue #11870 using gdb -args ./python Lib/test/regrtest.py -F -v --timeout=600 test_threading, I had the following error on Linux: -- test_default_timeout (test.test_threading.BarrierTests) ... [Thread 0x71acf700 (LWP 27178) exited] [New Thread 0x71acf700 (LWP 27181)] [New Thread 0x712ce700 (LWP 27182)] [New Thread 0x73c99700 (LWP 27183)] [New Thread 0x7325a700 (LWP 27184)] Unhandled exception in thread started by function task at 0x1302340 Unhandled exception in thread started by function task at 0x1302340 Unhandled exception in thread started by function task at 0x1302340 Traceback (most recent call last): Unhandled exception in thread started by function task at 0x1302340 File /home/haypo/prog/HG/cpython/Lib/test/lock_tests.py, line 37, in task Traceback (most recent call last): Traceback (most recent call last): File /home/haypo/prog/HG/cpython/Lib/test/lock_tests.py, line 37, in task Traceback (most recent call last): File /home/haypo/prog/HG/cpython/Lib/test/lock_tests.py, line 37, in task f() f() File /home/haypo/prog/HG/cpython/Lib/test/lock_tests.py, line 37, in task File /home/haypo/prog/HG/cpython/Lib/test/lock_tests.py, line 838, in f ERROR -- -- ERROR: test_default_timeout (test.test_threading.BarrierTests) Traceback (most recent call last): File /home/haypo/prog/HG/cpython/Lib/test/lock_tests.py, line 843, in test_default_timeout self.run_threads(f) File /home/haypo/prog/HG/cpython/Lib/test/lock_tests.py, line 672, in run_threads f() File /home/haypo/prog/HG/cpython/Lib/test/lock_tests.py, line 838, in f i = barrier.wait() File /home/haypo/prog/HG/cpython/Lib/threading.py, line 472, in wait self._enter() # Block while the barrier drains. File /home/haypo/prog/HG/cpython/Lib/threading.py, line 496, in _enter raise BrokenBarrierError threading.BrokenBarrierError -- The error occured on: * Ubuntu 10.04 * Python 3.3 (2127df2c972e) * Intel(R) Core(TM)2 Quad CPU Q9300 @ 2.50GHz * 4 GB of memory -- components: Tests messages: 133995 nosy: haypo priority: normal severity: normal status: open title: test_default_timeout() of test_threading.BarrierTests failure: BrokenBarrierError versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11871 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11779] test_mmap timeout (1 hour) on AMD64 Snow Leopard 3.x buildbot
Ned Deily n...@acm.org added the comment: Note that the various HFS variants, the default file system types on OS X, do not support sparse files at all. So any tests of large files require at some point that the system writes out all the data in the file. http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPFileSystem/Articles/Comparisons.html -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11779 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11779] test_mmap timeout (1 hour) on AMD64 Snow Leopard 3.x buildbot
Ned Deily n...@acm.org added the comment: That said, on my iMac (2.4 Ghz Intel Core 2 Duo): $ time ./python -m test -v -u largefile test_mmap [...] -- Ran 24 tests in 87.673s OK 1 test OK. real1m27.875s user0m0.186s sys 0m8.626s -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11779 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11779] test_mmap timeout (1 hour) on AMD64 Snow Leopard 3.x buildbot
STINNER Victor victor.stin...@haypocalc.com added the comment: We can use the following function to check if the filesystem does support sparse files: def support_sparse_file(directory): import tempfile with tempfile.NamedTemporaryFile(dir=directory) as tmpfile: # Create a file with a size of 1 byte but without content # (only zeros) with open(tmpfile.name, wb) as f: f.truncate(1) filestat = os.stat(tmpfile.name) return (filestat.st_blocks == 0) We may skip the test if the filesystem doesn't support sparse file... But I think that it is already the purpose of the largefile resource. If this issue is not a bug, but just that the timeout is too low, we should use a bigger timeout on this specific buildbot. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11779 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10042] total_ordering stack overflow
Alexander Boyd a...@opengroove.org added the comment: This is not fixed. The accepted fix doesn't take NotImplemented into account, with the result that comparing two mutually-incomparable objects whose ordering operations were generated with total_ordering causes a stack overflow instead of the expected TypeError: unorderable types: Foo() op Bar(). I've attached a fix for this. It properly takes NotImplemented into account. It also generates __eq__ from __ne__ and vice versa if only one of them exists. -- nosy: +javawizard Added file: http://bugs.python.org/file21708/sane_total_ordering.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11828] startswith and endswith don't accept None as slice index
Jesús Cea Avión j...@jcea.es added the comment: Torsten, could you possibly publish branches too for 3.2 and default (3.3)? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11828 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10042] total_ordering stack overflow
Raymond Hettinger raymond.hettin...@gmail.com added the comment: I'm not sure that we really care about handling NotImplemented (practicality beats purity). At some point, if someone writing a class wants complete control over the rich comparison methods, then they're going to have to write those methods. -- assignee: eric.araujo - rhettinger status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10042] total_ordering stack overflow
Alexander Boyd a...@opengroove.org added the comment: But it seems pointless to force someone to implement all of the rich comparison methods when they may want to do something as simple as this: class Foo: ... def __lt__(self, other): if not isinstance(other, Foo): return NotImplemented return self.some_value other.some_value -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5162] multiprocessing cannot spawn child from a Windows service
Changes by Brian Curtin br...@python.org: -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5162 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10042] total_ordering
Raymond Hettinger raymond.hettin...@gmail.com added the comment: It may seem pointless, but it takes less than a minute to do it and it would be both faster and clearer to do it manually. There's a limit to how much implicit code generation can or should be done automatically. Also, I'm not too keen on the feature creep, or having the tool grow in complexity (making it harder to understand what it actually does). I would also be concerned about subtly changing the semantics for code that may already be using total_ordering -- the proposed change is probably harmless in most cases with only a minor performance hit, but it might break some code that currently works. BTW, in Py3.x you get __ne__ for free whenever __eq__ is supplied. -- title: total_ordering stack overflow - total_ordering type: behavior - feature request versions: +Python 3.3 -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10042] total_ordering
Alexander Boyd a...@opengroove.org added the comment: Ok. I did write that against Python 2, so I wasn't aware of __eq__ and __ne__. I'll keep that in mind. I am curious, however, as to how this could break existing code. It seems like code that relies on a stack overflow is already broken as it is. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10042] total_ordering
Raymond Hettinger raymond.hettin...@gmail.com added the comment: I am curious, however, as to how this could break existing code. It seems like code that relies on a stack overflow is already broken as it is. Probably so. I worry about changes in semantics but it might be harmless. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10042 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11779] test_mmap timeout (1 hour) on AMD64 Snow Leopard 3.x buildbot
STINNER Victor victor.stin...@haypocalc.com added the comment: Timing on the x86 Tiger buildbot: time ./python.exe -m test -v -u largefile test_mmap gives approx 5 minutes. The buildbot is a Mac mini, Intel Core Duo 1.8 GHz, 2 GB of memory, Mac OS X 10.4.10, HD: 232 GB (182 GB available) WDC WD2500BEVT-00A23T0. /usr/sbin/system_profiler gives a lot of information about the OS and the hardware, great tool! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11779 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11779] test_mmap timeout (1 hour) on AMD64 Snow Leopard 3.x buildbot
Ned Deily n...@acm.org added the comment: Maybe that buildbot machine is just overloaded. If I understand the buildbot waterfall output correctly, it looks like there are often 4 simultaneous test runs happening on that machine, one each for 2.7, 3.1, 3.2 and 3.x. http://www.python.org/dev/buildbot/all/waterfall?builder=AMD64+Snow+Leopard+3.xbuilder=AMD64+Snow+Leopard+3.2builder=AMD64+Snow+Leopard+3.1builder=AMD64+Snow+Leopard+2.7builder=AMD64+Snow+Leopard+customreload=none Maybe the buildbot config could be changed to stagger the builds a bit? Otherwise, perhaps it will often take a long time to run. On my system, a full run of just 3.x with a similar ./configure and regrtest parameters takes about 30 minutes by itself. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11779 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11870] test_3_join_in_forked_from_thread() of test_threading hangs 1 hour on x86 Ubuntu Shared 3.x
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +gps ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11870 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11849] ElementTree memory leak
kaifeng cafe...@gmail.com added the comment: I applied your patch to Python 3.2, also I added a function call to 'malloc_trim' via ctypes, as you can see in issue11849_test2.py. In fact I have a daemon written in Python 2.5, parsing an XML of size 10+ MB every 5 minutes, after 16+ hours running, the program finally exhausted 4 GB memory and died. I simplified the logic of the daemon and found ElementTree eats too much memory. There comes the attached test script. BTW, after utilize lxml instead of ElementTree, such phenomenon of increasing memory usage disappeared. $ ltrace -e malloc_trim python3.2 Issue11849_test2.py --- SIGCHLD (Child exited) --- --- SIGCHLD (Child exited) --- *** Python 3.2.0 final --- SIGCHLD (Child exited) --- --- PID TTY STAT TIME MAJFL TRS DRS RSS %MEM COMMAND --- SIGCHLD (Child exited) --- 0 13708 pts/1S+ 0:00 165 1742 636 0.0 ltrace -e malloc_trim python3.2 Issue11849_test2.py 13709 pts/1S+ 0:00 1 1316 11055 6440 0.6 python3.2 Issue11849_test2.py --- SIGCHLD (Child exited) --- 1 13708 pts/1S+ 0:00 165 1742 636 0.0 ltrace -e malloc_trim python3.2 Issue11849_test2.py 13709 pts/1S+ 0:03 1 1316 53155 47332 4.5 python3.2 Issue11849_test2.py --- SIGCHLD (Child exited) --- 2 13708 pts/1S+ 0:00 165 1742 636 0.0 ltrace -e malloc_trim python3.2 Issue11849_test2.py 13709 pts/1S+ 0:06 1 1316 91055 85204 8.2 python3.2 Issue11849_test2.py --- SIGCHLD (Child exited) --- 3 13708 pts/1S+ 0:01 165 1742 636 0.0 ltrace -e malloc_trim python3.2 Issue11849_test2.py 13709 pts/1S+ 0:10 1 1316 128947 124212 11.9 python3.2 Issue11849_test2.py --- SIGCHLD (Child exited) --- 4 13708 pts/1S+ 0:01 165 1742 636 0.0 ltrace -e malloc_trim python3.2 Issue11849_test2.py 13709 pts/1S+ 0:13 1 1316 166807 162280 15.6 python3.2 Issue11849_test2.py --- SIGCHLD (Child exited) --- 5 13708 pts/1S+ 0:01 165 1742 636 0.0 ltrace -e malloc_trim python3.2 Issue11849_test2.py 13709 pts/1S+ 0:16 1 1316 204483 198808 19.2 python3.2 Issue11849_test2.py --- SIGCHLD (Child exited) --- 6 13708 pts/1S+ 0:02 165 1742 636 0.0 ltrace -e malloc_trim python3.2 Issue11849_test2.py 13709 pts/1S+ 0:20 1 1316 242379 236672 22.8 python3.2 Issue11849_test2.py --- SIGCHLD (Child exited) --- 7 13708 pts/1S+ 0:02 165 1742 636 0.0 ltrace -e malloc_trim python3.2 Issue11849_test2.py 13709 pts/1S+ 0:23 1 1316 284383 277508 26.8 python3.2 Issue11849_test2.py --- SIGCHLD (Child exited) --- 8 13708 pts/1S+ 0:03 165 1742 636 0.0 ltrace -e malloc_trim python3.2 Issue11849_test2.py 13709 pts/1S+ 0:27 1 1316 318191 312436 30.1 python3.2 Issue11849_test2.py --- SIGCHLD (Child exited) --- 9 13708 pts/1S+ 0:03 165 1742 636 0.0 ltrace -e malloc_trim python3.2 Issue11849_test2.py 13709 pts/1S+ 0:29 1 1316 360199 353272 34.1 python3.2 Issue11849_test2.py --- SIGCHLD (Child exited) --- END 13708 pts/1S+ 0:03 165 1742 636 0.0 ltrace -e malloc_trim python3.2 Issue11849_test2.py 13709 pts/1S+ 0:34 1 1316 393975 388164 37.4 python3.2 Issue11849_test2.py malloc_trim(0, 0, 0x818480a, 0x81a0114, 0xbfb6c940) = 1 --- SIGCHLD (Child exited) --- GC 13708 pts/1S+ 0:03 165 1742 648 0.0 ltrace -e malloc_trim python3.2 Issue11849_test2.py 13709 pts/1S+ 0:35 1 1316 351871 347480 33.5 python3.2 Issue11849_test2.py --- SIGCHLD (Child exited) --- *** 13708 pts/1S+ 0:03 165 1742 648 0.0 ltrace -e malloc_trim python3.2 Issue11849_test2.py 13709 pts/1S+ 0:35 1 1316 351871 347480 33.5 python3.2 Issue11849_test2.py +++ exited (status 0) +++ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11849 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8426] multiprocessing.Queue fails to get() very large objects
Brian Cain brian.c...@gmail.com added the comment: Please don't close the issue. Joining aside, the basic point (But when size = 7279, the data submitted reaches 64k, so the writting thread blocks on the write syscall.) is not clear from the docs, right? IMO, it would be nice if I could ask my queue, Just what is your capacity (in bytes, not entries) anyways? I want to know how much I can put in here without worrying about whether the remote side is dequeueing. I guess I'd settle for explicit documentation that the bound exists. But how should I expect my code to be portable? Are there platforms which provide less than 64k? Less than 1k? Less than 256 bytes? -- Added file: http://bugs.python.org/file21709/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8426 ___Please don#39;t close the issue.divbr/divdivJoining aside, the basic point (quot;span class=Apple-style-span style=font-family: monospace; font-size: 12px; line-height: 17px; white-space: pre-wrap; But when size = 7279, the data submitted reaches 64k, so the writting thread blocks on the write syscall./spanspan class=Apple-style-span style=border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; quot;) is not clear from the docs, right?/span/div divspan style=border-collapse:collapse;font-family:arial, sans-serif;font-size:13pxbr/span/divdivspan style=border-collapse:collapse;font-family:arial, sans-serif;font-size:13pxIMO, it would be nice if I could ask my queue, quot;Just what is your capacity (in bytes, not entries) anyways? Â I want to know how much I can put in here without worrying about whether the remote side is dequeueing.quot; Â I guess I#39;d settle for explicit documentation that the bound exists. Â But how should I expect my code to be portable? Â Are there platforms which provide less than 64k? Â Less than 1k? Â Less than 256 bytes?/span/div ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8426] multiprocessing.Queue fails to get() very large objects
Changes by Terry J. Reedy tjre...@udel.edu: Removed file: http://bugs.python.org/file21709/unnamed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8426 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8426] multiprocessing.Queue fails to get() very large objects
Terry J. Reedy tjre...@udel.edu added the comment: Please do not send html responses, as they result in a spurious 'unnamed' file being attached. Please do suggest a specific change. Should this be changed to a doc issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8426 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11750] Mutualize win32 functions
Brian Curtin br...@python.org added the comment: Here's a patch replacing Modules/_multiprocessing/win32_functions.c and PC/_subprocess.c with a common PC/_windows.c. There's not much to the patch despite its size -- it just shuffles around the C code and does a few renames in the appropriate Python modules. All tests pass. I left the copyright notice from PC/_subprocess.c at the top. No idea if that needs to stay or not. -- keywords: +patch Added file: http://bugs.python.org/file21710/issue11750.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11750 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11750] Mutualize win32 functions
Changes by Brian Curtin br...@python.org: -- keywords: +needs review stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11750 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11750] Mutualize win32 functions
Changes by Santoso Wijaya santoso.wij...@gmail.com: -- nosy: +santa4nt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11750 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com