Charles-François Natali added the comment:
> Apparently, they are specified to, even for blocking streams (which
> I find a bit weird, and the language in the docs seems deliberately
> vague).
"""
As an additional convenience, it attempts to read as many bytes as
Charles-François Natali added the comment:
> Since this patch may break existing valid code, I think it should be
> closed as invalid.
Yes. Since the benefit is not clear and it may break existing code, it's
probably wiser.
--
resolution: -> rejected
stage: patch revie
Charles-François Natali added the comment:
> But then what's the point of using buffered I/O at all? If it can't
> offer anything more than raw I/O, I'd rather do something like raise
> a RuntimeError("buffered I/O doesn't work with non-blocking streams&qu
Charles-François Natali added the comment:
> The bugfix itself is quite pedestrian, but the test is more interesting.
Indeed. Looks good to me.
--
___
Python tracker
<http://bugs.python.org/issu
Charles-François Natali added the comment:
There's a race:
"""
--- Lib/shutil.py 2011-11-05 00:11:05.745221315 +0100
+++ Lib/shutil.py.new 2011-11-05 00:11:01.445220324 +0100
@@ -307,6 +307,7 @@
try:
mode = os.fstatat(dirfd, name, os.AT_SYMLI
Charles-François Natali added the comment:
> write() is a bit simpler, since BlockingIOError has
> a "characters_written" attribute which is meant to inform you of the
> partial success: we can just reuse that. That said, BlockingIOError
> could grow a "partial_rea
Charles-François Natali added the comment:
So, what do you think of the new patch?
--
___
Python tracker
<http://bugs.python.org/issue>
___
___
Python-bug
Charles-François Natali added the comment:
The patch looks good to me.
Note that the whole kill(pid, SIGKILL) looks overkill to me...
--
nosy: +neologix
___
Python tracker
<http://bugs.python.org/issue12
Charles-François Natali added the comment:
> FYI, I have a pathlib experiment in
> http://hg.python.org/features/pathlib/, with an optional openat-based
> accessor.
Interesting: I used to think that the current API for dealing with paths was a
little too basic and terse.
Concer
Charles-François Natali added the comment:
Here's an updated patch:
- address returned by recvfrom()
- recv flags (MSG_PEEK)
- congestion behavior
I've also added a bunch of constants:
- all the typical SO_ constants
- CMSG flags
- RDMA-related options (RDMA is probably one of the m
Charles-François Natali added the comment:
> The server thread only waits for 3 seconds for the connection. If a
> connection is not created before 3 seconds, the server suicides and when the
> connection is tried, it will fail. This probably explain why the problem is
> sporad
Changes by Charles-François Natali :
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue13303>
___
___
Pyth
Changes by Charles-François Natali :
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Charles-François Natali added the comment:
> Together with -R, it can help chase those memory leaks which aren't
> reference leaks (see c6dafa2e2594).
Valgrind does a much better job at this: it will also show you where the leaked
blocks were allocated.
OTOH, Valgrind is Linux-on
Charles-François Natali added the comment:
Isn't this a duplicate of issue #1625?
--
nosy: +neologix
___
Python tracker
<http://bugs.python.org/is
Charles-François Natali added the comment:
Here's a patch removing the automatic retry on ECONNREFUSED: I tested it on
Linux and other Unices, and it seems to work just fine without this hammering.
Note that there's a similar mechanism for Windows (ERROR_PIPE_BUSY), but it
s
Charles-François Natali added the comment:
I'm not sure that the "register" storage class specifier is still relevant with
modern compilers: I'm pretty sure gcc ignores it unless -O0, and I think I've
read somewhere Microsoft's compiler ignores it to
Charles-François Natali added the comment:
> subprocess.Popen.communicate() hangs for daemonized subprocesses that
> leave a pipe open. [...] which leaves stderr pipe open.
Of course: the daemon process (spawned by the second fork()) inherits the
subprocess's stderr (since file
Charles-François Natali added the comment:
> Apparently you forgot to upload the patch...
Told you I couldn't think straight :-)
--
Added file: http://bugs.python.org/file23720/connection_retry.diff
___
Python tracker
<http://bugs
Charles-François Natali added the comment:
Alright, I got tired of seeing the FreeBSD buildbots consistently choke on
test_multiprocessing, so here's a simple patch that skips the test if the OS
doesn't support a reasonable number (30) of semaphores.
--
keywords: +patch
Charles-François Natali added the comment:
Benjamin, thanks for the report.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Charles-François Natali added the comment:
> Testing os.sysconf("SC_SEM_NSEMS_MAX") value is maybe better than
> creating 30 semaphores.
Yeah, I thought about that, but the problem is that it doesn't take into
account the number of semaphores already allocated: so, for
Charles-François Natali added the comment:
There are now more protocol families defined (PF_RDS, PF_CAN), etc.
Since both AF_ and PF_ are valid (see
http://en.wikipedia.org/wiki/Berkeley_sockets#Protocol_and_address_families for
more information), and there is so much code out there in the
Charles-François Natali added the comment:
Alright, should be fixed now.
Graham, thanks for the report!
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Charles-François Natali added the comment:
Alright, the test is now skipped when the system doesn't support enough POSIX
semaphores.
I'm closing, we can still reopen in case another similar problem pops up (on
other OS of course).
--
resolution: -> fixed
stage:
Charles-François Natali added the comment:
> Oh, it looks like unsetenv() has no return value on Mac OS X Tiger
And neither does FreeBSD < 7:
http://python.org/dev/buildbot/all/builders/x86%20FreeBSD%206.4%203.x/builds/2015/steps/compile/logs/stdio
Note that ignoring unsetenv() return
Changes by Charles-François Natali :
--
resolution: -> invalid
stage: test needed -> committed/rejected
status: pending -> closed
___
Python tracker
<http://bugs.python.or
Changes by Charles-François Natali :
--
keywords: +needs review
stage: -> patch review
Added file: http://bugs.python.org/file23764/broken_unsetenv.diff
___
Python tracker
<http://bugs.python.org/issu
Charles-François Natali added the comment:
> The problem I have with the solution that is currently implemented is that
> subprocess is waiting for the spawned child although the child is not running
> anymore.
> In my case this issue occured when invoking samba or the small s
Charles-François Natali added the comment:
> For the record, this seems to make large allocations slower:
>
> -> with patch:
> $ ./python -m timeit "b'x'*20"
> 1 loops, best of 3: 27.2 usec per loop
>
> -> without patch:
> $ ./python
Charles-François Natali added the comment:
> However, there's still another strange regression:
>
> $ ./python -m timeit \
> -s "n=30; f=open('10MB.bin', 'rb', buffering=0); b=bytearray(n)" \
> "f.seek(0);f.readinto(b)"
>
Charles-François Natali added the comment:
> Hmm, quite slow indeed, are you sure you're not running in debug mode?
>
Well, yes, but it's no faster with a non-debug build: my laptop is
really crawling :-)
> If the performance regression is limited to read(), I don'
Charles-François Natali added the comment:
_clocks = ['CLOCK_PROCESS_CPUTIME_ID', 'CLOCK_MONOTONIC_RAW',
'CLOCK_MONOTONIC', 'CLOCK_REALTIME']
Beware, we're mixing CPU time and wall-clock time:
$ ./python -c "from time import *;
Charles-François Natali added the comment:
> Indeed. I thought CPU time would be more useful (and that's the point
> of the patch)
Ah, OK.
Then you should probably rename the issue "make timeit measure CPU time", or
something like that, because I really thought this is
Charles-François Natali added the comment:
(No Rietveld link):
+is_valid_fd(int fd)
[...]
+dummy_fd = dup(fd);
+if (dummy_fd < 0)
+return 0;
+close(dummy_fd);
Why not use fstat() instead (does Windows have fstat()? And dup()?).
+@unittest.skipIf(os.name == 'nt
Charles-François Natali added the comment:
> Updated patch.
>
LGTM.
--
___
Python tracker
<http://bugs.python.org/issue7111>
___
___
Python-bugs-list
Charles-François Natali added the comment:
A 2.7 OS X buildbot segfaults in test_unicode since 0cd197f13400 :
http://www.python.org/dev/buildbot/all/builders/AMD64 Snow Leopard 2
2.7/builds/409/steps/test/logs/stdio
"""
test_unicode
make: *** [buildbottest] Segmentatio
Charles-François Natali added the comment:
> Are CLOCK_MONOTONIC_RAW, CLOCK_MONOTONIC and CLOCK_REALTIME more accurate
> than gettimeofday (time.time)?
Actually, on Linux gettimeofday() returns CLOCK_REALTIME.
As for CLOCK_MONOTONIC{_RAW}, they're guaranteed not to go backward
(N
Charles-François Natali added the comment:
> So I'm changing my mind and saying it seems desireable to return True if the
> wait succeeded before the timeout's end, even though the flag may have been
> reset in the meantime.
Agreed. What matters is that the event has been
Charles-François Natali added the comment:
Could you please provide a diff ?
Also, they should probably be commented by default (as other obmalloc-related
calls).
--
nosy: +neologix
___
Python tracker
<http://bugs.python.org/issue12
Charles-François Natali added the comment:
> If someone finds a way to sanitize Valgrind output,
Did you use the valgrind suppression file (Misc/valgrind-python.supp)?
If yes, then one could simply use --gen-suppressions=yes to add those spurious
warning to the suppression file.
> a
Charles-François Natali added the comment:
> Is there any reason to believe that the problem is confined to OS X?
It's a bit of a grey area.
Here's what POSIX says:
http://pubs.opengroup.org/onlinepubs/009695399/functions/readdir.html
"""
The pointer returned
Charles-François Natali added the comment:
And here's a post by Ulrich Drepper:
http://udrepper.livejournal.com/18555.html
"""
readdir_r is only needed if multiple threads are using the same directory
stream. I have yet to see a program where this really is the case. In t
Charles-François Natali added the comment:
Committed, thanks for the patch!
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Charles-François Natali added the comment:
Here's a trivial patch reducing the number of calls to open.
before:
"""
$ strace -c -e open ./python -c ""
% time seconds usecs/call callserrors syscall
-- --- --- - ---
Charles-François Natali added the comment:
It's a duplicate of #12157.
--
nosy: +neologix
resolution: -> duplicate
stage: needs patch -> committed/rejected
status: open -> closed
superseder: -> join method of multiprocessing Pool object hangs if iterable
argume
Charles-François Natali added the comment:
> I would have appreciated had you considered my review before pushing
> that change.
Sorry, I didn't receive an email notification for your review, so I didn't know
you had done one. I&
Charles-François Natali added the comment:
Here's a patch.
--
keywords: +patch
Added file: http://bugs.python.org/file23866/event_wait_cleared.diff
___
Python tracker
<http://bugs.python.org/issue13502>
Charles-François Natali added the comment:
> URLError: resolution>
For this one, we should probably add EAI_FAIL to support.transient_internet.
--
keywords: +patch
nosy: +neologix
Added file: http://bugs.python.org/file23867/transien
Charles-François Natali added the comment:
To debug this, we should probably make use of faulthandler (but not
dump_tracebacks_later, since it creates a new thread). The way to go
could be to make the parent process send a fatal signal to the child
process if the latter takes too long to
Charles-François Natali added the comment:
> This seems to imply that if the current thread previously set the event,
> the wait will return False, which is contradicted by the 'so' statement
> (which appears to be correct).
You're probably referring to the &q
Charles-François Natali added the comment:
> my computer has 122GB free RAM
122, or 1.22?
> Well, replace cPickle by pickle and it works.
cPickle makes some direct call to malloc()/realloc()/free(), contrarily to
pickle which uses pymalloc. This could lead to heap fragmentation.
Wha
Changes by Charles-François Natali :
--
nosy: +pitrou
___
Python tracker
<http://bugs.python.org/issue13453>
___
___
Python-bugs-list mailing list
Unsubscribe:
Charles-François Natali added the comment:
This paper might be of interest:
http://www.siam.org/meetings/alenex05/papers/13gheileman.pdf
Basically, it concludes that most of the time, there's no speedup to be gained
from the increased cached locality incurred by linear probing when the
Charles-François Natali added the comment:
Here's a patch to help nail this down.
--
Added file: http://bugs.python.org/file23896/debug_stuck.diff
___
Python tracker
<http://bugs.python.org/is
Charles-François Natali added the comment:
Thanks, here's a patch updated accordingly.
--
Added file: http://bugs.python.org/file23897/event_wait_cleared-1.diff
___
Python tracker
<http://bugs.python.org/is
Charles-François Natali added the comment:
The test_poplib failures are likely due to this obvious race:
"""
def setUp(self):
[...]
threading.Thread(target=self.server, args=(self.evt,self.sock)).start()
time.sleep(.1)
[...]
def server(
Charles-François Natali added the comment:
And I assume that the test_telnetlib failure on the OpenIndiana
buildbot is due to a broken name resolution service, as in issue
#11812.
Here's a patch bumping the timeout to 60s, which should be enough to
resolve "localhost"...
--
Charles-François Natali added the comment:
> Alan, I would open a new issue tracking this one and posting a patch there,
> if I were you.
>
> Previous DTRACE attempts failed because trying to make everybody happy. I
> don't want to repeat the mistake.
>
Sorry, b
Charles-François Natali added the comment:
@Antoine
Couldn't this be linked to #11564 (pickle not 64-bit ready)? AFAICT this wasn't
fixed in 2.7. Basically, an integer overflow, and malloc() would bail out when
asked a ridiculous size.
@Philipp
I'd be curious to see th
Charles-François Natali added the comment:
@Antoine
Couldn't this be linked to #11564 (pickle not 64-bit ready)? Basically, an
integer overflow, and malloc() would bail out when asked a ridiculous size.
AFAICT this wasn't fixed in 2.7.
@Philipp
I'd be curious to see th
Changes by Charles-François Natali :
--
Removed message: http://bugs.python.org/msg149321
___
Python tracker
<http://bugs.python.org/issue13555>
___
___
Python-bug
Charles-François Natali added the comment:
Thanks Craig.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
versions: -Python 3.1
___
Python tracker
<http://bugs.python.o
Charles-François Natali added the comment:
Another failure on a 2.7 FreeBSD buildbot:
"""
test test_time failed -- Traceback (most recent call last):
File
"/usr/home/db3l/buildarea/2.7.bolen-freebsd7/build/Lib/test/test_time.py", line
193, in test_tzset
self
Charles-François Natali added the comment:
> Can this be fixed?
More or less.
The following patch does the trick, but is not really elegant:
"""
--- a/Parser/tokenizer.c2011-06-01 02:39:38.0 +
+++ b/Parser/tokenizer.c2011-12-16 08:48:45.
Charles-François Natali added the comment:
Thanks Michael.
I committed a simpler version of your patch.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Charles-François Natali added the comment:
> So it seems unlikely to be the explanation.
Victor reproduced in on IRC, and it's indeed an overflow.
The problematic code is in readline_file:
"""
bigger = self->buf_size << 1;
if (bigger
Charles-François Natali added the comment:
Here's a patch which should fix this. However, I'm unable to test it.
--
keywords: +patch
Added file: http://bugs.python.org/file24006/pickle_overflow.diff
___
Python tracker
<http://bu
Charles-François Natali added the comment:
New version.
--
Added file: http://bugs.python.org/file24008/pickle_overflow-1.diff
___
Python tracker
<http://bugs.python.org/issue13
Charles-François Natali added the comment:
This broken the "Fedora without thread buildbot", since sched now requires the
threading module:
http://www.python.org/dev/buildbot/all/builders/AMD64 Fedora without threads
3.x/builds/1250/steps/test/logs/stdio
--
nosy: +neolo
Charles-François Natali added the comment:
Two patches have recently modified this part of the code:
http://hg.python.org/cpython/rev/d4d9a3e71897
http://hg.python.org/cpython/rev/cd15473a9de2
I'm unable to reproduce the problem on Linux 3.1.0 x86 with branch 2.7 (for
those who would li
Charles-François Natali added the comment:
There was a recent buildbot failure on test_lock_conflict() because of a race.
Looking at your patch, I must be missing something, but why not simply use a
multiprocessing condition to signal when the parent process has acquired the
lock?
Otherwise
Charles-François Natali added the comment:
Looking at the strace output:
Successful test:
sendmsg(11, {msg_name(0)=NULL, msg_iov(1)=[{"\267", 1}], msg_controllen=16,
{cmsg_len=16, cmsg_level=SOL_SOCKET, cmsg_type=SCM_RIGHTS, {7}}, msg_flags=0},
0) = 1
The FD sent is 7 ({7} fie
Charles-François Natali added the comment:
> But I tried building this
> http://www.python.org/ftp/python/2.7/Python-2.7.tar.bz2 and that
> build worked successfully.
This is 2.7, which is more than a year old.
The most recent 2.7 version is
http://www.python.org/ftp/python/2.7.2/Pyt
Charles-François Natali added the comment:
Alright, thanks!
--
resolution: -> out of date
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Charles-François Natali added the comment:
Victor, could you try the patch attached?
--
Added file: http://bugs.python.org/file24030/threading_reinit_lock.diff
___
Python tracker
<http://bugs.python.org/issue11
Charles-François Natali added the comment:
Alright, should be fixed now.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Charles-François Natali added the comment:
Should be fixed now.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Charles-François Natali added the comment:
I'm personally +1 on removing the verbose thing altogether:
- it's ugly
- I doubt it's really useful (I mean, printing to stderr - which is often line
buffered or unbuffered - upon every action will probably change the timing)
- it a
Charles-François Natali added the comment:
I think this could be due to the multiprocessing manager's server socket
backlog value, which is a little too low: by default, it's set to 5, and the
tests launch up to 3 threads and 3 processes in parallel, so if we're unlucky
with
Charles-François Natali added the comment:
> Probably because I'm a threading/multiprocessing neophyte :)
That's a very good reason :-)
Here's a version using two multiprocessing events. Note that I use
timeouts for wait() just to avoid being stuck if something goes wrong:
Charles-François Natali added the comment:
Should be fixed now, thanks!
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Charles-François Natali added the comment:
Another failure on an OpenIndiana buildbot:
"""
==
ERROR: testTimeoutConnect (test.test_ftpl
Charles-François Natali added the comment:
As I said, I'm skeptical about the benefit vs maintenance burden ratio,
especially since cPython doesn't target performance critical applications. I
just fear that's a lot of intrusive code which will only be used by a handful
of p
Charles-François Natali added the comment:
> 1. On FreeBSD, we must assume that every blocking system call, in
> *every thread*, can be interrupted, and we need to catch EINTR.
That's true for every Unix. Every blocking syscall can return EINTR, and there
are may non restartab
Charles-François Natali added the comment:
Looks good to me, except for another minor nit:
"""
the elements of the `iterable` are expected to be tuples
"""
AFAICT, you just require the elements of `ìterables` to be iter
Charles-François Natali added the comment:
> a struct timespec providing theoretical nanosecond precision.
Indeed. EXT3's timestamps have a 1s granularity, for example.
Another possibility would be to store both mtime and st_size (it's the default
heuristic used by rsync d
Charles-François Natali added the comment:
Thanks for the patch sbt.
I think this is indeed useful, but I'm tempted to go further and say we should
make this the default - and only - behavior. This will probably break existing
code that accidentaly relied the fact that the implementation
Charles-François Natali added the comment:
I'd like to make this move forward.
Milko, I see you have an implementation which looks OK at a first glance. Would
like to propose a patch against the default branch? The patch should include
documentation and tests.
I'm not sure abou
Charles-François Natali added the comment:
> There is probably lots of such code:
> I'm not convinced about making it the default behaviour, and
> certainly not the only one.
Then I'm not convinced that this patch is useful.
Having three different implentations and code
Charles-François Natali added the comment:
Yes, but it's not easy: the different URLs provided don't demonstrate
the behavior anymore (even if we do find such an URL, there's no
guarantee it won't change in a couple days/weeks).
It could be possible to set up an ad-hoc
Charles-François Natali added the comment:
> I prefer to write a "best-effort" function
I disagree. People who explicitely use an atomic file API want
atomicity/persistency, otherwise they wouldn't use it. Exposing a function that
may, or may not, be atomic is just plai
Charles-François Natali added the comment:
Here's a new version with a test (untested).
Note that I'm absolutely not sure that the 'memsize' argument to
bigmemtest is correct.
--
Added file: http://bugs.python.org/file24079/pi
Charles-François Natali added the comment:
Victor, could you try the attached script on FreeBSD, to see if you get
ECONNREFUSED?
--
___
Python tracker
<http://bugs.python.org/issue13
Charles-François Natali added the comment:
I assume this was due to the following bug:
https://bugs.launchpad.net/ubuntu/+source/mesa/+bug/259219
http://lists.freedesktop.org/archives/mesa-dev/2011-March/006180.html
In short, MESA didn't use the correct TLS model for thread-local vari
Charles-François Natali added the comment:
> I adhere to "flat is better than nested". e.g. it always irks me to type
> "urllib.request" instead of "urllib".
Well, that's what (selective) imports are for, no ?
from urllib import re
Charles-François Natali added the comment:
> Does it have to be a class? What would be the operations apart from
> write()?
Well, I thought that making it a file-like object could be useful:
that way, one could pass it to pickle.dump(), logging.StreamHandler or
any method expecting a fil
Charles-François Natali added the comment:
> If you want atomicity to apply to logging,
> you must instead guarantee the durability of each write() call, meaning
> calling fsync() on each logging call
Why so?
There's no point in calling fsync() after each write, since data i
Charles-François Natali added the comment:
Thanks for your patches, David.
I've only applied the first one: looking at the second one, I don't think they
are really problems (-Wstrict-aliasing=2 is know for generating a lot of false
positives).
--
nosy:
Charles-François Natali added the comment:
> Ah, it's a temporary file indeed.
> But does that mean you can't inspect your logs in real time? All log
> files I have ever seen are available under their final name while they
> are still being written to.
>
Yes, l
301 - 400 of 2227 matches
Mail list logo