1. 28 Feb, 2013 12 commits
  2. 27 Feb, 2013 5 commits
  3. 26 Feb, 2013 1 commit
  4. 20 Feb, 2013 20 commits
    • Marius Gedminas's avatar
      Normalize fstail output on Python 3 · 2f429e61
      Marius Gedminas authored
      The only remaining test failures are due to changed pickle sizes.  I've
      discovered two reasons for that so far:
      
        1) Python 3 pickles 'native strings' as BINUNICODE, Python 2 pickles
           'native strings' as SHORT_BINSTRING, which is 3 bytes shorter.
      
        2) Python 3 and also the 'pickle' module Python 2 pickles tuples like
           (UserDefinedClass, ) with an extra BINPUT opcode at the end,
           compared to 'cPickle' in Python 2 when given the same tuple:
      
              Python 2.7.3 (default, Sep 26 2012, 21:51:14)
              [GCC 4.7.2] on linux2
              Type "help", "copyright", "credits" or "license" for more information.
              >>> import pickle, cPickle
              >>> class MyClass(object): pass
              ...
              >>> len(pickle.dumps((MyClass, None), 1))
              26
              >>> len(cPickle.dumps((MyClass, None), 1))
              24
      
      The plan is to switch to zodbpickle instead of the builtin Python 3
      pickle, then use encoding=bytes from http://bugs.python.org/issue6784
      and fix the class-in-tuple encoding to match Python 2's cPickle.
      2f429e61
    • Marius Gedminas's avatar
      Fix nondeterministic testmvcc failures · a0978648
      Marius Gedminas authored
      This test wants to rely on OIDs that are assigned to various objects.
      OIDs are assigned by Pickler.persistent_id(), which gets called during
      graph traversal in a nonspecific order (courtesy randomized hashes in
      Python 3), so if we want to be sure to have the right OIDs assigned to
      the right objects, we need to call connection.add() manually or commit
      after adding every object.
      a0978648
    • Marius Gedminas's avatar
      Commit savepoints in a well-defined order · 7c272467
      Marius Gedminas authored
      This fixes nondeterministic failures in
      doctest_lp485456_setattr_in_setstate_doesnt_cause_multiple_stores
      7c272467
    • Marius Gedminas's avatar
      Require transaction >= 1.4.1 on Python 3 · d56bddec
      Marius Gedminas authored
      Because our test suite triggers that 'RuntimeError: dictionary changed
      size during iteration' error sporadically.
      d56bddec
    • Marius Gedminas's avatar
      edcc4bcb
    • Marius Gedminas's avatar
      Fix test_basic_cache_size_estimation · 020c6c18
      Marius Gedminas authored
      020c6c18
    • Marius Gedminas's avatar
      Fix find_globals to handle Python 2->3 module renamings · 433a00ef
      Marius Gedminas authored
      Stdlib's _compat_pickle is a big help here, but I've an uneasy feeling
      it's not supposed to be a public API.
      433a00ef
    • Marius Gedminas's avatar
      Try to push persistentclass along · abad361f
      Marius Gedminas authored
      Problem: in Python 2 object lives in sys.modules['__builtin__'].  In
      Python 3 it lives in sys.modules['builtins'].  When we pickle object in
      Python 2 and try to load it in Python 3, we end up getting a Broken
      object placeholder because sys.modules['__builtin__'] is AWOL.
      
      I'm not sure how persistentclass.txt manages to reproduce that purely in
      Python 3, but that's what the new assertion failure I added reports.
      
      Oh, I know: old pickle protocol!
      
          Python 3.3.0 (default, Sep 29 2012, 17:14:58)
          [GCC 4.7.2] on linux
          Type "help", "copyright", "credits" or "license" for more information.
          >>> import pickle
          >>> pickle.dumps(object)
          b'\x80\x03cbuiltins\nobject\nq\x00.'
          >>> pickle.dumps(object, 1)
          b'c__builtin__\nobject\nq\x00.'
          >>> pickle.loads(_)
          <class 'object'>
      
      We need to find the mapping layer that handles __builtin__ in Python
      3.3's pickle and make sure our own ZODB.broken.find_global can do the
      same.
      abad361f
    • Marius Gedminas's avatar
      Typo fixes · 9f93b7f5
      Marius Gedminas authored
      9f93b7f5
    • Marius Gedminas's avatar
      Fix half of testfsoids · cb8fe119
      Marius Gedminas authored
      In Python 2 str(SomeClass) returns "modulename.ClassName".
      
      In Python 3 str(SomeClass) returns "<class 'modulename.ClassName'>".
      
      We want the former.
      cb8fe119
    • Marius Gedminas's avatar
      Refactoring, typo fixes · b9e24eb7
      Marius Gedminas authored
      b9e24eb7
    • Marius Gedminas's avatar
      Fix ConflictResolution tests · c834a291
      Marius Gedminas authored
      Python 3 really wants rich comparison operators
      c834a291
    • Marius Gedminas's avatar
      Fix test_weakrefs_functional · 631bf4ed
      Marius Gedminas authored
      In Python 3 object.__hash__ raises TypeError, so we need an explicit
      override if we want hashability.
      631bf4ed
    • Marius Gedminas's avatar
      Fix doctest_readCurrent · 8788cb71
      Marius Gedminas authored
      It seems that OIDs are assigned in random order (dictionary iteration
      order perhaps), and the test made assumptions.  Add an extra
      transaction.commit() between object addition to fix OID assignment
      order.
      8788cb71
    • Marius Gedminas's avatar
      Typo fixes · b41613fe
      Marius Gedminas authored
      b41613fe
    • Marius Gedminas's avatar
      Consistently name doctest holder functions · 7f626297
      Marius Gedminas authored
      (To distinguish them from real functions that actually do something when
      called.)
      7f626297
    • Marius Gedminas's avatar
      6cd069dc
    • Marius Gedminas's avatar
      Unify doctest indentation · 338536e8
      Marius Gedminas authored
      338536e8
    • Marius Gedminas's avatar
      a8657578
    • Marius Gedminas's avatar
      Fix fstest tests on Python 3 · 57e89244
      Marius Gedminas authored
      57e89244
  5. 19 Feb, 2013 2 commits