[issue6939] shadows around the io truncate() semantics

2010-01-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: First, I get the following compilation warnings under Linux: /home/antoine/cpython/26/Modules/_fileio.c: In function ‘fileio_truncate’: /home/antoine/cpython/26/Modules/_fileio.c:651: attention : unused variable ‘tempposobj’ /home/antoine/cpython/26/Modules

[issue7561] PyByteArray_AS_STRING used unsafely

2010-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. A static empty string is used in case PyByteArray_AS_STRING() is asked on an empty bytearray, instead of returning NULL. Another possibility would be to implement tp_new for bytearray and always allocate a new 1-byte string, but this would

[issue7561] PyByteArray_AS_STRING used unsafely

2010-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: The posixmodule was committed with a test in r77571 (py3k) and r77572 (3.1). -- ___ Python tracker <http://bugs.python.org/issue7

[issue7561] PyByteArray_AS_STRING used unsafely

2010-01-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file15660/posixmodule_fn_bytearray_fix_01.patch ___ Python tracker <http://bugs.python.org/issue7

[issue7561] PyByteArray_AS_STRING used unsafely

2010-01-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file15663/release_bytes.diff ___ Python tracker <http://bugs.python.org/issue7561> ___ ___ Python-bug

[issue7561] PyByteArray_AS_STRING used unsafely

2010-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: (I meant the posixmodule fix, of course) -- ___ Python tracker <http://bugs.python.org/issue7561> ___ ___ Python-bugs-list m

[issue7561] PyByteArray_AS_STRING used unsafely

2010-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: The bytearray fix has been committed in r77573 (trunk), r77574 (2.6), r77576 (py3k), r77577 (3.1). The issue can now be closed. -- resolution: -> fixed stage: test needed -> committed/rejected status: open -&g

[issue7723] sqlite only accept buffer() for BLOB objects (input/output)

2010-01-17 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> ghaering nosy: +ghaering stage: -> needs patch ___ Python tracker <http://bugs.python.org/issue7723> ___ ___

[issue7723] sqlite only accept buffer() for BLOB objects (input/output)

2010-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is not exact. buffer() doesn't exist at all in 3.x, and it issues a warning in 2.x when used with the -3 flag: $ ./python -3 Python 2.7a2+ (trunk:77580M, Jan 17 2010, 16:51:51) [GCC 4.4.1] on linux2 Type "help", "copyright", &

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Replace 'may' with 'will' or 'shall' everywhere the context indicates > a mandatory requirement. > > Since this possibly affects the entire Python documentation, does it > make sense to discuss this on python-

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch looks rather good. Is `self.MAX_N` still necessary in read()? I guess it's rare to read more than 2GB at once, though... -- ___ Python tracker <http://bugs.python.org/i

[issue7723] sqlite only accept buffer() for BLOB objects (input/output)

2010-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hello Gerhard, > As far as I can see, the Python 3 definition of the old "buffer" > interface is "anything that I can apply memoryview to". Roughly, yes. > When returning BLOBs, the sqlite3 module now returns bytes objects. I >

[issue4194] default subprocess.Popen buffer size

2010-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: Can someone check if this still applies to Python 3.1/3.2? By the way, I see no reason not to buffer at least the subprocess's stdout and stderr streams. -- versions: -Python 2.4, Python 2.5, Python 2.6, Pytho

[issue7739] time.strftime may hung while trying to open /etc/localtime but does not release GIL

2010-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: You might want to investigate which C library call opens this file, and propose a patch to release the GIL before doing that call. As far as I can tell, Python itself does not open /etc/localtime in any place. -- nosy: +pitrou

[issue7712] Add a context manager to change cwd in test.test_support

2010-01-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: with_writable_cwd should probably use functools.wraps. -- ___ Python tracker <http://bugs.python.org/issue7712> ___ ___ Pytho

[issue7736] os.listdir hangs since opendir() and closedir() do not release GIL

2010-01-20 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +loewis ___ Python tracker <http://bugs.python.org/issue7736> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7736] os.listdir hangs since opendir() and closedir() do not release GIL

2010-01-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Releasing the GIL when calling C library functions (e.g. opendir()) is not a requirement, it's just an optimization for slightly better multi-threading. Also, as shown in the backtrace, PyGILState_Ensure() is called which should only try to acquire th

[issue7736] os.listdir hangs since opendir() and closedir() do not release GIL

2010-01-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ah, thanks for the explanation. Yes indeed the patch looks ok for the job. You should just be aware that similar problems may appear with other system calls. I don't think we have ever considered that common C calls such as opendir() could call back into P

[issue7736] os.listdir hangs since opendir() and closedir() do not release GIL

2010-01-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Well, now that I know what to look for, tracking down more of these > problems should be significantly faster and easier. Are you generally > going to accept similar patches for other unprotected syscalls? Until now the rule of thumb was to cons

[issue7745] Remove "isatty" check when setting sys.std[in|out|err] encoding to that of locale

2010-01-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: As discussed on python-dev, this patch should probably be rejected. -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue7

[issue7753] newgil backport

2010-01-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > * Instead of deprecating the set/getcheckinterval APIs, convert the > arguments passed to these to the switch interval. The new APIs > set/getswitchinteral are then not needed. This is certainly not a good idea. The semantics are different, whi

[issue7753] newgil backport

2010-01-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > While the semantics are different, the result is similar and > the actual numbers used are usually determined by experiment > or rough estimate - noone expects the APIs to provide any kind > of exact timing and it's not needed either. Ther

[issue7753] newgil backport

2010-01-22 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Just use some conversion formula, e.g. switching interval in micro > seconds = constant * byte code check interval. We can then determine > a constant to match todays CPU performance. Well, there are two problems: - opcode execution cost varies

[issue7751] urllib.urlopen("///C|/foo/bar/spam.foo") IOError: [Errno 22]

2010-01-23 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +orsenthil ___ Python tracker <http://bugs.python.org/issue7751> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: The documentation mentions that mhlib is deprecated and mailbox should be used instead. Is there any point in trying to fix it? -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue7

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: test needed -> patch review versions: +Python 2.6 -Python 3.2 ___ Python tracker <http://bugs.python.org/issue7759> ___ _

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +akuchling ___ Python tracker <http://bugs.python.org/issue7759> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7753] newgil backport

2010-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: As for your other comments, Marc-Andre: > * Please check whether you can move these variable declarations inside > the main loop function (as statics): > [snip] They are used in other functions than in the main loop, so it's not possible. >

[issue7753] newgil backport

2010-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: I meant "worse than milliseconds", sorry. -- ___ Python tracker <http://bugs.python.org/issue7753> ___ ___ Python-b

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > The documentation mentions that mhlib is deprecated and mailbox > > should be used instead. Is there any point in trying to fix it? > > It looks like Btrfs will eventually conform to traditional st_nlink > behavior. However, that sti

[issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure)

2010-01-24 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Sorry, I don't understand what you are proposing. Do you mean we > should just let the test fail for people who develop on HFS+ and > Btrfs filesystems? That seems not so good. Hmm, you are right. From a quick glance, the patch looks ok. I

[issue7774] sys.executable: wrong location if zeroth command argument is modified.

2010-01-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: How would you suggest to implement sys.executable if not by looking at sys.argv[0] (or the C equivalent, rather)? -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue7

[issue7753] newgil backport

2010-01-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le mercredi 27 janvier 2010 à 10:37 +, Marc-Andre Lemburg a écrit : > > I find it rather strange that Python 3.x now only supports > NT and POSIX threads in ceval while it still supports the > whole set of other thread implementations for

[issue7753] newgil backport

2010-01-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le mercredi 27 janvier 2010 à 10:33 +, Marc-Andre Lemburg a écrit : > > It appears to be better to use clock_gettime(CLOCK_MONOTONIC) > where available and only use gettimeofday() as fallback solution > together with times(), ftime() and tim

[issue7753] newgil backport

2010-01-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The arguments given in that thread sound a bit strange to me: > just because there were no changes to a few files, doesn't really > say anything about whether they contain working code or not. That was a heuristic. Files which do not get any m

[issue6715] xz compressor support

2010-01-27 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- dependencies: -please support lzma compression as an extension and in the tarfile module priority: -> high ___ Python tracker <http://bugs.python.org/iss

[issue5689] please support lzma compression as an extension and in the tarfile module

2010-01-27 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- dependencies: +xz compressor support ___ Python tracker <http://bugs.python.org/issue5689> ___ ___ Python-bugs-list mailin

[issue1225769] Proposal to implement comment rows in csv module

2010-01-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Agreed with Skip, Raymond and Amaury. Since the csv module returns you an iterator, it's easy enough to wrap it in another iterator. -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issu

[issue7796] No way to find out if an object is an instance of a namedtuple

2010-01-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: In this case, what is wrong with: if isinstance(obj, my_tuple): ... or do you want to catch all namedtuples? And if so, why? (I suppose it would be easy to make all namedtuples inherit from a common base class, though) -- assignee: -> rhettin

[issue7796] No way to find out if an object is an instance of a namedtuple

2010-01-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I need to be able to catch all named tuples, I don't know in advance > what instance of a namedtuple it might be, but I want my function to > only accept named tuples. Is this unreasonable? I don't know. Why exactly don't you want

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-27 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> pitrou resolution: -> accepted versions: +Python 2.7 ___ Python tracker <http://bugs.python.org/issue7610> ___ __

[issue7610] Cannot use both read and readline method in same ZipExtFile object

2010-01-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch has been committed in r77798 (trunk) and r77800 (py3k). Thank you! I won't commit it to 2.6 and 3.1 because it's too involved to qualify as a bug fix, though. -- resolution: accepted -> fixed stage: patch review -> committed

[issue6939] shadows around the io truncate() semantics

2010-01-27 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you. The patch was committed mostly unchanged in r77802 (a few cosmetic fixes). Now trunk and py3k must absolutely be patched in order to conform to the new behaviour. Can you produce a patch for trunk? -- priority: -> release blocker st

[issue6939] shadows around the io truncate() semantics

2010-01-27 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file15931/patch26_largefile_tested.patch ___ Python tracker <http://bugs.python.org/issue6939> ___ ___

[issue5673] Add timeout option to subprocess.Popen

2010-01-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +astrand stage: test needed -> patch review ___ Python tracker <http://bugs.python.org/issue5673> ___ ___ Python-bugs-lis

[issue5673] Add timeout option to subprocess.Popen

2010-01-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Some comments: - why do you say Thread.join() uses a busy loop? is it because it uses Condition.wait()? If so, this will be solved in py3k by issue7316 (which you are welcome to review). Otherwise, I think there should be an upper bound on the sleeping

[issue5362] Add configure option to disable Py3k warnings

2010-01-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Given the very small benefits, I don't think there's any point in making this a configuration variable. A hardcoded flag would be sufficient, and expert users would be able to recompile their Python (as with the FAST_

[issue7753] newgil backport

2010-01-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: > It appears to be better to use clock_gettime(CLOCK_MONOTONIC) > where available and only use gettimeofday() as fallback solution > together with times(), ftime() and time(). Ok, I've tried and it's less good than expected. Using CLOCK_M

[issue7753] newgil backport

2010-01-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: > pthreads will default to use the real time clock. In order > to have them use the monotonic timer, you have to setup > a condition variable attribute: See the man-page for > pthread_condattr_setclock(). I'll look at that, but I'm not t

[issue7804] test_readline failure

2010-01-29 Thread Antoine Pitrou
New submission from Antoine Pitrou : This is a fresh py3k checkout on a fresh Debian Lenny install: == ERROR: testHistoryUpdates (test.test_readline.TestHistoryManipulation

[issue7805] test_multiprocessing failure

2010-01-29 Thread Antoine Pitrou
New submission from Antoine Pitrou : This is a fresh py3k checkout on a fresh Debian Lenny install: == ERROR: test_pool_worker_lifetime (test.test_multiprocessing.WithProcessesTestPoolWorkerLifetime

[issue1926] NNTPS support in nntplib

2010-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, a test could use Google or gmane (according to the FAQ, nntps is supported: http://gmane.org/faq.php ). The test should skip gracefully (using the skipTest() API) if the connection fails, so that network errors or service unavailability don't

[issue7624] isinstance(... , collections.Callable) fails with oldstyle class i nstances

2010-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well the fix is easy for old-style classes, since we just have to use hasattr(obj, '__call__') in that case. -- keywords: +easy nosy: +pitrou priority: normal -> critical ___ Python tracker <http:/

[issue7624] isinstance(... , collections.Callable) fails with oldstyle class i nstances

2010-01-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: "subtype == _InstanceType" can probably be replaced with "subtype is _InstanceType". Otherwise, the patch looks good to me. -- nosy: +benjamin.peterson ___ Python tracker <http://bu

[issue7782] new test for test_iter.py

2010-01-29 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +rhettinger ___ Python tracker <http://bugs.python.org/issue7782> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7544] Fatal error on thread creation in low memory condition

2010-01-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: I didn't test the patch but some comments: - PyThreadState_Prealloc and PyThreadState_Init should probably be prefixed with an underscore, because there's no use for them outside of the interpreter - _PyThreadState_New should be static. Besid

[issue7544] Fatal error on thread creation in low memory condition

2010-01-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oh, and besides, you can use the -R option to regrtest to find out if there are any reference leaks (e.g. "-R 3:2:"). -- ___ Python tracker <http://bugs.python.

[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch should come with a test. -- ___ Python tracker <http://bugs.python.org/issue5677> ___ ___ Python-bugs-list mailin

[issue6939] shadows around the io truncate() semantics

2010-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Your patch lacked a fix for test_largefile (I think it is skipped under Windows). I added this and committed it in r77890. Will port to py3k. -- resolution: -> accepted versions: -Python 2.7 ___ Python trac

[issue6939] shadows around the io truncate() semantics

2010-01-31 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in py3k (r77895, r77896) and 3.1 (r77897). Thank you Pascal! -- resolution: accepted -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bug

[issue1943] improved allocation of PyUnicode objects

2010-02-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I'd consider that a bug. Esp. the IO lib should be 8-bit clean > in the sense that it doesn't add any special meaning to NUL > characters or code points. It doesn't add any special meaning to them. It just relies on a NUL being pres

[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-02-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is a particularly verbose patch for the information it is trying to convey. -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue6

[issue7829] dis module documentation gives no indication of the dangers of bytecode inspection

2010-02-01 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: georg.brandl -> brett.cannon nosy: +brett.cannon ___ Python tracker <http://bugs.python.org/issue7829> ___ ___ Python-

[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-02-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: I think checking errno would be fine (provided it eliminates all variations ot this bug). -- ___ Python tracker <http://bugs.python.org/issue5

[issue7805] test_multiprocessing failure

2010-02-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Also witnessed on one of the buildbots: test test_multiprocessing failed -- Traceback (most recent call last): File "/home/pybot/buildarea/3.x.klose-debian-ia64/build/Lib/test/test_multiprocessing.py", line 1076, in test_pool_worke

[issue7805] test_multiprocessing failure

2010-02-01 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- versions: +Python 2.6, Python 2.7 ___ Python tracker <http://bugs.python.org/issue7805> ___ ___ Python-bugs-list mailing list Unsub

[issue1943] improved allocation of PyUnicode objects

2010-02-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le lundi 01 février 2010 à 19:21 +, Marc-Andre Lemburg a écrit : > > This is not an implementation detail. > > It is, otherwise I would have documented it. Ok, so the current allocation scheme of unicode objects is an implementation detail as

[issue7830] Flatten nested functools.partial

2010-02-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Flattening should only happen for instances of the exact type. When people create subclasses, there's usually a reason for it. -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/i

[issue7834] socket.connect() no longer works with AF_BLUETOOTH L2CAP sockets

2010-02-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Could you produce a patch? -- keywords: +easy nosy: +pitrou priority: -> normal stage: -> needs patch ___ Python tracker <http://bugs.python.org/

[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: I still think this is much too verbose. The second note looks redundant with the first one and the third one. Remember, the notes you are adding may be useful, but they'll also make reading the whole page more te

[issue7827] recv_into() argument 1 must be pinned buffer, not bytearray

2010-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: There's a patch to make array implement the new buffer API in the following issue, which was closed: http://bugs.python.org/issue6071 The patch is "hasharray.patch". -- nosy: +pitrou ___ Python

[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > An errno+ferror approach works except for two cases: > > (1) MS fgets() does not consider reading from a write-only stream > an error. While annoying, I think this is standard conforming. > > (2) OpenSolaris sets errno unr

[issue6760] patch to subprocess docs to better explain Popen's 'args' argument

2010-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: The following sentences look like a distraction to me: « Additional quoting may be required because the entire string is a Python string. It may be useful to use a Python raw string in complex cases. » It is true of every string literal and is not specific

[issue7385] MemoryView_FromObject crashes if PyBuffer_GetBuffer fails

2010-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: When PyMemoryView_FromObject() doesn't return NULL, you should decref the result. Otherwise, it's "perfect". -- ___ Python tracker <http://bu

[issue7840] Lib/ctypes/test/test_pep3118.py should not shadow the memoryview() builtin

2010-02-02 Thread Antoine Pitrou
New submission from Antoine Pitrou : test_pep3118.py creates a dummy memoryview class and says "It can be removed when the py3k memoryview object is backported". Since memoryview has been backported to trunk, it should be removed. -- assignee: theller components: Tes

[issue7385] MemoryView_FromObject crashes if PyBuffer_GetBuffer fails

2010-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've added a missing call to PyBuffer_Release() and committed the patch to trunk (r77916). -- ___ Python tracker <http://bugs.python.org/i

[issue7841] test_capi fails when run more than once

2010-02-02 Thread Antoine Pitrou
New submission from Antoine Pitrou : For some reason it only fails in py3k, not trunk. test_capi beginning 5 repetitions 12345 test test_capi crashed -- : PyDateTime_CAPI somehow initialized 1 test failed: test_capi [101007 refs] -- assignee: benjamin.peterson components: Tests

[issue7816] test_capi crashes when run with "-R"

2010-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Needs to be merged in py3k :) -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue7816> ___ ___ Python-bugs-list m

[issue7385] MemoryView_FromObject crashes if PyBuffer_GetBuffer fails

2010-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Merged in r77918 (py3k) and r77920 (3.1). -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue7723] sqlite only accept buffer() for BLOB objects (input/output)

2010-02-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Pablo's documentation patch for py3k has been committed. -- ___ Python tracker <http://bugs.python.org/issue7723> ___ ___

[issue6715] xz compressor support

2010-02-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: We all agree that lzma/xz is important, what is needed is a patch. -- ___ Python tracker <http://bugs.python.org/issue6

[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-02-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +loewis ___ Python tracker <http://bugs.python.org/issue5677> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hmm, test_file.py is for the new IO library (backported from 3.x). You should use test_file2k.py for tests against the 2.x file object. Also, readinto() should take something such as a bytearray() as argument, not a string. -- versions: +Python 2.7

[issue7848] copy.copy corrupts objects that return false value from __getstate__

2010-02-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +alexandre.vassalotti ___ Python tracker <http://bugs.python.org/issue7848> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7853] on __exit__(), exc_value does not contain the exception.

2010-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed, it seems the exception isn't always normalized. -- nosy: +benjamin.peterson, pitrou ___ Python tracker <http://bugs.python.org/i

[issue7853] on __exit__(), exc_value does not contain the exception.

2010-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: No, it's also in 2.6. -- ___ Python tracker <http://bugs.python.org/issue7853> ___ ___ Python-bugs-list mailing list

[issue7728] test_timeout should use "find_unused_port" helper

2010-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Can you provide a patch? -- keywords: +easy type: -> behavior ___ Python tracker <http://bugs.python.org/issue7728> ___ _

[issue5673] Add timeout option to subprocess.Popen

2010-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I agree. Does subprocess.TimeoutExpired sound good? Yes. > It won't be possible with the current implementation to put the partial output > in the exception, because read blocks. Fair enough :) > I think call and check_call shou

[issue4772] undesired switch fall-through in socketmodule.c

2010-02-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in all four branches, thank you. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oh and the following line shouldn't be needed: data = b'xxx' if 'b' in mode else u'xxx' Since old-style file objects always take bytestrings (it's harmless, though, because the uni

[issue7857] test_logging fails

2010-02-05 Thread Antoine Pitrou
New submission from Antoine Pitrou : First, listening and/or connecting often fails. Second, the test should use try/finally to release all resources even in case of failure. This is breaking most buildbots currently: http://www.python.org/dev/buildbot/trunk/ [snip] test_listen_config_1_ok

[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I wonder if the ValueError in fileio.c is intentional: I don't know, but this would be the subject of a separate issue anyway. -- ___ Python tracker <http://bugs.python.or

[issue7859] support "with self.assertRaises(SomeException) as exc:" syntax

2010-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: You can't get the exception before it is even raised... -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/i

[issue5677] Serious interpreter crash and/or arbitrary memory leak using .read() on writable file

2010-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch was committed in r77989 (trunk) and r77990 (2.6). Thank you Stefan! -- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed ___ Python tracker <http://bug

[issue7859] support "with self.assertRaises(SomeException) as exc:" syntax

2010-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Indeed. In that case, I am all for it. -- ___ Python tracker <http://bugs.python.org/issue7859> ___ ___ Python-bugs-list mailin

[issue7858] os.utime(file, (0, 0, )) fails on on vfat, but doesn't fail immediately

2010-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks like a missing "goto done" in posix_utime(), posixmodule.c, line 2805. Could you test the following patch? -- keywords: +patch nosy: +pitrou priority: -> normal stage: -> needs patch type: -> behavior versions: +Python 2.7,

[issue7860] 32-bit Python on 64-bit Windows reports incorrect architecture

2010-02-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +lemburg ___ Python tracker <http://bugs.python.org/issue7860> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue7860] 32-bit Python on 64-bit Windows reports incorrect architecture

2010-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: It's also inconsistent with Linux behaviour: >>> import sys >>> sys.maxsize 2147483647 >>> import platform >>> platform.machine() 'x86_64' >>> platform.architecture() ('32bit', 'E

[issue7860] 32-bit Python on 64-bit Windows reports incorrect architecture

2010-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: The test could simply check that platform.machine() never returns "x86" when sys.maxsize is greater than 2**32. (and it would even be platform-agnostic) -- ___ Python tracker <http://bugs.python.

[issue6715] xz compressor support

2010-02-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: There's a Python binding for some lzma lib here: https://launchpad.net/pyliblzma -- ___ Python tracker <http://bugs.python.org/i

<    41   42   43   44   45   46   47   48   49   50   >