[issue12499] textwrap.wrap: add control for fonts with different character widths
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: About the patch: the function should not be passed to the constructor, it could be a regular method that can be overridden in subclasses. -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12499 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12492] Inconsistent Python find() behavior
Georg Brandl ge...@python.org added the comment: I suspect this is a problem where url is reassigned to an integer somewhere in code that isn't shown to us. Please post the whole function and the whole traceback if you still think this is a valid bug. -- nosy: +georg.brandl resolution: - invalid status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12492 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12469] test_faulthandler failures on FreeBSD 6
Charles-François Natali neolo...@free.fr added the comment: When signals are unblocked, pending signal ared delivered in the reverse order of their number (also on Linux, not only on FreeBSD 6). I don't like this. POSIX doesn't make any guarantee about signal delivery order, except for real-time signals. It might work on FreeBSD and Linux, but that's definitely not documented, and might break with new kernel releases, or other kernels. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12469 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12469] test_faulthandler failures on FreeBSD 6
STINNER Victor victor.stin...@haypocalc.com added the comment: When signals are unblocked, pending signal ared delivered in the reverse order of their number (also on Linux, not only on FreeBSD 6). I don't like this. POSIX doesn't make any guarantee about signal delivery order, except for real-time signals. It might work on FreeBSD and Linux, but that's definitely not documented, and might break with new kernel releases, or other kernels. It looks like it works like this on most OSes (Linux, Mac OS X, Solaris, FreeBSD): I don't see any test_signal failure on 3.x buildbots. If we have a failure, we can use set() again, but only for test_pending: signal order should be reliable if signals are not blocked. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12469 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12149] Segfault in _PyObject_GenericGetAttrWithDict
Changes by STINNER Victor victor.stin...@haypocalc.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12500] support.transient_internet(): catch also Windows socket errors
New submission from STINNER Victor victor.stin...@haypocalc.com: == ERROR: test_non_blocking_connect_ex (test.test_ssl.NetworkedTests) -- Traceback (most recent call last): File D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_ssl.py, line 518, in test_non_blocking_connect_ex s.do_handshake() File D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\ssl.py, line 442, in do_handshake self._sslobj.do_handshake() socket.error: [Errno 10057] A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using a sendto call) no address was supplied == FAIL: test_connect_ex (test.test_ssl.NetworkedTests) -- Traceback (most recent call last): File D:\cygwin\home\db3l\buildarea\3.x.bolen-windows\build\lib\test\test_ssl.py, line 495, in test_connect_ex self.assertEqual(0, s.connect_ex((svn.python.org, 443))) AssertionError: 0 != 10061 http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/4918/steps/test/logs/stdio WSAECONNREFUSED (10061): Connection refused. WSAENOTCONN (10057): Socket is not connected. It is obvious that transient_internet() should catch WSAECONNREFUSED, but for WSAENOTCONN, I don't understand why it happens on a SSL handshake. Attached patch catchs both errors. We may start with only WSAECONNREFUSED, and maybe add a specific code for test_ssl? -- components: Tests files: transient_internet_windows.patch keywords: patch messages: 139833 nosy: haypo, pitrou priority: normal severity: normal status: open title: support.transient_internet(): catch also Windows socket errors versions: Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file22575/transient_internet_windows.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12149] Segfault in _PyObject_GenericGetAttrWithDict
Changes by Senthil Kumaran sent...@uthcode.com: -- nosy: +orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Stefan Krah stefan-use...@bytereef.org added the comment: Nick, Pauli, thanks for all the comments. I'm busy implementing the easy changes; then it'll be easier to deal with the flags issues. Pauli: Does numpy use the (undocumented) smalltable array in the Py_buffer structure? We would like to drop it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10883] urllib: socket is not closed explicitly
Senthil Kumaran sent...@uthcode.com added the comment: With the patch applied, test_urllib2net fails at test_ftp test case when a valid and invalid url are presented in sequence. I think test needs a change or a further look is needed at the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10883 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9611] FileIO not 64-bit safe under Windows
Roundup Robot devnull@devnull added the comment: New changeset 6abbc5f68e20 by Victor Stinner in branch '2.7': Issue #9611, #9015: FileIO.read(), FileIO.readinto(), FileIO.write() and http://hg.python.org/cpython/rev/6abbc5f68e20 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9611 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12431] urllib2.Request.get_full_url() broken in newer versions of Python
Stephen White stephen-python@randomstuff.org.uk added the comment: Just to confirm that it was a release, but 2.7.1 so not the current. Doesn't appear to happen in Python 2.7 (as shipped with Fedora Core 14) or in Python 2.7.2. C:\\Python27\python.exe Python 2.7.1 (r271:86832, Nov 27 2010, 17:19:03) [MSC v.1500 64 bit (AMD64)] on win32 Type help, copyright, credits or license for more information. import urllib2 urllib2.Request(http://host/path#fragment;).get_full_url() 'http://host/path' Upgrading our affected Windows boxes to Python 2.7.2 seems to solve the problem. We're happy for this bug to remain closed. -- nosy: +Stephen.White ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12431 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9611] FileIO not 64-bit safe under Windows
Roundup Robot devnull@devnull added the comment: New changeset 7acdf9f5eb31 by Victor Stinner in branch '3.2': Issue #9611, #9015: FileIO.read() clamps the length to INT_MAX on Windows. http://hg.python.org/cpython/rev/7acdf9f5eb31 New changeset e8646f120330 by Victor Stinner in branch 'default': (merge 3.2) Issue #9611, #9015: FileIO.read() clamps the length to INT_MAX on Windows. http://hg.python.org/cpython/rev/e8646f120330 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9611 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9015] f.write(s) for s 2GB hangs in win64 (and win32?)
STINNER Victor victor.stin...@haypocalc.com added the comment: This issue is a duplicate of #9611. -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9015 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9611] FileIO not 64-bit safe under Windows
STINNER Victor victor.stin...@haypocalc.com added the comment: I backported fixes to 2.7, and also add a new fix to FileIO.read(). I don't see anything else to do on this issue, so I close it. Note: read() and write() methods the file object in 2.7 are 64-bit safe on any OS. They use fread() and frwrite() which take a length in the size_t type, not in int type even on Windows. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9611 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9611] FileIO not 64-bit safe under Windows
STINNER Victor victor.stin...@haypocalc.com added the comment: Issue #9015 has been marked as a duplicate of this issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9611 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12469] test_faulthandler failures on FreeBSD 6
STINNER Victor victor.stin...@haypocalc.com added the comment: I close this issue because test_signal pass on FreeBSD 6 buildbots (3.2 and 3.x). I will reopen it if test_faulthandler fails or if test_signal fails again, or maybe open new issues. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12469 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python
STINNER Victor victor.stin...@haypocalc.com added the comment: New changeset ea02eca122b5 by Ned Deily in branch '2.7': Issue #8716: Avoid crashes caused by Aqua Tk on OSX when attempting to run http://hg.python.org/cpython/rev/ea02eca122b5 New changeset 06cb0d602468 by Ned Deily in branch '2.7': Issue #8716: Fix errors in the non-OS X path of the 27 backport. http://hg.python.org/cpython/rev/06cb0d602468 Build #200 (revision 6abbc5f68e20eb01094dbbcf486c2ba0e1e4fa77) of AMD64 Snow Leopard 2 2.7 crashed: test_ttk_guionly make: *** [buildbottest] Segmentation fault http://www.python.org/dev/buildbot/all/builders/AMD64%20Snow%20Leopard%202%202.7/builds/200/ runtktests.check_tk_availability() creates a Tkinter.Button() in a subprocess. It should maybe try to create a ttk.Button() for test_ttk_guionly instead of Tkinter.Button(). -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8716 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11468] Improve unittest basic example in the doc
Florian Preinstorfer nbl...@archlinux.us added the comment: I tried to implement the improvements suggested by Ezio Melotti and updated the documentation accordingly. -- keywords: +patch nosy: +notizblock Added file: http://bugs.python.org/file22576/issue-11468.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11468 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Changes by Stefan Krah stefan-use...@bytereef.org: Added file: http://bugs.python.org/file22577/718801740bde.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11439] subversion keyword breakage
Neil Muller drnlmuller+b...@gmail.com added the comment: SVN_Revision.diff replaces the remaining $Revision$ keywords in 2.7 with the values from the last SVN checkout I have. This seems the correct minimal fix for the issues caused by code parsing the revision tag in Python 2. I've left the various other keywords untouched in 2.7 (mainly $Id$ tags) untouched, since they appear to be unused. -- keywords: +patch Added file: http://bugs.python.org/file22578/SVN_Revision.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11439 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Stefan Krah stefan-use...@bytereef.org added the comment: I've uploaded a revised version that addresses several suggestions. I think we have agreement on those now: - Officially ditch smalltable. - Comment static storage fields inside PyMemoryViewObject. - Improve refcounting in PyMemoryView_FromBuffer()/PyMemoryView_FromObject(). - Increment mbuf refcount in memory_getbuf(). - Create separate sections for managedbuffer and memoryview. Still open: - Update documentation. - Should PyManagedBuffer be private to this file? Do we need mbuf_new()? - Add test to _testcapimodule.c. I wrote a small test for the problematic case in PyMemoryView_GetContiguous(), and it indeed returns an unaltered view. I suggest that we leave the NotImplementedError for now and handle that in a separate issue. - Flag handling. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11439] subversion keyword breakage
Neil Muller drnlmuller+b...@gmail.com added the comment: This patch removes or replaces a number SVN keywords which aren't buried in comments. I've removed '__revision__ = $Id$' cases - mainly present in distutils - as no-one appears to using these. I've replaced values in tarfile.py, but they can probably be removed as well. -- Added file: http://bugs.python.org/file22579/cleanup_3.3svn_keywords.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11439 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12494] subprocess: check_output() doesn't close pipes on error
STINNER Victor victor.stin...@haypocalc.com added the comment: subprocess_check_output-2.patch is a more complete patch: fix (?) call(), check_output() and getstatusoutput(). These functions kill the process if an exception occurs to not hang on wait() in Popen.__exit__(). Because of the kill, I don't know if the fix should be applied to 2.7 and 3.2. In case of an exception, is it better to keep the subprocess alive, or to kill it? If we keep it alive, the caller of the function cannot interact with the process, and we don't know exactly when it will finish. By exception, I mean unexpected exceptions: check_output() handles explicitly the TimeoutExpired exception. -- Added file: http://bugs.python.org/file22580/subprocess_check_output-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python
Ronald Oussoren ronaldousso...@mac.com added the comment: python2.7 has MacOS.WMAvailable(). When that function returns False the Tkinter tests should be disabled. The function is not available in Python 3, but is easy enough to implement using ctypes. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8716 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6721] Locks in python standard library should be sanitized on fork
Tomaž Šolc tomaz.s...@tablix.org added the comment: Except for multiprocessing, does anyone know of any other module in the standard library that uses fork() and threads at the same time? After some grepping through the source I couldn't find any other cases. I'm still in favor of just deprecating using fork() on a multithreaded process (with appropriate warnings and documentation) and I'm prepared to work on a patch that would remove the need for helper threads in the multiprocessing module. I gather that having atfork would be useful beyond attempting to solve the locking problem, so this doesn't mean I'm opposed to it. However debugging rare problems in multithreaded/multiprocess applications is such a frustrating task that I really don't like a solution that only works in the common case. In Python atfork() handlers will never run from signal handlers, and if I understood correctly, Charles-François described a way to re-initialize a Python lock safely under that assumption. Just to clarify: it's not that POSIX atfork() handlers run from signal handlers. It's that after a fork in a multithreaded process POSIX only guarantees calls to safe functions, which is the same set of functions as those that are safe to call from signal handlers. This fact does not change for Python's os.fork(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12500] support.transient_internet(): catch also Windows socket errors
Antoine Pitrou pit...@free.fr added the comment: You don't need to add WSAECONNREFUSED, it's already there as ECONNREFUSED: errno.ECONNREFUSED 10061 errno.WSAECONNREFUSED 10061 As for (WSA)ENOTCONN, I don't want to add it before knowing what happens. It may signal a programming error. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6721] Locks in python standard library should be sanitized on fork
Antoine Pitrou pit...@free.fr added the comment: Except for multiprocessing, does anyone know of any other module in the standard library that uses fork() and threads at the same time? After some grepping through the source I couldn't find any other cases. It's quite common to launch a subprocess from a thread, so as to communicate with the subprocess without blocking the main thread. I'm not sure the stdlib itself does it, but the test suite does (when run in parallel mode). I'm prepared to work on a patch that would remove the need for helper threads in the multiprocessing module. Your contribution is welcome. Just to clarify: it's not that POSIX atfork() handlers run from signal handlers. It's that after a fork in a multithreaded process POSIX only guarantees calls to safe functions, which is the same set of functions as those that are safe to call from signal handlers. For the record, I would consider POSIX totally broken from this point of view. It seems most modern systems allow much more than that, fortunately. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12501] callable(): remove the deprecation warning from Python 2.7
New submission from STINNER Victor victor.stin...@haypocalc.com: Python 2.7 emits a DeprecationWarning warning if callable() is called and python has the -3 option. callable() was removed in Python 3.0, but it was also added again in Python 3.2 (issue #10518). $ ./python -bb -3 -Werror Python 2.7.2+ (2.7:7bfedb159e82, Jul 5 2011, 13:23:38) callable(int) Traceback (most recent call last): File stdin, line 1, in module DeprecationWarning: callable() not supported in 3.x; use isinstance(x, collections.Callable) I propose to drop the warning from Python 2.7. Use the six module if you would like to support Python 3.1, or use directly the following workaround in your code: def callable(obj): return any(__call__ in klass.__dict__ for klass in type(obj).__mro__) Attached patch removes the warning. By the way, the six should be updated for Python 3.2: callable is a builtin again ;-) -- files: callable_warning.patch keywords: patch messages: 139853 nosy: benjamin.peterson, haypo, pitrou priority: normal severity: normal status: open title: callable(): remove the deprecation warning from Python 2.7 versions: Python 2.7 Added file: http://bugs.python.org/file22581/callable_warning.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12501 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12500] support.transient_internet(): catch also Windows socket errors
STINNER Victor victor.stin...@haypocalc.com added the comment: You don't need to add WSAECONNREFUSED, it's already there as ECONNREFUSED Oh ok. Here is a patch for test_ssl.test_connect_ex() ignoring ECONNREFUSED error. -- Added file: http://bugs.python.org/file22582/test_ssl.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12489] email.errors.HeaderParseError if base64url is used
Thomas Guettler guet...@thomas-guettler.de added the comment: I received this email. Here is the creator: X-Mailer: CommuniGate Pro MAPI Connector 1.52.53.10/1.53.10.1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12489 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Stefan Krah stefan-use...@bytereef.org added the comment: I'm slightly confused about the implication chain in the flags. PyBUF_STRIDES seem to allow for discontiguous arrays, yet STRIDES - ND - C_CONTIGUOUS. PyBUF_FULL[_RO] | PyBUF_INDIRECT -- PyBUF_FORMAT --[PyBUF_WRITABLE] | PyBUF_STRIDES (This would be used when the consumer can handle strided, discontiguous arrays ...) | PyBUF_ND - PyBUF_CONTIG (why?) | PyBUF_C_CONTIGUOUS (... but the implication chain leads us to a contiguous buffer) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12500] support.transient_internet(): catch also Windows socket errors
Antoine Pitrou pit...@free.fr added the comment: Oh ok. Here is a patch for test_ssl.test_connect_ex() ignoring ECONNREFUSED error. IMO you also want to test for the other errnos in transient_internet. Also, it should skip the test if the connection is refused. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6721] Locks in python standard library should be sanitized on fork
Charles-François Natali neolo...@free.fr added the comment: Except for multiprocessing, does anyone know of any other module in the standard library that uses fork() and threads at the same time? After some grepping through the source I couldn't find any other cases. The same problem arises in case of user-created threads, this problem is not specific to the multiprocessing. Just to clarify: it's not that POSIX atfork() handlers run from signal handlers. It's that after a fork in a multithreaded process POSIX only guarantees calls to safe functions, which is the same set of functions as those that are safe to call from signal handlers. This fact does not change for Python's os.fork(). I think Nir knows perfectly that, he was just referring to a limitation of pthread_atfork: - fork() is async-safe, and thus can be called from a signal handler - but if pthread_atfork handlers are installed, then fork() can become non async-safe, if the handlers are not async-safe (and it's the case when you're dealing with POSIX mutexes for example) But since Python's user-defined signal handlers are actually called synchronously (and don't run on behalf of the signal handler), there's no risk of fork() being called from a signal handler. I'm still in favor of just deprecating using fork() on a multithreaded process (with appropriate warnings and documentation) We can't do that, it would break existing code. Furthermore, some libraries use threads behind the scene. I'm prepared to work on a patch that would remove the need for helper threads in the multiprocessing module. What do you mean by helper threads? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Antoine Pitrou pit...@free.fr added the comment: I'm slightly confused about the implication chain in the flags. PyBUF_STRIDES seem to allow for discontiguous arrays, yet STRIDES - ND - C_CONTIGUOUS. To be honest I have never understood anything about these flags, and I doubt anyone without a numpy background would. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12493] subprocess: Popen.communicate() doesn't handle EINTR in some cases
Roundup Robot devnull@devnull added the comment: New changeset dcfacc2d93b4 by Victor Stinner in branch '3.2': Issue #12493: subprocess: communicate() handles EINTR http://hg.python.org/cpython/rev/dcfacc2d93b4 New changeset 42e23db3ddfc by Victor Stinner in branch 'default': (merge 3.2) Issue #12493: subprocess: communicate() handles EINTR http://hg.python.org/cpython/rev/42e23db3ddfc New changeset 6a28ccde2f1b by Victor Stinner in branch '2.7': Issue #12493: subprocess: communicate() handles EINTR http://hg.python.org/cpython/rev/6a28ccde2f1b -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12493 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12493] subprocess: Popen.communicate() doesn't handle EINTR in some cases
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12493 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Pauli Virtanen p...@iki.fi added the comment: The flags don't seem to be meant to describe the properties of the buffer, only what the exporter is required to fill in. STRIDES does not imply necessarily discontinuous, only that the `strides` field is present. The C_/F_/ANY_CONTIGUOUS flags imply that the memory layout of an n-dim array is C/Fortran/either contiguous. Why these flags imply STRIDES is probably to make the result unambiguous, and because typically when dealing with n-d arrays you usually need to know the strides anyway. `NULL` `strides` implies C-contiguous, so the CONTIG flag does not imply STRIDES (no idea why it's different from PyBUF_C_CONTIGUOUS). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12500] support.transient_internet(): catch also Windows socket errors
STINNER Victor victor.stin...@haypocalc.com added the comment: Updated patch: add support.transient_errors tuple. -- Added file: http://bugs.python.org/file22583/test_ssl-2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12500] support.transient_internet(): catch also Windows socket errors
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file22575/transient_internet_windows.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12500] support.transient_internet(): catch also Windows socket errors
Changes by STINNER Victor victor.stin...@haypocalc.com: Removed file: http://bugs.python.org/file22582/test_ssl.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12500] Skip test_ssl.test_connect_ex() on connection error
Changes by STINNER Victor victor.stin...@haypocalc.com: -- title: support.transient_internet(): catch also Windows socket errors - Skip test_ssl.test_connect_ex() on connection error ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12500 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12426] packaging.tests.test_command_install_dist.InstallTestCase failure
STINNER Victor victor.stin...@haypocalc.com added the comment: I didn't see this failure recently. Because packaging module (and tests) changed after the failure, I suppose that the bug is already fixed. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12426 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12364] Deadlock in test_concurrent_futures
Changes by STINNER Victor victor.stin...@haypocalc.com: -- title: Timeout (1 hour) in test_concurrent_futures.tearDown() on sparc solaris10 gcc 3.x - Deadlock in test_concurrent_futures ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12364 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12451] open: avoid the locale encoding when possible
Roundup Robot devnull@devnull added the comment: New changeset 8b62f5d722f4 by Victor Stinner in branch '3.2': Issue #12451: pydoc: html_getfile() now uses tokenize.open() to support Python http://hg.python.org/cpython/rev/8b62f5d722f4 New changeset 2fbfb7ea362f by Victor Stinner in branch 'default': (merge 3.2) Issue #12451: pydoc: html_getfile() now uses tokenize.open() to http://hg.python.org/cpython/rev/2fbfb7ea362f -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12451 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8695] Issue while installing Python 2.6.5 in IBM AIX 6.1
Changes by abdeljalil chehaibou abdeljalil.chehai...@gmail.com: -- nosy: +abdeljalil.chehaibou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8695 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Nick Coghlan ncogh...@gmail.com added the comment: It took me a bit of thinking, but I figured out why the contiguous flags imply STRIDES. A quick recap of all the flags: WRITABLE - error if can't support write access FORMAT - request format info in Py_buffer struct. Should never error, but report unsigned bytes if not requested ND - requests shape info in Py_buffer struct. Report 1 dimensional if not requested. Error if data is not C contiguous (as STRIDES is required to handle any non-C contiguous cases). STRIDES - requests shape and stride info. Error if correct buffer access requires stride support and this flag is not passed. C_CONTIGUOUS/F_CONTIGUOUS/ANY_CONTIGUOUS - variants that also request shape and stride info but are limited to handling C contiguous memory, Fortran contiguous memory or either. INDIRECT - requests shape and suboffset info. Error if correct buffer access requires suboffset support and this flag is not passed. So, to address the specific confusion, the basic STRIDES request just says give me the strides info and I can deal with whatever you give me. The CONTIGUOUS variants say give me the strides info, but I can only cope with certain layouts, so error if you can't provide them. ND is a way to say I can copy with multiple dimensions, but only the C version without using strides info Suppose we have a 3x4 array of unsigned bytes (i.e. 12 bytes of data). In C format, the strides info would be [4, 1] (buf[0][0] and buf[0][1] are adjacent in memory, while buf[0][0] and buf[1][0] are 4 bytes apart). In FORTRAN format that layout is different, so the strides info would be [1, 3] (and now buf[0][0] and buf[1][0] are adjacent while buf[0][0] and buf[0][1] are 3 bytes apart). The difference between ND and C_CONTIGUOUS is that the latter asks for both the shape and strides fields in the Py_buffer object to be populated while the former only requests shape information. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Nick Coghlan ncogh...@gmail.com added the comment: At least, that's the explanation based on the PEP - not sure where CONTIG as an alias for ND (N-dimensional) comes from. But then, smalltable was an undocumented novelty, too :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12493] subprocess: Popen.communicate() doesn't handle EINTR in some cases
Roundup Robot devnull@devnull added the comment: New changeset 807921ba241d by Victor Stinner in branch '3.2': Issue #12493: skip test_communicate_eintr() if signal.SIGALRM is missing http://hg.python.org/cpython/rev/807921ba241d New changeset 4928cf093a11 by Victor Stinner in branch 'default': (merge 3.2) Issue #12493: skip test_communicate_eintr() if signal.SIGALRM is missing http://hg.python.org/cpython/rev/4928cf093a11 New changeset 8a4c9c154b5d by Victor Stinner in branch '2.7': Issue #12493: skip test_communicate_eintr() if signal.SIGALRM is missing http://hg.python.org/cpython/rev/8a4c9c154b5d -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12493 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Nick Coghlan ncogh...@gmail.com added the comment: To address the should PyManagedBuffer be public? question: yes, I think so. Given the amount of grief the raw PEP 3118 API has caused the memoryview implementation, I expect the easier lifecycle management provided by the PyObject based API may also help 3rd parties. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6721] Locks in python standard library should be sanitized on fork
Tomaž Šolc tomaz.s...@tablix.org added the comment: We can't do that, it would break existing code. I would argue that such code is already broken. What do you mean by helper threads? multiprocessing uses threads behind the scenes to handle queue traffic and such for individual forked processes. It's something I also wasn't aware of until Antoine pointed it out. It also has its own implementation of atfork hooks in an attempt to handle the locking issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Nick Coghlan ncogh...@gmail.com added the comment: Regarding the Reitveld cc field: I tend not to add anyone to that and instead post comments to the tracker item to say that I've finished a review in Reitveld. If people want to see details they can go look at the review itself (or remove themselves from the bug nosy list if they have genuinely lost interest). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Antoine Pitrou pit...@free.fr added the comment: Regarding the Reitveld cc field: I tend not to add anyone to that and instead post comments to the tracker item to say that I've finished a review in Reitveld. If people want to see details they can go look at the review itself (or remove themselves from the bug nosy list if they have genuinely lost interest). Be aware the Rietveld integration is buggy: for example, I got no notification of the current reviews. So it's better to post a message mentioning the review anyway. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Nick Coghlan ncogh...@gmail.com added the comment: I don't think that's a bug, it's a missing feature in the integration (there's a request on the metatracker to add automatic notifications of new reviews on the bug itself). I did mention the review above but it would have been easy to miss amongst the other comments. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Antoine Pitrou pit...@free.fr added the comment: I don't think that's a bug, it's a missing feature in the integration (there's a request on the metatracker to add automatic notifications of new reviews on the bug itself). It is a bug, actually. People on the nosy list are also on the Rietveld cc list, but in the wrong form. See http://psf.upfronthosting.co.za/roundup/meta/issue382 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Antoine Pitrou pit...@free.fr added the comment: (and so, for the record, I've added my own small review :)) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10608] Add a section to Windows FAQ explaining os.symlink
Changes by Adam Woodbeck adam.woodb...@gmail.com: -- nosy: +adam.woodbeck ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10608 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Nick Coghlan ncogh...@gmail.com added the comment: Moving this discussion out of the review comments: Antoine is wanting to make release() nondeterministic by having the underlying buffer only released when all views using it either have release() called or are no longer referenced. I contend that release() needs to mean release the underlying memory *right now* or it is completely pointless. The I don't want to care about lifecycle issues approach is already handled quite adequately by the ordinary refcounting semantics. If ensuring that all references have been eliminated before release() is called is too much work for a user then the answer is simple: don't call release() and let the refcounting do the work. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10647] scrollbar crash in non-US locale format settings
Hans Bering hans.ber...@arcor.de added the comment: I'm sorry, but it seems the issue described in my previous edit (msg139566) is perhaps not related to the original Scrollbar problem. I had thought they were because of the superficial resemblance (i.e., crashes due to locale-dependent float handling for integer arguments), but I cannot reproduce the Scollbar problem. Sorry for any inconvenience; is it possible to delete my entries? I would then submit them as an independent issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10647 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Antoine Pitrou pit...@free.fr added the comment: Antoine is wanting to make release() nondeterministic by having the underlying buffer only released when all views using it either have release() called or are no longer referenced. That's not nondeterministic if everyone calls release(). Less so than garbage collection anyway. I contend that release() needs to mean release the underlying memory *right now* or it is completely pointless. The I don't want to care about lifecycle issues approach is already handled quite adequately by the ordinary refcounting semantics. Well, if you assume refcounting and no reference cycles, then release() is AFAICT already useless. See issue9757 for the argument we had with Guido ;) My issue is that until now sliced memoryviews are independent objects and are not affected by the releasing of the original memoryview. With this patch, they are, and that's why I'm advocating for a subtler approach (which would really mirror the current slicing semantics, and wouldn't break compatibility ;)). release() is supposed to mean you can dispose of this memoryview, not you can dispose of any underlying memory area, even if there's some sharing that I as an user don't know anything about (*). By making release() affect related memoryviews we are exposing an internal implementation detail (the PyManagedBuffer sharing) as part of the API. (*) for something similar, if you close() a file-like object obtained through socket.makefile(), it doesn't close the underlying fd until all other file-like objects are closed too -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2506] Line tracing of continue after always-taken if is incorrect
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2506 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Stefan Krah stefan-use...@bytereef.org added the comment: Antoine Pitrou rep...@bugs.python.org wrote: My issue is that until now sliced memoryviews are independent objects and are not affected by the releasing of the original memoryview. With this patch, they are, and that's why I'm advocating for a subtler approach (which would really mirror the current slicing semantics, and wouldn't break compatibility ;)). I wrote a comment on rietveld (which failed to get mailed again). My plan is to make the sliced views more independent by copying shape, strides, and suboffsets unconditionally on construction. Then it should always be possible to delete views independently. With respect to releasing, the views are of course still dependent. release() is supposed to mean you can dispose of this memoryview, not you can dispose of any underlying memory area, even if there's some sharing that I as an user don't know anything about (*). By making release() affect related memoryviews we are exposing an internal implementation detail (the PyManagedBuffer sharing) as part of the API. I thought the rationale for the release() method was to allow sequences like: b = bytearray() m1 = memoryview(b) m1.release() - must call releasebuffer instantly. b.resize(10) - this might fail otherwise if the garbage collection is too slow. So I think releasebuffer must be called on the original base object, and only the ManagedBuffer can do that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12043] Update shutil documentation
Éric Araujo mer...@netwok.org added the comment: I will commit the rest of the patch. -- assignee: docs@python - eric.araujo priority: low - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12043 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12499] textwrap.wrap: add control for fonts with different character widths
Éric Araujo mer...@netwok.org added the comment: Amaury, do you think it’s more common to subclass TextWrapper than just instantiate it? I find the proposed API (an argument to __init__) very intuitive. -- keywords: +needs review nosy: +eric.araujo, georg.brandl stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12499 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12485] textwrap.wrap: new argument for more pleasing output
Éric Araujo mer...@netwok.org added the comment: xrange does not exist in Python 3, it’s called range. You should have seen yesterday that I changed the versions: as a new feature, this cannot go into stable releases, only into the next one. I’m adding Georg to nosy per http://docs.python.org/devguide/experts -- nosy: +georg.brandl title: textwrap.wrap: add control for custom length and orphans - textwrap.wrap: new argument for more pleasing output ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12485 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12501] callable(): remove/amend the deprecation warning in Python 2.7
Éric Araujo mer...@netwok.org added the comment: What about this change instead: -if (PyErr_WarnPy3k(callable() not supported in 3.x; +if (PyErr_WarnPy3k(callable() not supported in 3.1; -- nosy: +eric.araujo title: callable(): remove the deprecation warning from Python 2.7 - callable(): remove/amend the deprecation warning in Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12501 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Antoine Pitrou pit...@free.fr added the comment: I thought the rationale for the release() method was to allow sequences like: b = bytearray() m1 = memoryview(b) m1.release() - must call releasebuffer instantly. b.resize(10) - this might fail otherwise if the garbage collection is too slow. Well, that would still work with my proposal. Now consider: def some_library_function(byteslike): with memoryview(byteslike) as m2: # do something with m2 with memoryview(some_object) as m1: some_library_function(m1) ... print(m1[0]) That m1 becomes unusable after m2 is released in the library function is completely counter-intuitive, and will make memoryviews a pain to use in real life. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7231] Windows installer does not add \Scripts folder to the path
Éric Araujo mer...@netwok.org added the comment: Duplicate of #9093 (or is it the reverse?) -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7231 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7231] Windows installer does not add \Scripts folder to the path
Changes by Éric Araujo mer...@netwok.org: -- Removed message: http://bugs.python.org/msg139884 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7231 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7231] Windows installer does not add \Scripts folder to the path
Éric Araujo mer...@netwok.org added the comment: Duplicate of #3561 (or maybe the reverse) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7231 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11123] problem with packaged dependency extracter script, pdeps
Éric Araujo mer...@netwok.org added the comment: Looks good. I suggest you test again and commit. -- nosy: +eric.araujo stage: - patch review type: crash - behavior versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11123 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12492] Inconsistent Python find() behavior
Juan Gonzalez juan.gonza...@ti.com added the comment: Today I tried to use parse() instead of find() and I found out the following response: tony@ubuntu:~/auto/sel/scripts$ python wtfibmdom Traceback (most recent call last): File wtfibmdom, line 22, in module if url.parse(str) 0: AttributeError: 'str' object has no attribute 'parse' tony@ubuntu:~/auto/sel/scripts$ python wtfibmdom Title: j3-dcsled-prd-validation passed Fri, 01 Jul 2011 14:03:59 -0500 Description: Build passed Traceback (most recent call last): File wtfibmdom, line 22, in module if url.find(str) 0: AttributeError: 'int' object has no attribute 'find' I think this behavior is inconsistent since the compiler is treating the url variable as int and string at the same time. -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12492 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12492] Inconsistent Python find() behavior
Juan Gonzalez juan.gonza...@ti.com added the comment: Hi Georg, This is the python code listing: from RSS import ns, CollectionChannel, TrackingChannel #Create a tracking channel, which is a data structure that #Indexes RSS data by item URL tc = TrackingChannel() str = 'j3-nspire-prd-validation' index = 0 #Returns the RSSParser instance used, which can usually be ignored #tc.parse(http://www.python.org/channews.rdf;) tc.parse(http://pdt-california.eps.ti.com:8080/dashboard/rss.xml;) RSS10_TITLE = (ns.rss10, 'title') RSS10_DESC = (ns.rss10, 'description') #You can also use tc.keys() items = tc.listItems() for item in items: #Each item is a (url, order_index) tuple url = item[index] #print RSS Item:, #str.find(str, beg=0 end=len(string)) if url.find(str) 0: print RSS Item:, url break; #Get all the data for the item as a Python dictionary index = index + 1 item_data = tc.getItem(item) print Title:, item_data.get(RSS10_TITLE, (none)) print Description:, item_data.get(RSS10_DESC, (none)) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12492 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11394] Tools/demo, etc. are not installed
Éric Araujo mer...@netwok.org added the comment: Explicit request for inclusion? What kind of bureaucracy are you up to? This probably means: bug reports. The Tools directory may or may not be included in UNIX tarballs, Mac OS X installers or Windows installers. It is not documented anywhere that they should be, so I think this report is invalid. The primary users of Tools are developers and contributors, not Python users in general; the part of Tools/demo that survived the 3.2 Demo Purge is not very useful, and could be moved to the docs or the wiki IMHO. -- components: -Windows nosy: +eric.araujo title: No Tools/demo, etc, on Windows - Tools/demo, etc. are not installed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11394 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12492] Inconsistent Python find() behavior
Brian Curtin br...@python.org added the comment: Can you post some example code or a test case? -- nosy: +brian.curtin ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12492 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6931] dreadful performance in difflib: ndiff and HtmlDiff
Éric Araujo mer...@netwok.org added the comment: The patch by Filip does not add new features, so I’m adjusting versions. I cannot review the patch only by reading it, but if someone gives me a timeit command I can post a benchmark for my Debian machine. -- nosy: +eric.araujo versions: +Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6931 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10318] make altinstall installs many files with incorrect shebangs
Éric Araujo mer...@netwok.org added the comment: This 3.2 patch updates UNIX rights and shebangs in Tools/scripts. I also edited mailerdaemon, which used a string exception. -- versions: -Python 3.1 Added file: http://bugs.python.org/file22584/tools-scripts.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10318 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12492] Inconsistent Python find() behavior
Jesús Cea Avión j...@jcea.es added the comment: Put the failing code inside a try, and wrote in the except: print repr(url). I am pretty sure your url can be, actually, a number. Or print url just before the 'faulty' line. I guess you will be surprised. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12492 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12499] textwrap.wrap: add control for fonts with different character widths
Tyler Romeo tylerro...@gmail.com added the comment: Normally I would have just added it as a function to be overloaded, but because of the nature of the textwrap.wrap function (all kwargs are passed to the TextWrapper constructor) I thought it made a lot more sense to keep it as an argument to __init__. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12499 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9860] Building python outside of source directory fails
Éric Araujo mer...@netwok.org added the comment: I am working on a patch to make patchcheck use os.path.join(sysconfig.get_config_var('srcdir'), etc.) to look for the .hg dir and open files (to do its checks) with the right paths. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9860 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12492] Inconsistent Python find() behavior
Changes by Brian Curtin br...@python.org: -- stage: - committed/rejected status: open - closed type: crash - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12492 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6721] Locks in python standard library should be sanitized on fork
Charles-François Natali neolo...@free.fr added the comment: We can't do that, it would break existing code. I would argue that such code is already broken. - that's not necessarily true, if your code is carefully designed - we can't forbid fork() in a multi-threaded application while it's allowed by POSIX - backward compatibility is *really* important What do you mean by helper threads? multiprocessing uses threads behind the scenes to handle queue traffic and such for individual forked processes. It's something I also wasn't aware of until Antoine pointed it out. It also has its own implementation of atfork hooks in an attempt to handle the locking issue. I'm curious as to how you'll manage to implement multiprocessing.queues without threads. Please open a dedicated issue for this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12492] Inconsistent Python find() behavior
Juan Gonzalez juan.gonza...@ti.com added the comment: I print 1 before the faulty line and like Jesús says I'm surprised I get a 1 Description: Build passed 1 Traceback (most recent call last): File wtfibmdom, line 23, in module if url.find(str) 0: AttributeError: 'int' object has no attribute 'find' -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12492 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12502] 100% cpu usage when using asyncore with UNIX socket
New submission from Алексей Агапитов marwinx...@gmail.com: When using asyncore server with UNIX socket, I got 100% CPU usage. I run modified code example from asyncore doc page. This code was tested on two systems: Ubuntu 10.04 2.6.32-32-generic #62-Ubuntu SMP with two versions of Python: Python 3.2 (r32:88445, Mar 29 2011, 08:55:36) Python 3.2.1rc2 (default, Jul 5 2011, 20:33:19) Built from sources and Gentoo 2.6.36-hardened-r9 #6 SMP with Python 3.1.3 (r313:86834, Mar 12 2011, 20:06:24) I'm not sure, maybe it's because of the characteristics of UNIX socket? -- components: Library (Lib) files: asyncore_test.py messages: 139898 nosy: Alexey.Agapitov priority: normal severity: normal status: open title: 100% cpu usage when using asyncore with UNIX socket type: resource usage versions: Python 3.2 Added file: http://bugs.python.org/file22585/asyncore_test.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12502 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12502] 100% cpu usage when using asyncore with UNIX socket
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12502 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12502] 100% cpu usage when using asyncore with UNIX socket
Charles-François Natali neolo...@free.fr added the comment: It's looping in Lib/asyncore.py:poll select(4, [3], [3], [3], {30, 0}) = 1 (out [3], left {29, 94}) select(4, [3], [3], [3], {30, 0}) = 1 (out [3], left {29, 94}) select(4, [3], [3], [3], {30, 0}) = 1 (out [3], left {29, 94}) loop sets the Unix domain socket in the writable set, and contrarily to AF_INET/AF_INET6 sockets, bound AF_UNIX SOCK_STREAM sockets are reported as writable before any client connects to them, which triggers the loop. I've attached a patch which just doesn't add the socket to the writable set if it's in the accepting state. It fixes the loop, and doesn't seem to cause any regression in test_asyncore, but since it's the first time I'm looking at asyncore's code, I might very well have missed something :-) -- keywords: +patch nosy: +neologix Added file: http://bugs.python.org/file22586/asyncore_unix_socket.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12502 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12502] 100% cpu usage when using asyncore with UNIX socket
Ross Lagerwall rosslagerw...@gmail.com added the comment: Looks good, the patch seems to fix the problem. This section of code indicates that the accepting socket shouldn't be in the write set... def handle_write_event(self): if self.accepting: # Accepting sockets shouldn't get a write event. # We will pretend it didn't happen. return -- nosy: +rosslagerwall ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12502 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12459] time.sleep(-1.0) behaviour
Roundup Robot devnull@devnull added the comment: New changeset 0e5485634817 by Victor Stinner in branch 'default': Issue #12459: time.sleep() now raises a ValueError if the sleep length is http://hg.python.org/cpython/rev/0e5485634817 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12459] time.sleep(-1.0) behaviour
STINNER Victor victor.stin...@haypocalc.com added the comment: Tim Lesher agreed to raise an exception (That makes sense. Better to be consistent within the time API--I know the different semantics of time.clock() have confused people around here.), so I think that everybody agreed to raise an exception. I commited my commit, let close this issue. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12459 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12494] subprocess: check_output() doesn't close pipes on error
STINNER Victor victor.stin...@haypocalc.com added the comment: See also issue #12044 which changed the context manager to call the wait() method. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12494 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12044] subprocess.Popen.__exit__ doesn't wait for process end
STINNER Victor victor.stin...@haypocalc.com added the comment: See also issue #12494: subprocess: check_output() doesn't close pipes on error. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12044 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python
Ned Deily n...@acm.org added the comment: That's puzzling. That particular segfault failure is on test_ttk_guionly but test_tk apparently passed earlier in the run and it seems that this buildbot is being run with a window manager connection available (the changes that I added did not raise an exception and the DISPLAY env variable is set). Further, it's an intermittent segfault. At the moment, for this buildbot (http://www.python.org/dev/buildbot/all/buildslaves/parc-snowleopard-1), in recent builds only 2.7 builds 202 and 200 have the segfault; 2.7 builds 203 and 201 do not nor do any of the recent 3.2 or 3.x builds. So, while the fixes I checked in do appear to prevent segfaults in the headless operation case (I was able to reproduce and test this on my systems), these two buildbot segfaults appear to have a different root cause. I am going to temporarily add Ronald's suggested test for 2.7 in hopes of confirming that the window manager connection is indeed not the issue on the buildbot. I would also be int erested in confirmation that what is checked in now prevents the segfaults when running the tests under a headless ssh. With regard to untktests.check_tk_availability() creates a Tkinter.Button() in a subprocess. It should maybe try to create a ttk.Button() for test_ttk_guionly instead of Tkinter.Button(): ttk is not necessarily available in older versions of Tk. The tests are structured to test for Tk availability first and then separately for ttk availability. -- resolution: fixed - stage: committed/rejected - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8716 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python
Roundup Robot devnull@devnull added the comment: New changeset 18ce15f841cf by Ned Deily in branch '2.7': Issue #8716: Add temporary code for 2.7 to help diagnose buildbot failure. http://hg.python.org/cpython/rev/18ce15f841cf -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8716 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10883] urllib: socket is not closed explicitly
Nadeem Vawda nadeem.va...@gmail.com added the comment: The failure seems to occur sporadically. I'm looking into it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10883 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12149] Segfault in _PyObject_GenericGetAttrWithDict
Davide Rizzo sor...@gmail.com added the comment: Looking through Antoine's example code. When garbage is collected, the subtype and its tp_dict are cleared before the instance object itself. When the dict is cleared as part of the garbage collection, the methods get deallocated but the method cache is not updated. That way the lookup for the close method results in a cache hit for an invalid pointer. I'm not at all knowledgeable to understand whether it is right for the type dictionary to be cleared before instances of that type (then either the finalizer for IOBase should work around this case, or the cache should be updated beforehand), or there is something to be done to ensure a correct clearing order. Also I can't think of any other example of a C type, inheritable from Python code, that calls another method in the destructor: is this specific to IO? Please note that the example code fails even when inheriting from the C type directly (_io._IOBase). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12149] Segfault in _PyObject_GenericGetAttrWithDict
Changes by Andreas Stührk andy-pyt...@hammerhartes.de: -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12149 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12482] input() not working correctly on Mac OS X
Dmitriy Gorbachev dgorbac...@yahoo.com added the comment: Hello Ned Thank you very much for your time and for your advice where to post questions like mine. I apologise for my mistake: instead of input() there was raw_input() function in the book, which works as expected on all platforms. Best regards Dmitry - Original Message From: Ned Deily rep...@bugs.python.org To: dgorbac...@yahoo.com Sent: Sun, July 3, 2011 4:18:35 PM Subject: [issue12482] input() not working correctly on Mac OS X Ned Deily n...@acm.org added the comment: The test case you've provide is working as expected but the code doesn't make a lot of sense as provided. The function loadDbase sets sys.stdin to a disk file but never sets it back again. If you run this in an interactive interpreter on any Unix-like system and call that function, it will leave sys.stdin still connected to the disk file which will give unexpected results. I don't have a copy of the book so I don't know how the author recommends to run things but it won't work as it stands (also, the function loadDbase is incomplete compared with the book's example files). You can remove the immediate problem by adding the following line just before the return db at the end of loadDbase: sys.stdin = sys.__stdin__ That will restore the original value of sys.stdin. You may want to ask questions like this on either the tutor mailing list or comp.lang.python. http://www.python.org/community/lists/ http://docs.python.org/library/sys.html#sys.__stdin__ -- assignee: ronaldoussoren - components: -Macintosh nosy: +ned.deily resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12482 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12482 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5342] packaging: add tests for old versions cleanup on update
Changes by Thomas Holmes tho...@devminded.com: -- nosy: +thomas.holmes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5342 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11512] adding test suite for cgitb
Roundup Robot devnull@devnull added the comment: New changeset 7e0102ec95d4 by Brian Curtin in branch 'default': Fix #11512. Add an initial test suite for the cgitb, providing 75% coverage. http://hg.python.org/cpython/rev/7e0102ec95d4 New changeset f362f0053eab by Brian Curtin in branch 'default': Normalize whitespace for #11512 fix. http://hg.python.org/cpython/rev/f362f0053eab -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11512 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12482] input() not working correctly on Mac OS X
Dmitriy Gorbachev dgorbac...@yahoo.com added the comment: Hi Amaury, Thank you very much for your email. Actually what happedded is that I mistakenly used input() function in place of raw_input() as it is in the book. raw_input correctly inputs bob and 'bob', while input() inputs correctly 'bob' only and complains about bob. I will definitely check the usage of input() with bob in Python 3 when I install it. Best regards Dmitry - Original Message From: Amaury Forgeot d'Arc rep...@bugs.python.org To: dgorbac...@yahoo.com Sent: Sun, July 3, 2011 4:08:02 PM Subject: [issue12482] input() not working correctly on Mac OS X Amaury Forgeot d'Arc amaur...@gmail.com added the comment: You are certainly using Python 2 with code designed for Python 3... Can you check? -- nosy: +amaury.forgeotdarc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12482 ___ -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12482 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10883] urllib: socket is not closed explicitly
Nadeem Vawda nadeem.va...@gmail.com added the comment: The problem seems to be that CacheFTPHandler inherits ftp_open() from FTPHandler - FTPHandler.ftp_open() marks the ftpwrapper object to be closed as soon as the current transfer is complete. So CacheFTPHandler's cache ends up full of closed ftpwrappers. I don't have time to put together a solution now, but I'll work on something over the weekend. Another thing: CacheFTPHandler.clear_cache() sometimes breaks the cache, because it fails to clear self.timeout. Is there any reason why the timeouts need to be in a separate dict from the cached connections themselves? It seems like a very ugly and error-prone way of organizing things. -- assignee: - nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10883 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com