[issue26959] pickle: respect dispatch for functions again

2018-01-08 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26959] pickle: respect dispatch for functions again

2017-02-19 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Is saving global an atomic operation? Falling back to using reduce can be not 
safe if some data was written during saving global. That also might make error 
messages less helpful. Is not founding a function the only cause of 
PicklingError? Raising and catching an exception is not very efficient. 
Shouldn't the fallback be used for classes and C functions?

If add this feature the patch should be significantly reworked.

--
nosy: +serhiy.storchaka
stage: patch review -> needs patch
type: behavior -> enhancement
versions: +Python 3.7 -Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26959] pickle: respect dispatch for functions again

2016-10-31 Thread Vsevolod Velichko

Vsevolod Velichko added the comment:

Hi, any progress here?

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26959] pickle: respect dispatch for functions again

2016-05-06 Thread Vsevolod Velichko

Vsevolod Velichko added the comment:

I was trying to avoid additional imports in the test.
But your point of view seems more reasonable, so I reupload the fixed patch.

--
Added file: http://bugs.python.org/file42751/function_pickle.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26959] pickle: respect dispatch for functions again

2016-05-06 Thread Hrvoje Nikšić

Hrvoje Nikšić added the comment:

You can simplify pickle_lambda in the test by using marshal.dumps(code_obj) and 
marshal.loads(code_obj) to dump and load the code object without going through 
its entire guts. It would be a shame to have to change a pickle test just 
because some detail of the code object implementation changes.

--
nosy: +hniksic

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26959] pickle: respect dispatch for functions again

2016-05-06 Thread SilentGhost

Changes by SilentGhost :


--
nosy: +alexandre.vassalotti, pitrou
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26959] pickle: respect dispatch for functions again

2016-05-04 Thread Vsevolod Velichko

New submission from Vsevolod Velichko:

The commit [2] removed support for handling unpicklable functions with copyreg 
override from cpickle due to lack of the same feature in pickle.
This patch restores that feature and adds the support of it to pickle.

[1] Original discussion: 
https://mail.python.org/pipermail/python-dev/2016-May/144426.html
[2] https://hg.python.org/cpython/rev/6bd1f0a27e8e

--
components: Extension Modules
files: function_pickle.patch
keywords: patch
messages: 264866
nosy: torkve
priority: normal
severity: normal
status: open
title: pickle: respect dispatch for functions again
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file42727/function_pickle.patch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com