[issue10500] Palevo.DZ worm msix86 installer 3.x installer

2010-11-28 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: File checked with ClamAV under Linux, no findings. -- nosy: +scoder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10500

[issue10227] Improve performance of MemoryView slicing

2011-02-01 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: I've extracted and fixed the part of this patch that implements the slice object cache. In particular, PySlice_Fini() was incorrectly implemented. This patch applies cleanly for me against the latest py3k branch. -- Added

[issue10227] Improve performance of MemoryView slicing

2011-02-02 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Any benchmark numbers for the slice cache? I ran the list tests in pybench and got this: Test minimum run-timeaverage run-time thisother diffthisother diff

[issue10227] Improve performance of MemoryView slicing

2011-02-02 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: There's a PyObject_Del(obj) in all code paths. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10227

[issue10227] Improve performance of MemoryView slicing

2011-02-03 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Here are some real micro benchmarks (note that the pybench benchmarks actually do lots of other stuff besides slicing): base line: $ ./python -m timeit -s 'l = list(range(100)); s=slice(None)' 'l[s]' 100 loops, best of 3: 0.464

[issue10227] Improve performance of MemoryView slicing

2011-02-03 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Here's another base line test: slicing an empty list patched: $ ./python -m timeit -s 'l = []' 'l[:]' 1000 loops, best of 3: 0.0847 usec per loop original: $ ./python -m timeit -s 'l = []' 'l[:]' 1000 loops, best of 3

[issue10227] Improve performance of MemoryView slicing

2011-02-03 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: of course, this will not help for other common cases such as l[x:x+2] ... which is exactly what this slice caching patch is there for. ;-) -- ___ Python tracker rep...@bugs.python.org

[issue10227] Improve performance of MemoryView slicing

2011-02-03 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: A quick test against the py3k stdlib: find -name *.py | while read file; do egrep '\[[-0-9]*:[-0-9]*\]' $file; done | wc -l This finds 2096 lines in 393 files. -- ___ Python tracker rep

[issue11107] Cache constant slice instances

2011-02-03 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: Follow-up to ticket 10227. The following facts seem to indicate that it would be worth caching constant instances of the slice type, such as in [:] or [:-1]. with cached slice instance: $ ./python -m timeit -s 'l = list(range(100

[issue10227] Improve performance of MemoryView slicing

2011-02-03 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Created follow-up issue 11107 for caching constant slice objects. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10227

[issue11107] Cache constant slice instances

2011-02-03 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Erm, issue 10227. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11107

[issue11107] Cache constant slice instances

2011-02-03 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Hmm, ok, but AFAICT, your patch was rejected rather because of the way it approached the problem, not so much because of the issue itself. Plus, the fact that Python 3 requires slices in more places than Python 2 (which had

[issue11254] distutils doesn't byte-compile .py files to __pycache__ during installation

2011-02-20 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: During installation of Python packages (setup.py install or bdist), distutils puts .pyc files into the installed source directory, instead of moving them into __pycache__. This may mean that they are not getting used after

[issue11254] distutils doesn't byte-compile .py files to __pycache__ during installation

2011-02-20 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Here's a patch. I basically copied over the way py_compile determines the .pyc file name. It works for me for a normal installation. However, I couldn't test it with -O, as 2to3 crashes for me when I enable it during installation

[issue11255] 2to3 throws AttributeError during distutils installation with -O

2011-02-20 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: When running a distutils installation of Cython (which uses lib2to3) as python3.2 -O setup.py bdist, I get this: Skipping implicit fixer: buffer Skipping implicit fixer: idioms Skipping implicit fixer: set_literal Skipping

[issue1158231] string.Template does not allow step-by-step replacements

2010-07-13 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: I actually am no longer interested (after 5 years), but if the patch solves the problem, it'd be good to apply it. Lacks a docs patch, though. -- ___ Python tracker rep...@bugs.python.org

[issue9375] ElementPath parser in ElementTree 1.3 does not reject element// as invalid

2010-07-25 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: Subject says it all: Python 2.7 (r27:82500, Jul 5 2010, 13:37:06) [GCC 4.4.3] on linux2 Type help, copyright, credits or license for more information. import xml.etree.ElementTree as ET el = ET.Element('hui') el.findall

[issue9375] ElementPath parser in ElementTree 1.3 does not reject element// as invalid

2010-07-25 Thread Stefan Behnel
Changes by Stefan Behnel sco...@users.sourceforge.net: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9375 ___ ___ Python-bugs

[issue9375] ElementPath parser in ElementTree 1.3 does not reject element// as invalid

2010-07-25 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: The parser actually starts with this code: def iterfind(elem, path, namespaces=None): # compile selector pattern if path[-1:] == /: path = path + * # implicit all (FIXME: keep this?) IMHO, the 'FIXME' is worth

[issue9375] ElementPath parser in ElementTree 1.3 does not reject element// as invalid

2010-07-25 Thread Stefan Behnel
Changes by Stefan Behnel sco...@users.sourceforge.net: -- nosy: +effbot, flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9375 ___ ___ Python

[issue9522] xml.etree.ElementTree forgets the encoding

2010-08-08 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: I think it makes sense to keep input and output separate. After all, the part of the software that outputs a document doesn't necessarily know how it came in, so having the default output encoding depend on the input sounds error

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-08-08 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: I would suggest fixing the tostring() behaviour also in a future 3.1.x bug fix release. After all, the current behaviour means that 3.0 and 3.1 would behave different from any other (released or future) Python version here

[issue4617] SyntaxError when free variable name is also an exception target

2010-08-09 Thread Stefan Behnel
Changes by Stefan Behnel sco...@users.sourceforge.net: -- nosy: -scoder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4617 ___ ___ Python-bugs

[issue9522] xml.etree.ElementTree forgets the encoding

2010-08-12 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: lxml.etree has encapsulated this in a 'docinfo' property which also holds the XML 'version', the 'standalone' state and the DOCTYPE (if available). Note that this information is readily available in lxml.etree for any parsed

[issue9522] xml.etree.ElementTree forgets the encoding

2010-08-12 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: That's why I mention it here to prevent future incompatibilities between the two libraries. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9522

[issue7415] PyUnicode_FromEncodedObject() uses PyObject_AsCharBuffer()

2010-08-20 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Here's a patch against the latest py3k. The following will call the new code, for example: str(memoryview(b'abc'), 'ASCII') whereas bytes and bytesarray continue to use their own special casing code (which has also changed a bit

[issue7415] PyUnicode_FromEncodedObject() uses PyObject_AsCharBuffer()

2010-08-20 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Doesn't the GIL protect the bytearray buffer? Or does decoding free the GIL? -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7415

[issue7415] PyUnicode_FromEncodedObject() uses PyObject_AsCharBuffer()

2010-08-20 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Regardless of the answer, I think Antoine is right, special cases aren't special enough to break the rules, and this is a special case that's more safely handled as part of the normal buffer case. Updated patch uploaded

[issue7415] PyUnicode_FromEncodedObject() uses PyObject_AsCharBuffer()

2010-08-20 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: ... and another complete patch that refactors the complete function to make it clearer what happens. Includes a small code duplication for the bytes object case, which I think it acceptable. -- Added file: http

[issue7415] PyUnicode_FromEncodedObject() uses PyObject_AsCharBuffer()

2010-08-20 Thread Stefan Behnel
Changes by Stefan Behnel sco...@users.sourceforge.net: Removed file: http://bugs.python.org/file18588/unicodeobject-PyUnicode_FromEncodedObject-buffer-refactored.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7415

[issue7415] PyUnicode_FromEncodedObject() uses PyObject_AsCharBuffer()

2010-08-20 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Another updated patch with a readability fix (replacing the last one). -- Added file: http://bugs.python.org/file18589/unicodeobject-PyUnicode_FromEncodedObject-buffer-refactored.patch

[issue7415] PyUnicode_FromEncodedObject() uses PyObject_AsCharBuffer()

2010-08-20 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: When I read the comments and exception texts in the function, it didn't occur to me that char buffer could have been used as a name for the old Py2 buffer interface. From the context, it totally makes sense to me that the function

[issue9834] PySequence_GetSlice() lacks a NULL check

2010-09-11 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: PySequence_GetSlice() in Objects/abstract.c contains the following code: mp = s-ob_type-tp_as_mapping; if (mp-mp_subscript) { This crashes when the type's tp_as_mapping is NULL. The obvious fix is to simply write

[issue10227] Improve performance of MemoryView slicing

2010-11-01 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: I find it a lot easier to appreciate patches that implement a single change than those that mix different changes. There are three different things in your patch, which I would like to see in at least three different commits. I'd

[issue10294] Lib/test/test_unicode_file.py contains dead code

2010-11-02 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: Lib/test/test_unicode_file.py contains dead code: def _test_equivalent(self, filename1, filename2): remove_if_exists(filename1) self.assertTrue(not os.path.exists(filename2)) f = file(filename1, w

[issue9518] PyModuleDef_HEAD_INIT does not explicitly initialize all fields of m_base

2010-11-17 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: I agree that this is annoying, we get the same thing in Cython's test suite all over the place. Any foreign warning that doesn't get triggered helps in debugging your own code. And this one is easy to avoid. -- nosy

[issue4244] ihooks incompatible with absolute_import feature

2008-11-10 Thread Stefan Behnel
Stefan Behnel [EMAIL PROTECTED] added the comment: This is an (extended) duplicate of issue4152. -- nosy: +scoder ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue4244

[issue4242] Classify language vs. impl-detail tests, step 1

2009-01-20 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: I would definitely appreciate having a well-defined set of required tests that Cython should pass for compliance. However, something like sys.vm won't easily work for Cython: it runs within the CPython VM but only after converting

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2010-01-30 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Looks like this is one of those bugs that run away when you look too close... I can get it to crash reliably for me with the latest py3k branch (and all Python 3.x release versions) when I run the test suite completely, so here's

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2010-01-31 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: I'll add a couple of comments about the relevant parts of the code that appears to trigger the crash. The code runs through the parse tree and applies transformations to it. 1) For node matching, we use a dispatcher (in Visitor.py

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2010-02-15 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: I tried several times to debug it myself, but I don't understand the exception cleanup macros in ceval.c (UNWIND_EXCEPTION_HANDLER and friends, new in Py3). If someone can get me set up to debug them, I can give it another shot. I

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-02 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: The xml.etree.ElementTree package in the Python 3.x standard library breaks compatibility with existing ET 1.2 code. The serialiser returns a unicode string when no encoding is passed. Previously, the serialiser was guaranteed

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-03 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: I agree that the lxml API is somewhat clumsy here. I just mentioned it to show that there are already ways to do it in a backwards compatible way, so this change does two things: it breaks existing code, and it does so in a way

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-07 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: It has been brought up several times that ET is special in the stdlib in that it is an externally maintained package. Correct me if I'm wrong, but the rules seem to be: features come outside, adaptation to Py3 can happen inside

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-08 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Antoine, in the same comment, you say that it was not backported to Py2 in order to prevent breaking existing code, and then you ask if it's difficult to support in lxml. ;-) Supporting the same behaviour in lxml would either mean

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Sorry, Antoine, but you can't possibly mean what you say here. The culprit in question is clearly one of the best hidden features of the new Py3 ET API. The only existing reference to it that I can find is the SVN commit comment

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Then I would call that a clear sign that no-one actually stumbled over this feature in Py3 before I did, well hidden as it was. Still time to fix it. -- ___ Python tracker rep

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Hi Guido, your comment was long overdue in this discussion. Guido van Rossum, 12.03.2010 01:35: My thinking was that since an XML document looks like text, it should probably be considered text, at least by default. (There may

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-11 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: One more thing: given that many web-frameworks are still not available for Py3 at this time, and that there are still tons of third-party libraries missing on that platform, I would be surprised if there was any ElementTree based

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-12 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: 'None' has always been the documented default for the encoding parameter What I meant here was that help(ET.tostring) will show you that as the default. Also, in the docs, the signature is tostring(tree, encoding=None), so None

[issue8130] except-as in Py3 eats variables

2010-03-12 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: Python 3.2a0 (py3k:78205M, Feb 16 2010, 17:32:08) [GCC 4.4.1] on linux2 Type help, copyright, credits or license for more information. e = None [50279 refs] e [50279 refs] try: raise ValueError ... except ValueError as e: pass

[issue8130] except-as in Py3 eats variables

2010-03-12 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: I knew that the variable was supposed to go out of scope when leaving the except block, but I wasn't aware that this was supposed to be done using (the equivalent of) a 'del'. Were the side-effects of deleting variables defined

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-14 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: That's a funny idea. I like that. +1 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8047

[issue8047] Serialiser in ElementTree returns unicode strings in Py3k

2010-03-22 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Supporting unicode for lxml.etree compatibility is fine with me, but I think it might make sense to support the string unicode as well (as a pseudo-encoding -- it's pretty clear to me that nobody will ever define a real character

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2010-05-02 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: There is at least one valid use case: code that needs to deal with HTML and XHTML currently has to normalise the tag names in some way, which usually means that it will want to remove the namespaces from XHTML documents to make

[issue2860] re module fails to handle digits in byte strings

2008-05-15 Thread Stefan Behnel
New submission from Stefan Behnel [EMAIL PROTECTED]: The following fails in Py3.0a5: import re re.search(b'(\d+)', b'-2.80 98\n') I get a TypeError: Can't convert 'int' object to str implicitly in line 204 of file sre_parse.py, code being char = char + c. -- components

[issue2895] Crash in ParseTupleAndKeywords when passing byte string keywords

2008-05-16 Thread Stefan Behnel
New submission from Stefan Behnel [EMAIL PROTECTED]: Using 3.0a5, the following code crashes in vgetargskeywords (getargs.c:1542) d = {bencoding: abc} str(babc, **d) It should raise a TypeError instead, i.e. line 1535 should read if (!PyUnicode_Check(key)) { instead

[issue2915] PyObject_IsInstance() doesn't find bases named in type(name, bases, dict)

2008-05-19 Thread Stefan Behnel
New submission from Stefan Behnel [EMAIL PROTECTED]: While porting the code that Cython generates to Py3a5 (almost completed, BTW), I noticed a problem with class creation. We are currently using this call to create a new class in Py3: PyObject_CallFunctionObjArgs((PyObject *)PyType_Type

[issue2860] re module fails to handle byte strings

2008-05-20 Thread Stefan Behnel
Stefan Behnel [EMAIL PROTECTED] added the comment: Ah, I now see what the actual problem is. Byte strings return the byte value on indexing. Changing the title accordingly. -- title: re module fails to handle digits in byte strings - re module fails to handle byte strings

[issue2915] PyObject_IsInstance() doesn't find bases named in type(name, bases, dict)

2008-05-21 Thread Stefan Behnel
Stefan Behnel [EMAIL PROTECTED] added the comment: Sorry, the bug was in Cython, which didn't call InstanceMethod(). Please ignore. __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2915

[issue2963] Method cache is broken in Py3

2008-05-25 Thread Stefan Behnel
New submission from Stefan Behnel [EMAIL PROTECTED]: The method cache is deactivated in current Py3. As Lisandro DalcĂ­n noticed, the following code in typeobject.c always returns false for a Py3 identifier: #define MCACHE_CACHEABLE_NAME(name

[issue2964] instancemethod_descr_get() lacks an INCREF

2008-05-25 Thread Stefan Behnel
New submission from Stefan Behnel [EMAIL PROTECTED]: Here is a fix for Objects/classobject.c in Py3.0a5 that fixes a ref count crash for classmethods. -- components: Interpreter Core files: instancemethod-fix.patch keywords: patch messages: 67334 nosy: scoder severity: normal status

[issue2963] Method cache is broken in Py3

2008-05-25 Thread Stefan Behnel
Stefan Behnel [EMAIL PROTECTED] added the comment: Here is a patch that fixes this. -- keywords: +patch Added file: http://bugs.python.org/file10435/py3k-method-cache-fix.patch __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2963

[issue2989] type_modified() in typeobject.c should be public

2008-05-28 Thread Stefan Behnel
New submission from Stefan Behnel [EMAIL PROTECTED]: Here is a patch that makes this function public. This allows C code to correctly taint a type after updating its attributes or base classes. -- components: Interpreter Core files: pytype_modified.patch keywords: patch messages: 67444

[issue2990] type cache updates might run cleanup code in an inconsistent state

2008-05-28 Thread Stefan Behnel
New submission from Stefan Behnel [EMAIL PROTECTED]: Similar to the decref before set issue solved by Py_CLEAR(), the code in typeobject.c calls DECREF in the middle of a cache update. This leaves one cache entry in an invalid state during the DECREF call, which might result in running cleanup

[issue2997] PyNumberMethods has left-over fields in Py3

2008-05-29 Thread Stefan Behnel
New submission from Stefan Behnel [EMAIL PROTECTED]: Here is a patch that removes three unused fields from the PyNumberMethods struct in Py3. Since two fields were already removed (one even before the ones this patch removes), there is no way existing Py2 C code that uses this struct can work

[issue2990] type cache updates might run cleanup code in an inconsistent state

2008-05-29 Thread Stefan Behnel
Stefan Behnel [EMAIL PROTECTED] added the comment: Ok, I buy that argument. The patch may be considered a code uglification then. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2990

[issue2997] PyNumberMethods has left-over fields in Py3

2008-06-01 Thread Stefan Behnel
Stefan Behnel [EMAIL PROTECTED] added the comment: This seems to have been applied in current SVN. ___ Python tracker [EMAIL PROTECTED] http://bugs.python.org/issue2997

[issue3020] doctest should have lib2to3 integration

2008-06-01 Thread Stefan Behnel
New submission from Stefan Behnel [EMAIL PROTECTED]: Running a doctest with Py2 syntax in Py3 currently involves either running the 2to3 tool by hand or writing code to convert the doctest using lib2to3, and then running the modified version. This basically pushes the burden of automating

[issue3046] Locking should be removed from the new buffer protocol

2008-06-06 Thread Stefan Behnel
Stefan Behnel [EMAIL PROTECTED] added the comment: As a quick summary of the problems with the current PEP: 1) Many use cases will not require any locking at all, either because they run single-threaded with a short-read/short-write pattern, or because they do not write at all. 2) Write locks

[issue2997] PyNumberMethods has left-over fields in Py3

2008-06-06 Thread Stefan Behnel
Stefan Behnel [EMAIL PROTECTED] added the comment: :) sorry, that's the problem when you don't have commit rights and leave the changes in your local copy. So this is still an open issue that should be fixed before beta1, thanks. ___ Python tracker [EMAIL

[issue2799] Remove PyUnicode_AsString(), rework PyUnicode_AsStringAndSize(), add PyUnicode_AsChar()

2008-06-06 Thread Stefan Behnel
Stefan Behnel [EMAIL PROTECTED] added the comment: While PyUnicode_AsStringAndSize() may be a better solution if the length is required, PyUnicode_AsString is enough() when it is not required. So I don't buy that argument. Since there are dedicated UTF-8 encoding functions, both functions

[issue3171] operator.*slice() should be deprecated in 2.6

2008-06-21 Thread Stefan Behnel
New submission from Stefan Behnel [EMAIL PROTECTED]: operator.delslice() and friends were removed in Python 3.0, as the underlying object methods no longer exist. In the same way that the slicing special methods were deprecated in favour of the item methods should the functions in the operator

[issue3443] crash on badly initialised AttributeError

2008-07-27 Thread Stefan Behnel
Stefan Behnel [EMAIL PROTECTED] added the comment: Thanks a lot for the analysis. I was considering that this was a problem with Cython, but since this was the first time I got a crash on this (even Py3.0b1 didn't expose this), I wanted to ask here first. Your explanation sounds like the right

[issue2394] [Py3k] Finish the memoryview object implementation

2008-07-29 Thread Stefan Behnel
Stefan Behnel [EMAIL PROTECTED] added the comment: Also, the implementation does not follow the revised buffer PEP 3118. It still calls get/releasebuffer(NULL) to acquire a lock, which is no longer allowed by the buffer protocol. I think this should become a release blocker for the last beta

[issue6365] distutils duplicates package directory for C extensions in 3.1 final

2009-06-29 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: When compiling a C extension (lxml in this case) in Py3.1, calling the build_ext -i distutils target duplicates the package path when writing the dynlib. In this case, I get lxml/lxml/etree.so instead of lxml/etree.so. Obviously

[issue6673] Py3.1 hangs in coroutine and eats up all memory

2009-08-09 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: Here's a simple coroutine that works perfectly in Python 2.6 but seems to let Py3.1 enter an infinite loop that ends up eating all memory. - def printing_sink(): A simple sink that prints the received values

[issue6673] Py3.1 hangs in coroutine and eats up all memory

2009-08-09 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Hmm, ok, so this is actually an anticipated bug? And I assume this has been discussed before and was decided to get solved by doing... what? Is it documented somewhere why this happens and what one must avoid to not run

[issue6673] Py3.1 hangs in coroutine and eats up all memory

2009-08-17 Thread Stefan Behnel
Changes by Stefan Behnel sco...@users.sourceforge.net: -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6673 ___ ___ Python

[issue6673] Py3.1 hangs in coroutine and eats up all memory

2009-08-17 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Very good argumentation, thanks Nick! I think this is worth being fixed in the 3.1 series. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6673

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2009-10-20 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: Running the Cython compiler under Python 3.1.1 and 3.2 (SVN) corrupts PyThreadState-exc_value by leaving a dead reference. Printing the value then leads to a crash. This bug is about plain Python code, no Cython built extension

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2009-10-20 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: I should add that the crash doesn't necessarily happen during the first test run, which also converts the Cython source to Py3 using 2to3. However, once that's done, running the test a second time crashes reliably

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2009-11-21 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: I hadn't, but it looks like the 2to3-ed Cython also runs on 3.0 now, so I tested that, but I failed to get the procedure below to crash for me. And that's both in 3.0 *and* 3.1.1! :-/ But I can still provoke the crash in 3.0, 3.0.1

[issue7173] Cython compiler run crashes CPython 3.1.1 and 3.2

2009-11-22 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: The patch is supposed to apply near the end of the class TreeAssertVisitor at the end of the file Cython/TestUtils.py, not in the class NodeTypeWriter. And the test doesn't run (or even import) the extension, it just builds

[issue7415] PyUnicode_FromEncodedObject() uses PyObject_AsCharBuffer()

2009-11-30 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: PyUnicode_FromEncodedObject() currently calls PyObject_AsCharBuffer() to get the buffer pointer and length of a buffer supporting object. It should be changed to support the buffer protocol correctly instead. I filed

[issue11379] Remove lightweight from minidom description

2011-03-02 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: http://docs.python.org/library/xml.dom.minidom.html presents MiniDOM as a Lightweight DOM implementation. The word lightweight is easily misunderstood as meaning efficient or memory friendly. MiniDOM is well known to be neither

[issue11379] Remove lightweight from minidom description

2011-03-02 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Well, I'm not aware of many people who use 4DOM these days, and if that's what it's meant to refer to, maybe that should be made more obvious, because it currently is not at all. Even cDomlette uses only half of the memory according

[issue11379] Remove lightweight from minidom description

2011-03-03 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: It's the tree based API most python users are parsing XML with, though. So I do not agree that it's comparing apples and oranges, not at all. It's comparing tree based XML libraries, only one of which is worth being called light

[issue11379] Remove lightweight from minidom description

2011-03-03 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: If that is a real concern, I'd rather reduce the memory footprint of minidom than put actual performance figures into the documentation that will likely outdate over time. Personally, I do not think it's worth putting much work

[issue11903] Incorrect test code in test_logging.py

2011-04-21 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: In test file test_logging.py, around line 2359, list.append() is called with two arguments instead of one. I suppose it is meant to be called with a tuple. class ModuleLevelMiscTest(BaseTest): [...] def _test_log(self

[issue12131] python built with --prefix fails in site.py with no section 'posix_prefix'

2011-05-20 Thread Stefan Behnel
Changes by Stefan Behnel sco...@users.sourceforge.net: -- nosy: +scoder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12131 ___ ___ Python-bugs

[issue8583] Hardcoded namespace_separator in the cElementTree.XMLParser

2011-05-28 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: I don't see this having much to do with the DRY principle. It's explicit is better than implicit and better safe than sorry that applies here. -- ___ Python tracker rep...@bugs.python.org

[issue13186] instance_ass_item() broken in classobject.c (Py2.7)

2011-10-15 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: Starting at line 1223 in classobject.c, you can find this code: if (item == NULL) arg = PyInt_FromSsize_t(i); else arg = Py_BuildValue((nO), i, item); if (arg == NULL) { Py_DECREF(func

[issue13378] Change the variable nsmap from global to instance (xml.etree.ElementTree)

2011-11-10 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Florent, thanks for the notification. Nekmo, note that you are misusing this feature. The _namespace_map is meant to provide well known namespace prefixes only, so that common namespaces end up using the expected prefix

[issue13378] Change the variable nsmap from global to instance (xml.etree.ElementTree)

2011-11-11 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Reading the proposed patch, I must agree that it makes more sense in ElementTree to support this as a serialiser feature. ET's tree model doesn't have a notion of prefixes, whereas it's native to lxml.etree. Two major advantages

[issue13429] provide __file__ to extension init function

2011-11-18 Thread Stefan Behnel
New submission from Stefan Behnel sco...@users.sourceforge.net: In Python modules, the top-level module code sees the __file__ variable and can use it to refer to resources in package subdirectories, for example. This is not currently possible in extension modules, because __file__ is only set

[issue13429] provide __file__ to extension init function

2011-11-18 Thread Stefan Behnel
Changes by Stefan Behnel sco...@users.sourceforge.net: -- keywords: +patch nosy: +loewis Added file: http://bugs.python.org/file23725/ext_module_init_file_path.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13429

[issue13429] provide __file__ to extension init function

2011-11-18 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Here is an extension to the patch that implements the protocol also for extension module reinitialisation, so that the module creation can also set __file__ and the proper package in that case. Currently without tests (and users, I

[issue10227] Improve performance of MemoryView slicing

2011-11-18 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: Updated single slice caching patch for latest Py3.3 hg tip. -- Added file: http://bugs.python.org/file23727/slice-object-cache.patch ___ Python tracker rep...@bugs.python.org http

[issue13429] provide __file__ to extension init function

2011-11-18 Thread Stefan Behnel
Stefan Behnel sco...@users.sourceforge.net added the comment: I don't know how the import lock applies here. Would it have to be protected by it? The lifetime is restricted to the call of the extension module init function, and its value is saved recursively if the init function triggers

  1   2   3   4   5   6   7   8   9   10   >