[issue1032] Improve the hackish runtime_library_dirs support for gcc

2007-08-26 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: In distutils.unixccompiler, there is a hack to passing correctly the -R option to gcc (and a few other compilers). However, there is a small bug that causes gcc to not be detected correctly if the compiler name does not start with "gcc" (e

[issue1032] Improve the hackish runtime_library_dirs support for gcc

2007-08-26 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1032> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue1029] py3k: io.StringIO.getvalue() returns \r\n

2007-08-26 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: As far as I know, StringIO should not do any string transformations. >From PEP-3116 "New I/O", last paragraph of the section "Text I/O": > Another implementation, StringIO, creates a file-like TextIO > implementation witho

[issue1029] py3k: io.StringIO.getvalue() returns \r\n

2007-08-27 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: > That's why the current behaviour is not correct: When I write('\n'), > getvalue() currently returns '\r\n'. Oh, I missed your example in your initial message. So yes, I agree that StringIO shouldn't translate newline

[issue1032] Improve the hackish runtime_library_dirs support for gcc

2007-08-28 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: > The patch is incorrect since find returns -1 on failure. Oops, that is right. I attached the corrected patch. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1032> _

[issue1247] PEP 3137 patch (repr, names, parser)

2007-10-08 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I am not sure how the parser work, so I can't comment if your change to it is correct. It would probably a better idea to keep it for later, when the semantic differences between str8 and bytes objects will be resolved. I think changing b'&#x

[issue1247] PEP 3137 patch (repr, names, parser)

2007-10-08 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1247> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue1247] PEP 3137 patch (repr, names, parser)

2007-10-08 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1247> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue1260] PEP 3137: Remove the buffer API from PyUnicode

2007-10-10 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: This patch removes the buffer API from PyUnicode, as specified by PEP 3137. All the unit tests passes. However, I believe there is a few function calls to PyArg API that could become problematic if they are given a PyUnicode object: % egrep -R

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I found a few problems in your patch. In PyCode_New() the type check for the filename argument is incorrect: --- Objects/codeobject.c(revision 58412) +++ Objects/codeobject.c(working copy) @@ -59,7 +59,7 @@ freevars == NULL

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1272> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Guido wrote: > Why copy the default encoding before mangling it? With a little > extra care you will only have to copy it once. Also, consider not > mangling at all, but assuming the encoding comes in a canonical form > -- several other func

[issue1260] PEP 3137: Remove the buffer API from PyUnicode

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: There was a problem with one of the call of PyArg_ParseTuple in the OS/2 version of listdir() in the posix module. I also clarified the error message of the 't' format unit. __ Tracker <[EMAIL PROT

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Guido wrote: > I figured out the problem -- it came from marshalled old code objects. > If you throw away all .pyc files the problem goes away. You can also > get rid of the similar checks for the 'name' argument -- this should > j

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: > Remove the PyString type check on 'filename' and 'name' in PyCode_New. Oops. I removed one of the ! the checks by mistake. __ Tracker <[EMAIL PROTECTED]> <

[issue1260] PEP 3137: Remove the buffer API from PyUnicode

2007-10-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r58455. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1260> __ ___ Python-bugs-list mailing list Unsubs

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Christian wrote: > Alexandre's mangle loop doesn't do the same job as mine. Chars like _ > and - aren't removed from the encoding name and the if clauses don't > catch for example UTF-8 or ISO-8859-1 only UTF8 or ISO8859-1.

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: > I have a question for Alexandre related to frozen.c -- why is there a > mode line with an encoding involved in freezing hello.py? For some reason which I don't know about, freeze.py tries to read all the modules accessible from sys.path:

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I thought of another way to implement PyUnicode_DecodeFSDefault. If Py_FileSystemDefaultEncoding is set, decode with the codecs module, otherwise use UTF-8 + replace. This works because when Py_FileSystemDefaultEncoding is initialized at the end of

[issue1280] PEP 3137: Make PyString's indexing and iteration return integers

2007-10-15 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: Here a preliminary patch to make PyString return integers on indexing and iteration. There is still quite a few XXX in the patch, that I would like to fix. However, the good thing is all tests passes. -- components: Interpreter Core files

[issue1278] imp.find_module() ignores -*- coding: Latin-1 -*-

2007-10-15 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- nosy: +alexandre.vassalotti __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1278> __ ___ Python-bugs-list

[issue1272] Decode __file__ and co_filename to unicode using fs default

2007-10-15 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I wrote in msg56419: > It is not perfect, since the extra function calls in the codecs module > causes test_profile and test_doctest to fail. How this was resolved? __ Tracker <[EMAIL PROTECTED]> <http://

[issue1302] Fixes for profile/cprofile

2007-10-21 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I don't think it's possible to add shortcuts in PyUnicode_Decode for UTF-16 and UTF-32 because the byte-order can be different depending of the platform. So, these two need to pass through the codecs module. I am sure if it's better, but

[issue1286] fileinput, StringIO, and cStringIO do not support the with protocol

2007-10-21 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Do you have a use-case for this? In Py3k, I don't think adding support for the 'with' statement to StringIO makes any sense, since the close() method does nothing. -- nosy: +alexandre.vassalotti __

[issue1302] Fixes for profile/cprofile

2007-10-25 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: > I still don't understand why you are using (sizeof lower) - 2 It is simply to avoid duplicating the constant (a.k.a. the Don't Repeat Yourself (DRY) rule). > and what &lower[(sizeof lower) - 2] returns. Is it the memory address >

[issue1302] Fixes for profile/cprofile

2007-10-25 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: > Personally, I used like to subtract pointer, ((lower - l + 1) < > (sizeof lower)) to get the bound. Doh. I got it backward. It's (l - lower + 1), not (lower - l + 1). > But now, I find Guido's trick more cute (and less error-pr

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: On 11/7/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 11/7/07, Christian Heimes <[EMAIL PROTECTED]> wrote: > > > > Christian Heimes added the comment: > > > > By the way what happened to the SoC project related

[issue1395] py3k: duplicated line endings when using read(1)

2007-11-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: On 11/7/07, Guido van Rossum wrote: > Cool. How hard do you think it would be to extend your work on > StringIO into a translation of TextIOWrapper into C? Well, StringIO and TextIOWrapper are quite different. The only part that I could reuse

[issue13503] improved efficiency of bytearray pickling by using bytes type instead of str

2011-12-05 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Antoine, do we have unit tests for this code path? -- ___ Python tracker <http://bugs.python.org/issue13503> ___ ___ Pytho

[issue13520] Patch to make pickle aware of __qualname__

2011-12-05 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: This might not be the case anymore, but __module__ can sometime be None. There is some discussion about this in Issue 3657. We should define the expected behavior when this happens. Also, I don't think backward-compatibility of the protocol is

[issue13505] Bytes objects pickled in 3.x with protocol <=2 are unpickled incorrectly in 2.x

2011-12-05 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I think we are kind of stuck here. I might need to rely on some clever hack to generate the desired str object in 2.7 without breaking the bytes support in 3.3 and without changing 2.7 itself. One *dirty* trick I am thinking about would be to use

[issue3635] pickle.dumps cannot save instance of dict-derived class that overrides __getattribute__

2011-12-05 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I don't think it is a bug. The posted code completely breaks the expected behavior of __getattribute__. With a such implementation, there is nothing we can do with this object as we cannot introspect it. Use the following if you really need this

[issue13505] Bytes objects pickled in 3.x with protocol <=2 are unpickled incorrectly in 2.x

2011-12-08 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: sbt, the bug is not that the encoding is inefficient. The problem is we cannot unpickle bytes streams from Python 3 using Python 2. -- ___ Python tracker <http://bugs.python.org/issue13

[issue2775] Implement PEP 3108

2011-12-08 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Brett, issue 2919 had a patch that merges profile/cProfile for a while now but nobody test it yet. All I need it someone to download the patch, install it, test it on some random script and tell me if it works. I don't need

[issue13505] Bytes objects pickled in 3.x with protocol <=2 are unpickled incorrectly in 2.x

2011-12-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Fixed. Thanks for the patch! -- assignee: -> alexandre.vassalotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python

[issue9410] Add Unladen Swallow's optimizations to Python 3's pickle.

2010-09-06 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Antoine, I fixed these issues in the latest patch posted on Rietveld. Also, Skip added the buffer limit in Unladen Swallow (see msg112956). We just need to merge that. -- Added file: http://bugs.python.org/file18777/issue1694050_19001.diff.txt

[issue3873] Unpickling is really slow

2010-09-24 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I get this error with the patch: python: /home/alex/src/python.org/py3k/Modules/_pickle.c:908: _Unpickler_ReadFromFile: Assertion `self->next_read_idx == 0' failed. Aborted -- ___ Python tracke

[issue3873] Unpickling is really slow

2010-09-27 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Didn't Victor say that only one seek at the end is necessary per pickle? If this is the case, I don't think expensive seeks will be an issue. -- ___ Python tracker <http://bugs.python.

[issue9965] Loading malicious pickle may cause excessive memory usage

2010-09-27 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti : This was mentioned during the review of issue #9410 (http://codereview.appspot.com/1694050/diff/2001/3001#newcode347), however we forgot to fix this. The new array-based memo for the Unpickler class assumes incorrectly that memo indices are always

[issue9965] Loading malicious pickle may cause excessive memory usage

2010-09-27 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/issue9965> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue9965] Loading malicious pickle may cause excessive memory usage

2010-09-27 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I was going to say this method http://docs.python.org/dev/py3k/library/pickle.html#restricting-globals could be used to prevent this kind of attack on bytearray. But, I came up with this fun thing: pickle.loads(b'\x80\x03cbuiltins\nlist\ncbui

[issue9935] Faster pickling of instances

2010-10-04 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Sorry Antoine, I have been busy with school work lately. I like the general idea and I will try to look at your patch ASAP. -- ___ Python tracker <http://bugs.python.org/issue9

[issue11299] Allow deepcopying and pickling paused generators

2011-02-25 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Although, I would really like to see support of pickling generators. It is not really possible in CPython. This is recurrent request. I even wrote a small article about it. http://peadrop.com/blog/2009/12/29/why-you-cannot-pickle-generators/ Looking

[issue11299] Allow deepcopying and pickling paused generators

2011-02-26 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The value of the instruction pointer depends on the byte-code. So it's not portable either. But, the bigger issue is the fact generator objects do not have names we can refer to, unlike top-level functions and classes which pickle supports. Simi

[issue11564] pickle not 64-bit ready

2011-03-15 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: We could resort to the text-based protocol which doesn't have these limitations with respect to object lengths (IIRC). Performance won't be amazing, but we won't have to modify the current

[issue2887] bsddb 4.6.4 needs to be ported to Python 3.0

2008-05-15 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti <[EMAIL PROTECTED]>: The recent updates to bsddb (r63207, r63210 and r63218) needs to forward-ported to the py3k branch. At first glance, here is the things that needs to be done in the test suite: - Change the import: from test_all

[issue2888] pprint produces different output in 2.6 and 3.0

2008-05-15 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti <[EMAIL PROTECTED]>: The indent argument produces different output in Python 2.6 and 3.0: Python 3.0a5+ (py3k:63349:63350M, May 16 2008, 00:37:17) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 Type "help", "copyright", "

[issue2880] Rename repr to reprlib

2008-05-15 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: -- assignee: -> alexandre.vassalotti nosy: +alexandre.vassalotti __ Tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue2880] Rename repr to reprlib

2008-05-16 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs

[issue2775] Implement PEP 3108

2008-05-16 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Quentin Gallet-Gilles wrote: > I've found some places where configparser, copyreg, queue and > socketserver haven't been renamed. The attached patch > 'renaming_leftovers_2.6.patch' correc

[issue2874] Remove use of the stat module in the stdlib

2008-05-16 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Brett wrote: > This will require moving over to using the named tuple features of > os.stat() along with adding methods to the object that the stat module > has as functions. How do you add new methods to a P

[issue2920] Patch to print symbolic value or errno in EnvironmentError.__str__()

2008-05-19 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Overall, the patch looks good. I made a couple of fixes to make the changes more robust. -- nosy: +alexandre.vassalotti priority: -> normal type: -> feature request Added file: http://bugs.python.org/file10

[issue2980] Pickle stream for unicode object may contain non-ASCII characters.

2008-06-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: -- nosy: +alexandre.vassalotti ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2917] merge pickle and cPickle in 3.0

2008-06-02 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Here is the fully reviewed and shiny C optimized pickle module. :-) Note, I am only posting the _pickle.c source code for now. I still need to work out a few details out. For example, there is a few methods that needs to be expo

[issue2917] merge pickle and cPickle in 3.0

2008-06-04 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Here is a diff against the previously posted _pickle.c module. The module is pretty much done now. I fixed find_class() to be a proper method and move the initialization code of Pickler/Unpickler into the tp_init slot to allow

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

2008-06-05 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I now think the proposed changes wouldn't be bad thing, after all. I have been bitten myself by the confusing naming of the Unicode API. So, there is definitely a potential for errors. The main problem with PyUnicode_AsS

[issue2582] Unpickling of range objects fail in Py3k

2008-06-05 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Weird. I wonder why it succeeds to pickle to range object at all. It seems the __reduce_ex__ method emits bogus value. >>> r.__reduce_ex__(2) (, (,), None, None, None) Anyway, that is easy to fix when you know the

[issue2582] Unpickling of range objects fail in Py3k

2008-06-05 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Oh, here is a slightly more efficient version. Added file: http://bugs.python.org/file10531/fix_range_pickling-2.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2582] Unpickling of range objects fail in Py3k

2008-06-05 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: xrange() in Python 2.x is also affected by this bug. So, here is the fix. -- versions: +Python 2.5, Python 2.6 Added file: http://bugs.python.org/file10532/fix_xrange_pickling

[issue3008] Let bin() show floats

2008-06-05 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Kind of a cool hack. I am not sure how useful it is though. Personally, I find ``struct.pack('d', f)`` slightly more educative (more useful too), but that is just me. And if you allow bin() to accept floats, will

[issue2523] binary buffered reading is quadratic

2008-06-07 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I am going to go through your patch as soon as I get the time -- i.e., later today or tomorrow morning. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2523] binary buffered reading is quadratic

2008-06-07 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I reviewed the patch and I found a few bugs -- i.e., peek() was replacing the buffer content, read() wasn't written in consideration of non-blocking streams, the removal of the None check in BufferedRandom.read() was wrong.

[issue3065] Fix pickling bug of collections.namedtuple

2008-06-08 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti <[EMAIL PROTECTED]>: There is currently a pickling bug in the namedtuple factory: >>> from collections import namedtuple >>> MemoRecord = namedtuple("MemoRecord", "key, msg") >>> m = MemoRec

[issue2917] merge pickle and cPickle in 3.0

2008-06-09 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file10566/changeset-2.diff ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2917] merge pickle and cPickle in 3.0

2008-06-09 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Here is the full patch that adds the _pickle module. I would like to commit it as soon another developer tests it and (hopefully) reviews it. A documentation patch is coming as well. However since I don't want to block the r

[issue2918] Merge StringIO/cStringIO in 3.0

2008-06-09 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Here's a preliminary patch that add the C optimization for StringIO. All tests are passing except two which depends on the StringIO.buffer attribute of the TextIOWrapper class. Honestly, I am not sure what is the correct way

[issue2523] binary buffered reading is quadratic

2008-06-09 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Oh, that is simple to fix. You can round the value 2*avail to the nearest block by doing something like (2*avail) & ~(bksize-1) where bksize is a power of 2, or the less magic (2*avail//bksize

[issue2582] Unpickling of range objects fail in Py3k

2008-06-09 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Fixed in r64059 for Python 3.0 Fixed in r64056 and r64057 for Python 2.6 -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <h

[issue2582] Unpickling of range objects fail in Py3k

2008-06-09 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: > Fixed in r64056 and r64057 for Python 2.6 Oops, I meant r64057 and r64058. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue1092962] Make Generators Pickle-able

2008-06-09 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I think is a bad idea too. Unless I see patch that implements this feature cleanly, I will have to reject this feature request. -- nosy: +alexandre.vassalotti resolution: -> rejected status: open -

[issue1580] Use shorter float repr when possible

2008-06-09 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: -- nosy: +alexandre.vassalotti ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2919] Merge profile/cProfile in 3.0

2008-06-09 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I will try to fix issue. I cannot promise that I will get it done before the beta though. -- nosy: +alexandre.vassalotti ___ Python tracker <[EMAIL PROTECTED]> <http://

[issue2918] Merge StringIO/cStringIO in 3.0

2008-06-10 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Here's another patch fixes the failing tests. I have tried to support the buffer attribute using following hack: @property def buffer(self): # XXX Hack to support the buffer attribute.

[issue2744] Fix test_cProfile

2008-06-11 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I will try to fix this one with profile/cProfile merge. -- assignee: -> alexandre.vassalotti nosy: +alexandre.vassalotti ___ Python tracker <[EMAIL PROTECTED]> <http

[issue2917] merge pickle and cPickle in 3.0

2008-06-11 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I updated the patch to use the new module framework. Added file: http://bugs.python.org/file10592/add-cpickle-2.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2918] Merge StringIO/cStringIO in 3.0

2008-06-11 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I updated the patch to use the new module framework. Added file: http://bugs.python.org/file10593/add-stringio-3.patch ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2918] Merge StringIO/cStringIO in 3.0

2008-06-11 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Committed in r64154. -- resolution: -> accepted status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue2917] merge pickle and cPickle in 3.0

2008-06-11 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Committed in r64152. -- resolution: -> accepted status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue2775] Implement PEP 3108

2008-06-11 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Done with pickle and stringio. -- dependencies: -Merge StringIO/cStringIO in 3.0, merge pickle and cPickle in 3.0 ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue2917] merge pickle and cPickle in 3.0

2008-06-12 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Okay, I fixed _pickle's integers unpickling on 64bit platforms. Here is the patch. Added file: http://bugs.python.org/file10601/fix_pickle_int64.diff ___ Python tracker <[EMAIL PRO

[issue2917] merge pickle and cPickle in 3.0

2008-06-12 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Restored _pickle in r64180. -- status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue616013] cPickle documentation incomplete

2008-07-13 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Is this still desired? If so, I have fairly long list of differences that I could document. Or maybe, I could backport the _pickle module to Python 2.6, which doesn't have as many differences. -- nosy: +alexandre

[issue3350] multiprocessing adds built-in types to the global copyreg.dispatch_table

2008-07-13 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti <[EMAIL PROTECTED]>: The multiprocessing module modifies the global copyreg.dispatch_table to extend pickling to several built-in types (mostly callable types). In my humble opinion, this is unacceptable for a standard library module. Here is an e

[issue3119] pickle.py is limited by python's call stack

2008-07-13 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: On some benchmark of my own, I get a good 2x slowdown when this patch is applied. The benchmark consists of loading ~1.4 millions objects (mostly dict, list, str and int) from a pickle string. It is basically a torture test f

[issue3274] Py_CLEAR(tmp) seg faults

2008-07-13 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Committed the fix r64927. Thanks. -- nosy: +alexandre.vassalotti resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

[issue3326] py3k shouldn't use -fno-strict-aliasing anymore

2008-07-13 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: With gcc 4.2.3, I see a whole bunch of warnings: Objects/exceptions.c: In function ‘UnicodeDecodeError_init’: Objects/exceptions.c:1472: warning: dereferencing type-punned pointer will break strict-aliasing rules Objects/frameob

[issue3153] sqlite leaks on error

2008-07-13 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Fixed in r64930 (trunk) and r64931 (py3k). Thanks. -- nosy: +alexandre.vassalotti resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <h

[issue3208] function annotation for builtin and C function

2008-07-13 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Extension modules can use PyFunction_GetAnnotations() to access and modify the annotations dictionary. In addition, PyFunction_SetAnnotations() can be used to add annotations. I added some documentation for these functions in

[issue3385] cPickle to pickle conversion in py3k missing methods

2008-07-16 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: The omission of the dispatch dictionary was sort of intentional. But now, I think it would be a good idea to add it to _pickle.Pickler. I will write a patch ASAP. ___ Python tracker &

[issue3385] cPickle to pickle conversion in py3k missing methods

2008-07-22 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Just in case you are wondering why I haven't submitted a patch yet, I want to let you know that my home computer is currently broken. So, I won't be able to work on this until I get my computer fixed (which unfortunat

[issue2523] binary buffered reading is quadratic

2008-07-22 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Antoine wrote: > Le lundi 21 juillet 2008 à 21:18 +, Martin v. Löwis a écrit : > > IIUC, a read of the full requested size would achieve exactly that: on a > > non-blocking stream (IIUC), a read will

[issue3431] multiprocessing uses Pickler.dispatch which isn't in 3.0 _pickle

2008-07-23 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Duplicate of issue3385 -- resolution: -> duplicate status: open -> closed superseder: -> cPickle to pickle conversion in py3k missing methods ___ Python tracker <[EMAIL

[issue2744] Fix test_cProfile

2008-08-03 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Not anymore! :-) ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2744> ___ __

[issue3492] Zlib compress/decompress functions returning bytearray

2008-08-03 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Could you submit unified diff--i.e., with 'diff -u' or 'svn diff'? Also, could you add tests for this fix? -- nosy: +alexandre.vassalotti ___ Python tracker

[issue3385] cPickle to pickle conversion in py3k missing methods

2008-08-03 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I got a preliminary patch that adds the dispatch dictionary. However, the patch leaks and it doesn't expose the save_reduce() method (which is needed by ForkingPickler). -- keywords: +patch Added file: http://bugs

[issue2389] Array pickling exposes internal memory representation of elements

2008-08-10 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I don't see why this cannot be fixed easily. All we need to do is fix the __reduce__ method of array objects to emit a list--i.e. with array.tolist()--instead of a memory string. Since the reduce protocol is just a fancy w

[issue3514] pickle segfault with infinite loop in __getattr__

2008-08-10 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: This is a bug in the C implementation of pickle (i.e., the _pickle module). I think you're right about the missing exception check. At first glance, it looks like the missing else-if case for "setstate == NULL", in

[issue2389] Array pickling exposes internal memory representation of elements

2008-08-11 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: The slowdown depends of the array type. The patch makes array unpickling a few orders of magnitude slower (i.e. between 4 and 15 times slower depending of the array type). In general, pickling is about as fast as with the

[issue2389] Array pickling exposes internal memory representation of elements

2008-08-13 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I'm all in for a standardized representation of array's pickles (with width and endianness preserved). However to happen, we will either need to change array's constructor to support at least the byte-order speci

[issue3514] pickle segfault with infinite loop in __getattr__

2008-08-14 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Committed fix in r65689. Thanks! -- resolution: -> fixed status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> <http://bugs

  1   2   3   4   5   6   7   >