[issue23096] Implementation-depended pickling floats with protocol 0

2015-02-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - serhiy.storchaka

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



[issue23096] Implementation-depended pickling floats with protocol 0

2015-02-15 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue23096] Implementation-depended pickling floats with protocol 0

2015-02-15 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8c9121993eb5 by Serhiy Storchaka in branch 'default':
Issue #23096: Pickle representation of floats with protocol 0 now is the same
https://hg.python.org/cpython/rev/8c9121993eb5

--
nosy: +python-dev

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



[issue23096] Implementation-depended pickling floats with protocol 0

2015-02-08 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch.

--
keywords: +patch
stage:  - patch review
versions:  -Python 2.7, Python 3.4
Added file: http://bugs.python.org/file38039/pickle_float_repr.patch

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



[issue23096] Implementation-depended pickling floats with protocol 0

2014-12-22 Thread Alexandre Vassalotti

Alexandre Vassalotti added the comment:

The repr for floats was changed some time ago to use a shorter decimal strings 
when possible. Both representations should yield the same float value once 
decoded. If we want to make the C and Python implementations of pickle 
consistent, then we should pick on what the Python version does currently: 
i.e., call repr on the float.

--

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



[issue23096] Implementation-depended pickling floats with protocol 0

2014-12-22 Thread Antoine Pitrou

Antoine Pitrou added the comment:

This looks less like a bug than an enhancement request.

--

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



[issue23096] Implementation-depended pickling floats with protocol 0

2014-12-21 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Python and C implementations of pickle produce different results when pickle 
floats with protocol 0.

 pickle.dumps(4.2, 0)
b'F4.2002\n.'
 pickle._dumps(4.2, 0)
b'F4.2\n.'

--
components: Library (Lib)
messages: 232992
nosy: alexandre.vassalotti, pitrou, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Implementation-depended pickling floats with protocol 0
type: behavior
versions: Python 2.7, Python 3.4, Python 3.5

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



[issue23096] Implementation-depended pickling floats with protocol 0

2014-12-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Python implementation uses repr(value) and C implementation uses '%.17g' % 
value.

--

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