[issue3385] cPickle to pickle conversion in py3k missing methods

2008-08-14 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I ran into a few problems while trying to fix this issue. First, does someone know how to add class attributes on extension types? It sounds like I will need either some tp_dict hacking or a Pickler subclass. Second, which meth

[issue1398] Can't pickle partial functions

2008-08-15 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I agree that this a bug. However, the liberal functools.partial constructor makes it hard to pickle partial instances correctly. Ideally, we would add the __getnewargs__ special method and be done with it. But, this won't w

[issue2919] Merge profile/cProfile in 3.0

2008-08-18 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Sorry, I can't. I would love to get this done, but I am just too busy this week (and next week doesn't look any better). Furthermore, the amount of work that the profile/cProfile merge will require is quite considera

[issue3385] cPickle to pickle conversion in py3k missing methods

2008-08-18 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Yeah, the old Pickler and Unpickler classes are available by design (to allow testing both implementation). You could subclass _Pickler as a temporary fix for this issue. ___ Python tracker &

[issue3279] import of site.py fails on startup

2008-08-25 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Benjamin is right. site.py imports the io module before _bytesio and _stringio are available for import. Thus the python version of BytesIO and StringIO is always used. There is an old thread about the issue at http://mail.pyth

[issue3664] Pickler.dump from a badly initialized Pickler segfaults

2008-08-25 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Oh, that's nasty. Recalling __init__ with bad arguments breaks the internal invariants as it clears the Pickler's content before parsing the arguments. I suspect that Unpickler is vulnerable too. Adding a NULL check

[issue3664] Pickler.dump from a badly initialized Pickler segfaults

2008-08-25 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Unpickler looks safe as Unpickler_load() checks if Unpickler was properly initialized. And only Pickler_dump is vulnerable right now (new methods, if any, exposed for issue3385 will have to take into account this vulnera

[issue3279] import of site.py fails on startup

2008-09-05 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Look good to me, and python-dev accepted the patch. So, go ahead and commit it. -- assignee: -> benjamin.peterson resolution: -> accepted ___ Python tracker <[EMAIL PR

[issue3850] find_recursion_limit.py is broken

2008-09-12 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Could you use PyDict_GetItemWithError() to avoid this? -- nosy: +alexandre.vassalotti ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3657] pickle can pickle the wrong function

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

[issue3664] Pickler.dump from a badly initialized Pickler segfaults

2008-10-02 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I will try to time next weekend to fix this (and other pickle blockers). ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3664] Pickler.dump from a badly initialized Pickler segfaults

2008-10-02 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3664> ___ ___ Python-bugs-list mailin

[issue3664] Pickler.dump from a badly initialized Pickler segfaults

2008-10-02 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I will try to find time next weekend to fix this (and other pickle blockers). ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue3664] Pickler.dump from a badly initialized Pickler segfaults

2008-10-04 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Here's the fix. The added check in Pickler_dump should prevent any segfaults due to __init__() errors. I also added the check proposed by Christian as a safe-guard in case a core developer adds a new method that doesn

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

2008-10-04 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I agree with Antoine, protocols <= 2 should remain compatible with Python 2.x or be deprecated. Keeping compatibility will require a hack, in addition to the proposed patch, in Pickler.save_global to map Python 3's modul

[issue2744] Fix test_cProfile

2008-10-06 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Have you verified the numbers? They don't look right to me. The problem is the 2nd argument of cProfile's constructor has a different semantic meaning than the one for profile.py. For profile.py, it is used to set the &

[issue2744] Fix test_cProfile

2008-10-06 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Unassigning myself as I don't have the time to fix this properly. ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.

[issue2744] Fix test_cProfile

2008-10-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: -- assignee: alexandre.vassalotti -> ___ Python tracker <[EMAIL PROTECTED]> <http://bugs.py

[issue3623] _json: fix raise_errmsg(), py_encode_basestring_ascii() and linecol()

2008-10-06 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: The patch looks good to me. You may want to fix the refleak in the PyList_Append() calls (I counted 4) too: if (PyList_Append(chunks, chunk)) { goto bail; } should be:

[issue3873] Unpickling is really slow

2008-10-07 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: The solution is to add a read buffer to Unpickler (Pickler already has a write buffer, so that why it is unaffected). I believe this would mitigate much of the (quite large) Python function call overhead. cPickle has a performanc

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

2010-02-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Mark Dickinson added the comment: > (1) should the 'signed' parameter remain keyword-only in 2.7? We should keep it as a keyword-only argument. Also, issue #1745 might bring keyword-only arguments to 2.7. > (2) When specifying the byt

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

2010-02-13 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- ___ Python tracker <http://bugs.python.org/issue1745> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

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

2010-02-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Mark Dickinson added the comment: > (1) should the 'signed' parameter remain keyword-only in 2.7? We should keep it as a keyword-only argument. Also, issue #1745 might bring keyword-only arguments to 2.7. > (2) When specifying the byt

[issue8404] Set operations don't work for dictionary views

2010-04-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: It is a bug. First, the dictviews_as_number is broken; the field for classic division was removed in 3.x, so everything is shifted by one. I included a patch to fix this. Unfortunately, this isn't enough to fix the issue. There seems to be some o

[issue8404] Set operations don't work for dictionary views

2010-04-14 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- keywords: +patch Added file: http://bugs.python.org/file16927/fix_dictviews_as_number.diff ___ Python tracker <http://bugs.python.org/issue8

[issue8404] Set operations don't work for dictionary views

2010-04-17 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I found the issue. The view types didn't have Py_TPFLAGS_CHECKTYPES set, so the types were using the old-style binary operators. Here's a patch that fixes the issue. Please review. -- Added file: http://bugs.python.org

[issue8404] Set operations don't work for dictionary views

2010-04-17 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file16927/fix_dictviews_as_number.diff ___ Python tracker <http://bugs.python.org/issue8

[issue8404] Set operations don't work for dictionary views

2010-05-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r80749 and r80751 (for py3k). Thank you! -- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.o

[issue1338] pickling bytes?

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Please assign this to me. I am planning to fix this, along a few other bugs, with my new revision of the pickle protocol. -- nosy: +alexandre.vassalotti __ Tracker <[EMAIL PROTECTED]> <http://bugs.p

[issue892902] problem with pickling newstyle class instances

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Please assign this bug to me. Note that neither cPickle or pickle is able to load the stream generated by cPickle correctly: >>> g = group(None) >>> subitem(g) >>> g[0].parent is g True >>> gp = cPickle

[issue939395] cPickle.Pickler: in list mode, no way to set protocol

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Please mark this bug as Won't Fix. As Tim said, the list-based interface of cPickle is unsupported and pending removal. Please use the pickle.dumps and pickle.loads functions if you want string interface to pickle. -- nosy: +alexandre.vassa

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

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Please assign this bug to me. This certainly doesn't look easy to fix. I will look into it, but I can promise that I can fix it. -- nosy: +alexandre.vassalotti type: -> behavior versions: +Python 2.6, Py

[issue1338] pickling bytes?

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Thank you, Georg! __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1338> __ ___ Python-bugs-list mailing list Unsubs

[issue892902] problem with pickling newstyle class instances

2007-12-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- assignee: -> alexandre.vassalotti Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue892902> ___ Python-bu

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

2007-12-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- assignee: -> alexandre.vassalotti _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1761028> _ ___ Python-bu

[issue1536] pickle's documentation is severely outdated

2007-12-01 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: The current documentation for the pickle module (and related modules) is outdated and should be updated. For example, the section "Pickling and unpickling extension types" [1] is not only confusing, but outright wrong. For Python 2.6, the doc

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

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: This should be fixed along issue1536. -- assignee: -> alexandre.vassalotti dependencies: +pickle's documentation is severely outdated nosy: +alexandre.vassalotti Tracker <[EMAIL PROTEC

[issue655802] cPickle not always same as pickle

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: This should be fixed along with issue1536. I am assigning this to me, instead of Fred Drake. (Is that okay with you, Fred?) -- assignee: fdrake -> alexandre.vassalotti dependencies: +pickle's documentation is severely outda

[issue1536] pickle's documentation is severely outdated

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: [I just realized that dependencies in the tracker should go the other way around.] -- dependencies: +Update pickle docs to describe format of persistent IDs, cPickle not always same as pickle __ Tracker <[EM

[issue655802] cPickle not always same as pickle

2007-12-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- dependencies: -pickle's documentation is severely outdated Tracker <[EMAIL PROTECTED]> <http://bugs.python.o

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

2007-12-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- dependencies: -pickle's documentation is severely outdated Tracker <[EMAIL PROTECTED]> <http://bugs.python.o

[issue1283] PyBytes (buffer) .extend method needs to accept any iterable of ints

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Here a patch that adds support for any iterable (or sequence) of integers to bytearray.extend(). -- assignee: -> alexandre.vassalotti keywords: +patch nosy: +alexandre.vassalotti resolution: accepted -> Added file: http://bugs.pyth

[issue1283] PyBytes (buffer) .extend method needs to accept any iterable of ints

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Made 2 minor enhancements to the patch: + Added the proper type-cast to PyMem_Realloc call. + Changed (len >> 1) to (len >> 1) + 1, just to be sure that the buffer doesn't overflow if __length_hint__ return 0 or 1 erroneously.

[issue1283] PyBytes (buffer) .extend method needs to accept any iterable of ints

2007-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: There is a reference leak in my previous patches. So, I updated (again) the patch. There is still another possible leak if the PyMem_Realloc return NULL (i.e., the system is out of memory), but I don't think it worth fixing. Added file:

[issue1283] PyBytes (buffer) .extend method needs to accept any iterable of ints

2007-12-02 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Here yet another revision of the patch. This one makes bytearray.extend() try to determine the length of its argument a bit more aggressively -- i.e., also uses PyObject_Length(). Added file: http://bugs.python.org/file8856/byte_extend-4.patch

[issue1283] PyBytes (buffer) .extend method needs to accept any iterable of ints

2007-12-02 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Done. Is there any other issue with the patch? Added file: http://bugs.python.org/file8857/byte_extend-5.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1283> ___

[issue1294] Management of KeyboardInterrupt in cmd.py

2007-12-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: First, I would like to say thank you both for spending your time trying to do a contribution to Python. However, I believe the current behavior of cmd.py is correct. The module documentation states clearly that "End of file on input is processed a

[issue1005] Patches to rename Queue module to queue

2007-12-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Thank you, Paul, for the patches. I reviewed the patches and improved them. Here the list of changes: - Added unit test for the import fixers. - Renamed Lib/Queue.py to Lib/queue.py. - Updated Tools/webchecker/wsgui.py. - Updated the

[issue1005] Patches to rename Queue module to queue

2007-12-03 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: Added file: http://bugs.python.org/file8868/queue-rename-misc.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1005> __ ___

[issue1005] Patches to rename Queue module to queue

2007-12-03 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: Added file: http://bugs.python.org/file8867/queue-rename-lib-and-tests.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1005] Patches to rename Queue module to queue

2007-12-03 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- assignee: collinwinter -> brett.cannon nosy: -collinwinter __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1005> __ ___

[issue1005] Patches to rename Queue module to queue

2007-12-03 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- assignee: brett.cannon -> collinwinter nosy: +collinwinter Added file: http://bugs.python.org/file8866/queue-rename-documentation.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.o

[issue1214] Timeout in CGIXMLRPCRequestHandler under IIS

2007-12-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Looks good to me. I updated the patch to use .get() with a default value instead of a if-statement with .has_key(). -- nosy: +alexandre.vassalotti priority: -> normal Added file: http://bugs.python.org/file8869/check-content-length.pa

[issue1553] An errornous __length_hint__ can make list() raise a SystemError

2007-12-03 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: If an iterator with a __length_hint__ method that returns a negative integer is passed to list(), a SystemError is raised. >>> class A: ... def __iter__(self): ... return self ... def __length_hint__(self): ...

[issue1283] PyBytes (buffer) .extend method needs to accept any iterable of ints

2007-12-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Thank you Gregory for the review! Committed to r59314. -- resolution: -> accepted status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1553] An errornous __length_hint__ can make list() raise a SystemError

2007-12-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Fixed for Py3k in r59316. Should this gets backported? -- status: open -> __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.o

[issue1553] An errornous __length_hint__ can make list() raise a SystemError

2007-12-04 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- status: -> open __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1553> __ ___ Python-bugs-list mailing list Uns

[issue614555] Rewrite _reduce and _reconstructor in C

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

[issue1266570] PEP 349: allow str() to return unicode

2007-12-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The PEP has been deferred and the patch is out of date. So, is this change still wanted? -- nosy: +alexandre.vassalotti resolution: -> out of date _ Tracker <[EMAIL PROTECTED]> <http://bug

[issue1530] doctest should return error if not all tests passed

2007-12-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r59411. Thanks! -- resolution: -> accepted status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1530] doctest should return error if not all tests passed

2007-12-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Looks good to me. Here's slightly modified patch ready to be committed. -- keywords: +patch nosy: +alexandre.vassalotti priority: -> low Added file: http://bugs.python.org/file8893/doctest.patch __ Tracker

[issue1573] Improper use of the keyword-only syntax makes the parser crash

2007-12-08 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- versions: +Python 3.0 __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1573> __ ___ Python-bugs-list mailing list

[issue1573] Improper use of the keyword-only syntax makes the parser crash

2007-12-08 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: I found that the parser fails to handle correctly the (incorrect) case where the single-star (*), used for delimiting keyword-only arguments, is immediately followed by a **keywords parameter: >>> def f(*, **kw): ... pass ... python: Python/

[issue1573] Improper use of the keyword-only syntax makes the parser crash

2007-12-08 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Amaury is right. "def f(*, **kw): pass" should raise a SyntaxError. The keyword-only delimiter is useless since the **kw parameter already only accepts keywords. __ Tracker <[EMAIL PROTECTED]> <htt

[issue1596] Broken pipes should be handled better in 2.x

2007-12-11 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: I think Python 2.x should mimic, or improve on, the behavior of Py3k for handling broken pipes. That is: 1. Don't print the message "close failed: [Errno 32] Broken pipe", from filemodule.c; since this is impossible to override from Pyt

[issue1313119] urlparse "caches" parses regardless of encoding

2007-12-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Fixed in r59480. -- nosy: +alexandre.vassalotti resolution: -> fixed status: open -> closed _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.o

[issue1333] merge urllib and urlparse functionality

2007-12-13 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- resolution: accepted -> __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1333> __ ___ Python-bugs-list mailing li

[issue1621] Python should compile with -Wstrict-overflow when using gcc

2007-12-16 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I compiled Python using gcc 4.3.0 with the -Wstrict-overflow, and that's the only warning I got: Objects/doubledigits.c: In function ‘_PyFloat_Digits’: Objects/doubledigits.c:313: error: assuming signed overflow does not occur when assuming that (

[issue1751] Fast BytesIO implementation + misc changes

2008-01-06 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: Finally, here is my C implementation of BytesIO. The code is well tested and include the proper unit tests. The only remaining issues are: - The behavior of the close() method. - The failure of test_profile and test_cProfile. Currently, I have no

[issue1751] Fast BytesIO implementation + misc changes

2008-01-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: Added file: http://bugs.python.org/file9085/add-bytesio-setup.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1751> __ ___

[issue1751] Fast BytesIO implementation + misc changes

2008-01-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: Added file: http://bugs.python.org/file9086/swap-initstdio-initsite.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1751> __ __

[issue1751] Fast BytesIO implementation + misc changes

2008-01-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: Added file: http://bugs.python.org/file9087/test_memoryio.py __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1751> __ ___ Pyth

[issue1751] Fast BytesIO implementation + misc changes

2008-01-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: Added file: http://bugs.python.org/file9088/remove-old-stringio-test.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1751] Fast BytesIO implementation + misc changes

2008-01-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: Added file: http://bugs.python.org/file9089/truncate-semantic-change.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1751] Fast BytesIO implementation + misc changes

2008-01-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: Added file: http://bugs.python.org/file9090/io-misc-fixes.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1751> __ ___ Pyth

[issue1751] Fast BytesIO implementation + misc changes

2008-01-06 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- nosy: +brett.cannon __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1751> __ ___ Python-bugs-list mailing list Unsubs

[issue1751] Fast BytesIO implementation + misc changes

2008-01-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: So, here's one big patch. I have updated the behavior of close(), so that > The profile tests often fail when io.py changes because they happen to > depend on "golden output" which includes line numbers of code in io.py > that hap

[issue1751] Fast BytesIO implementation + misc changes

2008-01-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: [grrr, I eat my words] > So, here's one big patch. I have updated the behavior of close(), so that ... it matches the behavior of 2.x. > As a side-effect, this make __next__ raises a ValueError, instead of StopIteration. ... when the fil

[issue1753] TextIOWrapper.write writes utf BOM for every string

2008-01-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed fix in r59832. Thanks! P.S. Guido, what this comment, in write(), is about? # XXX What if we were just reading? __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1753] TextIOWrapper.write writes utf BOM for every string

2008-01-07 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- resolution: -> fixed __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1753> __ ___ Python-bugs-list mailing li

[issue1753] TextIOWrapper.write writes utf BOM for every string

2008-01-07 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1753> __ ___ Python-bugs-list mailing li

[issue1751] Fast BytesIO implementation + misc changes

2008-01-07 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: Removed file: http://bugs.python.org/file9096/bytesio+misc-fixes.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1751> __ __

[issue1751] Fast BytesIO implementation + misc changes

2008-01-07 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I got a patch that also fixes the profiler tests. That was easy after all. :-) Added file: http://bugs.python.org/file9099/bytesio+misc-fixes-2.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

[issue1621] Do not assume signed integer overflow behavior

2008-01-10 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Hm. I don't get any warning, related to the overflow issue, neither with -Wstrict-overflow=3, nor -Wstrict-overflow=5. Are the cPickle warnings already fixed? __ Tracker <[EMAIL PROTECTED]> <http://bugs.python

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

2008-01-11 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: FYI, StringIO and BytesIO, in Python 3K, already support the context management protocol. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/

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

2008-01-26 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: I was wandering whether the pointer returned by PyUnicode_AsString needs to be freed after usage (It turned it doesn't since the result is cached). However, I found out that there isn't any documentation on docs.python.org about the PyUnicod

[issue1950] Potential Overflow due to incorrect usage of PyUnicode_AsString.

2008-01-27 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: I have found a few instances of the following pattern in Py3k: char buf[MAX]; len = PyUnicode_GET_SIZE(str); if (len >= MAX) /* return error */ strcpy(buf, PyUnicode_AsString(str)); which could overflow if str contains non-AS

[issue1950] Potential overflows due to incorrect usage of PyUnicode_AsString.

2008-01-27 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- title: Potential Overflow due to incorrect usage of PyUnicode_AsString. -> Potential overflows due to incorrect usage of PyUnicode_AsString. __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.o

[issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__

2008-02-04 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti: -- nosy: +alexandre.vassalotti _ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1692335> _ ___ Python-bugs-list

[issue1950] Potential overflows due to incorrect usage of PyUnicode_AsString.

2008-03-09 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Thanks for the review! > Your description of the patch is a bit misleading. As far as I can > tell only the first chunk (Python/import.c changes) addresses a > potential buffer overflow. Yes, you are right. It seems

[issue2298] Patch for "string without null bytes" check in getargs.c

2008-03-17 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Yes, that sounds like a good idea. Although I haven't reviewed this patch yet, I find the naming of the `ustr` variable confusing -- e.g. is it a bytes object or a unicode object? (It seems to be bytes). Anyway, I will che

[issue2307] Decide what to do with bytes/str when transferring pickles between 2.6 and 3.0

2008-03-17 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: -- nosy: +alexandre.vassalotti __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2307> __ __

[issue1751] Fast BytesIO implementation + misc changes

2008-03-18 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Here is a patch against the latest trunk (r61578) that includes the accelerator module of io.BytesIO with its test suite. The patch also changes the behavior of the truncate method to imply a seek(). Please review! Added file

[issue2281] Enhanced cPython profiler with high-resolution timer

2008-03-21 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I don't think this should be added to 2.5. Only bugfixes are admissible to the backporting process (see PEP 6). Finally, could you post the diff of your changes as described at http://www.python.org/dev/patch

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9084/_bytesio.c __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9085/add-bytesio-setup.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9087/test_memoryio.py __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9086/swap-initstdio-initsite.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9088/remove-old-stringio-test.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9089/truncate-semantic-change.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

<    1   2   3   4   5   6   7   >