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:
New submission from Chris Jerdonek:
I have observed that when running unit tests using unittest's test discovery,
unittest can simultaneously (1) modify sys.path unnecessarily (by adding a path
that is already in sys.path with a different case), and (2) modify sys.path by
adding a path of the
Changes by Serhiy Storchaka storch...@gmail.com:
--
keywords: +patch
Added file: http://bugs.python.org/file37521/pickle_frame_readline.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23094
Martin Panter added the comment:
Patch v4 with John’s doc string wording
--
Added file: http://bugs.python.org/file37522/issue21279.v4.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21279
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
___
CensoredUsername added the comment:
Indeed. In my case the problem was caused a subclassed Pickler which still used
GLOBAL instead of STACK_GLOBAL in protocol 4.
My own minimized test case was:
data = b\x80\x04\x95\x11\x00\x00\x00\x00\x00\x00\x00cpickle\nPickler\n.
pickletools.dis(data)
Martin Panter added the comment:
Here is patch v2, which ignores any exception derived from the Exception base
class when reading the self.name etc properties. I’m interested what people
think of this approach.
--
Added file: http://bugs.python.org/file37523/detach-indep.v2.patch
Serhiy Storchaka added the comment:
It looks reasonable to me.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23093
___
___
Python-bugs-list
John Posner added the comment:
Patch of 12-21 looks good, Martin.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21279
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
Proposed wording looks superfluously verbose to me.
Look also at description in Include/unicodeobject.h:
/* Translate a string by applying a character mapping table to it and
return the resulting Unicode object.
The mapping table must map Unicode
R. David Murray added the comment:
See also issue 6294 for a related problem.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue22836
___
___
Martin Panter added the comment:
Serhiy can you point out which bits are too verbose? Perhaps you prefer it
without the bullet list like in the earlier 2014-12-13 version of the patch.
Looking at the C API, I see a couple problems there:
* Omits mentioning that an ordinal can map to a
Martin Panter added the comment:
Not sure what the original method to cause this message is. I’m guessing some
code was trying to call a function that was set to None by the shutdown
process, causing the exception message, and that repr() was also failing,
causing the broken wording. Like
New submission from Jesús Cea Avión:
Dan MacDonald told me that os.mknod() should accept devices 32 bits.
I wrote this code in linux 64 bits:
#include sys/types.h
#include sys/stat.h
#include fcntl.h
#include unistd.h
#include stdio.h
int main(void) {
printf(%d, sizeof(dev_t));
Martin Panter added the comment:
Patch v2 revises the unit tests so they are cleaner. Also now tests that the
repr() failed placeholders are in the exception reports.
--
Added file: http://bugs.python.org/file37524/unraisable-continue.v2.patch
___
Roundup Robot added the comment:
New changeset f3ff3e424b6f by Benjamin Peterson in branch '3.4':
allow more operations to work on detached streams (closes #23093)
https://hg.python.org/cpython/rev/f3ff3e424b6f
New changeset afa8d8ab0937 by Benjamin Peterson in branch '2.7':
allow more
Martin Panter added the comment:
[Edit Error: 'utf8' codec can't decode byte 0xe2 in position 212: invalid
continuation byte]
Re-reading the suggested description, it struck me that for encoding, this is
redundant with the “backslashreplace” error handler:
test = .join(map(chr,
Ian Lee added the comment:
So one concern that was brought up on GitHub was the fact that currently this
is not actually followed universally in the Python standard library. In
particular there are 636 errors in the standard library ``python pep8.py
--select E402 --statistics
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23061
___
___
Ian Lee added the comment:
I should add that I would be happy to patch the standard libraries to be
compliant w.r.t. the imports at top of the files.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23061
Serhiy Storchaka added the comment:
Serhiy can you point out which bits are too verbose? Perhaps you prefer it
without the bullet list like in the earlier 2014-12-13 version of the
patch.
I prefer it without the bullet list and without LookupError expansion (there
is a link to LookupError
21 matches
Mail list logo