[Checkins] [zopefoundation/persistent] 2225fb: Stop calling gc.collect in the Python incrgc.

GitHub noreply at github.com
Mon Dec 19 14:10:07 CET 2016


  Branch: refs/heads/new_ghost_doesnt_clear_newargs
  Home:   https://github.com/zopefoundation/persistent
  Commit: 2225fb73808706fa964bbaa8c77c3b3bd838c022
      https://github.com/zopefoundation/persistent/commit/2225fb73808706fa964bbaa8c77c3b3bd838c022
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2016-12-19 (Mon, 19 Dec 2016)

  Changed paths:
    M CHANGES.rst
    M persistent/picklecache.py
    M persistent/tests/test_picklecache.py

  Log Message:
  -----------
  Stop calling gc.collect in the Python incrgc.

@jimfulton and I have talked about it, and I'm (mostly :) convinced that
this shouldn't be an actual problem for any of the reasons described in
the previous comment.

If I use PyPy 5.4.1 to run the ZODB master test suite against
this (well, with #44 rolled back) I don't get any unexpected
failures. (I haven't run the ZEO test suite yet.) Which honestly amazes
me because I'm sure I used to get test failures---I guess the PyPy GC
has changed...which means we may see some failures on Travis. I'll try
to set up an older PyPy to verify.


  Commit: d63fde7264eafd4e88f2de4ff12be423271c5dde
      https://github.com/zopefoundation/persistent/commit/d63fde7264eafd4e88f2de4ff12be423271c5dde
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2016-12-19 (Mon, 19 Dec 2016)

  Changed paths:
    M persistent/persistence.py
    M persistent/picklecache.py

  Log Message:
  -----------
  new_ghost doesn't clear object state, preserving __getnewargs__ values.


  Commit: de9f3f2a69bc5aeff87b73854850766d3762047a
      https://github.com/zopefoundation/persistent/commit/de9f3f2a69bc5aeff87b73854850766d3762047a
  Author: Jason Madden <jamadden at gmail.com>
  Date:   2016-12-19 (Mon, 19 Dec 2016)

  Changed paths:
    M persistent/picklecache.py
    M persistent/tests/test_persistence.py
    M persistent/tests/test_picklecache.py

  Log Message:
  -----------
  Don't clear the slots/dict when adding a new_ghost to Python
PickleCache.

Fixes #49.

Unfortunately, this doesn't fix the whole problem, because
_p_deactivate() still clears them, and so we lose what we set in __new__.


Compare: https://github.com/zopefoundation/persistent/compare/7fb761e0a86a...de9f3f2a69bc


More information about the checkins mailing list