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: - wont fix
stage:
R. David Murray rdmur...@bitdance.com added the comment:
The randomly failing tests seem to have been the high priority issue. The
remaining, eponymous issue seems to be of rather lower priority, so I'm setting
it to normal. Although Tim wanted a separate issue for the pickling problem, I
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Revision 68903 was merged in py3k in r68908. It looks like a similar issue
shows up in test_random:
==
ERROR: test_pickling
Antoine Pitrou pit...@free.fr added the comment:
Revision 68903 was merged in py3k in r68908. It looks like a similar issue
shows up in test_random:
==
ERROR: test_pickling (test.test_random.MersenneTwister_TestBasicOps)
Antoine Pitrou pit...@free.fr added the comment:
It should be noted that, contrary to Amaury's suggestion, pickling random.seed
fails under 3.x:
pickle.dumps(random.seed)
Traceback (most recent call last):
File stdin, line 1, in module
File /home/antoine/py3k/__svn__/Lib/pickle.py, line
Mark Dickinson dicki...@gmail.com added the comment:
Antoine's fix in r82919 / r82920 fixes the test_random failure for me. (Before
the fix,
./python.exe ./Lib/test/regrtest.py test___all__ test_threaded_import
test_random
was enough to produce the failure.)
--
Changes by Terry J. Reedy tjre...@udel.edu:
--
nosy: -tjreedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3657
___
___
Python-bugs-list mailing
Terry J. Reedy tjre...@udel.edu added the comment:
'works for me' contradicts 'open', so I unset that
--
nosy: +tjreedy
resolution: works for me -
versions: +Python 2.7
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3657
Changes by Mark Dickinson dicki...@gmail.com:
--
nosy: +marketdickinson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3657
___
___
Mark Dickinson dicki...@gmail.com added the comment:
I just committed Tim's suggested change in r68906. This seemed a no-
brainer, regardless of what should be done about pickle.whichmodule. One
fewer sporadic buildbot failure sounds like a good thing to me.
(I hadn't noticed the pickletools
Antoine Pitrou [EMAIL PROTECTED] added the comment:
I expect this is why nobody has ever complained about it: unless you're
looking at the strings embedded in the pickle GLOBAL opcode, it's
unlikely to have a visible consequence.
Well, it may have a consequence if pickle picks the random
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
I'm not sure that pickling random.random is a good idea; did you try to
pickle the random.seed function?
Their definition look very similar (at the end of random.py:
_inst = Random()
seed = _inst.seed
random = _inst.random
) but
Amaury Forgeot d'Arc [EMAIL PROTECTED] added the comment:
The explanation is actually simple, do not blame bsddb :-)
random.random is a built-in method, so its __module__ attribute is not
set. To find it, pickle.whichmodule loops through all sys.modules, and
pick the first one that contains the
Tim Peters [EMAIL PROTECTED] added the comment:
No thought went into picking random.random in the test -- it was just a
random ;-) choice. Amaury's analysis of the source of non-determinism
is on target, and the easiest fix is to pick a coded-in-Python function
to pickle instead. I suggest,
Changes by Alexandre Vassalotti [EMAIL PROTECTED]:
--
nosy: +alexandre.vassalotti
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3657
___
___
Antoine Pitrou [EMAIL PROTECTED] added the comment:
But it still means pickling a function/method defined in a builtin
extension module can give wrong results, doesn't it deserve being fixed?
--
nosy: +pitrou
___
Python tracker [EMAIL PROTECTED]
Tim Peters [EMAIL PROTECTED] added the comment:
Amaury, yes, it would be nice if pickle were more reliable here. But
that should be the topic of a different tracker issue. Despite the
Title, this issue is really about sporadic pickletools.py failures, and
the pickletools tests are trying to
Changes by Barry A. Warsaw [EMAIL PROTECTED]:
--
priority: release blocker - high
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3657
___
___
Tim Peters [EMAIL PROTECTED] added the comment:
BTW, note that the Title of this issue is misleading:
pickle.whichmodule() uses object identity (is:
if ... getattr(module, funcname, None) is func:
) to determine whether the given function object is supplied by a
module, so it's /not/ the
Benjamin Peterson [EMAIL PROTECTED] added the comment:
I can reproduce this on 2.6.
--
nosy: +benjamin.peterson
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3657
___
Changes by Barry A. Warsaw [EMAIL PROTECTED]:
--
priority: deferred blocker - release blocker
___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3657
___
Barry A. Warsaw [EMAIL PROTECTED] added the comment:
Neal, can you verify that this is still a problem now that bsddb has
been removed? The tests, run in the order of the last comment, succeed
for me in both 2.6 and 3.0, debug build or not, on both my single
processor Ubuntu box and dual core
Neal Norwitz [EMAIL PROTECTED] added the comment:
It seems that if the tests are run in this order:
./python -E -tt ./Lib/test/regrtest.py -u all test_xmlrpc test_ctypes
test_json test_bsddb3 test_pickletools
The error will trigger consistently. That is in 2.6 with a debug build
on a dual cpu
New submission from Neal Norwitz [EMAIL PROTECTED]:
test_pickletools fails sporadically on at least two platforms I've seen.
http://www.python.org/dev/buildbot/all/x86%20gentoo%20trunk/builds/4120/step-test/0
Neal Norwitz [EMAIL PROTECTED] added the comment:
The valgrind errors below are possibly related.
Conditional jump or move depends on uninitialised value(s)
PyUnicodeUCS2_EncodeUTF8 (unicodeobject.c:2216)
_PyUnicode_AsString (unicodeobject.c:1417)
save (_pickle.c:930)
Pickler_dump
Neal Norwitz [EMAIL PROTECTED] added the comment:
Indeed. The problem was an incorrect conversion of str - unicode,
instead of converting to bytes. On getting the buffer from unicode, it
tried to read data which was uninitialized.
Hmmm, this fix is for 3.0 only, but the problem is happening
26 matches
Mail list logo