-
Notifications
You must be signed in to change notification settings - Fork 88
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
Fixed: ZODB.Connection.TransactionMetaData didn't custom data #132
Fixed: ZODB.Connection.TransactionMetaData didn't custom data #132
Conversation
storage that some storages rely on.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! This looks good to me, modulo a typo. And coverage went up!
@@ -2,6 +2,9 @@ | |||
Change History | |||
================ | |||
|
|||
- Fixed: ``ZODB.Connection.TransactionMetaData`` didn't custom data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing some words?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup
try: | ||
return data[id(ob)] | ||
except KeyError: | ||
raise KeyError(ob) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this simpler and equivalent (fewer lines of code to cover)?
try:
return self._data[id(ob)]
except (AttributeError, KeyError):
raise KeyError(ob)
Not that it's a big deal. If you prefer the more explicit version that's fine by me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. This code was copied verbatim from transaction.
storage that some storages rely on.