Skip to content

WIP: Resurrect old Python ring implementation and make the CFFI implementation optional#227

Draft
dataflake wants to merge 2 commits intomasterfrom
dataflake/remove_cffi_dependency
Draft

WIP: Resurrect old Python ring implementation and make the CFFI implementation optional#227
dataflake wants to merge 2 commits intomasterfrom
dataflake/remove_cffi_dependency

Conversation

@dataflake
Copy link
Member

This is work in progress.

Current issue: A lot of the ring implementation tests as well as picklecache tests seem to expect specific internals and additional APIs from the CFFI implementation.

@dataflake dataflake requested a review from jamadden November 30, 2025 14:22
@dataflake dataflake self-assigned this Nov 30, 2025
@dataflake
Copy link
Member Author

Example tracebacks from local testing:

Error in test test_sweep_of_non_deactivating_object (persistent.tests.test_picklecache.PythonPickleCacheTests)
Traceback (most recent call last):
  File "/Users/jens/src/python/Python-3.10.13/lib/python3.10/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/Users/jens/src/python/Python-3.10.13/lib/python3.10/unittest/case.py", line 591, in run
    self._callTestMethod(testMethod)
  File "/Users/jens/src/python/Python-3.10.13/lib/python3.10/unittest/case.py", line 549, in _callTestMethod
    method()
  File "/Users/jens/src/zope/persistent/.tox/py310/lib/python3.10/site-packages/persistent/tests/test_picklecache.py", line 777, in test_sweep_of_non_deactivating_object
    self.assertEqual(cache.full_sweep(), 0)
  File "/Users/jens/src/zope/persistent/.tox/py310/lib/python3.10/site-packages/persistent/picklecache.py", line 325, in full_sweep
    return self._sweep(0)
  File "/Users/jens/src/zope/persistent/.tox/py310/lib/python3.10/site-packages/persistent/picklecache.py", line 49, in locked
    return f(self, *args, **kwargs)
  File "/Users/jens/src/zope/persistent/.tox/py310/lib/python3.10/site-packages/persistent/picklecache.py", line 440, in _sweep
    for node, value in ring.iteritems():
AttributeError: '_DequeRing' object has no attribute 'iteritems'
Error in test test_update_object_size_estimation_simple (persistent.tests.test_picklecache.PythonPickleCacheTests)
Traceback (most recent call last):
  File "/Users/jens/src/python/Python-3.10.13/lib/python3.10/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/Users/jens/src/python/Python-3.10.13/lib/python3.10/unittest/case.py", line 591, in run
    self._callTestMethod(testMethod)
  File "/Users/jens/src/python/Python-3.10.13/lib/python3.10/unittest/case.py", line 549, in _callTestMethod
    method()
  File "/Users/jens/src/zope/persistent/.tox/py310/lib/python3.10/site-packages/persistent/tests/test_picklecache.py", line 787, in test_update_object_size_estimation_simple
    cache[p._p_oid] = p
  File "/Users/jens/src/zope/persistent/.tox/py310/lib/python3.10/site-packages/persistent/picklecache.py", line 245, in __setitem__
    self.ring.ring_node_for(value)
AttributeError: '_DequeRing' object has no attribute 'ring_node_for'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant