[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

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2013-08-20 Thread Alexandre Dias
New submission from Alexandre Dias: Me and a couple of colleagues have stumbled upon the need to sometimes sort our profiling stats by time (cumulative and total) per call. I believe this could be useful to other people, and have therefore opened this patch. Thanks for taking the time to look

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2013-08-21 Thread Alexandre Dias
Alexandre Dias added the comment: It does support sorting by total time and cumulative time spent on a function, but not by the time per each call of that function. I've uploaded a diff of the patch. -Alexandre -- versions: +Python 3.4 -Python 2.7 Added file: http://bugs.pytho

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2013-08-21 Thread Alexandre Dias
Alexandre Dias added the comment: Average time would indeed be a better description. As for its usefulness: let's say that for example you would want to find the function in which your code spends the most time on average, in order to later optimise said function. If one of the cal

[issue4851] xml.dom.minidom.Element.cloneNode fails with AttributeError

2012-05-20 Thread Alexandre Zani
Alexandre Zani added the comment: This patch allows the cloning of elements that do not have a document owner. If a node does not have a document owner, a new document owner is created for the clone. -- keywords: +patch Added file: http://bugs.python.org/file25651

[issue1105770] null source chars handled oddly by tokenize

2012-05-20 Thread Alexandre Zani
Changes by Alexandre Zani : -- nosy: +Alexandre.Zani ___ Python tracker <http://bugs.python.org/issue1105770> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4849] instantiating and populating xml.dom.minidom.Element is cumbersome

2012-05-20 Thread Alexandre Zani
Changes by Alexandre Zani : -- nosy: +Alexandre.Zani ___ Python tracker <http://bugs.python.org/issue4849> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue4849] instantiating and populating xml.dom.minidom.Element is cumbersome

2012-06-01 Thread Alexandre Zani
Alexandre Zani added the comment: I would tend to disagree with the use of **kwargs. It means the argument list would be implicit, not documented by the code and not checked at runtime. We could end up with anything in there. I'll try to propose a patch tonight that implements Jean-P

[issue4849] instantiating and populating xml.dom.minidom.Element is cumbersome

2012-06-01 Thread Alexandre Zani
Alexandre Zani added the comment: Here is my patch for it. -- keywords: +patch Added file: http://bugs.python.org/file25796/easier_element_init.patch ___ Python tracker <http://bugs.python.org/issue4

[issue14908] datetime.datetime should have a timestamp() method

2012-06-04 Thread Alexandre Zani
Alexandre Zani added the comment: I think the easiest and most intuitive approach is to simply define timestamp() as being the reverse of fromtimestamp(). Don't worry about leap seconds and all that stuff. If non-1970 epochs are a concern, this could be renamed to posix_timestamp or

[issue14908] datetime.datetime should have a timestamp() method

2012-06-04 Thread Alexandre Zani
Alexandre Zani added the comment: I'm still reading through the issue you mentioned. (It's a painful read I have to admit) One major obstacle seems to be that during the DST switch over, an hour gets repeated and so the datetime object is ambiguous. (are you on the first or secon

[issue15008] PEP 362 reference implementation for 3.3

2012-06-05 Thread Alexandre Zani
Changes by Alexandre Zani : -- nosy: +Alexandre.Zani ___ Python tracker <http://bugs.python.org/issue15008> ___ ___ Python-bugs-list mailing list Unsubscribe:

[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

[issue20950] asyncio.docs : asyncio.subprocess.Process.wait() method typo

2014-03-16 Thread Alexandre JABORSKA
New submission from Alexandre JABORSKA: The asyncio.subprocess.Process.wait() documentation mention "self" parameter (typo ?) and don't tell it's a coroutine. -- assignee: docs@python components: Documentation messages: 213753 nosy: ajaborsk, docs@python prior

[issue21005] asyncio.docs : asyncio.subprocess.DEVNULL doc inadequate

2014-03-21 Thread Alexandre JABORSKA
New submission from Alexandre JABORSKA: asyncio.subprocess.DEVNULL documentation is the same as asyncio.subprocess.STDOUT one and (I guess) inadequate (cut & paste error ?). -- assignee: docs@python components: Documentation messages: 214338 nosy: ajaborsk, docs@python priority: no

[issue21006] asyncio.docs : create_subprocess_exec example does not work on windows

2014-03-21 Thread Alexandre JABORSKA
New submission from Alexandre JABORSKA: The documentation example (getstatusoutput) does not work on windows because it use the default loop (based on select). The whole asyncio.ProactorEventLoop stuff is not really explained anywhere. Maybe a "How to use asyncio on Windows" could

[issue21006] asyncio.docs : create_subprocess_exec example does not work on windows

2014-03-21 Thread Alexandre JABORSKA
Alexandre JABORSKA added the comment: I saw the "low level" part with the warning. But what I mean is that I found no clear indication on how to change default loop to allow asyncio.subprocess usage with Windows Python. I guessed : asyncio.set_event_loop(ProactorEventLoop()) but I&

[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

[issue9269] Cannot pickle self-referencing sets

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) ___ Python

[issue19726] BaseProtocol is not an ABC

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- Removed message: http://bugs.python.org/msg204785 ___ Python tracker <http://bugs.python.org/issue19726> ___ ___ Python-bug

[issue19088] TypeError with pickle in embedded python3.3 when starting multiple Interpreters.

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- assignee: -> alexandre.vassalotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python

[issue19834] Unpickling exceptions pickled by Python 2

2013-11-30 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I have reviewed the patch in the review tool. Please take a look! -- ___ Python tracker <http://bugs.python.org/issue19

[issue6673] Uncaught comprehension SyntaxError eats up all memory

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- assignee: -> docs@python components: +Documentation -Interpreter Core keywords: -64bit nosy: +docs@python stage: -> needs patch type: resource usage -> enhancement versions: +Python 3.4, Python 3.5 -Python 3.2, P

[issue15513] Correct __sizeof__ support for pickle

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26617/pickle_sizeof-2.7.patch ___ Python tracker <http://bugs.python.org/issue15513> ___ ___

[issue15513] Correct __sizeof__ support for pickle

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26616/pickle_sizeof-3.2.patch ___ Python tracker <http://bugs.python.org/issue15513> ___ ___

[issue15490] Correct __sizeof__ support for StringIO

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26588/stringio_sizeof-2.7.patch ___ Python tracker <http://bugs.python.org/issue15490> ___ ___

[issue15490] Correct __sizeof__ support for StringIO

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26587/stringio_sizeof-3.2.patch ___ Python tracker <http://bugs.python.org/issue15490> ___ ___

[issue15490] Correct __sizeof__ support for StringIO

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26810/stringio_sizeof-3.3_2.patch ___ Python tracker <http://bugs.python.org/issue15

[issue15490] Correct __sizeof__ support for StringIO

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26586/stringio_sizeof-3.3.patch ___ Python tracker <http://bugs.python.org/issue15490> ___ ___

[issue15490] Correct __sizeof__ support for StringIO

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26811/stringio_sizeof-3.2_2.patch ___ Python tracker <http://bugs.python.org/issue15

[issue15490] Correct __sizeof__ support for StringIO

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file26812/stringio_sizeof-2.7_2.patch ___ Python tracker <http://bugs.python.org/issue15

[issue15490] Correct __sizeof__ support for StringIO

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : Removed file: http://bugs.python.org/file27241/stringio_sizeof-3.2_3.patch ___ Python tracker <http://bugs.python.org/issue15

[issue17897] Optimize unpickle prefetching

2013-11-30 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Looks good to me! Feel free to commit. -- ___ Python tracker <http://bugs.python.org/issue17897> ___ ___ Python-bugs-list m

[issue16231] pickle persistent_id return value

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

[issue5885] uuid.uuid1() is too slow

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- priority: low -> normal stage: needs patch -> patch review versions: +Python 3.5 -Python 2.7, Python 3.2 ___ Python tracker <http://bugs.python.org/

[issue2281] Enhanced cPython profiler with high-resolution timer

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- priority: normal -> low versions: +Python 3.5 -Python 3.2 ___ Python tracker <http://bugs.python.org/issue2281> ___ ___ Py

[issue2281] Enhanced cPython profiler with high-resolution timer

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- priority: normal -> low versions: +Python 3.5 -Python 3.2 ___ Python tracker <http://bugs.python.org/issue2281> ___ ___ Py

[issue2281] Enhanced cPython profiler with high-resolution timer

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- priority: normal -> low versions: +Python 3.5 -Python 3.2 ___ Python tracker <http://bugs.python.org/issue2281> ___ ___ Py

[issue2799] Remove _PyUnicode_AsString(), rework _PyUnicode_AsStringAndSize(), add PyUnicode_AsChar()

2013-11-30 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: With PEP 393 implemented, there doesn't seem to anything left to be done here. Closing as fixed. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___

[issue6477] Pickling of NoneType raises PicklingError

2013-11-30 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- assignee: docs@python -> alexandre.vassalotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.pytho

[issue6477] Pickling of NoneType raises PicklingError

2013-11-30 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Would you be okay with removing the static declaration of PyNotImplemented_Type and PyNone_Type if we prefix their name with an underscore? There isn't any other way to fix this without making the types linkable. I might revert the 2.7 change anyw

[issue6477] Pickling of NoneType raises PicklingError

2013-11-30 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Antoine, are you okay with applying this fix to 2.7? Or should we just mark this as a won't fix? -- keywords: +patch priority: low -> normal resolution: fixed -> stage: committed/rejected -> patch review versions: -Python 3

[issue6477] Pickling of NoneType raises PicklingError

2013-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I thought it over. I don't think the fix is appropriate for 2.x, as it seems closer to being an extra feature than a bug fix. Thanks Antoine for calling me out on this one. -- resolution: -> wont fix stage: patch review -> committ

[issue3657] pickle can pickle the wrong function

2013-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: This was fixed in 3.4 with the introduction of method pickling. I don't think it would be appropriate to backport this to 2.7. Thus, I am closing this as a won't fix for 2.x. -- assignee: -> alexandre.vassalotti resolution: ->

[issue5885] uuid.uuid1() is too slow

2013-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I agree that there is a maintenance cost associated with C extension modules. However, I would certainly be glad if it allowed us to eliminate uses of ctypes in this module because ctypes is quite unsafe and doesn't work well across platforms (thou

[issue11480] Cannot copy a class with a metaclass other than type

2013-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Thank you for the patch! -- assignee: -> alexandre.vassalotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 3.4 -Python 3.1, Python 3.2 __

[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2013-12-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- assignee: -> alexandre.vassalotti priority: normal -> high stage: -> needs patch type: -> behavior versions: +Python 3.4 ___ Python tracker <http://bugs.python

[issue11299] Allow deepcopying paused generators

2013-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Allowing generators to be deepcopied via their code object should be fine. -- stage: test needed -> needs patch title: Allow deepcopying and pickling paused generators -> Allow deepcopying paused generators versions: +Python 3.5 -Pyth

[issue3208] function annotation for builtin and C function

2013-12-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- nosy: -alexandre.vassalotti stage: -> needs patch versions: +Python 3.5 -Python 3.0 ___ Python tracker <http://bugs.python.org/iss

[issue2295] cPickle corner case - docs or bug?

2013-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: We can't fix this without a working test case. Feel free to re-open if you find one. -- assignee: docs@python -> alexandre.vassalotti components: -Documentation resolution: -> works for me status: open -> closed versions: +Pyth

[issue11349] _pickle should implement the module finalisation protocol

2013-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I have implemented PEP 3121 module finalization for _pickle in 64c6d52793be. -- assignee: -> alexandre.vassalotti nosy: +alexandre.vassalotti resolution: -> fixed stage: needs patch -> committed/rejected status: open

[issue15667] PEP 3121, 384 refactoring applied to pickle module

2013-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: I have implemented PEP 3121 module finalization for _pickle in 64c6d52793be. I don't see the use case for implementing PEP 384 stable ABI, since _pickle is only distributed with Python. -- assignee: -> alexandre.vassalo

[issue4727] copyreg doesn't support keyword only arguments in __new__

2013-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: PEP 3154 implemented support for pickling classes taking keyword-only arguments. The copy module should be updated to use __getnewargs_ex__ when available through object.__reduce__(4). -- nosy: +alexandre.vassalotti superseder: -> Implement

[issue4727] copyreg doesn't support keyword only arguments in __new__

2013-12-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- superseder: Implement PEP 3154 (pickle protocol 4) -> ___ Python tracker <http://bugs.python.org/issue4727> ___ ___ Py

[issue10717] Multiprocessing module Pickling unPickling issues

2013-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Without a reproducible test case, I am afraid there is nothing we can do here. -- assignee: -> alexandre.vassalotti components: +Library (Lib) -None nosy: +alexandre.vassalotti resolution: -> works for me stage: -> test needed sta

[issue10717] Multiprocessing module Pickling unPickling issues

2013-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Look like I isolated the problem. It seems multiprocessing is using cPickle which cannot be extended with ForkingPickler, unlike the Python version of the pickle module. 15:09:29 [ ~/pythondev/python2.7 ]$ ./python.exe issue10717.py Traceback (most

[issue10717] Multiprocessing module cannot call instance methods across processes

2013-12-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- title: Multiprocessing module Pickling unPickling issues -> Multiprocessing module cannot call instance methods across processes ___ Python tracker <http://bugs.python.org/issu

[issue19754] pickletools.optimize doesn't reframe correctly

2013-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Now, pickletools.optimize doesn't do anything on protocol 4. :) -- assignee: -> alexandre.vassalotti resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Pyth

[issue19780] Pickle 4 frame headers optimization

2013-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Yeah, let's close this. It is much simpler to just double the frame size target if the extra reads ever become a performance issue. -- status: pending -> closed ___ Python tracker <http://bugs

[issue19858] Make pickletools.optimize aware of the MEMOIZE opcode.

2013-12-01 Thread Alexandre Vassalotti
New submission from Alexandre Vassalotti: PEP 3154 introduced the MEMOIZE opcode which lowered the overhead of memoization compared to the PUT opcodes which were previously used. We should update pickletools.optimize to remove superfluous uses of this new opcode. -- components

[issue19834] Unpickling exceptions pickled by Python 2

2013-12-01 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Feel free to commit once you have addressed the remaining comments. -- assignee: -> doerwalter ___ Python tracker <http://bugs.python.org/issu

[issue18073] pickle.Unpickler may read too many bytes, causing hangs with blocking input stream

2013-12-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- assignee: -> alexandre.vassalotti resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python

[issue19835] Add a MemoryError singleton to fix an unlimited loop when the memory is exhausted

2013-12-01 Thread Alexandre Vassalotti
Changes by Alexandre Vassalotti : -- nosy: -alexandre.vassalotti ___ Python tracker <http://bugs.python.org/issue19835> ___ ___ Python-bugs-list mailin

[issue19858] Make pickletools.optimize aware of the MEMOIZE opcode.

2013-12-02 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: Well, that can only happen if MEMOIZE and PUT are both used together, which won't happen with the Pickler classes we support. The easiest thing to do here is to disable pickletools.optimize on proto

[issue19858] Make pickletools.optimize aware of the MEMOIZE opcode.

2013-12-02 Thread Alexandre Vassalotti
Alexandre Vassalotti added the comment: MEMOIZE and PUT can be used together. They just need to not step on each other toes when they write to the memo table. As specified by PEP 3154, the memo index used by MEMOIZE is the number of elements currently in the memo table. This obviously means

<    1   2   3   4   5   6   7   >