-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make pure python match C: call 'jar.register()' in '__setattr__'/'_p_register' even if OID is not set. #29
Conversation
@jamadden Can you have a look? This seems similar to some of the discrepancies you tracked down. @tonich-sh this PR needs to add tests for the code being changed: the tests should fail without the changes, and pass with them. |
@tseaver There does appear to be a discrepancy. But it's deeper than just calling However, the example code is violating the specification for a data manager and so we're in undefined territory. According to
So in my reading, having a This discrepancy was not a problem in practice for ZODB or our application (in fact it was never noticed) because ZODB's Connection always does what the documentation says and sets oid and jar together (Connection.py:227, elif obj._p_jar is None:
assert obj._p_oid is None
oid = obj._p_oid = self.new_oid()
obj._p_jar = self |
@tonich-sh can you provide a valid usecase for setting |
@tonich-sh Before we can consider merging, the PR needs to add a test which fails without your change to |
@jamadden You are using the pure-Python versions most heavily of anyone: would merging this PR break anything for you? |
It will probably be next week before I can check. Sent from my iPad On Aug 10, 2016, at 12:13 PM, Tres Seaver notifications@github.com wrote: @jamadden https://github.com/jamadden You are using the pure-Python — |
I haven't run all the test suites, but I don't think this change would cause us a problem. However, without a motivating example from the OP, I also don't know how valuable it is (especially if it doesn't also deal with |
It's been two years with no comments from the author of this PR addressing the feedback, so I'm going to assume that @tonich-sh has moved on and I will close this PR. If that's not true, feel free to reopen! |
fixes #28