[issue9246] os.getcwd() hardcodes max path len

2011-06-17 Thread STINNER Victor
STINNER Victor added the comment: bigpath2.py: script to check the maximum path length of os.getcwd(). -- Added file: http://bugs.python.org/file22395/bigpath2.py ___ Python tracker <http://bugs.python.org/issue9

[issue12310] Segfault in test_multiprocessing

2011-06-17 Thread STINNER Victor
STINNER Victor added the comment: test_multiprocessing pass with success on PPC Tiger 3.x (and x86 Tiger 3.x, but the segfaults only occurred on PPC), but this issue is a sporadic issue. I close the issue because I hope that it is closed, but reopen it if you still see segfaults on PPC Tiger

[issue12320] test_packaging failures

2011-06-17 Thread STINNER Victor
STINNER Victor added the comment: I fixed the issue #12333. I don't see any test_packaging failure anymore, let's close this issue. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.py

[issue12281] bytes.decode('mbcs', 'ignore') does replace undecodable bytes on Windows Vista or later

2011-06-17 Thread STINNER Victor
STINNER Victor added the comment: > What about something like .decode('mbcs', errors='windows')? Yes, we can use an error handler specific to the mbcs codec, but I would prefer to not introduce special error handlers. For os.fsencode(), we can keep it unchanged, or

[issue12167] test_packaging reference leak

2011-06-18 Thread STINNER Victor
STINNER Victor added the comment: > test_build_ext builds and imports xx. I changed test test to use a subprocess: New changeset 144cea8db9a5 by Victor Stinner in branch 'default': Issue #12333: run tests on the new module in a subprocess http://hg.python.org/cpython/rev/144

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

2011-06-19 Thread STINNER Victor
New submission from STINNER Victor : == FAIL: test_siginterrupt_on (test.test_signal.SiginterruptTest) -- Traceback (most recent call last): File "/usr

[issue12364] Timeout (1 hour) in test_concurrent_futures.tearDown() on sparc solaris10 gcc 3.x

2011-06-19 Thread STINNER Victor
New submission from STINNER Victor : [271/356/1] test_concurrent_futures Traceback (most recent call last): File "/home2/buildbot/slave/3.x.loewis-sun/build/Lib/multiprocessing/queues.py", line 268, in _feed send(obj) File "/home2/buildbot/slave/3.x.loewi

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

2011-06-19 Thread STINNER Victor
STINNER Victor added the comment: Seen also on OpenSolaris: test test_signal failed -- Traceback (most recent call last): File "/export/home/buildbot/64bits/3.x.cea-indiana-amd64/build/Lib/test/test_signal.py", line 399, in test_siginterrupt_on self.assertTrue(i) AssertionEr

[issue12367] select.error has no errno attribute

2011-06-19 Thread STINNER Victor
New submission from STINNER Victor : It would be nice to have a errno attribute for select.error. I don't know if select.errno should inherit from OSError, WindowsError or nothing. See also the PEP 3151: http://www.python.org/dev/peps/pep-3151/#common-errnos-with-select-

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

2011-06-19 Thread STINNER Victor
STINNER Victor added the comment: I tried to patch the test to use a semaphore, but my patch was not reliable (don't remove completly the race condition). Here is a patch using a subprocess to: - have only one thread - have a timeout on the blocking read (select cannot be used in the

[issue3067] setlocale error message is confusing

2011-06-19 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue3067> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9436] test_sysconfig failure: build a 32-bit Python a 64-bit OS

2011-06-19 Thread STINNER Victor
Changes by STINNER Victor : -- title: test_sysconfig failure -> test_sysconfig failure: build a 32-bit Python a 64-bit OS ___ Python tracker <http://bugs.python.org/iss

[issue7652] Merge C version of decimal into py3k.

2011-06-19 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue7652> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2011-06-19 Thread STINNER Victor
STINNER Victor added the comment: shutil_chown-default-v3.patch: - os.chown() is only available on Unix, shutil.chown() should not be defined if os.chown() doesn't exist (require to add a @unittest.skipUnless decorator to the test) - tests: is it possible that shutil.chown() exists wh

[issue12314] regrtest checks (os.environ, sys.path, etc.) are hard to use

2011-06-19 Thread STINNER Victor
STINNER Victor added the comment: > I’d like regrtest to tell me what exactly was changed, and where. regrtests has many tests (you give some examples: os.environ, sys.path), run all tests after calling a single test function would make regrtest slower. We can add an option (e.g. --str

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

2011-06-19 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo, pitrou ___ Python tracker <http://bugs.python.org/issue12338> ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2011-06-19 Thread STINNER Victor
STINNER Victor added the comment: subprocess._communicate_with_select() retries select.select() on EINTR: it recomputes timeout before each call. while self._read_set or self._write_set: timeout = self._remaining_time(endtime) if timeout is not None and timeout < 0: ra

[issue12371] datetime.now() bug

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: str(datetime object) doesn't contain a dot if obj.microsecond equals zero. You can use obj=obj.replace(microsecond=0) to create a new datetime object using microsecond=0. Or just test that str(obj) contains a dot or not. It is not a bug in P

[issue12367] select.error has no errno attribute

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: select_errno.patch: select.error now inherits from OSError and so have an errno attribute. I only ran the unit test on Linux, it should be tested on Windows. -- keywords: +patch Added file: http://bugs.python.org/file22414/select_errno.patch

[issue12337] Need real TextIOWrapper for stdin/stdout

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: > so there really was a bug. > If fixed in 3.2.1, this issue could be closed. This issue is a duplicate of #11272: upgrade to Python 3.2.1. -- resolution: -> duplicate status: open -> closed ___ Py

[issue11873] test_regexp() of test_compileall fails occassionally

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: > What about Windows? tempfile.mkdtemp(prefix='bar') can generate > ...\tmpxxbaxx\... Or compileall does first normalize the path? @r.david.murray: You reopened the issue, but you didn't answer to this question. And, is there a bug

[issue12090] 3.2: build --without-threads fails

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: > Yes, this is fixed in 3.2. > I just left the issue open as a reminder for the release branch. The issue is still open, can it be closed? What do you mean by "release branch"? -- ___ Pytho

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: > I wrote a similar patch to add PyModule_GetNameObject() > (I am working on another huge patch, to fix #3080) Issue #3080 added the PyModule_GetNameObject() function, so it simplify your patch. I commited your issue6697-lsprof.diff patch, I just f

[issue6697] Check that _PyUnicode_AsString() result is not NULL

2011-06-20 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue6697> ___ ___ Python-bugs-list

[issue7732] imp.find_module crashes Python if there exists a directory named "__init__.py"

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: import_directory-py3k.patch: find_module_path_list() ignores silently directories matching requested filename pattern (like module_name + ".py"). I don't think that it is useful to emit a warning (or raise an error) here, the code checks f

[issue7732] imp.find_module crashes Python if there exists a directory named "__init__.py"

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: pyfile_fromfile_close.patch: patch based on issue7732_find_module_v2.diff, fixing this issue in Python 2.7 - PyFile_FromFile() closes the file on PyString_FromString() failure (note: unlikely failure) - call_find_module() doesn't close the file an

[issue3067] setlocale error message is confusing

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: > On Py3, locale.setlocale() should allow only unicode strings > and reject byte strings. I agree and it is the current behaviour (of Python 3.3). I don't see any use case of a byte strings in locale.setlocale() with Python 3.3, so I remove Python

[issue3067] setlocale error message is confusing

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: I fixed locale.setlocale() of Python 2.7 to accept Unicode string because it helps porting to Python 3... But I think that the commit is just useless because we will have to wait until Python 2.7.3 is released, and if you want to support older Python

[issue5905] strptime fails in non-UTF locale

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: I close the issue because I am unable to reproduce it. -- resolution: -> invalid status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue4841] io's close() not handling errors correctly

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: fileio_close.patch (for Python 3.3): Fix FileIO.__init__() to not close the file if closefd=False and the constructor is called twice (or more). -- Added file: http://bugs.python.org/file22417/fileio_close.patch

[issue4841] io's close() not handling errors correctly

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: fileio_close.patch should maybe use os.open() (to create the fd) and os.fstat() (to check that the fd is not closed). -- ___ Python tracker <http://bugs.python.org/issue4

[issue4841] io's close() not handling errors correctly

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: Status of this issue: - io.FileIO.close() raises IOError with Python 2.7, 3.1, 3.2 and 3.3 (e.g. if the underlying file descriptor has been closed), it doesn't with Python 2.6 - If FileIO constructor is called twice, the file is closed at the second

[issue10086] test_sysconfig failure when prefix matches /site

2011-06-20 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker <http://bugs.python.org/issue10086> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12285] Unexpected behavior for 0 or negative processes in multiprocessing.pool()

2011-06-20 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue12285> ___ ___ Python-bugs-list

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

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: >> My patch tries to fix interlaced read-write by always calling flush(), > > Why do you need to call flush()? Can't you read from the buffer? Hum, my patch does not always call flush of the reader and the writer. On read, it flushs the wri

[issue12326] Linux 3: tests should avoid using sys.platform == 'linux2'

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: > what do you propose to do with Lib/plat-linux2 > (or, more generally, Lib/plat-*)? What are these directories? Are they still used? -- ___ Python tracker <http://bugs.python.org/i

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

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: > In the subprocess, why not use the standard 0 exit code > in case of success? Something outside my code may exit Python with the code 0. Even if it unlikely, I prefer to use uncommon exit codes, to ensure that the child process executed "correct

[issue12364] Timeout (1 hour) in test_concurrent_futures.tearDown() on sparc solaris10 gcc 3.x

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: Message on a stackoverflow thread: "I have suffered from the same problem, even if connecting on localhost in python 2.7.1. After a day of debugging i found the cause and a workaround: Cause: BaseProxy class has thread local storage which cache

[issue12364] Timeout (1 hour) in test_concurrent_futures.tearDown() on sparc solaris10 gcc 3.x

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: Connection._send_bytes() has a comment about broken pipes: def _send_bytes(self, buf): # For wire compatibility with 3.2 and lower n = len(buf) self._send(struct.pack("=i", len(buf))) # The condition is necessar

[issue12364] Timeout (1 hour) in test_concurrent_futures.tearDown() on sparc solaris10 gcc 3.x

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: Ah, submit a new task after the manager shutdown fails with OSError(32, 'Broken pipe'). Example: --- from multiprocessing.managers import BaseManager class MathsClass(object): def foo(self): return 42 class MyManager(B

[issue12364] Timeout (1 hour) in test_concurrent_futures.tearDown() on sparc solaris10 gcc 3.x

2011-06-20 Thread STINNER Victor
STINNER Victor added the comment: Oh, I think that I found a deadlock (or something like that): import concurrent.futures import faulthandler import os import signal import time def work(n): time.sleep(0.1) def main(): faulthandler.register(signal.SIGUSR1

[issue12263] punycode codec ignores the error handler argument

2011-06-21 Thread STINNER Victor
STINNER Victor added the comment: Oh, I forgot to give a little bit more details. b'abc\xff-'.decode('punycode', 'ignore') and b'abc\xff-'.decode('punycode', 'replace') raise a UnicodeDecodeError: the error handler is just useless

[issue12352] multiprocessing.Value() hangs

2011-06-21 Thread STINNER Victor
STINNER Victor added the comment: > I also wonder about the performance cost of a recursive lock. An alternative is to disable the garbage collector in malloc(): def malloc(self, size): ... enabled = gc.isenabled() if enabled: # disable the garb

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2011-06-21 Thread STINNER Victor
STINNER Victor added the comment: > The addition of the _posixsubprocess module in 3.2 introduced > a change of behaviour when passing an empty dict > (or other false value besides None) as env: ... This bug was introduced by the commit (768722b2ae0a) introducing _posixs

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2011-06-21 Thread STINNER Victor
STINNER Victor added the comment: Thanks for the fix, I added an unit test. -- ___ Python tracker <http://bugs.python.org/issue12383> ___ ___ Python-bugs-list m

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2011-06-21 Thread STINNER Victor
STINNER Victor added the comment: On Mac OS X, the failure is different: == FAIL: test_empty_env (test.test_subprocess.ProcessTestCase) -- Traceback (most

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2011-06-21 Thread STINNER Victor
STINNER Victor added the comment: > Maybe test_empty_env() should pass LD_LIBRARY_PATH to child process. The idea of the test is to test an empty environment: if we pass one variable, it is no more an empty environment. I changed the test to skip it if Python is compiled in shared m

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

2011-06-22 Thread STINNER Victor
STINNER Victor added the comment: > Apart from removing those tests, I don't see what we can do here. The previous version of the test rarely failed (only sometimes on the FreeBSD 6.4 buildbox). We may revert my commits to restore the previous test if the new tests fail more often

[issue12181] SIGBUS error on OpenBSD (sparc64)

2011-06-22 Thread STINNER Victor
STINNER Victor added the comment: Why did you remove your patch? -- ___ Python tracker <http://bugs.python.org/issue12181> ___ ___ Python-bugs-list mailin

[issue9642] #ifdef and mbcs: don't check for defined(HAVE_USABLE_WCHAR_T)

2011-06-22 Thread STINNER Victor
STINNER Victor added the comment: have_mbcs.patch: use HAVE_MBCS define instead of different tests to check if the MBCS codec can be used or not. HAVE_MBCS is defined in unicodeobject.h by: #if defined(MS_WINDOWS) && defined(HAVE_USABLE_WCHAR_T) # define HAVE_MBCS #endif > >

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

2011-06-23 Thread STINNER Victor
STINNER Victor added the comment: All Python 3.x buildbots are green (except FreeBSD 7.2, but it's not related to this issue). Let close this issue. -- status: open -> closed ___ Python tracker <http://bugs.python.org

[issue12383] subprocess.Popen(..., env={}) fails to pass empty env.

2011-06-23 Thread STINNER Victor
STINNER Victor added the comment: All Python 3.x buildbots are green again (except FreeBSD 7.2, but the failures are not related to this issue). -- status: open -> closed ___ Python tracker <http://bugs.python.org/issu

[issue11812] transient test_telnetlib failure

2011-06-23 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue11812> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12372] semaphore errors on AIX 7.1

2011-06-23 Thread STINNER Victor
STINNER Victor added the comment: It is the fourth issue for the same problem, other issues: - #1106262 (AIX 5, 2005) - #1234 (duplicate of #1106262, 2007) - #9700 (AIX 6) The initial issue was related to semaphores and fork() (msg60639). Pass pshared=1 to sem_init() gets around this issue

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

2011-06-23 Thread STINNER Victor
New submission from STINNER Victor : pthread_kill() doesn't work on the main thread on FreeBSD6: sending a signal to the main thread does nothing. It works on the main thread just after the creation of the first thread. PyThread__init_thread() has 3 implementations in Python/thread_pthr

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

2011-06-23 Thread STINNER Victor
STINNER Victor added the comment: Attached patch implements the suggested fix. -- keywords: +patch Added file: http://bugs.python.org/file22431/thread_init_freebsd6.patch ___ Python tracker <http://bugs.python.org/issue12

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

2011-06-23 Thread STINNER Victor
STINNER Victor added the comment: FreeBSD 7 is not affected by this issue. To test this issue, call signal.pthread_kill(threading.get_ident(), signal.SIGINT) in an interpreter: it should raise a KeyboardInterrupt. On FreeBSD6, it does nothing. Or run ./python -m test -v test_signal

[issue11812] transient socket failure to connect to 'localhost'

2011-06-23 Thread STINNER Victor
STINNER Victor added the comment: > With a bit of searching, HOST == support.HOST == 'localhost'. > Looking at the traceback, it is socket that fails, not telnetlib > or its test. I only saw the failure on test_telnetlib, not in other tests using sockets. I think that thi

[issue11812] transient socket failure to connect to 'localhost'

2011-06-23 Thread STINNER Victor
STINNER Victor added the comment: Does the failure occur on other buildbots? If not, it's maybe something specific to this Windows Seven: a local firewall or something like that? Can we use start 127.0.0.1 instead of "localhost"? I don't know if it would change anyt

[issue11812] transient socket failure to connect to 'localhost'

2011-06-23 Thread STINNER Victor
STINNER Victor added the comment: > I only saw the failure on test_telnetlib, not in other tests > using sockets. Oh, the last failure of the buildbot "x86 Windows7 3.x" is on test_ftplib, not test_telnetlib!

[issue11812] transient socket failure to connect to 'localhost'

2011-06-23 Thread STINNER Victor
STINNER Victor added the comment: Some tests of test_ftplib and test_telnetlib use HOST or directly 'localhost' instead of getting the host from the server socket. About the test_ftplib failures, only the tests using explicitly 'localhost' do fail. Attached patch reads th

[issue12303] expose sigwaitinfo() and sigtimedwait() in the signal module

2011-06-24 Thread STINNER Victor
STINNER Victor added the comment: Cool, a patch! "Some" comments. Why do you wait until the end of PyInit_signal() to set initialized to 1? If this variable is only present to call PyStructSequence_InitType() only once, you can set initialized to 1 directly in the if. Is it pos

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

2011-06-24 Thread STINNER Victor
STINNER Victor added the comment: > I've attached a patch spawning a new interpreter to test that. Thanks, I commited your test at the same time of the fix. -- ___ Python tracker <http://bugs.python.org

[issue12303] expose sigwaitinfo() and sigtimedwait() in the signal module

2011-06-24 Thread STINNER Victor
STINNER Victor added the comment: >> It is possible to pass a negative timeout > It now raises an exception like select. Great. >> According to the manual page, sigwaitinfo() or sigtimedwait() >> can be interrupted (EINTR) > Actually, PyErr_SetFromErrno() does this im

[issue11457] Expose nanosecond precision from system calls

2011-06-24 Thread STINNER Victor
STINNER Victor added the comment: > I suggest that rather than using composite time stamps, > decimal.Decimal is used to represent high-precision time in Python. Hey, why nobody proposed datetime.datetime objects? Can't we improve the datetime precision to support nanoseconds? I w

[issue11457] Expose nanosecond precision from system calls

2011-06-24 Thread STINNER Victor
STINNER Victor added the comment: > datetime.datetime is extremely bad at representing time stamps. > Don't use broken-down time if you can avoid it. I didn't know that datetime is "extremely bad at representing time stamps",

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

2011-06-24 Thread STINNER Victor
New submission from STINNER Victor : Sporadic issues are difficult to analyze on the buildbots because sometimes a test fails, but when it runs again in verbose mode... it doesn't fail anymore. Typical example: === [ 99/356/1] test_smtplib Re-running

[issue11457] Expose nanosecond precision from system calls

2011-06-24 Thread STINNER Victor
STINNER Victor added the comment: > there is no easy way to convert it into "seconds since the epoch" Ah yes, it remembers me that Alexander rejected my .totimestamp() patch (#2736) because he considers that "Converting datetime values to float is easy": (d

[issue9642] #ifdef and mbcs: don't check for defined(HAVE_USABLE_WCHAR_T)

2011-06-24 Thread STINNER Victor
Changes by STINNER Victor : Removed file: http://bugs.python.org/file18577/ifdef_mbcs.patch ___ Python tracker <http://bugs.python.org/issue9642> ___ ___ Python-bug

[issue9642] #ifdef and mbcs: don't check for defined(HAVE_USABLE_WCHAR_T)

2011-06-24 Thread STINNER Victor
STINNER Victor added the comment: > How do the two patches relate? Oh, I forgot to remove my first patch which was wrong. -- ___ Python tracker <http://bugs.python.org/iss

[issue12303] expose sigwaitinfo() and sigtimedwait() in the signal module

2011-06-25 Thread STINNER Victor
STINNER Victor added the comment: > If this is OK, I'll commit the patch. Yep, this version is the good one. Please keep the issue open until the test pass on all buildbots. Each newly added signal functions took me some days to fix the test for Mac OS X and/or FreeBSD 6. But you a

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

2011-06-25 Thread STINNER Victor
STINNER Victor added the comment: > Victor: to debug this kind of problem, it would be great > if faulthandler could also dump tracebacks of children processes. > Do you mind if I create a new issue? Please open a new issue. -- ___ Pytho

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue12157> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12410] Create a new helper function that enable to test that an operation don't hang more than a given timeout.

2011-06-25 Thread STINNER Victor
STINNER Victor added the comment: alarm() is one possible implementation, but Charles-François listed some drawbacks. You can also use resource.setrlimit(RLIMIT_CPU), but the timeout is the CPU time (e.g. you cannot stop a sleep) and it is not portable (e.g. resource is not available on

[issue12352] multiprocessing.Value() hangs

2011-06-25 Thread STINNER Victor
STINNER Victor added the comment: Or you can combine your two ideas: > in free(), perform a trylock of the mutex > if the trylock fails, then create a new Finalizer to postpone the freeing of the same block to a later time,... > ... perform the freeing of pending blocks synchronous

[issue12410] Create a new helper function that enable to test that an operation don't hang more than a given timeout.

2011-06-25 Thread STINNER Victor
STINNER Victor added the comment: Oh, there is another possible implementation: use a subprocess. But if the timeout is implemented using a subprocess, the syntax cannot be: with timeout(5): do_something() It should be something like: timeout(5, """if 1:

[issue12157] join method of multiprocessing Pool object hangs if iterable argument of pool.map is empty

2011-06-25 Thread STINNER Victor
STINNER Victor added the comment: >Don't Try to use any fancy way to check if the join will hang, > leave all the job to faulthandler. > Victor, do you agree with the simpler method, depending > on faulthandler to catch a hang in the test and fail it? > Or is the exp

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

2011-06-25 Thread STINNER Victor
STINNER Victor added the comment: +@unittest.skipIf(sys.platform in ('freebsd4', 'freebsd5', 'freebsd6', + 'netbsd5', 'os2emx'), "due to known OS bug") This skip gives very few information, and it is dup

[issue12413] make faulthandler dump traceback of child processes

2011-06-25 Thread STINNER Victor
STINNER Victor added the comment: Oh oh. I already thaugh to this feature, but its implementation is not trivial. > As noted in issue #11870 ... You mean that the tracebacks of children should be dumped on a timeout of the parent? Or do you also want them on a segfault of the parent? In

[issue12352] multiprocessing.Value() hangs

2011-06-25 Thread STINNER Victor
STINNER Victor added the comment: > _pending_free uses a lock internally to make it thread-safe, so I > think this will have exactly the same problem You are probably right. Can't we use a lock-less list? list.append is atomic thanks to the GIL, isn't it? But I don't know

[issue12413] make faulthandler dump traceback of child processes

2011-06-25 Thread STINNER Victor
STINNER Victor added the comment: > since all the processes receive the signal at the same time, > their outputs will be interleaved (we could maybe add a random > sleep before dumping the traceback?) And we have the pid list of the children, we can use an arbitrary sleep (e.g.

[issue12413] make faulthandler dump traceback of child processes

2011-06-25 Thread STINNER Victor
Changes by STINNER Victor : -- Removed message: http://bugs.python.org/msg139135 ___ Python tracker <http://bugs.python.org/issue12413> ___ ___ Python-bugs-list m

[issue12413] make faulthandler dump traceback of child processes

2011-06-25 Thread STINNER Victor
STINNER Victor added the comment: > since all the processes receive the signal at the same time, > their outputs will be interleaved (we could maybe add a random > sleep before dumping the traceback?) If we have the pid list of the children, we can use an arbitrary sleep (e.g.

[issue12413] make faulthandler dump traceback of child processes

2011-06-26 Thread STINNER Victor
STINNER Victor added the comment: > > In which case is Python the leader of the group? ... > > Yes, it's the case by default when you launch a process through a shell. subprocess doesn't use a shell by default, and I don't think that multiprocessing uses a shel

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

2011-06-26 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue12392> ___ ___ Python-bugs-list

[issue12303] expose sigwaitinfo() and sigtimedwait() in the signal module

2011-06-26 Thread STINNER Victor
STINNER Victor added the comment: > @Victor, you've had some experience with fixing signals > on the FreeBSD 6 buildbot... It's not exactly that I had some experience, it's just that I have a SSH access to the buildbot. The following code hangs for (exactly?) 30 s

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

2011-06-27 Thread STINNER Victor
STINNER Victor added the comment: > Typical example: (... smtplib ...) Another example (yesterday): -- [355/356/2] test_subprocess ... Re-running test test_subprocess in verbose mode ... Ran 228 tests in 322.313s OK (skipped

[issue12139] Add CCC command support to ftplib

2011-06-27 Thread STINNER Victor
STINNER Victor added the comment: http://www.python.org/dev/buildbot/all/builders/x86%20Ubuntu%20Shared%203.x/builds/4043/steps/test/logs/stdio == ERROR: test_ccc (test.test_ftplib.TestTLS_FTPClass

[issue12139] Add CCC command support to ftplib

2011-06-27 Thread STINNER Victor
STINNER Victor added the comment: http://www.python.org/dev/buildbot/all/builders/x86%20Tiger%203.x/builds/2792/steps/test/logs/stdio == ERROR: test_ccc (test.test_ftplib.TestTLS_FTPClass

[issue12398] Sending binary data with a POST request in httplib can cause Unicode exceptions

2011-06-27 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue12398> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue12423] signal handler doesn't handle SIGABRT from os.abort

2011-06-27 Thread STINNER Victor
STINNER Victor added the comment: Extract of abort manual page: "The abort() first unblocks the SIGABRT signal, and then raises that signal for the calling process. This results in the abnormal termination of the process unless the SIGABRT signal is caught and the signal handler

[issue12352] multiprocessing.Value() hangs

2011-06-27 Thread STINNER Victor
STINNER Victor added the comment: heap_gc_deadlock_lockless.diff: _free_pending_blocks() and free() execute the following instructions in a different order, is it a problem? +self._free(block) +self._allocated_blocks.remove(block) vs +self

[issue12352] multiprocessing.Value() hangs

2011-06-27 Thread STINNER Victor
STINNER Victor added the comment: > You may document that _pending_free_blocks.append() > and _pending_free_blocks.pop() are atomic in CPython > and don't need a specific lock. Oops, i skipped complelty your long comment explaining everything

[issue12352] multiprocessing.Value() hangs

2011-06-27 Thread STINNER Victor
STINNER Victor added the comment: There are different technics to workaround this issue. My preferred is heap_gc_deadlock_lockless.diff because it has less border effect and have a well defined behaviour. -- ___ Python tracker <h

[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2011-06-27 Thread STINNER Victor
STINNER Victor added the comment: You someone update the patch for Python 3.3? Python 2.7 and 3.2 don't accept new features. -- versions: +Python 3.3 -Python 2.7, Python 3.2 ___ Python tracker <http://bugs.python.org/i

[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2011-06-27 Thread STINNER Victor
STINNER Victor added the comment: Can someone update the patch for Python 3.3? Python 2.7 and 3.2 don't accept new features. -- ___ Python tracker <http://bugs.python.org/i

[issue6755] Patch: new method get_wch for ncurses bindings: accept wide characters (unicode)

2011-06-27 Thread STINNER Victor
Changes by STINNER Victor : -- Removed message: http://bugs.python.org/msg139334 ___ Python tracker <http://bugs.python.org/issue6755> ___ ___ Python-bugs-list m

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

2011-06-27 Thread STINNER Victor
STINNER Victor added the comment: New patch updated according to bitdancer's comment on IRC: only change the -W option. With the patch, -W only runs the test once but captures the output. The main difference with my patch is that all output is written to stderr, even if the captured o

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

2011-06-27 Thread STINNER Victor
STINNER Victor added the comment: Your patch is linux3 compliant, go ahead! -- ___ Python tracker <http://bugs.python.org/issue11870> ___ ___ Python-bugs-list m

[issue8912] `make patchcheck` should check the whitespace of .c/.h files

2011-06-27 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +haypo ___ Python tracker <http://bugs.python.org/issue8912> ___ ___ Python-bugs-list mailing list Unsubscribe:

<    12   13   14   15   16   17   18   19   20   21   >