[issue6560] socket sendmsg(), recvmsg() methods

2009-07-24 Thread Thomas Herve
Thomas Herve the...@free.fr added the comment: This is a duplicate (although updated patch) from bug #1194378. It would still need unit tests... -- nosy: +therve ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6560

[issue3051] heapq change breaking compatibility

2008-06-11 Thread Thomas Herve
Thomas Herve [EMAIL PROTECTED] added the comment: Yes, the last commit did the trick. Thanks. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3051 ___ ___ Python

[issue3051] heapq change breaking compatibility

2008-06-11 Thread Thomas Herve
Thomas Herve [EMAIL PROTECTED] added the comment: Sure, that's fine with me. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3051 ___ ___ Python-bugs-list mailing

[issue3051] heapq change breaking compatibility

2008-06-07 Thread Thomas Herve
Thomas Herve [EMAIL PROTECTED] added the comment: Unfortunately, the modification didn't fix the problem. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3051

[issue3051] heapq change breaking compatibility

2008-06-06 Thread Thomas Herve
Thomas Herve [EMAIL PROTECTED] added the comment: Okay then. At least the issue is recorded somewhere, if someone has the same problem. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3051

[issue3027] if extended c module is calling Windows API waitForSingleObject, it will block other thread.

2008-06-02 Thread Thomas Herve
Thomas Herve [EMAIL PROTECTED] added the comment: You have to release the GIL. See http://docs.python.org/api/threads.html for some information. -- nosy: +therve ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue3027

[issue2982] more tests for pyexpat

2008-05-31 Thread Thomas Herve
Thomas Herve [EMAIL PROTECTED] added the comment: I attach a first try adding tests for the handlers you mentioned. -- keywords: +patch Added file: http://bugs.python.org/file10483/2922.diff ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org

[issue2760] Recent change in socket.py breaks urllib2

2008-05-04 Thread Thomas Herve
New submission from Thomas Herve [EMAIL PROTECTED]: The problematic change is here: http://svn.python.org/view/python/trunk/Lib/socket.py?rev=62627r1=61008r2=62627 The following script shows the problem: Python 2.6a2+ (trunk:62707, May 4 2008, 19:13:44) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7

[issue1657] [patch] epoll and kqueue wrappers for the select module

2008-02-29 Thread Thomas Herve
Thomas Herve added the comment: Is there a chance for this go in the first alpha? FWIW, I've tested it with twisted kqueue and epoll reactors, and didn't get any problems. There are still 2 typos in the patch: KQ_ADD is used 2 times in the docs instead of KQ_EV_ADD. Everything else looks good

[issue2168] gdbm needs to be iterable

2008-02-24 Thread Thomas Herve
Changes by Thomas Herve: -- keywords: +patch Added file: http://bugs.python.org/file9531/dbm.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2168 __ ___ Python-bugs

[issue2168] gdbm needs to be iterable

2008-02-24 Thread Thomas Herve
Changes by Thomas Herve: Added file: http://bugs.python.org/file9532/gdbm.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2168 __ ___ Python-bugs-list mailing list

[issue2168] gdbm needs to be iterable

2008-02-24 Thread Thomas Herve
Thomas Herve added the comment: Attached files add contains method to dbm and gdbm objects. It fixes failures with test_shelve. I'm ready to add more tests for this, but #1960 should probably go in first (it converts the tests to unittest, and add some coverage). Please review

[issue2177] Update compiler module to handle class decorators

2008-02-24 Thread Thomas Herve
New submission from Thomas Herve: The attached patch (tries to?) updates compiler to handle class decorators, and also to handle the new way decorated function are handled. I had a weird bug because it seems that ast.py was modified at hand last time (r51330). This fixes the recent failures

[issue2165] Fix for test_logging

2008-02-23 Thread Thomas Herve
New submission from Thomas Herve: The attached patch fixes the test_logging failure on my machine. Please review. -- components: Tests files: test_logging.diff messages: 62727 nosy: therve severity: normal status: open title: Fix for test_logging versions: Python 2.6 Added file: http

[issue2168] gdbm needs to be iterable

2008-02-23 Thread Thomas Herve
New submission from Thomas Herve: A recent change in shelve (r60927) raises the need for gdbm objects to be iterable. We can see it by running test_shelve on a machine with gdbm. I'll try to fix this. The same thing should be done with the dbm module I think. -- components: Library

[issue2111] mmap segfaults when trying to write a block opened with PROT_READ

2008-02-14 Thread Thomas Herve
New submission from Thomas Herve: Basically, the write method of mmap objects check the state with is_writable, which check the writability with the access attributes. But the mmap object can be opened correctly specifying the rights with prot=mmap.PROt_READ. Attached patch corrects the problem

[issue2112] mmap.error should be a subclass of EnvironmentError and not a direct EnvironmentError

2008-02-14 Thread Thomas Herve
New submission from Thomas Herve: mmap.error in mmapmodule is a direct reference to PyExc_EnvironmentError, whereas it should be a subclass. It makes it provide a specific string representation, and allows to be more specific when catching exceptions. The attached patch tries to provide

[issue1625] bz2.BZ2File doesn't support multiple streams

2008-01-20 Thread Thomas Herve
Thomas Herve added the comment: The gzip module supports reopening an existing file to add another stream. I think the bz2 module should not the same. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1625

[issue1657] [patch] epoll and kqueue wrappers for the select module

2007-12-24 Thread Thomas Herve
Thomas Herve added the comment: You have to use sys.platform to get 'darwin', not os.name. The rest of the test seems good. I didn't spot the check of EEXIST in pyepoll_internal_ctl, I'm not sure it's a good idea. I understand it's for being able to only use register, but it's not the way it's

[issue1657] [patch] epoll and kqueue wrappers for the select module

2007-12-22 Thread Thomas Herve
Thomas Herve added the comment: What do you suggest as sort criteria? The natural sort of the tuple you used for equality, I'd say. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1657

[issue1657] [patch] epoll and kqueue wrappers for the select module

2007-12-21 Thread Thomas Herve
Thomas Herve added the comment: Here I go for kqueue: * the docstring of test_kqueue.py is wrong * the tests are a bit light. It would be good the have a test like test_control_and_wait in test_epoll. * the kqueue_queue_control (and the pyepoll_poll) are now completely wrong! You should

[issue1657] [patch] epoll and kqueue wrappers for the select module

2007-12-21 Thread Thomas Herve
Changes by Thomas Herve: Added file: http://bugs.python.org/file9020/test_kqueue.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1657 __ ___ Python-bugs-list mailing list

[issue1657] [patch] epoll and kqueue wrappers for the select module

2007-12-21 Thread Thomas Herve
Thomas Herve added the comment: I attached a patch with a more complete test of kqueue. It's not that great, but it's a thing. I've only tested on OS X, but it works. Regarding the ability of building an epoll object from a fd, it might be usefull in some corner cases, but that's not a priority

[issue1549] Regression with __hash__ definition and rich comparison operators

2007-12-20 Thread Thomas Herve
Thomas Herve added the comment: Thanks a lot! __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1549 __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue1657] [patch] epoll and kqueue wrappers for the select module

2007-12-20 Thread Thomas Herve
Thomas Herve added the comment: Some remarks: * the name of the function used for PyArg_ParseTupleAndKeywords in register, modify, unregister is set to control instead of the good name. * there is a leak in pyepoll_new if the parsing of arguments fails. * the indentation is sometimes tabs

[issue1657] [patch] select.epoll wrapper for Linux 2.6 epoll()

2007-12-19 Thread Thomas Herve
Thomas Herve added the comment: Cool, thanks for working on that. Just for the record, I don't really understand the workflow: why closing the other ticket as duplicate and not post the patch on the old one? But whatever. For this patch, I don't see the benefit of putting it in the select

[issue1625] bz2.BZ2File doesn't support multiple streams

2007-12-14 Thread Thomas Herve
New submission from Thomas Herve: The BZ2File class only supports one stream per file. It possible to have multiple streams concatenated in one file, it the resulting data should be the concatenation of all the streams. It's what the bunzip2 program produces, for example. It's also supported

[issue1336] subprocess.Popen hangs when child writes to stderr

2007-12-06 Thread Thomas Herve
Thomas Herve added the comment: FWIW, we encountered roughly the same problem in Twisted. However, we fixed it by disabling gc *before* fork, because the gc can occur just after the fork. See http://twistedmatrix.com/trac/ticket/2483 for the bug report, and http://twistedmatrix.com/trac

[issue1326] internal zipimport.zipimporter feature untested

2007-12-05 Thread Thomas Herve
Thomas Herve added the comment: I attach a patch adding a test and some documentation. This tries to solve issue1325 too. exarkun, does that fulfill your original request? -- nosy: +therve Added file: http://bugs.python.org/file8877/1326.diff __ Tracker

[issue1326] internal zipimport.zipimporter feature untested

2007-12-05 Thread Thomas Herve
Thomas Herve added the comment: The patch is against trunk. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1326 __ ___ Python-bugs-list mailing list Unsubscribe: http

[issue1554] [patch] socketmodule cleanups: allow the use of keywords in socket functions

2007-12-05 Thread Thomas Herve
Thomas Herve added the comment: Here it is. There were several functions which didn't have any tests at all, so I had to create some. These tests are likely to fail on some platforms (like windows), but I didn't get any machine to test. Added file: http://bugs.python.org/file8878

[issue1549] Regression with __hash__ definition and rich comparison operators

2007-12-04 Thread Thomas Herve
Thomas Herve added the comment: I gave it a try. The following patch corrects 2 problems: * classes with only __lt__ and __gt__ defined are hashable * classes defining __eq__ get a meaningful exception. I've restricted the hash_name_op to the bare minimum, but no tests failed, so I supposed

[issue1552] fromfd() and socketpair() should return wrapped sockets

2007-12-04 Thread Thomas Herve
Thomas Herve added the comment: This is a nice enhancement. I attach a quick patch to add tests for that. -- nosy: +therve Added file: http://bugs.python.org/file8872/1552_test_socket.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1552

[issue1285940] socket intial recv() latency

2007-12-04 Thread Thomas Herve
Thomas Herve added the comment: Can we close this one? -- nosy: +therve _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1285940 _ ___ Python-bugs-list mailing

[issue1554] [patch] socketmodule cleanups: allow the use of keywords in socket functions

2007-12-04 Thread Thomas Herve
New submission from Thomas Herve: I attach a patch where I use PyArg_ParseTupleAndKeywords in socketmodule where ARGSUSED was mentioned, or removed ARGSUSED if keywords already used. -- components: Library (Lib) files: socket_keywords.diff messages: 58189 nosy: therve severity: normal

[issue1554] [patch] socketmodule cleanups: allow the use of keywords in socket functions

2007-12-04 Thread Thomas Herve
Thomas Herve added the comment: It's not really for solving a problem, it's an enhancement to allow the functions to be called with keyword parameters. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1554

[issue1554] [patch] socketmodule cleanups: allow the use of keywords in socket functions

2007-12-04 Thread Thomas Herve
Thomas Herve added the comment: Alright I'll add tests to the modified functions. I don't think I have to change documentation because I kept the same name for the parameters, but I'll check. Looking at the patch more, maybe it doesn't make sense on the functions taking only one parameter

[issue1549] Regression with __hash__ definition and rich comparison operators

2007-12-03 Thread Thomas Herve
New submission from Thomas Herve: A new behavior was introduced in r59106 in python trunk, which look suspicious to me. Basically, every time a class defines a comparison operator, it's __hash__ method is defined to None. The simple following example shows it: class A(object): ... def

[issue1549] Regression with __hash__ definition and rich comparison operators

2007-12-03 Thread Thomas Herve
Thomas Herve added the comment: Of course, I meant unusable. -- nosy: +exarkun __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1549 __ ___ Python-bugs-list mailing list

[issue1549] Regression with __hash__ definition and rich comparison operators

2007-12-03 Thread Thomas Herve
Thomas Herve added the comment: Also, to be more clear, that happens when you define any of the functions in the name_op array (__lt__, __le___, __gt__, __ge__, ...). It's not just a problem about the object being non hashable. __ Tracker [EMAIL PROTECTED] http

[issue1549] Regression with __hash__ definition and rich comparison operators

2007-12-03 Thread Thomas Herve
Thomas Herve added the comment: There are different ways to fix this. Reverting r59016 is one of them, but I guess it's not an acceptable solution :). From what I understand of the changes, removing the operations (__lt__, __gt__, __le__, __ge__) from the name_op array would fix this. But I

[issue1269] Exception in pstats print_callers()

2007-11-25 Thread Thomas Herve
Thomas Herve added the comment: Here's my patch against trunk, with one test. Please review! -- versions: +Python 2.6 Added file: http://bugs.python.org/file8806/1269.diff __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1269

[issue1117670] profiler: Bad return and Bad call errors with exceptions

2007-11-25 Thread Thomas Herve
Thomas Herve added the comment: Ping to close this? -- nosy: +therve _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1117670 _ ___ Python-bugs-list mailing list

[issue1269] Exception in pstats print_callers()

2007-11-23 Thread Thomas Herve
Thomas Herve added the comment: 1315 is a duplicate of this, and I end up with a very similar solution. -- nosy: +therve __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1269

[issue1315] Bug in pstats.print_callers

2007-11-23 Thread Thomas Herve
Thomas Herve added the comment: The real bug is in fact in add_callers, where it concatenates tuples instead of adding the values. I'll try to write a test this week-end if nobody beats me to it. The attached is against current trunk. -- nosy: +therve Added file: http://bugs.python.org

[issue1315] Bug in pstats.print_callers

2007-11-23 Thread Thomas Herve
Thomas Herve added the comment: Oh I didn't see, but this one should probably closed as duplicate of 1269. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1315 __ ___ Python-bugs

[issue1686386] Python SEGFAULT on tuple.__repr__ and str()

2007-09-13 Thread Thomas Herve
Thomas Herve added the comment: I think it could be solved both the same way: if tuple repr is wrong, there are probably some other repr code that is wrong too, so fixing PyObject_Repr is safer. _ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue1686386

[issue1686386] Python SEGFAULT on invalid superclass access

2007-09-06 Thread Thomas Herve
Thomas Herve added the comment: object.c is already inconsistent about tabs and space :). It may be better to fix it in the commit, not to clutter the patch. But I can provide a new patch if necessary. _ Tracker [EMAIL PROTECTED] http://bugs.python.org