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
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
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/
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
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
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
Changes by STINNER Victor :
--
nosy: -haypo
___
Python tracker
<http://bugs.python.org/issue10086>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue12285>
___
___
Python-bugs-list
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
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
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
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
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
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
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
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
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
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
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
STINNER Victor added the comment:
On Mac OS X, the failure is different:
==
FAIL: test_empty_env (test.test_subprocess.ProcessTestCase)
--
Traceback (most
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
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
STINNER Victor added the comment:
Why did you remove your patch?
--
___
Python tracker
<http://bugs.python.org/issue12181>
___
___
Python-bugs-list mailin
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
> >
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
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
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue11812>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
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
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!
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
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
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
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
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
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",
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
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
Changes by STINNER Victor :
Removed file: http://bugs.python.org/file18577/ifdef_mbcs.patch
___
Python tracker
<http://bugs.python.org/issue9642>
___
___
Python-bug
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
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
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
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue12157>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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:
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
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
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
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
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.
Changes by STINNER Victor :
--
Removed message: http://bugs.python.org/msg139135
___
Python tracker
<http://bugs.python.org/issue12413>
___
___
Python-bugs-list m
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.
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
Changes by STINNER Victor :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue12392>
___
___
Python-bugs-list
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
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
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
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
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue12398>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
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
Changes by STINNER Victor :
--
Removed message: http://bugs.python.org/msg139334
___
Python tracker
<http://bugs.python.org/issue6755>
___
___
Python-bugs-list m
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
STINNER Victor added the comment:
Your patch is linux3 compliant, go ahead!
--
___
Python tracker
<http://bugs.python.org/issue11870>
___
___
Python-bugs-list m
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue8912>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
> test_sigwaitinfo_interrupted() fails because SIGALRM
> signal handler is called ...
Oh, the problem is that sigwait() behaviour changes after a fork: it is
interrupted if an unexpected signal is received, but the signal handler is not
called. It b
New submission from STINNER Victor :
FAIL: test_user_site (packaging.tests.test_command_install_dist.InstallTestCase)
--
Traceback (most recent call last):
File
"/home/buildbot/buildarea/3.x.ochtman-gentoo-amd64/buil
New submission from STINNER Victor :
test_io.check_interrupted_write() has two threads and a pipe:
- reader (thread): read one byte from the pipe
- writer (main thread): write 1 MB into the pipe
An alarm (SIGALRM) is scheduled in one second. The writer blocks because the
pipe buffer is
STINNER Victor added the comment:
Patch to skip the test on FreeBSD 5, 6 and 7.
I was unable to reproduce #11859 on my FreeBSD 8 VM, so I didn't add freebsd8.
--
keywords: +patch
Added file: http://bugs.python.org/file22506/test_io_skip_freebsd.
STINNER Victor added the comment:
"Be aware that programs which use signal.signal() to register a handler for
SIGABRT will behave differently."
I don't understand this sentence. I think that this sentence should be removed,
and another should maybe be added. E.g. "os.abor
STINNER Victor added the comment:
> But I think we could just remove this test
The test pass on Linux and FreeBSD 6 using a subprocess. I commited my patch to
replace fork() by subprocess, let's see how it works on buildbots.
--
___
Python
New submission from STINNER Victor :
Seen on "AMD64 Snow Leopard 2 3.x" buildbot:
=
ERROR: test_options (test.test_ssl.ContextTests)
--
Traceback (m
STINNER Victor added the comment:
I will not backport the change in Python 2.7, because regrtest already captures
stdout (but not in verbose mode), and it checks that the output is empty.
--
___
Python tracker
<http://bugs.python.org/issue12
STINNER Victor added the comment:
> One more time, commit messages using the present tense are ambiguous:
> when you write “runtest() truncates the StringIO stream before a new
> test“, it’s not clear at all whether you describe the previous,
> incorrect behavior or the new, fixed o
STINNER Victor added the comment:
> Eric is right. I don't see the patch when reading "hg log" output
I'm using hg log -p.
> or looking up revisions given by "hg annotate".
hg annotate doesn't display the changelog, only the commi
STINNER Victor added the comment:
Good news: it's a duplicate and it's already fixed! See issues #10090 and
#10154. The fix is part of Python 3.1.4 (released the 12th june 2011) and
Python 2.7.2 (released the 12 june 2011), and will be part of Python 3.2.1.
--
nosy: +haypo
STINNER Victor added the comment:
(Python 2.6 only accepts security fixes, no more bug fixes. It's time to
upgrade to 2.7!)
--
___
Python tracker
<http://bugs.python.org/is
STINNER Victor added the comment:
See also #8260.
--
___
Python tracker
<http://bugs.python.org/issue12446>
___
___
Python-bugs-list mailing list
Unsubscribe:
STINNER Victor added the comment:
See also #12446.
--
___
Python tracker
<http://bugs.python.org/issue8260>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue7117>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from STINNER Victor :
open() uses the locale encoding in Python 3 when opening text file if the
encoding argument is not specified (implicit). Some functions use locale
encoding, but it's not the right encoding. I see at least three cases where the
encoding should be ch
Changes by STINNER Victor :
--
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue12450>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from STINNER Victor :
sysconfig uses regex to parse the a .plist file (format based on XML),
/System/Library/CoreServices/SystemVersion.plist: the plistlib module can be
used instead. I rebuild my patched Python from scatch (make distclean) and I
didn't notice any boot
Changes by STINNER Victor :
Added file: http://bugs.python.org/file22522/plistlib_deprecation.patch
___
Python tracker
<http://bugs.python.org/issue12452>
___
___
Pytho
STINNER Victor added the comment:
pkginfo_utf8.patch: distutils uses UTF-8 to write PKG-INFO and .egg-info,
instead of the locale encoding. It should be applied to 2.7, 3.2 and 3.3.
packaging_pkginfo_utf8.patch: packaging tests use UTF-8 to write PKG-INFO
files, instead of the locale
Changes by STINNER Victor :
Added file: http://bugs.python.org/file22524/packaging_pkginfo_utf8.patch
___
Python tracker
<http://bugs.python.org/issue9561>
___
___
Pytho
STINNER Victor added the comment:
> What about Windows? tempfile.mkdtemp(prefix='bar') can generate
> ...\tmpxxbaxx\...
AH! The test failed on "x86 XP-4 x86":
http://www.python.org/dev/buildbot/all/builders/x86%20XP-4%203.x/builds/
New submission from STINNER Victor :
The following test fails sometimes. I don't know on which buildbot it occurs.
The last failure is on "x86 XP-5 3.x":
==
FAIL: test_failing_import_sticks (test.test_imp
STINNER Victor added the comment:
The test is still failing on many buildbots.
x86 Ubuntu Shared 3.x:
==
ERROR: test_ccc (test.test_ftplib.TestTLS_FTPClass
STINNER Victor added the comment:
See also issue #9561 for distutils: I just attached a new patch for PKG-INFO /
.egg-info files.
--
___
Python tracker
<http://bugs.python.org/issue12
New submission from STINNER Victor :
The MH class uses the locale encoding to read and write .mh_sequences files.
According to R. David Murray, ASCII can be safetly used instead. Extract of our
discussion on IRC:
bitdancer> haypo: that's one of the cases where using locale
1601 - 1700 of 35168 matches
Mail list logo