1. 22 Jan, 2002 2 commits
  2. 21 Jan, 2002 6 commits
  3. 17 Jan, 2002 2 commits
    • Jeremy Hylton's avatar
      Merge Standby-branch to trunk (mostly). · 6e1e87a1
      Jeremy Hylton authored
      The Standby-branch was branched from the StandaloneZODB-1_0-branch,
      which includes the BTrees-fsIndex code.  I didn't include that change
      in the merge, but everything else.  Terse summary follows:
      
      BTreeModuleTemplate.c:
          Greg Ward's ConflictError patch
      6e1e87a1
    • Jeremy Hylton's avatar
      Merge Standby-branch to trunk (mostly). · 3e3800a2
      Jeremy Hylton authored
      The Standby-branch was branched from the StandaloneZODB-1_0-branch,
      which includes the BTrees-fsIndex code.  I didn't include that change
      in the merge, but everything else.  Terse summary follows:
      
      BaseStorage.py:
          Add read-only storage feature.
          Add TransactionRecord and DataRecord marker classes for iteration.
          Reformat some lines.
      
      FileStorage.py:
          Add read-only storage feature.
          Greg Ward's ConflictError patch
          Reformat some lines.
          Add lastTransaction(), lastSerialno().
          Add bounds support to iterator().
          Use TransactionRecord and DataRecord.
      
      Connection.py:
      DemoStorage.py:
      MappingStorage.py:
          Greg Ward's ConflictError patch
      
      POSException.py:
          Greg Ward's ConflictError patch
          Add ReadOnlyError.
      3e3800a2
  4. 11 Jan, 2002 2 commits
  5. 09 Jan, 2002 2 commits
  6. 07 Jan, 2002 1 commit
  7. 21 Dec, 2001 2 commits
  8. 20 Dec, 2001 2 commits
  9. 05 Dec, 2001 1 commit
  10. 04 Dec, 2001 2 commits
  11. 30 Nov, 2001 2 commits
    • Jeremy Hylton's avatar
    • Jeremy Hylton's avatar
      Ensure that new code produces pickles acceptable to old code. · c5f31d21
      Jeremy Hylton authored
      Add __getstate__() and __setstate__() methods.
      
      Thanks to Chris McDonough for helping me see the problem.
      
      There are extensive comments that discuss the backwards compatibility
      issues.  Basically, we must be careful that the pickles these methods
      operate on are just like the pickles generated by the old code, or
      developers couldn't switch back and forth between new and old code.
      That's a incompatibility we aren't willing to live with for now --
      perhaps not ever.
      
          # If the internal representation of PersistentMapping changes,
          # it causes compatibility problems for pickles generated by
          # different versions of the code.  Compatibility works in both
          # directions, because an application may want to share a database
          # between applications using different versions of the code.
      
          # Effectively, the original rep is part of the "API."  To provide
          # full compatibility, the getstate and setstate must read and
          # right objects using the old rep.
      
          # As a result, the PersistentMapping must save and restore the
          # actual internal dictionary using the name _container.
      c5f31d21
  12. 28 Nov, 2001 4 commits
  13. 27 Nov, 2001 2 commits
    • Jeremy Hylton's avatar
      Make consistent use of assignment to _p_changed instead of __changed__(). · 93f1a0ef
      Jeremy Hylton authored
      The doc string for __changed__() says that it is deprecated, but
      presumably the calls here were old and just never got updated.
      93f1a0ef
    • Jeremy Hylton's avatar
      Simplify and cleanup implementation of PersistentMapping. · 92c24115
      Jeremy Hylton authored
      The implementation now defers all implementation decisions to UserDict
      and merely handles updates to _p_changed in the PersistentMapping
      implementation.  This change simplifies the implementation and ensures
      that it implements all the new methods of dictionaries like popitem()
      and setdefault().
      
      There is one (important?) behavioral change:  The old implementation
      of the keys() method did not return keys that were strings starting
      with underscore.  This behavior was undocumented and could lead to
      problems for implementations that expect keys() to working like a
      regular mapping.
      
          The feature was removed after verifying that the Zope test suite
          does not depend on this behavior.
      
      An internal implementation change is that the PersistentMapping does
      not keep a copy of the keys() of the dict.  It simplifies the
      implementation a lot to remove the cacheing and the benefit is
      unclear.  It only benefits applications that call keys() frequently
      without modifying the dict.  And it requires that two copies of the
      list exist for each call to keys() which may require a lot of space.
      92c24115
  14. 26 Nov, 2001 1 commit
  15. 16 Nov, 2001 1 commit
  16. 08 Nov, 2001 6 commits
    • Barry Warsaw's avatar
      initcoptimizations(): Some cleanup of the initializer. First be sure · a94c1c48
      Barry Warsaw authored
      to decref the revision string, added to the module dict with the keys
      "__version__".  This fixes a small leaks detected by Insure.
      
      Also, at the end of the function, we do a PyErr_Occurred() check and
      throw a fatal error if true.  This makes this module's init function
      more in line with other init functions in this package.
      a94c1c48
    • Barry Warsaw's avatar
      initcPickleCache(): Some cleanup of the initializer. First be sure to · bb773b12
      Barry Warsaw authored
      decref the revision string, added to the module dict with the keys
      "__version__".  This fixes a small leaks detected by Insure.
      
      Also, at the end of the function, we do a PyErr_Occurred() check and
      throw a fatal error if true.  This makes this module's init function
      more in line with other init functions in this package.
      bb773b12
    • Barry Warsaw's avatar
      initcPersistence(): Some cleanup of the initializer. First be sure to · 55a871a1
      Barry Warsaw authored
      decref the revision string, added to the module dict with the keys
      "__version__".  Do the same with the PyCObject set to the dict's
      "CAPI" key.  This fixes small leaks detected by Insure.
      
      Also, clean up the way the global TimeStamp static is handled on
      creation failure.  We need to decref `s' whether or not TimeStamp was
      properly created or not.  Also, at the end of the function, we do a
      PyErr_Occurred() check and throw a fatal error if true.  This makes
      this module's init function more in line with other init functions in
      this package.
      55a871a1
    • Barry Warsaw's avatar
      initTimeStamp(): Some cleanup of the initializer. First be sure to · d9782bc6
      Barry Warsaw authored
      decref the revision string, added to the module dict with the keys
      "__version__".  This fixes a small leaks detected by Insure.
      
      Also, instead of returning from the init should the
      PyString_FromString() of "TimeStamp.error fail, we simply take
      precautions by XDECREF'ing it.  Then at the end of the function, we do
      a PyErr_Occurred() check and throw a fatal error if true.  This makes
      this module's init function more in line with other init functions in
      this package.
      d9782bc6
    • Jeremy Hylton's avatar
    • Barry Warsaw's avatar
      INITMODULE(): Be sure to decref the $Revision$ string added to the · 697dd574
      Barry Warsaw authored
      module dictionary under the "__version__" key.  Plugs a small memory
      leak caught by Insure.
      697dd574
  17. 07 Nov, 2001 2 commits
    • Jeremy Hylton's avatar
      Really stop the leak of file descriptors! · 5f03f920
      Jeremy Hylton authored
      The previous checkin stopped using the per-connection trigger, but
      didn't stop creating it.  (Dang.)
      
      Thanks to Shane for noticing.
      5f03f920
    • Jim Fulton's avatar
      Totally rewrote recovery script to use an entirely different approach · f400474a
      Jim Fulton authored
      based on:
      
        - transaction iteration/copy
      
        - scanning for transactions after bad data
      
      This should allow recovery of data when:
      
        - only data records are damaged and when
      
        - multiple parts of a file are damaged
      
      The interface has changed to not modify in place.
      
      Other features:
      
        - Progress indicator
      
        - Verbose output
      
        - optional packing
      
        - index creation
      f400474a