[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

[issue1597] running test_ctypes 25 times in a row causes it to fail

2007-12-12 Thread Thomas Heller
Thomas Heller added the comment: Guido van Rossum schrieb: > Thanks! (I agree with Eric Smith that this is mysterious for the > innocent bystander.) I have added a comment. > Also, what about the -33/+33 leaks? I suppose these are harmless, but > it would be better if the t

[issue1597] running test_ctypes 25 times in a row causes it to fail

2007-12-12 Thread Thomas Heller
Thomas Heller added the comment: > more reproducible fashion. I've fixed this in ctypes/util.py now: > r59477. Cool! And the 'leak' is gone. __ Tracker <[EMAIL PROTECTED]> <ht

[issue1608] test_str.py crashes

2007-12-13 Thread Thomas Heller
Thomas Heller added the comment: Guido van Rossum schrieb: > (Thomas, could you run it in the 2.5 branch as well? I seem to have > checked in a lot of gratuitous changes by using an older version of > autoconf.) Done, see rev 59494. __ Tracker <[EMA

[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 su

[issue1642] segfault when deleting value member in ctypes types

2007-12-18 Thread Thomas Heller
Thomas Heller added the comment: Fixed in rev. 59549 (trunk) and rev. 59550 (release25-maint). Thanks. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[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

[issue1549] Regression with __hash__ definition and rich comparison operators

2007-12-19 Thread Thomas Herve
Thomas Herve added the comment: This is probably not the best moment (holidays etc), but please take this issue seriously. This problem completely block the community builders at pybots.org, and make any tests on current python trunk impossible. This also means that if in the meantime another

[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://mai

[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] 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 not

[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-

[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&#

[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.pyt

[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 regis

[issue1793] ctypes.util.find_msvcrt() function

2008-01-11 Thread Thomas Heller
New submission from Thomas Heller: I'm uploading this patch for discussion, in case someone cares. This code (for Windows) adds a function ctypes.util.find_msvcrt(). This function returns the filename of the MSVC runtime library that the current Python executable uses. If calling func

[issue1797] ctypes NULL function pointers should have a False bool value.

2008-01-11 Thread Thomas Heller
New submission from Thomas Heller: ctypes NULL function pointers should have a False bool value. -- assignee: theller components: Extension Modules files: ctypes-funcptr.patch keywords: patch messages: 59744 nosy: theller severity: normal status: open title: ctypes NULL function

[issue1796] ctypes should allow a tuple when an Array is expected

2008-01-11 Thread Thomas Heller
New submission from Thomas Heller: Another ctypes patch for discussion, if someone cares. This patch allows to pass a tuple of the correct size, a ctypes pointer to the correct itemtype, or None to foreign functions that expect ctypes array instances. 'None' is passed as a NU

[issue1793] ctypes.util.find_msvcrt() function

2008-01-11 Thread Thomas Heller
Thomas Heller added the comment: The cross-platform function is ctypes.util.find_library, which is currently not very useful on Windows. This patch changes it so that, on Windows, find_library("c") or find_library("m") finds the MS C runtime lib which exposes functions the a

[issue1797] ctypes function pointer enhancements

2008-01-11 Thread Thomas Heller
Thomas Heller added the comment: The patch will be extended ASAP so that 'None' is accepted by foreign functions where a function pointer (callback function) is expected. For consistency it should be possible to call the ctypes function prototype with None to create a NULL callbac

[issue1798] Add ctypes calling convention that allows safe access of errno

2008-01-11 Thread Thomas Heller
New submission from Thomas Heller: This patch adds new calling conventions to ctypes foreign functions by passing 'errno=True' or 'GetLastError=True' to the CDLL or WinDLL constructor. If CDLL(..., errno=True) or WinDLL(..., errno=True) is used, the function objects avai

[issue1810] Partial AST compile() patch

2008-01-11 Thread Thomas Lee
New submission from Thomas Lee: This patch against HEAD provides the inverse operations to all the ast2obj_* functions in Python/Python-ast.c: effectively, this allows conversion to & from a PyObject representation of a Python AST. Additionally, it updates the compile() builtin to allow i

[issue1810] Partial AST compile() patch

2008-01-11 Thread Thomas Lee
Thomas Lee added the comment: Attaching a sample program to demonstrate the crash. Added file: http://bugs.python.org/file9135/ast.py __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1798] Add ctypes calling convention that allows safe access of errno

2008-01-12 Thread Thomas Heller
Thomas Heller added the comment: > But this thread-local attribute on the function seems bizarre to me. > I would prefer another way to get the errno. I can see two alternatives: > - the function returns a tuple (normalresult, errno) on each call. > - when errno is not zero, Environm

[issue1810] AST compile() patch

2008-01-12 Thread Thomas Lee
Thomas Lee added the comment: I knew it would be a simple one for somebody who knew what to look for :) Thanks Georg! r02 is the updated patch. Changing the title of the tracker issue to reflect that this *should* be a complete patch now. Any further recommendations? -- title: Partial

[issue1821] configure.ac change for FreeBSD

2008-01-14 Thread Thomas Heller
Thomas Heller added the comment: Thanks. Committed in trunk as rev. 59952. -- assignee: -> theller nosy: +theller resolution: -> fixed status: open -> closed versions: +Python 2.6 -Python 2.5 __ Tracker <[EMAIL PROTECTED]> <http

[issue1772] popen fails when there are two or more pathnames/parameters with spaces

2008-01-14 Thread Thomas Lee
Thomas Lee added the comment: Do you have a code sample that reproduces this issue? Which popen module and/or function are you using to execute this command? -- nosy: +thomas.lee __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

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

2008-01-14 Thread Thomas Lee
Thomas Lee added the comment: If you're referring to an 'append' mode for bz2file objects, it may be a limitation of the underlying library: my version of bzlib.h only provides BZ2_bzWriteOpen and BZ2_bzReadOpen - it's not immediately clear how you would open a BZ2File in ap

[issue1796] ctypes should allow a tuple when an Array is expected

2008-01-14 Thread Thomas Heller
Thomas Heller added the comment: Lenard Lindstrom pointed out in a post to the ctypes-users list that pointer instances must not be accepted. Uploaded new patch ctypes-array-2.patch. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1796] ctypes should allow a tuple when an Array is expected

2008-01-14 Thread Thomas Heller
Changes by Thomas Heller: Added file: http://bugs.python.org/file9162/ctypes-array-2.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1796> __ ___ Pyth

[issue1796] ctypes should allow a tuple when an Array is expected

2008-01-14 Thread Thomas Heller
Changes by Thomas Heller: Removed file: http://bugs.python.org/file9127/ctypes-arrays.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1796> __ ___ Pyth

[issue1796] ctypes should allow a tuple when an Array is expected

2008-01-14 Thread Thomas Heller
Changes by Thomas Heller: Removed file: http://bugs.python.org/file9162/ctypes-array-2.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1796> __ ___ Pyth

[issue1796] ctypes should allow a tuple when an Array is expected

2008-01-14 Thread Thomas Heller
Thomas Heller added the comment: Corrected the patch to NOT accept None. Added file: http://bugs.python.org/file9163/ctypes-array-3.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller
Thomas Heller added the comment: This would require to build the 'char *format' string at runtime, the 'char *keywords[]' array too, and pass a variable number of arguments into the call. __ Tracker <[EMAIL PROTECTED]> <htt

[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller
Thomas Heller added the comment: Do you have any idea how this could be implemented? -- nosy: +theller __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller
Thomas Heller added the comment: Oops, uploaded the wrong file. Added file: http://bugs.python.org/file9177/ctypes-struct.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller
Changes by Thomas Heller: Removed file: http://bugs.python.org/file9176/ctypes-struct.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1831> __ ___ Pyth

[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller
Thomas Heller added the comment: Yes, I came up with a similar solution in the meantime; see the attached patch. Added file: http://bugs.python.org/file9176/ctypes-struct.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller
Thomas Heller added the comment: Ok, added the missing Py_DECREF, changed to TypeError, and added a test. Added file: http://bugs.python.org/file9178/ctypes-struct.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1831] ctypes.Structure constructor arguments

2008-01-15 Thread Thomas Heller
Changes by Thomas Heller: Removed file: http://bugs.python.org/file9177/ctypes-struct.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1831> __ ___ Pyth

[issue1831] ctypes.Structure constructor arguments

2008-01-16 Thread Thomas Heller
Thomas Heller added the comment: Committed as rev. 60003 in trunk. I'll also change the "too many arguments..." exception to a TypeError. Thanks. -- assignee: -> theller resolution: -> fixed status: open -> closed __ Tracker &

[issue1796] ctypes should allow a tuple when an Array is expected

2008-01-16 Thread Thomas Heller
Thomas Heller added the comment: Lenard Lindstrom convinced me that tuples should not be allowed when an array is expected. -- resolution: -> rejected status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1292] libffi needs an update to support mips64, arm and armeabi on linux

2008-01-16 Thread Thomas Heller
Thomas Heller added the comment: Matthias, can this issue be set to 'fixed' and 'closed' now? __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1292> __

[issue1793] ctypes.util.find_msvcrt() function

2008-01-16 Thread Thomas Heller
Thomas Heller added the comment: Amaury Forgeot d'Arc schrieb: > This code works on all pythons I have on my machine: official builds, > custom builds (relase/debug) with several MS compilers... > I did not test it with other compiled vendors (mingw32...). What I do not like abou

[issue1252550] modulefinder misses modules

2008-01-16 Thread Thomas Heller
Changes by Thomas Heller: -- resolution: -> out of date status: open -> closed _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1252550> _ __

[issue1872] change the bool struct format code from 't' to '?'

2008-01-19 Thread Thomas Heller
New submission from Thomas Heller: Currently the struct module uses the format code 't' for the bool datatype (this was added in python 2.6, in revision 53508). This conflicts with the specification in PEP 3118, which proposes the '?' format character for the bool type, &#

[issue1872] change the bool struct format code from 't' to '?'

2008-01-19 Thread Thomas Heller
Changes by Thomas Heller: -- components: +Documentation __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1872> __ ___ Python-bugs-list mailing list Unsubs

[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/

[issue1919] Backport of io.py

2008-01-24 Thread Thomas Heller
Thomas Heller added the comment: > * backport bytearray and the new buffer interface from 3.0 backport of the new buffer interface is required for PEP 3118 which is marked accepted: " It is intended that this PEP will be back-ported to Python 2.6 by adding the C-API and the two func

[issue1941] 2.6 stdlib using with statement

2008-01-26 Thread Thomas Heller
Thomas Heller added the comment: modulefinder should be kept compatible with Python 2.2, so please do not apply the patch for this module. See also PEP 291. No idea about the other modules. -- nosy: +theller __ Tracker <[EMAIL PROTECTED]>

[issue1967] Backport dictviews to 2.6

2008-01-29 Thread Thomas Wouters
New submission from Thomas Wouters: Patch to backport dictviews to trunk. Consists of some trickery: - new 'viewkeys', 'viewvalues' and 'viewitems' methods of dicts, returning exactly what 'keys', 'values' and 'items' return in 3.0

[issue1971] ctypes exposing the pep 3118 buffer interface

2008-01-30 Thread Thomas Heller
New submission from Thomas Heller: The attached patch against py3k makes ctypes expose the pep 3118 buffer interface. The code is also available in the py3k-ctypes-pep3118 branch. -- components: Extension Modules files: ctypes-pep3118.patch keywords: patch messages: 61844 nosy: theller

[issue1967] Backport dictviews to 2.6

2008-01-30 Thread Thomas Wouters
Changes by Thomas Wouters: Removed file: http://bugs.python.org/file9320/dictviews_backport.diff __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1967> __ ___ Pyth

[issue1967] Backport dictviews to 2.6

2008-01-30 Thread Thomas Wouters
Thomas Wouters added the comment: After talking to Guido, got rid of the future import magic in favour of just providing 'viewkeys', 'viewitems' and 'viewvalues' methods of dicts. This makes efficient 2.6-and-3.0 dict-using code possibly by making 2to3 translate the

[issue1941] 2.6 stdlib using with statement

2008-01-31 Thread Thomas Heller
Thomas Heller added the comment: Lib/platform.py contains this notice at the top: #This module is maintained by Marc-Andre Lemburg <[EMAIL PROTECTED]>. #If you find problems, please submit bug reports/patches via the #Python SourceForge Project Page and assign them to &q

[issue1390] toxml generates output that is not well formed

2008-02-12 Thread Thomas Conway
Thomas Conway added the comment: On Feb 13, 2008 6:27 AM, Virgil Dupras <[EMAIL PROTECTED]> wrote: > CDATASection.writexml() already raises ValueError when finding invalid data, > so it seems consistent to me to extend the behavior to Comment.writexml() That look

[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 that

[issue2115] __slots__ make attribute setting 10x slower

2008-02-14 Thread Thomas Heller
Thomas Heller added the comment: I think this is a serious problem (and thanks, amaury, for finding the spot). comtypes, like ctypes, uses quite a bit of isinstance calls. It is the reason that the comtypes unit tests run between 8% and 25% slower with trunk than with python 2.5.1. If I

[issue2115] __slots__ make attribute setting 10x slower

2008-02-14 Thread Thomas Heller
Thomas Heller added the comment: PyObject_IsSubclass() has the same problem. BTW; calling PyObject_GetAttr() with interned strings for "__instancecheck__" and "__subclasscheck__" brings not enough speedup. __ Tracker <[EMAIL PROTECTED]&g

[issue2123] ctypes pointer not always keeping target alive

2008-02-15 Thread Thomas Heller
Thomas Heller added the comment: May I ask: do you have a real use case for this, or is it a carefully constructed example? Of course I take all the blame for not defining/documenting this stuff. My current view is this: Python code C code

[issue2146] ctypes: support double for calling function

2008-02-20 Thread Thomas Heller
Thomas Heller added the comment: I reject this patch. It would be an arbitrary decision whether a Python float should be passed as a C float or as a C double, and the docs explicitely mention which native Python types can be passed to function calls when argtypes is not set; see the bottom of

[issue2145] ctypes.util.find_library(): posix .so without SONAME

2008-02-20 Thread Thomas Heller
Thomas Heller added the comment: Honestly I do not know enough about linux shared libraries to have any opinion about this issue. IIRC, the find_library should behave in a similar way as dynamic linking works on linux. If this libdistorm64.so is not a "real" so library, as you w

[issue2152] make sqlite.Row hashable correctly

2008-02-21 Thread Thomas Heller
New submission from Thomas Heller: The attached patch implements hash and cmp for sqlite3.Row objects. -- files: sqliterow.patch keywords: patch messages: 62615 nosy: theller severity: normal status: open title: make sqlite.Row hashable correctly type: behavior versions: Python 2.6

[issue1292] libffi needs an update to support mips64, arm and armeabi on linux

2008-02-21 Thread Thomas Heller
Thomas Heller added the comment: I'm reopening this. libffi 3 has been released; I have created the libffi3-branch for this work in Python svn. -- status: closed -> open __ Tracker <[EMAIL PROTECTED]> <http://bugs.pyt

[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: Li

[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> __ __

[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

[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 r

[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 in

[issue1740] use unittest for test_logging

2008-02-27 Thread Thomas Herve
Thomas Herve added the comment: I have just one comment: I have recently modified the initialization of LogRecordSocketReceiver to not use a stupid loop to get a free port, but instead use port 0 and get the port number once bound. I think this modification should stay. -- nosy: +therve

[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

[issue1292] libffi needs an update to support mips64, arm and armeabi on linux

2008-03-05 Thread Thomas Heller
Thomas Heller added the comment: libffi3-branch has been merged to trunk; the Modules/_ctypes/libffi files are from the libffi 3.0.4 release now. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://

[issue1810] AST compile() patch

2008-03-15 Thread Thomas Lee
Thomas Lee <[EMAIL PROTECTED]> added the comment: Updating the patch to apply cleanly against HEAD. Added file: http://bugs.python.org/file9672/ast-r03.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2292] Missing *-unpacking generalizations

2008-03-15 Thread Thomas Wouters
New submission from Thomas Wouters <[EMAIL PROTECTED]>: The attached patch adds the missing *-unpacking generalizations. Specifically: >>> a, b, *c = range(5) >>> *a, b, c = a, b, *c >>> a, b, c ([0, 1, 2], 3, 4) >>> [ *a, b, c ] [0, 1, 2, 3, 4] >&g

[issue2292] Missing *-unpacking generalizations

2008-03-15 Thread Thomas Wouters
Thomas Wouters <[EMAIL PROTECTED]> added the comment: On Sat, Mar 15, 2008 at 9:12 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > Guido van Rossum <[EMAIL PROTECTED]> added the comment: > > Didn't you say it does sets too? Does this work? > a = [1, 2,

[issue2292] Missing *-unpacking generalizations

2008-03-15 Thread Thomas Wouters
Thomas Wouters <[EMAIL PROTECTED]> added the comment: On Sat, Mar 15, 2008 at 9:18 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > Guido van Rossum <[EMAIL PROTECTED]> added the comment: > > Looking at the flatten() example I'm curious -- how come the

[issue2321] return more memory from unicode objects to system

2008-03-17 Thread Alec Thomas
Alec Thomas <[EMAIL PROTECTED]> added the comment: Hi Neal, This seems to be a more general problem than just unicode. eg. Tuples: >>> x = [(1, 2, 3, 4, i) for i in xrange(80)] >>> del x And user-defined objects: >>> class A(object): ... d

[issue2321] return more memory from unicode objects to system

2008-03-17 Thread Alec Thomas
Alec Thomas <[EMAIL PROTECTED]> added the comment: > Alec, can you find places that are using the PyMem_* interface and > create a patch to fix them. That would be great! Sure thing! I'll see if I can finish it today, but if not I'll work on it during the fl

[issue1506] func alloca inside ctypes lib needs #include on solaris

2008-03-18 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: I applied the patch to SVN trunk as rev 61520. It would probably be better to have a configure test for alloca.h. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PR

[issue2303] isinstance is 4x as slow as in 2.5 because the common case raises

2008-03-18 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: Would it help to implement a default __instancecheck__ and __subclasscheck__ for object (or for type), that subclasses can override? -- nosy: +theller __ Tracker <[EMAIL PROTECTE

[issue1390] toxml generates output that is not well formed

2008-03-19 Thread Thomas Conway
Thomas Conway <[EMAIL PROTECTED]> added the comment: On Thu, Mar 20, 2008 at 8:26 AM, Sean Reifschneider <[EMAIL PROTECTED]> wrote: > > Sean Reifschneider <[EMAIL PROTECTED]> added the comment: > > Martin: What do you th

[issue1971] ctypes exposing the pep 3118 buffer interface

2008-03-20 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: Travis, can you please review this / when can you review this issue for compliance with pep 3118? -- nosy: +teoliphant __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2470] Need fixer for dl (removed) -> ctypes module

2008-03-25 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: > In the simplest case, convert > > import dl > libc = dl.open("libc.so.6") > iconv = libc.call("iconv_open", "ISO-8859-1", "ISO-8859-2") > print(iconv) > > to > &g

[issue2470] Need fixer for dl (removed) -> ctypes module

2008-03-25 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: Thomas Heller schrieb: > Thomas Heller <[EMAIL PROTECTED]> added the comment: > >> In the simplest case, convert >> >> import dl >> libc = dl.open("libc.so.6") >> iconv = libc.cal

[issue1555570] email parser incorrectly breaks headers with a CRLF at 8192

2008-03-27 Thread Thomas Guettler
Thomas Guettler <[EMAIL PROTECTED]> added the comment: I was hit by this bug in Django. The ticket URL: http://code.djangoproject.com/ticket/6256 It would be nice if this could be fixed. -- nosy: +guettli _ Tracker <[EMAIL PROTECTE

[issue2152] make sqlite.Row hashable correctly

2008-03-31 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: Here's a patch against trunk that implements tp_richcompare. It does apply to and work also in the py3k branch. I have only implemented the '__eq__' and '__ne__' comparisons. Added file: http://bug

[issue2513] 64bit cross compilation on windows

2008-03-31 Thread Thomas Heller
Changes by Thomas Heller <[EMAIL PROTECTED]>: -- nosy: +theller __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2513> __ ___ Python-bugs

[issue2513] 64bit cross compilation on windows

2008-03-31 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: I had to make additional changes to PCBuild\pcbuild.sln to create a 64-bit wininst-9.0-amd64.exe (but I was not able to try out if it works or not). Added file: http://bugs.python.org/file9914/pcbuil

[issue2533] Invalid TypeError with class method decorator and class method parameter

2008-04-01 Thread Thomas Dimson
New submission from Thomas Dimson <[EMAIL PROTECTED]>: Having a peculiar issue (exception raised despite being valid) when defining a decorator that takes a class method as a callback. Here is a cooked example: def decorator( callback ): def inner(func): def application(

[issue2303] isinstance is 4x as slow as in 2.5 because the common case raises

2008-04-02 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: Issue #2534 has a patch which speeds up isinstance and issubclass by implementing type.__instancecheck__ and type.__subclasscheck__. __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2534] Speed up isinstance and issubclass

2008-04-02 Thread Thomas Heller
New submission from Thomas Heller <[EMAIL PROTECTED]>: This patch implements type.__instancecheck__ and type.__subclasscheck__, which speeds up isinstance and issubclass calls quite a bit. See also issue #2303. Here are the performance figures for the current trunk version: Current SNV

[issue2534] Speed up isinstance and issubclass

2008-04-02 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: Running Daniels code interactively, with a debug build on Windows, additionally prints 'XXX undetected error' before the Runtime error is raised. I cannot see anything that is wrong with my code. Maybe this, and the test fa

[issue2542] PyErr_ExceptionMatches must not fail

2008-04-03 Thread Thomas Heller
New submission from Thomas Heller <[EMAIL PROTECTED]>: PyErr_ExceptionMatches must not fail, according to the docs. So an error code from PyObject_IsSubclass() cannot be returned. The attached patch calls PyErr_WriteUnraisable in this case, and returns an arbitrary value (0 was chosen

[issue2534] Speed up isinstance and issubclass

2008-04-03 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: Problem found. See issue #2542, which contains a patch that fixes the failure in test_exceptions; this test now additionally prints Exception RuntimeError: 'maximum recursion depth exceeded in __subclasscheck__' in ign

[issue2543] Make ctypes compatible with Python 2.3, 2.4, and 2.5, as per PEP291

2008-04-03 Thread Thomas Heller
New submission from Thomas Heller <[EMAIL PROTECTED]>: To be committed after the current release is out. -- assignee: theller components: ctypes files: ctypes-compat-py23.diff keywords: patch, patch messages: 64904 nosy: theller severity: normal status: open title: Make

[issue2544] link with "gcc -shared" on HP systems

2008-04-03 Thread Thomas Heller
New submission from Thomas Heller <[EMAIL PROTECTED]>: As discussed in issue #1582742, this patch uses 'gcc -shared' as linker on HP systems when compiling with gcc. It fixes a problem in the ctypes test-suite, that _ctypes_test.so cannot be dynloaded because of missing

[issue1582742] Python is dumping core after the test test_ctypes

2008-04-03 Thread Thomas Heller
Thomas Heller <[EMAIL PROTECTED]> added the comment: See issue #2544, this problem will be solved in Python 2.6. In Python 2.5, ctypes does not work on HPUX. -- assignee: -> theller resolution: -> rejected status: open -> closed _

[issue2548] Undetected error in exception handling

2008-04-04 Thread Thomas Heller
New submission from Thomas Heller <[EMAIL PROTECTED]>: [Found by Daniel Diniz (ajaksu2), see issue #2542] The following code triggers an undetected error with a debug build: """ import sys def g(): try: return g() except: return sys.exc_info() g() print 42

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