[issue6434] buffer overflow in Zipfile when wrinting more than 2gig file

2011-10-27 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 3.2, Python 3.3 -Python 2.4, Python 3.0 ___ Python tracker <http://bugs.python.org/issue6434> ___ ___ Python-bug

[issue10363] Embedded python, handle (memory) leak

2011-10-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch that fixes some of these handle leaks in Python 3.2. However, as a general guideline, you shouldn't unload the Python DLL if you fish to use it later again. Just keep it in memory (the DLL isn't very big, is it?). Yes, C++ would allo

[issue13059] Sporadic test_multiprocessing failure: IOError("bad message length") in recv_bytes()

2011-10-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is a really weird error. At this point, the child is waiting for a challenge from the parent, and the challenge is something like 32 bytes long: message = os.urandom(MESSAGE_LENGTH) connection.send_bytes(CHALLENGE + message) So, this can only

[issue13286] PEP 3151 breaks backward compatibility: it should be documented

2011-10-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why would you catch IOError after os.mkdir()? -- ___ Python tracker <http://bugs.python.org/issue13286> ___ ___ Python-bug

[issue13287] urllib.request exposes too many names

2011-10-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +orsenthil ___ Python tracker <http://bugs.python.org/issue13287> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13238] Add shell command helpers to shutil module

2011-10-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: > default - str + shutil.quote_ascii_whitespace > !q - str + shlex.quote > !u - unquoted (i.e. no conversion, str.format default behaviour) The default doesn't look very understandable to me. Why would you quote only some characters and n

[issue13238] Add shell command helpers to shutil module

2011-10-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: > With the default whitespace escaping (which allows spaces in > filenames), wildcard matching still works (thus the list of > directories matching the "../py*" pattern), but with full quoting it > breaks (thus the "nothing n

[issue13288] SSL module doesn't allow access to cert issuer information

2011-10-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: It's available in 3.3: >>> ctx = ssl.SSLContext(ssl.PROTOCOL_TLSv1) >>> ctx.verify_mode = ssl.CERT_REQUIRED >>> ctx.set_default_verify_paths() >>> with ctx.wrap_socket(socket.socket()) as sock: ... sock.co

[issue10363] Embedded python, handle (memory) leak

2011-10-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: > If the handle leaks are restricted to the windows implementation of cpython, > could it not be justified to allow C++ in a patch, I can't think of a C only > compiler for windows? Well, I think that would be rather clumsy. I'm not a

[issue12797] io.FileIO and io.open should support openat

2011-10-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: > What would you envisage the API for the custom opener to look like? The same as os.open(), I would say. -- ___ Python tracker <http://bugs.python.org/issu

[issue12797] io.FileIO and io.open should support openat

2011-10-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Before I implement it properly, is this the kind of api that's desired? Yes, although I think most people would use a closure instead of a dedicated class. -- ___ Python tracker <http://bugs

[issue12797] io.FileIO and io.open should support openat

2011-10-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is my quick review: - shouldn't the opener also get the third open() argument (although it currently seems to always be 0o666)? - when fdobj is NULL, you shouldn't override the original error - PyLong_AsLong can fail (if the opener returns to

[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

2011-10-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: This looks good to me. I'm slightly worried about what happens when there's a stale tmp file (for example if the Python process crashed before renaming it). -- ___ Python tracker <http://bugs.python.o

[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

2011-10-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Here's a patch using pseudo-random filenames. > I used id(path) to generate a random name: it's faster than getpid(), > and doesn't pollute strace's output (I'm one of strace's biggest > fan :-). If you go that way,

[issue12797] io.FileIO and io.open should support openat

2011-10-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Updated patch: > * checks for long overflow > * raises original exception if opener returns null > * makes it explicit that "opener" must return an open file descriptor. This looks good to me. You just need to add a "versi

[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

2011-10-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Here's a patch for Python/import.c using mkstemp(3). AFAICT, mkstemp > should always be available (on Unix of course). This looks fine to me. The code simplification tastes good :) -- ___ Python tra

[issue13291] latent NameError in xmlrpc package

2011-10-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Apparently buildbot failures are caused by this commit: == ERROR: test_datetime_before_1900 (test.test_xmlrpc.XMLRPCTestCase

[issue13279] Add memcmp into unicode_compare for optimizing comparisons

2011-10-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I am currently working with Bob Arendt (a colleague who works > frequently with Fedora) to try to put the > -fno-builtin-memcmp in the .spec file for their Python Wouldn't it be better to have it enabled by defaul

[issue13279] Add memcmp into unicode_compare for optimizing comparisons

2011-10-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > Note we only really see the effect if we make sure that gcc > > isn't emitting its "special" memcmp: that's why the -fno-builtin-memcmp > > is SO important on gcc builds! > > I'd rather infer the opposite:

[issue12939] Add new io.FileIO using the native Windows API

2011-11-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Instead of rewriting your own RawIO implementation, why not use _open_osfhandle? This should be simple now with the "opener" argument. http://msdn.microsoft.com/en-us/library/bdts1c9x.aspx -- nos

[issue13302] Clarification needed in C API arg parsing

2011-11-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: It's already in the 3.x docs (but not 2.x): “Strings and buffers These formats allow to access an object as a contiguous chunk of memory. You don’t have to provide raw storage for the returned unicode or bytes area. Also, you won’t have to releas

[issue12939] Add new io.FileIO using the native Windows API

2011-11-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > why not use _open_osfhandle? > > Because it is wrapper for other CRT functions for Windows, like > close(). In other words it is an emulation. I think Python should not > create wrapper around wrapper around wrapper... Why do you think it mak

[issue12939] Add new io.FileIO using the native Windows API

2011-11-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > Why do you think it makes a difference? > Because adding one more dependency on unneeded libraries add the pain. MSVCRT is unneeded?? What are you talking about? > Also it limit us on very restricted API of that wrapper. Windows > native AP

[issue7777] Support needed for AF_RDS family

2011-11-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: A couple of things: - the tests are skipped with "unable to bind RDS socket" here (even under root). Is it expected? - socket.error is the same as OSError now - there are some ResourceWarnings abount unclosed sockets when running

[issue13320] _remove_visual_c_ref in distutils.msvc9compiler causes DLL load fail with embedded Python and multiple CRT versions

2011-11-01 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> tarek components: +Distutils, Distutils2 nosy: +alexis, eric.araujo, loewis, tarek versions: +Python 3.3 -Python 2.7 ___ Python tracker <http://bugs.python.org/issu

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-02 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +IO, Library (Lib) nosy: +pitrou versions: -Python 2.6, Python 3.1, Python 3.4 ___ Python tracker <http://bugs.python.org/issue13

[issue13224] Change str(class) to return only the class name

2011-11-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Please also see the proposed PEP 3155 - http://mail.python.org/pipermail/python-ideas/2011-October/012609.html -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue13

[issue13303] Sporadic importlib failures: FileNotFoundError on os.rename()

2011-11-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Thoughts? I would say go for the simpler (that's probably option 3). -- ___ Python tracker <http://bugs.python.org

[issue13328] pdb shows code from wrong module

2011-11-02 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brett.cannon, georg.brandl, ncoghlan ___ Python tracker <http://bugs.python.org/issue13328> ___ ___ Python-bugs-list mailin

[issue13307] bdist_rpm: INSTALLED_FILES does not use __pycache__

2011-11-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Should be fixed now (verified here on Mageia). -- dependencies: -distutils doesn't byte-compile .py files to __pycache__ during installation nosy: +pitrou resolution: -> fixed stage: -> committed/rejected status: ope

[issue13325] no address in the representation of asyncore dispatcher after connection established

2011-11-02 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +giampaolo.rodola, josiahcarlson, stutzbach stage: -> patch review versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issu

[issue13314] ImportError ImportError: Import by filename, should be deferred until sys.meta_path hooks are processed

2011-11-02 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brett.cannon, ncoghlan ___ Python tracker <http://bugs.python.org/issue13314> ___ ___ Python-bugs-list mailing list Unsub

[issue13311] asyncore handle_read should call recv

2011-11-02 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +giampaolo.rodola, josiahcarlson, neologix, stutzbach stage: -> patch review versions: +Python 3.2 ___ Python tracker <http://bugs.python.org/issu

[issue13327] Update utime API to not require explicit None argument

2011-11-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: You have a possible failure here: +# Set to the current time in the old explicit way. +os.utime(support.TESTFN, None) +st1 = os.stat(support.TESTFN) +# Set to the current time in the new way +os.utime(support.TESTFN

[issue13298] Result type depends on order of operands for bytes and bytearray

2011-11-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think the current behaviour is fine, in that the alternatives are not better at all. In the absence of a type inherently "superior" to the others (as float can be to int, except for very large integers :-)), it makes sense to keep the type of the

[issue13327] Update utime API to not require explicit None argument

2011-11-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: I would specify an even smaller "places". We have very slow buildbots. You could first call utime() with a date far away in the past if you want. -- ___ Python tracker <http://bugs.python.o

[issue13327] Update utime API to not require explicit None argument

2011-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The `delta` keyword would actually be better than `places`, especially > on the slower buildbots. delta=10 would allow up to 10 seconds between > those utime calls. Is that being too permissive? I think it's ok. We don't have to test

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'd still do it like this for portability's sake: > > + -find $(srcdir) -depth -name '__pycache__' -exec rm -rf {} ';' Then you'd probably reintroduce issue8665. -- _

[issue13333] utf-7 inconsistent with surrogates

2011-11-03 Thread Antoine Pitrou
New submission from Antoine Pitrou : The utf-7 codec happily encodes lone surrogates, but it won't decode them: >>> "\ud801".encode("utf-7") b'+2AE-' >>> "\ud801\ud801".encode("utf-7") b'+2AHYAQ-' >>> &

[issue13326] make clean failed on OpenBSD

2011-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > No, the -depth argument avoids that. Ah, you are right, my bad. -- ___ Python tracker <http://bugs.python.org/issu

[issue13332] execfile fixer produces code that does not close the file

2011-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Be aware that execfile() is a simple function call and can be used in any expression. -- nosy: +benjamin.peterson, pitrou ___ Python tracker <http://bugs.python.org/issue13

[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- priority: normal -> deferred blocker ___ Python tracker <http://bugs.python.org/issue13309> ___ ___ Python-bugs-list mai

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Wierdly, it looks like BlockingIO is not raised anywhere in the code > for the C implementation of io. That would explain why it isn't raised :) This is a hairy issue: read(n) is documented as returning either n bytes or nothing. But what if

[issue12498] asyncore.dispatcher_with_send, disconnection problem + miss-conception

2011-11-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +giampaolo.rodola, josiahcarlson, stutzbach ___ Python tracker <http://bugs.python.org/issue12498> ___ ___ Python-bugs-list m

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Also, the advantage of the current approach is that at least, no data > is ever lost But what about the buggy readline() behaviour? -- ___ Python tracker <http://bugs.python.org/i

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Note that Java's BufferedInputStream and ReadableByteChannel also > return partial reads. Apparently, they are specified to, even for blocking streams (which I find a bit weird, and the language in the docs seems deliberately vague). Python&

[issue13342] input() builtin always uses "strict" error handler

2011-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > There cannot be a reason input() should be confined to "strict", or can > there? ;-) Actually, there's a good reason: in the non-interactive case, input() simply calls sys.stdin.read(), which doesn't have encoding or error

[issue13342] input() builtin always uses "strict" error handler

2011-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. The bugfix itself is quite pedestrian, but the test is more interesting. I did what I could to fork a subprocess into a pseudoterminal so as to trigger the GNU readline code path. The only limitation I've found is that I'm unab

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > >> But what about the buggy readline() behaviour? > > Just tell people that if the return value is a string which does not > > end in '\n' then it might caused by EOF or EAGAIN. They can just call > > readline() again t

[issue13342] input() builtin always uses "strict" error handler

2011-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > However when I try your example I get > > sys.stdin = io.TextIOWrapper( > sys.stdin.detach(), 'ascii', 'replace') > ValueError: underlying buffer has been detached Which version of Python (and which OS?). It wo

[issue13344] closed sockets don't raise EBADF anymore

2011-11-04 Thread Antoine Pitrou
New submission from Antoine Pitrou : This decrepancy between 2.x and 3.x is witnessed under Windows: 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

[issue13344] closed sockets don't raise EBADF anymore

2011-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: discrepancy, not decrepancy :S (10038 is WSAENOTSOCK, by the way) -- ___ Python tracker <http://bugs.python.org/issue13

[issue13342] input() builtin always uses "strict" error handler

2011-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I can make it work at the interpreter prompt with your patch applied. > Sorry for cluttering up the ticket. ;-) That's ok, thanks a lot for testing. -- ___ Python tracker <http://bugs.python.

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2011-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Finally, since writting a such code is tricky, what do you - all - > think of making this a generic walker method that would take as > argument the methods to call on a directory and on a file (or link), > so that we could reuse it to wri

[issue7777] Support needed for AF_RDS family

2011-11-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oops, sorry. I wonder if it would be possible to test the address returned by recvfrom(). Same for the flags and ancillary data in recvmsg(). -- ___ Python tracker <http://bugs.python.org/issue7

[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: I also get this error on Mageia. If this can't be fixed, the test should be skipped or removed. -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/is

[issue13342] input() builtin always uses "strict" error handler

2011-11-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed. I hope the test won't disturb the buildbots. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.pyth

[issue13351] Strange time complexity when creating nested lists

2011-11-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: It's because of the cyclic garbage collector. If you call gc.disable() at the beginning of your benchmark, you'll see that runtimes get more similar in both cases. You can also use tuples instead of lists as much as possible, it will reduce press

[issue13229] Add shutil.filter_walk

2011-11-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Nick, perhaps you want to have a look at http://hg.python.org/features/pathlib/ (it doesn't have a filter_walk equivalent but it could grow one :-)) -- nosy: +pitrou ___ Python tracker <http://bugs.py

[issue10287] NNTP authentication should check capabilities

2011-11-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > By always sending capabilities at connection, some servers immediately > throw an error. I've modified the class initialization to include an > optional parameter to indicate if this should be disabled. Which kind of error? As Julien says, w

[issue10115] Support accept4() for atomic setting of flags at socket creation

2011-11-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > What value should we assign to sock->sock_timeout if SOCK_NONBLOCK was > specified in accept4() call? The same value as for other non-blocking sockets, IMO. > And in socket.py should we check as in original accept: > if getdefaulttimeou

[issue10115] Support accept4() for atomic setting of flags at socket creation

2011-11-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > The same value as for other non-blocking sockets, IMO. > There are three possible values I think: > 1. parent's current sock_timeout > 2. global default socket timeout > 3. 0 > > Can you please tell which one? I assume it sh

[issue4489] shutil.rmtree is vulnerable to a symlink attack

2011-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I think the best thing would be to let rmtree fail (provided it closes > all the FDs it opened) Agreed. -- ___ Python tracker <http://bugs.python.org/

[issue6397] Implementing Solaris "/dev/poll" in the "select" module

2011-11-07 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +neologix ___ Python tracker <http://bugs.python.org/issue6397> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13366] test_pep277 failures under WIndows

2011-11-07 Thread Antoine Pitrou
New submission from Antoine Pitrou : The 3.x Windows buildbots all fail in test_pep277. == FAIL: test_open (test.test_pep277.UnicodeFileTests) -- Traceback

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

2011-11-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Anyway, we can keep using "localhost", but just delete the socket > timeout in the server. Please don't. Any problem might then hang the whole test suite. You can bump it up if you want, though. > About using getsockname(), the bind

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

2011-11-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Please, review attached changeset. Doesn't look acceptable to me. -- ___ Python tracker <http://bugs.python.org

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

2011-11-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > If thread.join had a timeout , we could wait for a while and if the > thread is still active, do a fake connection and another join. What's wrong with a socket timeout exactly? Everything you're proposing is ten times more complicated,

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

2011-11-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Antoine, the problem with this test is the timeout. We can set an > arbitrary timeout, but how big is big enough?. I would say answering this question is your task, since you have access to that buildbot. > The only "cosmetic" pro

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

2011-11-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Antoine: Then you would be satisfied if I increase the timeout from 3 > seconds to 60 seconds and clean the event signaling? Yes! -- ___ Python tracker <http://bugs.python.org/i

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

2011-11-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Consider too that if something goes bad enough in the test to skip the > teardown method, Such as? tearDown is normally like a "finally" block, it always gets executed (unless perhaps setUp fails). -- __

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

2011-11-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Stupid mistake. Please, review b93657b239a5.diff (erroneous "sock.close()" > deleted) Looks good to me, thanks. -- ___ Python tracker <http://bugs.py

[issue13373] Unexpected blocking call to multiprocessing.Queue.get with a timeout

2011-11-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue13373> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13373] Unexpected blocking call to multiprocessing.Queue.get with a timeout

2011-11-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +neologix stage: -> patch review versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python tracker <http://bugs.python.org/issu

[issue6397] Implementing Solaris "/dev/poll" in the "select" module

2011-11-09 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue6397> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue6397] Implementing Solaris "/dev/poll" in the "select" module

2011-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > That was thorough :-) Seems OK though. > > +if (n < size) { > +PyErr_SetString(PyExc_IOError, "failed to write all pollfds. " > +"Please, report in http://bugs.python.org/";); > > I

[issue13375] Provide a namedtuple style interface for os.walk values

2011-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Like any named tuple, the benefits lie in the better repr, and the fact > that if you only want some fields you don't have to unpack the whole > tuple. But, given the common idiom shown by Benjamin, how likely is it that you manipulate t

[issue13373] Unexpected blocking call to multiprocessing.Queue.get with a timeout

2011-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch committed, thank you for contributing! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hi, > Testing the patch a bit more thoroughly, I found that data received > from the readable end of the pipe can be corrupted by the C > implementation. This seems to be because two of the previously > dormant codepaths did not properly

[issue13322] buffered read() and write() does not raise BlockingIOError

2011-11-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Do you mean self->raw_pos should give the same answer as > self.raw.tell()? (But that seems to be the definition of > self->abs_pos.) Or is it the buffer offset which corresponds to > self.raw.t

[issue13149] optimization for append-only StringIO

2011-11-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've committed an improved version (which also optimizes seek(0); read()). -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.pyth

[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-10 Thread Antoine Pitrou
Antoine Pitrou added the comment: It is definitely a glibc issue. Here's a C snippet to reproduce: """ #include #include int main() { time_t t; struct tm tmp; char str[200]; t = time(NULL); tmp = *gmtime(&t); tmp.tm_gmtoff = 0; tmp.tm_zo

[issue13309] test_time fails: time data 'LMT' does not match format '%Z'

2011-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Has it been reported? Yes, in http://sourceware.org/bugzilla/show_bug.cgi?id=13401 -- ___ Python tracker <http://bugs.python.org/issu

[issue13385] Add an explicit re.NOFLAGS flag value to the re module

2011-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: As Eric, I don't really think it's useful, and it might actually be confusing (people will start wondering if there's a difference between 0 and NOFLAGS). -- nosy: +pitrou ___ Python

[issue13193] test_packaging and test_distutils failures

2011-11-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Antoine, I appreciate that you took time to fix this bug while I was > without Internet and without Windows, but unfortunately I will have to > backout your commit. Postel’s Law doesn’t win here: It is documented > that the MANIFEST template

[issue13193] test_packaging and test_distutils failures

2011-11-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > A "commit adding problem" should be fixed or reverted > The point is that fixing it may take tome. Reverting is fine by me. But we have no way of knowing you will be taking tome to do it. Ideally, you should have reverted it yourself (

[issue13387] add exact_type argument to assertIsInstance

2011-11-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think there's a point in adding such an extra argument. Why don't you just write self.assertIs(type(myobj), sometype) ? How is the error message not good enough? -- nosy: +pitrou ___

[issue13389] Clear lists freelist in gc.collect()

2011-11-12 Thread Antoine Pitrou
New submission from Antoine Pitrou : Complete gc collections currently clear all freelists, except for the freelist of list objects. Attached patch fixes the omission. -- components: Interpreter Core files: listfreelist.patch keywords: patch messages: 147530 nosy: pitrou priority

[issue13390] Hunt memory allocations in addition to reference leaks

2011-11-12 Thread Antoine Pitrou
New submission from Antoine Pitrou : This patch adds a counting of the number of allocated memory blocks (through the PyObject_Malloc API). Together with -R, it can help chase those memory leaks which aren't reference leaks (see c6dafa2e2594). The sys.getallocedblocks() function is

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

2011-11-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Victor, can you fix the test failures on Windows and 2.7? Otherwise the commit should be reverted. -- ___ Python tracker <http://bugs.python.org/issue7

[issue13389] Clear lists freelist in gc.collect()

2011-11-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Dicts also have a freelist which isn't freed either. New patch attached. -- Added file: http://bugs.python.org/file23672/listdictfreelist.patch ___ Python tracker <http://bugs.python.org/is

[issue13380] ctypes: add an internal function for reseting the ctypes caches

2011-11-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Two things: - you duplicated the part with "CFUNCTYPE(c_int)(lambda: None)" without removing the original chunk of code - some platforms can't compile ctypes, you must handle that case in regrtest Otherwise, good idea. -

[issue13389] Clear lists freelist in gc.collect()

2011-11-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fix the return values and add documentation. -- Added file: http://bugs.python.org/file23673/listdictfreelist.patch ___ Python tracker <http://bugs.python.org/issue13

[issue13389] Clear lists and dicts freelist in gc.collect()

2011-11-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- title: Clear lists freelist in gc.collect() -> Clear lists and dicts freelist in gc.collect() ___ Python tracker <http://bugs.python.org/issu

[issue13389] Clear lists and dicts freelist in gc.collect()

2011-11-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file23672/listdictfreelist.patch ___ Python tracker <http://bugs.python.org/issue13389> ___ ___ Python-bug

[issue13392] Writing a pyc file is not atomic under Windows

2011-11-12 Thread Antoine Pitrou
New submission from Antoine Pitrou : #13146 solved the issue of writing pyc files under POSIX. Under Windows, the problem still exists, as the following buildbot failure shows: [317/360] test_multiprocessing Traceback (most recent call last): File "", line 1, in File "D:\c

[issue13391] string.strip Does Not Remove Zero-Width-Space (ZWSP)

2011-11-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 3.3 ___ Python tracker <http://bugs.python.org/issue13391> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue13393] Improve BufferedReader.read1()

2011-11-12 Thread Antoine Pitrou
New submission from Antoine Pitrou : The main current user of BufferedReader.read1() is TextIOWrapper. In this context, read1() is used to signal that we want to bypass binary buffering as much as possible, since TextIOWrapper does its own buffering. The current read1() implementation is

[issue13393] Improve BufferedReader.read1()

2011-11-12 Thread Antoine Pitrou
Changes by Antoine Pitrou : Added file: http://bugs.python.org/file23676/textioread.patch ___ Python tracker <http://bugs.python.org/issue13393> ___ ___ Python-bugs-list m

[issue13390] Hunt memory allocations in addition to reference leaks

2011-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the comments, here is a new patch addressing them. I've kept the C API available in all builds (since it's private), but sys.getallocatedblocks() is only available in debug builds. As for the memory leak run results, I think we may have t

<    1   2   3   4   5   6   7   8   9   10   >