[issue6607] asctime causing python to crash

2009-07-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- resolution: -> duplicate stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue6608] asctime causing python to crash

2009-07-30 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Confirmed. On Windows, the out-of-range value triggers a debugging assertion in the CRT library. -- components: +Extension Modules, Windows -None nosy: +alexandre.vassalotti priority: -> normal stage: -> needs patch versions: +Pyth

[issue2335] Backport set literals

2009-08-04 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Here is a patch for backporting set literals to the trunk. -- keywords: +patch nosy: +alexandre.vassalotti stage: -> patch review Added file: http://bugs.python.org/file14650/backport_set_literal.d

[issue5449] bug fix to prevent io.BytesIO from accepting arbitrary keyword arguments

2009-08-04 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r74316. Thanks! -- nosy: +alexandre.vassalotti resolution: -> accepted stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue2335] Backport set literals

2009-08-04 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I think we should keep the repr() of sets as is to avoid breaking any code. And yes, I plan to port set comprehensions along with dict comprehension. -- ___ Python tracker <http://bugs.python.org/issue2

[issue1967] Backport dictviews to 2.7

2009-08-04 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I have refreshed Thomas's patch to reflect recent updates to dictviews. I also added the documentation for dictviews. -- nosy: +alexandre.vassalotti stage: -> patch review Added file: http://bugs.python.org/file14651/backport_dictvi

[issue1967] Backport dictviews to 2.7

2009-08-04 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Here is a patch for 2to3 to support the translation of code using dictviews. -- Added file: http://bugs.python.org/file14652/2to3_fixer_dictviews.diff ___ Python tracker <http://bugs.python.org/issue1

[issue2333] Backport set and dict comprehensions

2009-08-05 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Here is a patch to backport dict and set comprehensions to the trunk. The patch preserves the Python 3.x's syntax and semantics of the feature. Although this makes dict and set comprehensions is inconsistent with list comprehension, I believe th

[issue2334] Backport set comprehensions

2009-08-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Backport set and dict comprehensions ___ Python tracker <http://bugs.pytho

[issue2333] Backport set and dict comprehensions

2009-08-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- dependencies: +Backport set literals ___ Python tracker <http://bugs.python.org/issue2333> ___ ___ Python-bugs-list mailin

[issue2345] Using an exception variable outside an 'except' clause should raise a Py3K warning

2009-08-05 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Brett, could you provide an example of "an exception bound to a variable"? -- nosy: +alexandre.vassalotti priority: critical -> normal stage: -> test needed ___ Python tracker <htt

[issue1745] Backport of PEP 3102 "keyword-only arguments" to 2.6

2009-08-05 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- nosy: +alexandre.vassalotti stage: -> patch review ___ Python tracker <http://bugs.python.org/issue1745> ___ ___ Python-

[issue2333] Backport set and dict comprehensions

2009-08-06 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: You need to apply the set literal patch I posted in issue2335 first. -- ___ Python tracker <http://bugs.python.org/issue2

[issue6687] Move the special-case for integer objects out of PyBytes_FromObject.

2009-08-11 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti : The documentation for PyBytes_FromObject states: .. cfunction:: PyObject* PyBytes_FromObject(PyObject *o) Return the bytes representation of object *o* that implements the buffer protocol. However, there exists a special-case for integer object

[issue6687] Move the special-case for integer objects out of PyBytes_FromObject.

2009-08-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Oh, in case you wonder, the added PyUnicode_Check(x) check is to force PyBytes_FromObject to raise an error when given an empty unicode string (I will this as a comment in my patch). -- ___ Python tracker

[issue6688] Optimize PyBytes_FromObject.

2009-08-11 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti : Optimize PyBytes_FromObject by adding special-cases for list and tuple objects and by using _PyObject_LengthHint() instead of an arbitrary value for the size of the initial buffer. [Without the patch] ./python -m timeit -s "x = list(range(256))&qu

[issue1023290] proposed struct module format code addition

2009-08-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I went ahead and coded a new API for converting long integers to byte arrays and vice-versa. My patch adds two new methods to the long type: .as_bytes() and .frombytes(). The patch itself is well-documented; but nevertheless, here's some exa

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

2009-08-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Not a bug. The list comprehension in your chunker: while True: target.send([ (yield) for i in range(chunk_size) ]) is equivalent to the following generator in Python 3: while True: def g(): for i in range(chunk_size

[issue1023290] Conversion of longs to bytes and vice-versa.

2009-08-17 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Here's a new patch incorporating the suggestions I received on python-ideas. Notable changes are: - The name of the methods have been changed to int.tobytes() and int.frombytes(). - The tri-state `little_endian' argument has been

[issue6551] test_codecs fails when ran after test_zipimport and test_mailbox.

2009-11-12 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The patch looks good to me. -- resolution: -> accepted ___ Python tracker <http://bugs.python.org/issue6551> ___ _

[issue1023290] Conversion of longs to bytes and vice-versa.

2009-11-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Here's an updated patch. - Renamed tobytes() to to_bytes() and frombytes() to from_bytes(). - Moved the changes to pickle to a different patch. - Made the NULL-checks more consistent with the rest of long's code. - Fixed the type check of t

[issue5683] Speed up cPickle's pickling generally

2009-11-20 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Last august, I worked on integrating Collin's optimization work into py3k in a local Mercurial branch. So, I can champion these changes into py3k, if Collin is unavailable. And if Collin allows me, I would like to merge the other pickle optimiza

[issue7128] cPickle looking for non-existent package copyreg

2009-11-20 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: But, that change was undone already, no? In fact, it is you, Georg, that reverted my mess in r63493. ;-) -- nosy: +alexandre.vassalotti ___ Python tracker <http://bugs.python.org/issue7

[issue7128] cPickle looking for non-existent package copyreg

2009-11-21 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Yes. But, I would remove the ugly copy_reg_str variable from cPickle as the patch. -- Added file: http://bugs.python.org/file15377/remove_copyreg_str.diff ___ Python tracker <http://bugs.python.org/issue7

[issue7382] bytes.__getnewargs__ is broken; copy.copy() therefore doesn't work on bytes, and bytes subclasses can't be pickled by default

2009-11-24 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: We just need make __getnewargs__ return bytes, instead of a unicode string. So this is a single character fix. I think we should reuse the ByteArraySubclass test case in test_bytes.py to test for this bug. Incidentally, the reduce method of bytearray

[issue7392] cPickle test failure on release26-maint branch

2009-11-24 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti : I get the following test failure on the release26-maint branch: ./python Lib/test/test_cpickle.py [...] == ERROR: test_issue2702 (__main__.cPickleDeepRecursive

[issue7128] cPickle looking for non-existent package copyreg

2009-11-24 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Thanks you! Committed in r76499 and backported to 2.6 in r76500. -- resolution: -> accepted stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bug

[issue7426] StringIO and with statement

2009-12-04 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> fileinput, StringIO, and cStringIO do not support the with protocol ___ Python tracker <http://

[issue1398] Can't pickle partial functions

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Indeed. Jack Diederich added support for pickling partial functions in r70931. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bug

[issue6687] Move the special-case for integer objects out of PyBytes_FromObject.

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Mark Dickinson wrote: > Is there still a need for a separate C function for creating a zero- > initialized bytes object from a Py_ssize_t or a Python integer? What C function are you referring to? > And this check doesn't cover other,

[issue2335] Backport set literals

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: If there are no objections, I will commit this patch later this week. -- ___ Python tracker <http://bugs.python.org/issue2

[issue2333] Backport set and dict comprehensions

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: If there are no objections, I will commit this patch later this week after issue #2335. -- ___ Python tracker <http://bugs.python.org/issue2

[issue1967] Backport dictviews to 2.7

2009-12-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Can someone review the patches? I would like to commit this later this week. -- ___ Python tracker <http://bugs.python.org/issue1

[issue1967] Backport dictviews to 2.7

2009-12-30 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: It looks like that crash is caused by some bug in the implementation of PyUnicode_FromFormat(). I rewrote my patch to avoid it and added some additional unit tests. -- Added file: http://bugs.python.org/file15705/backport_dictviews-2.diff

[issue7608] PyUnicode_FromFormatV handles %R and %S incorrectly.

2009-12-30 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti : It seems PyUnicode_FromFormatV wrongly assumes that the return value of PyObject_Str and PyObject_Repr is a unicode object. It looks like the %S and %R feature was backported from 3.x without updating the code for 2.x. PyObject

[issue7608] PyUnicode_FromFormatV handles %R and %S incorrectly.

2009-12-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- resolution: -> duplicate status: open -> closed superseder: -> PyUnicode_FromFormat broken and not documented for 2.x ___ Python tracker <http://bugs.python.o

[issue7608] PyUnicode_FromFormatV handles %R and %S incorrectly.

2009-12-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- stage: test needed -> committed/rejected ___ Python tracker <http://bugs.python.org/issue7608> ___ ___ Python-bugs-list mai

[issue1967] Backport dictviews to 2.7

2009-12-30 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The tests were missing in my last patch. So, here's a new one. -- Added file: http://bugs.python.org/file15706/backport_dictviews-3.diff ___ Python tracker <http://bugs.python.org/i

[issue6687] Move the special-case for integer objects out of PyBytes_FromObject.

2009-12-30 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r77174. Thank you for reviewing! -- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue1023290] Conversion of longs to bytes and vice-versa.

2010-01-09 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r77394. Thank you for the good reviews! -- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue6688] Optimize PyBytes_FromObject.

2010-01-09 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r77398. -- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue2335] Backport set literals

2010-01-09 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: It been a long week, but this patch is now committed as r77400. -- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bug

[issue2333] Backport set and dict comprehensions

2010-01-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r77422. -- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue2919] Merge profile/cProfile in 3.0

2010-01-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Any comment about the code I posted? -- ___ Python tracker <http://bugs.python.org/issue2919> ___ ___ Python-bugs-list m

[issue1967] Backport dictviews to 2.7

2010-01-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r77428. Thanks for your comments! -- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue6710] hotshot stats load causes TypeError when multiple files are loaded

2010-01-11 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- nosy: +alexandre.vassalotti ___ Python tracker <http://bugs.python.org/issue6710> ___ ___ Python-bugs-list mailing list Unsub

[issue7382] bytes.__getnewargs__ is broken; copy.copy() therefore doesn't work on bytes, and bytes subclasses can't be pickled by default

2010-01-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r77437. Thanks! -- ___ Python tracker <http://bugs.python.org/issue7382> ___ ___ Python-bugs-list mailin

[issue7382] bytes.__getnewargs__ is broken; copy.copy() therefore doesn't work on bytes, and bytes subclasses can't be pickled by default

2010-01-11 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- resolution: -> accepted stage: test needed -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue5373] TypeError when '\x00' in docstring

2009-02-28 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The motivation behind the restriction was to prevent the tp_doc member to get truncated. Since tp_doc is a C string, it cannot contains embeded null bytes. However, it seems tp_doc is not used at all for heap types. So, I don't mind liftin

[issue5373] TypeError when '\x00' in docstring

2009-02-28 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Here is a patch that removes the restriction. -- keywords: +patch priority: -> normal stage: -> patch review type: compile error -> behavior Added file: http://bugs.python.org/file13213/remove_null_restriction_on_clas

[issue5373] TypeError when '\x00' in docstring

2009-02-28 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file13214/remove_null_restriction_on_classdoc.diff ___ Python tracker <http://bugs.python.org/issue5

[issue5373] TypeError when '\x00' in docstring

2009-02-28 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file13213/remove_null_restriction_on_classdoc.diff ___ Python tracker <http://bugs.python.org/issue5

[issue5665] Add more pickling tests

2009-04-02 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Overall, the patch looks good. I haven't reviewed the patch thoroughly yet, but there is a few things I am not sure about. First, why do you bother supporting 2.4 (i.e. with a copy of run_with_locale) in a patch aimed at 2.7? In test_many_puts_and

[issue5670] Speed up pickling of dicts in cPickle

2009-04-02 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I ported the patch to py3k. In addition, I added a special-case when the dict contains only one item; you probably want this special-case in the trunk version as well. -- nosy: +alexandre.vassalotti Added file: http://bugs.python.org/file13593

[issue5670] Speed up pickling of dicts in cPickle

2009-04-02 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Oops, I forgot to add the comment on top of batch_dict_exact in the patch. Here is a better patch. -- Added file: http://bugs.python.org/file13594/pickle_batch_dict_exact_py3k-2.diff ___ Python tracker <h

[issue5671] Speed up pickling of lists in cPickle

2009-04-02 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Here's a patch for py3k. I also added a special-case for 1-item lists. -- nosy: +alexandre.vassalotti Added file: http://bugs.python.org/file13595/pickle_batch_list_exact_py3k.diff ___ Python tracker

[issue5671] Speed up pickling of lists in cPickle

2009-04-02 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- versions: +Python 3.1 ___ Python tracker <http://bugs.python.org/issue5671> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue5670] Speed up pickling of dicts in cPickle

2009-04-02 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Oops again, I just remarked that the comment for batch_dict_exact refers to batch_dict as being above, but I copied batch_dict_exact before batch_dict. Here's a good patch (hopefully) that puts batch_dict_exact at the right place. -- key

[issue5670] Speed up pickling of dicts in cPickle

2009-04-02 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file13593/pickle_batch_dict_exact_py3k.diff ___ Python tracker <http://bugs.python.org/issue5

[issue5670] Speed up pickling of dicts in cPickle

2009-04-02 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file13594/pickle_batch_dict_exact_py3k-2.diff ___ Python tracker <http://bugs.python.org/issue5

[issue5345] cStringIO class name typo

2009-04-02 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: This is not a typo. cStringIO.StringIO is a factory function that returns either a cStringO object (for writing) or cStringI (for reading). If this behavior causes a problem to you, then consider using StringIO.StringIO. Alternatively, you could upgrade

[issue2389] Array pickling exposes internal memory representation of elements

2009-04-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Ah, I just remembered the smart way I had devised some time ago to handle this issue without changing the constructor of array.array. The trick would be to add a __reduce__ method to array.array. This method would return a special constructor function

[issue3675] Python 2.6 can't read sets pickled with Python 3.0

2009-04-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Would it would be sufficient to add a function in the pickletools capable of converting old Python 2 pickles to the new format in Python 3? Alternatively, we could add a compatibility Unpickler class that would override the find_class method to do the

[issue5670] Speed up pickling of dicts in cPickle

2009-04-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Silly me, I had changed the PyDict_Size call in outer loop for Py_SIZE and this is of course totally wrong. Here's a good patch (I am pretty sure now! ;-) I ran the whole test suite and I saw no failures. Collin, you can go ahead and commit both pa

[issue5670] Speed up pickling of dicts in cPickle

2009-04-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Sigh... silly me again. There is some other junk in my last patch. -- Added file: http://bugs.python.org/file13598/pickle_batch_dict_exact_py3k-5.diff ___ Python tracker <http://bugs.python.org/issue5

[issue5670] Speed up pickling of dicts in cPickle

2009-04-03 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file13596/pickle_batch_dict_exact_py3k-3.diff ___ Python tracker <http://bugs.python.org/issue5

[issue5670] Speed up pickling of dicts in cPickle

2009-04-03 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file13597/pickle_batch_dict_exact_py3k-4.diff ___ Python tracker <http://bugs.python.org/issue5

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti : Here is a patch that moves the source files of the _io module (and closely related modules) into subdirectory of Modules. The new file hierarchy proposed is the following: Modules/ _io/ _iomodule.h _iomodule.c iobase.c

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file13602/move-iomodule-in-subdir.diff ___ Python tracker <http://bugs.python.org/issue5682> ___ ___

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Antoine, you're too quick. :-) By the way, the patch is fairly large due to the renaming. So, here's quick-and-dirty summary of the important changes. PCbuild/pythoncore.vcproj: Renamed the paths and added a tag for the _io directory.

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Antoine wrote: > - in Makefile.pre.in, it seems the IO_OBJS definition might need updating I updated the patch to also fix IO_OBJS. Also, I added stringio.c to IO_OBJS. > Please note, when committing, it would be good to use "svn mv"

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file13602/move-iomodule-in-subdir.diff ___ Python tracker <http://bugs.python.org/issue5

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file13604/move-iomodule-in-subdir-2.diff ___ Python tracker <http://bugs.python.org/issue5

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Have you tested PCbuild changes? As, this is the part I am the most unsure about. -- ___ Python tracker <http://bugs.python.org/issue5

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Thanks! Here is the updated patch. -- Added file: http://bugs.python.org/file13607/move-iomodule-in-subdir-4.diff ___ Python tracker <http://bugs.python.org/issue5

[issue5682] Move io-in-c modules into a subdirectory of Modules/

2009-04-04 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r71185. Thanks Antoine for the review! -- resolution: -> accepted status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue5596] memory leaks in 3.1

2009-04-04 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I have the following tests leaking on my Linux build of py3k: test_structmembers leaked [102, 102, 102] references, sum=306 test_structmembers leaked [102, 102, 102] references, sum=306 test_structmembers leaked [102, 102, 102, 102] references, sum=408

[issue5596] memory leaks in 3.1

2009-04-04 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Dismiss my last comment. These are the tests actually leaking for my build: test_docxmlrpc leaked [85, -6, 0, 39] references, sum=118 test_httpservers leaked [-195, 195, 0, 64] references, sum=64 test_os leaked [23, -23, 0, 23] references, sum=23

[issue3873] Unpickling is really slow

2009-04-08 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Victor, Unpickler shouldn't raise an error if the given file object does support seek(); it should gracefully fall back to using only read() and readline(). Also, I think you could get a greater performance improvement by using peek() and avo

[issue4753] Faster opcode dispatch on gcc

2009-04-11 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- nosy: -alexandre.vassalotti ___ Python tracker <http://bugs.python.org/issue4753> ___ ___ Python-bugs-list mailing list Unsub

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

2009-04-22 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: > I wouldn't mind a protocol 3 that does <128 ascii only. If only because > debugging base64'd zlib'd protocol-2 data is not particularly convenient. Is there any reason that prevent you to debug your pickle using pick

[issue5265] StringIO can duplicate newlines in universal newlines mode

2009-05-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The bug shouldn't affect 2.6 and 2.7 unless you backported the now obsolete _stringio module from 3.0. I tested 2.6 and 2.7 and as expected I didn't see the bug: Python 2.6.2+ (release26-maint:72576, May 11 2009, 23:16:48) [GCC 4.3.3] on l

[issue5265] StringIO can duplicate newlines in universal newlines mode

2009-05-12 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: > Should this issue go under a new ticket? Yes, it would be preferable as the issue is probably not specific to io.StringIO. Also, make sure that you include the result of this test-case: open("testnl.txt", "wb").write("foo\r

[issue6066] POP_MARK was not in pickle protocol 0

2009-05-19 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: SHORT_BINBYTES needs to be corrected as well; pickletools lists it as part of protocol 0 instead of protocol 3. I doubt backporting this patch to 2.6 will cause any trouble. So, you can go forward with this

[issue5794] pickle/cPickle of recursive tuples create pickles that cPickle can't load

2009-05-25 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Looks good to me. -- ___ Python tracker <http://bugs.python.org/issue5794> ___ ___ Python-bugs-list mailing list Unsub

[issue1761028] pickle - cannot unpickle circular deps with custom __hash__

2009-05-25 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Checked this out more throughly and I came to the conclusion this cannot be fixed without a considerable amount of work. The problem is pickle adds an Node instance stub in the next_nodes set before its attributes are ready. Since the stub doesn't

[issue6151] Make PyDescr_COMMON conform to standard C

2009-05-30 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti : PyDescrObject make use of the some undefined behavior noted in PEP 3123 for PyObject in Python 2.x. Although fixing this requires breaking backward-compatibility, this shouldn't be much a problem since PyDescrObject is only used directly by P

[issue6137] Pickle migration: Should pickle map "copy_reg" to "copyreg"?

2009-05-30 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: If I understood correctly, #3675 is about making pickle data generated by Python 3 readable by Python 2. However, this issue is about compatibility in the other direction—i.e., making Python 2 pickles readable by Python 3, which is easier. I have a patch

[issue956303] Update pickle docs to describe format of persistent IDs

2009-05-30 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The updated documentation for pickle for Python 3 describes the requirement that persistent IDs should be alphanumeric strings when protocol 0 is used. http://docs.python.org/3.0/library/pickle.html#persistence-of-external-objects Closing as fixed

[issue5373] TypeError when '\x00' in docstring

2009-06-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Patch committed in r73195. -- resolution: -> accepted status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue6137] Make pickle generated by Python 3.x compatible with 2.x and vice-versa.

2009-06-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Here is an updated patch based on Antoine's latest patch. Summary of changes: * Updated docstrings of Pickler and Unpickler in the pickle module. * Fixed pickle._Pickler to consider fix_imports only for protocol < 3 * Made module name rema

[issue3675] Python 2.6 can't read sets pickled with Python 3.0

2009-06-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Superseded by issue #6137. -- resolution: -> duplicate status: open -> closed superseder: -> Make pickle generated by Python 3.x compatible with 2.x and vice-versa. ___ Python track

[issue6137] Make pickle generated by Python 3.x compatible with 2.x and vice-versa.

2009-06-04 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Oops. Here is a new patch with _compat_pickle.py. -- Added file: http://bugs.python.org/file14186/compat_pickle7.diff ___ Python tracker <http://bugs.python.org/issue6

[issue6127] Unexpected universal newline behavior (newline duplication) in Windows

2009-06-04 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Can you check if the patch in issue #5645 fix the bug? -- nosy: +alexandre.vassalotti ___ Python tracker <http://bugs.python.org/issue6

[issue6218] Make io.BytesIO and io.StringIO picklable.

2009-06-05 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti : Here is a patch to add pickling support to io.BytesIO and io.StringIO. Although they are non-trivial, the additions were made with a fair amount of care (and love!) and thus I believe they could be included in 3.1. Furthermore, the improved test-suite

[issue1944] Documentation for PyUnicode_AsString (et al.) missing.

2009-06-08 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The patch looks alright. I don't like the documentation for PyUnicode_FromFormatV, however. Here's my attempt to document it: .. cfunction:: PyObject* PyUnicode_FromFormatV(const char *format, va_list vargs) Equivalent to the funct

[issue6241] Better type checking for the arguments of io.StringIO

2009-06-08 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti : The included patch makes type checking of the arguments of StringIO consistent between pyio and io. >>> import io >>> io.StringIO(b"hello") Traceback (most recent call last): ... ValueError: initial_value mu

[issue6242] Fix reference leak in io.StringIO

2009-06-08 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti : io.StringIO does not clear its reference to its attributes dictionary when deleted. This causes a leak when io.StringIO has attributes. >>> def leak(): ...for _ in range(100): ... f = io.StringIO() ... f.foo = 1 ... [3

[issue6218] Make io.BytesIO and io.StringIO picklable.

2009-06-08 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I split the bug fixes in the patch into two separate issues. It looks like pickling support for io.StringIO and io.BytesIO will have to wait for 3.2. -- dependencies: +Better type checking for the arguments of io.StringIO Added file: http

[issue3816] __newobj__ pickle feature is not documented

2009-06-08 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Closing as the feature is documented in the section "The __newobj__ unpickling function" of PEP 307. -- assignee: georg.brandl -> resolution: -> invalid status: open -> closed ___ Py

<    1   2   3   4   5   6   7   >