[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9090/io-misc-fixes.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1751] Fast BytesIO implementation + misc changes

2008-03-29 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Yes, that was a leak. It should be fixed now. Merci Antoine! Added file: http://bugs.python.org/file9899/bytesio+misc-fixes-4.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1751] Fast BytesIO implementation + misc changes

2008-03-30 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Oops, I forgot to include the unit tests, with "svn add", when I made the diff. Added file: http://bugs.python.org/file9904/bytesio+misc-fixes-5.patch __ Tracker <[EMAI

[issue1751] Fast BytesIO implementation + misc changes

2008-03-30 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: There is a small bug in the last patch I posted. The unit tests assumed (wrongly) that accelerator module for io.StringIO (i.e., _stringio) was present. Added file: http://bugs.python.org/file9905/bytesio+misc-fixes-6

[issue1751] Fast BytesIO implementation + misc changes

2008-03-30 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I think that check in write_bytes() is a guard to avoid resize_buffer() from truncating the string stored in the buffer. However, I am not sure if it is still necessary. I don't know why help() doesn't work on BytesI

[issue2572] 3.0 pickle docs -- what about old-style classes?

2008-04-07 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Python 3.0 shouldn't have any problem unpickling old-style classes. However, they will be unpickled as new-style classes. Therefore, there might be a few corner-cases that might cause some problems. For example, if an old-

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

2008-04-12 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I revised the patch with respect to Alexander's comments. In summary, here is what I changed from the previous patch: - Removed the unnecessary "fixes" to Objects/structseq.c and Modules/timemodule.

[issue1751] Fast BytesIO implementation + misc changes

2008-04-13 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Here's an updated patch. Added file: http://bugs.python.org/file10023/bytesio+misc-fixes-7.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.

[issue1751] Fast BytesIO implementation + misc changes

2008-04-13 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Oops, I forgot again to "svn add" the new files. Added file: http://bugs.python.org/file10024/bytesio+misc-fixes-8.patch __ Tracker <[EMAIL PROTECTED]> <http://

[issue1751] Fast BytesIO implementation + misc changes

2008-04-13 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file10023/bytesio+misc-fixes-7.patch __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1751] Fast BytesIO implementation + misc changes

2008-04-14 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Hi Guido, The patch changes a minor things to io.py to allow io.BytesIO to pass my test suite, so you may want to check it out. Other than that, I think the review is going fine. __ Tracker &

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

2008-04-26 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: So, any comment on the latest patch? If everything is all right, I would like to commit the patch to py3k. __ Tracker <[EMAIL PROTECTED]> <http://bugs.pytho

[issue1338] pickling bytes?

2008-04-26 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Guido fixed this issue in r61467. Closing. -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs

[issue558238] Pickling bound methods

2008-04-26 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Personally, I don't see how adding this feature would create a security hole (or more properly said, grow the giant hole that are the GLOBAL and REDUCE opcodes). I don't see either why this should be included in the

[issue558238] Pickling bound methods

2008-04-26 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti <[EMAIL PROTECTED]>: -- status: open -> pending Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue558238> ___

[issue1637926] Empty class 'Object'

2008-04-26 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: This has almost no-chance to get included in the standard library. Also, Python 2.6 will include ``namedtuple`` (see http://docs.python.org/dev/library/collections.html#collections.namedtuple), which provides similar functi

[issue2480] pickling of large recursive structures fails

2008-04-26 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Bob Kline wrote: > I just ran into this behavior with an attempt to pickle a dom tree > for an XML document whose nesting level never got deeper than nine > child nodes, and indeed it crashed the interpreter. Pickling

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

2008-05-03 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Alexander Belopolsky wrote: > The patch looks good. Just a question: I thought the strings returned > by PyUnicode_AsStringAndSize are 0-terminated, while your patch at > several places attempts to explicitly 0-terminate

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

2008-05-03 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Marc-Andre Lemburg wrote: [SNIP] > The above cast needs to be (Py_ssize_t). size_t is an unsigned length type. Actually, the cast is right (even though it is not strictly necessary). It just the patch that is confusing. He

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

2008-05-03 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Committed to r62667. Thank you all for your comments! -- resolution: -> fixed status: open -> closed __ Tracker <[EMAIL PROTECTED]> <http://bugs

[issue2523] binary buffered reading is quadratic

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

[issue1751] Fast BytesIO implementation + misc changes

2008-05-06 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Patch committed in r62778. Antoine wrote: > Also, I stand by the suggestion I made about the resizing logic, but it > shouldn't be a showstopper either. We can improve that later. I made your suggested change to t

[issue2523] binary buffered reading is quadratic

2008-05-07 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I see that the code is still using the immutable bytes object for its buffer (which forces Python to create a new buffer every time its modified). Also, I think it worthwhile to check if using a pre-allocated bytearray objec

[issue2788] ignore file for Mercurial

2008-05-07 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I have a slightly different .hgignore for my personal mercurial branch. Although, I don't really like the idea of polluting the main subversion repository with the ignore files of other VCS. -- nosy: +alexandre.vassa

[issue2807] Remove the API PyUnicode_AsString()

2008-05-09 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti <[EMAIL PROTECTED]>: Marc-Andre Lemburg noted: BTW: The API PyUnicode_AsString() is pretty useless by itself - there's no way to access the size information of the returned string without again going to the Unicode object. I&#

[issue2807] Remove the API PyUnicode_AsString()

2008-05-09 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Honestly, I am not sure if removing PyUnicode_AsString() is a good idea. There is many cases where the size of the returned string is not needed. Furthermore, this would be a rather major backward-incompatible change to be include

[issue2807] Remove the API PyUnicode_AsString()

2008-05-09 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Oops, it seems Marc-André has already opened an issue about this. Closing as duplicate. -- resolution: -> duplicate status: open -> closed superseder: -> Remove PyUnicode_AsString(), rework PyUnicode_AsStrin

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

2008-05-09 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Honestly, I am not sure if removing PyUnicode_AsString() is a good idea. There is many cases where the size of the returned string is not needed. Furthermore, this would be a rather major backward-incompatible change to be include

[issue2295] cPickle corner case - docs or bug?

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

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

2008-10-16 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Oops. I must have been quite tired when I submitted that. Here's the patch for the fix and the test case. -- keywords: +patch Added file: http://bugs.python.org/file11814/issue36

[issue3816] __newobj__ pickle feature is not documented

2008-10-29 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Could explain me how this feature could be used, other than for providing the efficient and backward-compatible pickling mechanism for new-style classes? -- nosy: +alexandre.vass

[issue3816] __newobj__ pickle feature is not documented

2008-10-29 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: > Without the __reduce__ method the information in __dict__ and > the class would be lost. Are you sure about that? Python 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2 >

[issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator

2008-10-30 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Thank you, Amaury, for fixing this. However, you forgot to also patch the Python implementation of pickle, which makes the following test fail: =

[issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator

2008-10-31 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Iterators only need to provide a __next__() method. So, you don't have to check __iter__. Other than that, the patch looks good. ___ Python tracker <[EMAIL PROTECTED]> <ht

[issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator

2008-10-31 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Hirokazu Yamamoto wrote > Hmm, but python document says, > (http://docs.python.org/library/stdtypes.html#typeiter) > > >The iterator objects themselves are required to support the > >following two metho

[issue4176] segfault with pickle if 4th or 5th item of tuple returned by __reduce__ is not an iterator

2008-10-31 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: Amaury Forgeot d'Arc wrote: > Regarding the consistency between python and C, I don't think it is > necessary to be so strict. If the python version can allow a weaker > version of the "iterator"

[issue4374] Pickle tests fail w/o _pickle extension

2008-11-21 Thread Alexandre Vassalotti
Alexandre Vassalotti <[EMAIL PROTECTED]> added the comment: I think the best way to fix this is to add sanity checks similar to the ones in _pickle. The checks are obviously useless in pickle.py, but I think it is simpler than to try to skip tests, and it gives a nicer error message to

[issue4664] fix_imports does not refactor "import urlparse, cStringIO" correctly

2008-12-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Sorry, I still cannot reproduce it. Could you attach your test file? Maybe it is some weird encoding bug. a...@helios:~$ 2to3 -f imports test.py --- test.py (original) +++ test.py (refactored) @@ -1,2 +1,2 @@ -import urlparse, cStringIO -import cStringIO

[issue4664] fix_imports does not refactor "import urlparse, cStringIO" correctly

2008-12-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Benjamin, your example fails for a different reason--i.e. the fixer for HTMLParser is missing. Sorry Lennart, I still cannot reproduce it. ___ Python tracker <http://bugs.python.org/issue4

[issue4664] Regression fix_imports does not refactor multiple imports correctly

2008-12-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I got it. It is a regression from a previous version of 2to3's fix_imports. I was able to reproduce your problem using the sandbox's 2to3. And to answer your question, I still running an older RC release of Python 3.0. That explains why

[issue4730] cPickle corrupts high-unicode strings

2008-12-27 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Fixed in r67934. Backported to 2.6 in r67936. Thanks! -- nosy: +alexandre.vassalotti resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/

[issue4374] Pickle tests fail w/o _pickle extension

2008-12-27 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Committed in r67940. ___ Python tracker <http://bugs.python.org/issue4374> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4374] Pickle tests fail w/o _pickle extension

2008-12-27 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue4374> ___ ___ Python-bugs-

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: You may want to check out issue1408710 in which a similar patch was provided, but failed to deliver the desired results. I didn't get the advertised ~15% speed-up, but only 4% on my Intel Core2 laptop and 8% on my AMD Athlon64 X2 desktop. I attache

[issue4753] Faster opcode dispatch on gcc

2008-12-31 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file12513/intel-core2-mobile-pybench.txt ___ Python tracker <http://bugs.python.org/issue4

[issue4753] Faster opcode dispatch on gcc

2009-01-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Antoine Pitrou wrote: > [...] count the number of indirect jump instructions in ceval.c: > > grep -E "jmp[[:space:]]\*%" ceval.s > > There should be 85 to 90 of them, roughly. If there are many less, then > the compiler h

[issue4753] Faster opcode dispatch on gcc

2009-01-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file12522/amd-athlon64-x2-gcc-sunos-pybench.txt ___ Python tracker <http://bugs.python.org/issue4

[issue4753] Faster opcode dispatch on gcc

2009-01-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: > Attached new patch for fixes suggested by Alexandre (rename > opcode_targets.c to opcode_targets.h, replace USE_THREADED_CODE with > USE_COMPUTED_GOTOS). You forgot to update your script to use the

[issue4753] Faster opcode dispatch on gcc

2009-01-02 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The patch make a huge difference on 64-bit Linux. I get a 20% speed-up and the lowest run time so far. That is quite impressive! At first glance, it seems the extra registers of the x86-64 architecture permit GCC to avoid spilling registers onto the

[issue4753] Faster opcode dispatch on gcc

2009-01-02 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: One more thing, the patch causes the following warnings to be emited by GCC when USE_COMPUTED_GOTOS is undefined. Python/ceval.c: In function ‘PyEval_EvalFrameEx’: Python/ceval.c:2420: warning: label ‘_make_function’ defined but not used Python/ceval.c

[issue4753] Faster opcode dispatch on gcc

2009-01-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Paolo wrote: > So, can you try dropping the switch altogether, using always computed > goto and seeing how does the resulting code get compiled? Removing the switch won't be possible unless we change the semantic EXTENDED_ARG. In addition,

[issue4753] Faster opcode dispatch on gcc

2009-01-04 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: > Removing the switch won't be possible unless we change the semantic > EXTENDED_ARG. In addition, I doubt the improvement, if any, would worth > the increased complexity. Nevermind what I have said. I managed to remove switch pretty ea

[issue4753] Faster opcode dispatch on gcc

2009-01-04 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: > I managed to remove switch pretty easily by moving opcode fetching > in the FAST_DISPATCH macro and abstracting the control flow of the > switch. Here is the diff against threadceval5.patch. Added file: http://bugs.python.org/file12584

[issue5077] 2to3 fixers for the removal of operator functions

2009-01-26 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti : This is a 2to3 fixer for the removal of obsolete functions in r68962. -- components: 2to3 (2.x to 3.0 conversion tool) files: fix_operator.py messages: 80624 nosy: alexandre.vassalotti severity: normal stage: patch review status: open title

[issue5077] 2to3 fixers for the removal of operator functions

2009-01-26 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file12875/fix_operator.py ___ Python tracker <http://bugs.python.org/issue5077> ___ ___ Python-bug

[issue5077] 2to3 fixers for the removal of operator functions

2009-01-26 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file12874/fix_operator.py ___ Python tracker <http://bugs.python.org/issue5077> ___ ___ Python-bug

[issue5077] 2to3 fixer for the removal of operator functions

2009-01-26 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- title: 2to3 fixers for the removal of operator functions -> 2to3 fixer for the removal of operator functions ___ Python tracker <http://bugs.python.org/iss

[issue5084] unpickling does not intern attribute names

2009-01-27 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The patch for cPickle doesn't do the same thing as the pickle one. In the cPickle one, you are only interning slot attributes, which, I believe, is not what you intended. :-) -- assignee: -> alexandre.vassalotti nosy: +alexandre.va

[issue5084] unpickling does not intern attribute names

2009-01-27 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Oh, you are right. I was looking at py3k's version of pickle, which uses PyDict_Update instead of a while loop; that is why I got confused. ___ Python tracker <http://bugs.python.org/i

[issue38876] pickle is raising KeyError insteat of pickle.UnpicklingError under certain conditions

2019-11-24 Thread Alexandre Vassalotti
Change by Alexandre Vassalotti : -- assignee: -> alexandre.vassalotti resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.7, Python 3.8 ___ Python tracker <https://bugs.python

[issue27635] pickle documentation says that unpickling may not call __new__

2020-10-11 Thread Alexandre Vassalotti
Change by Alexandre Vassalotti : -- stage: patch review -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue27635> ___ ___

[issue13842] Cannot pickle Ellipsis or NotImplemented

2012-01-23 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: We will need to bump the protocol number to add support for None, Ellipsis, and NotImplemented. Antoine, can you add this to PEP 3154? -- ___ Python tracker <http://bugs.python.org/issue13

[issue34973] Crash in bytes constructor with mutating list

2018-10-18 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: PR 9841 looks good to me. I wouldn't worry about the performance hit. -- ___ Python tracker <https://bugs.python.org/is

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-06-03 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Stefan, could you address my review comments soon? The improved support for globals is the only big piece missing from the implementation of PEP, which I would like to get done and submitted by the end of the month

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-08-18 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I am still working on it. I am implemented support for nested globals last week (http://hg.python.org/features/pep-3154-alexandre/rev/c8991b32a47e). At this point, the only big piece remaining is the support for method descriptors. There are other minor

[issue15513] Correct __sizeof__ support for pickle

2012-07-31 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I reviewed the patch here http://bugs.python.org/review/15513/#ps5596 -- ___ Python tracker <http://bugs.python.org/issue15

[issue15596] pickle: Faster serialization of Unicode strings

2012-08-09 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Amazing! Though, it would probably be good idea to benchmarks non-ASCII strings as well. -- ___ Python tracker <http://bugs.python.org/issue15

[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2012-08-13 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: Stefan Mihaila has been working on the implementation of PEP 3154, plus some other enhancements. His work is pretty complete and ready to be reviewed. I will do my best to finish a thorough review of his changes by the end of next week

[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2012-08-13 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file26794/pickle4.diff ___ Python tracker <http://bugs.python.org/issue15642> ___ ___ Python-bug

[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2012-08-13 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26794/pickle4.diff ___ Python tracker <http://bugs.python.org/issue15642> ___ ___ Python-bug

[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2012-08-13 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file26795/pickle4.diff ___ Python tracker <http://bugs.python.org/issue15642> ___ ___ Python-bug

[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2012-08-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I get warnings when compiling with the patch: /home/avassalotti/pickle4/Modules/_pickle.c: In function ‘save_global_binary’: /home/avassalotti/pickle4/Modules/_pickle.c:2952: warning: pointer targets in passing argument 2 of ‘_Pickler_Write’ differ in

[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2012-08-13 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: There are reference leaks in the _pickle.c part that will need to be fixed too. 22:36:29 [~/pickle4]$ ./python -m test.regrtest -R :: test_pickle [1/1] test_pickle beginning 9 repetitions 123456789 . test_pickle leaked [14780, 14780, 14780

[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2012-08-17 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file26881/pickle4-2.diff ___ Python tracker <http://bugs.python.org/issue15642> ___ ___ Python-bug

[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2012-08-17 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- dependencies: +Unbinding of methods ___ Python tracker <http://bugs.python.org/issue15642> ___ ___ Python-bugs-list mailin

[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2012-08-17 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26881/pickle4-2.diff ___ Python tracker <http://bugs.python.org/issue15642> ___ ___ Python-bug

[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2012-08-17 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Oops, wrong patch. Uploading the right one. -- Added file: http://bugs.python.org/file26882/pickle4-2.diff ___ Python tracker <http://bugs.python.org/issue15

[issue15642] Integrate pickle protocol version 4 GSoC work by Stefan Mihaila

2012-08-21 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Some quick thoughts about the new implicit memoization scheme in Stefan's implementation. - The new scheme will need to be documented in PEP 3154 before we can accept the change. - I don't really like the idea of changing the semantics of t

[issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned

2012-11-06 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: pickle.py is the buggy one here. Its use of the marshal module is really a hack. Plus, it is slower than both struct and int.from_bytes. 14:40:57 [~/cpython]$ ./python -m timeit "int.from_bytes(b'\xff\xff\xff\xff', 'big')&

[issue2919] Merge profile/cProfile in 3.n+1

2013-10-14 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Let's close this. There is no point keeping this languishing any further. The profile and cProfile modules are different enough that we can't merge them without breaking compatibility. They should treated as two separate profilers. Maybe in

[issue19301] Globals declared in function scope have wrong __qualname__

2013-10-19 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: The value of __qualname__ for globals declared in function scope doesn't seems right to me: >>> def f(): ...global C ...class C: pass ...return C.__qualname__ ... >>> f() 'f..C' It would be much more usef

[issue19301] Globals declared in function scope have wrong __qualname__

2013-10-19 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Supporting nonlocal variables would be nice. However, unless it is easy to implement, I don't think it is worth the effort since these variables can't be accessed outside the enclosing functi

[issue19301] Globals declared in function scope have wrong __qualname__

2013-10-20 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: It seems that we are missing support for nested globals: >>> def f(): ... global C ... class C: ... class D: ... pass ... >>> f() >>> C.D.__qualname__ 'f..C.D

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-11-15 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file32639/f87b455af573.diff ___ Python tracker <http://bugs.python.org/issue17810> ___ ___ Python-bug

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-11-15 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Added file: http://bugs.python.org/file32640/8434af450da0.diff ___ Python tracker <http://bugs.python.org/issue17810> ___ ___ Python-bug

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-11-15 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file32639/f87b455af573.diff ___ Python tracker <http://bugs.python.org/issue17810> ___ ___ Pytho

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-11-15 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Hi folks, I consider my implementation of PEP-3154 mostly feature complete at this point. I still have a few things left to do. For example, I need to update the documentation about the new protocol. However, these can mostly be done along the review

[issue17893] Refactor reduce protocol implementation

2013-11-17 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Merged with issue #17810 -- resolution: -> duplicate status: open -> closed superseder: -> Implement PEP 3154 (pickle protocol 4) ___ Python tracker <http://bugs.python.or

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-11-18 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I have been looking again at Stefan's previous proposal of making memoization implicit in the new pickle protocol. While I liked the smaller pickles it produced, I didn't the invasiveness of the implementation, which requires a change for al

[issue15397] Unbinding of methods

2013-11-23 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- resolution: -> duplicate status: open -> closed superseder: -> Implement PEP 3154 (pickle protocol 4) ___ Python tracker <http://bugs.python.or

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-11-23 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I've finalized the framing implementation in de9bda43d552. There will be more improvements to come until 3.4 final. However, feature-wise we are done. Thank you everyone for the help! -- status: open ->

[issue17787] Optimize pickling function dispatch in hot loops.

2013-11-24 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: The patch is too complicated for too little. -- resolution: -> rejected stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue17747] Deprecate pickle fast mode

2013-11-24 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- resolution: -> wont fix stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue17810] Implement PEP 3154 (pickle protocol 4)

2013-11-25 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Optimizing the output of the pickler class should be fine during the feature freeze as long the semantics of the current opcodes stay unchanged. -- ___ Python tracker <http://bugs.python.org/issue17

[issue19739] Legit compiler warnings in new pickle code on 32-bit Windows

2013-11-25 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Thanks Zachary for the notice! Look like my change fixed the warnings on the Windows x86 build. http://buildbot.python.org/all/builders/x86%20Windows%20Server%202008%20%5BSB%5D%203.x/builds/1801 -- resolution: -> fixed status: open ->

[issue19780] Pickle 4 frame headers optimization

2013-11-26 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Serhiy, I am not able to reproduce your results. I don't get any significant performance improvements with your patch. 22:34:03 [ ~/PythonDev/cpython-baseline ]$ ./python.exe -m timeit "import pickle" "with open('test.pickle4&

[issue9276] pickle should support methods

2013-11-29 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: As part of the implementation of PEP 3154 (Pickle protocol 4), I've introduced support for pickling methods for all pickle protocols (and not just for the new protocol 4). This was implemented by adding the appropriate __reduce__ method on bui

[issue19780] Pickle 4 frame headers optimization

2013-11-29 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: > Test data are too small, they all less than frame size. Ah, good point! It seems your patch helps when the reads are *very* slow and buffering is disabled. ### unpickle_file ### Min: 1.125320 -> 0.663367: 1.70x faster Avg: 1.237206 -> 0.7013

[issue3693] Obscure array.array error message

2013-11-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- assignee: -> alexandre.vassalotti resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.pytho

[issue13520] Patch to make pickle aware of __qualname__

2013-11-29 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- assignee: -> alexandre.vassalotti resolution: -> duplicate stage: patch review -> committed/rejected status: open -> closed superseder: -> Implement PEP 3154 (pickle protocol 4) versions: +Python

<    1   2   3   4   5   6   7   >