Skip to content
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

Merged
merged 3 commits into from
Nov 18, 2016

Conversation

jimfulton
Copy link
Member

storage that some storages rely on.

@coveralls
Copy link

coveralls commented Nov 18, 2016

Coverage Status

Coverage increased (+0.06%) to 74.871% when pulling 763b9a9 on data-for-TransactionMetaData-and-TransactionRecord into 9cfba5e on master.

Copy link
Member

@jamadden jamadden left a 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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing some words?

Copy link
Member Author

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)
Copy link
Member

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.

Copy link
Member Author

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.

@coveralls
Copy link

coveralls commented Nov 18, 2016

Coverage Status

Coverage increased (+0.04%) to 74.859% when pulling 930d15d on data-for-TransactionMetaData-and-TransactionRecord into 9cfba5e on master.

@jimfulton jimfulton merged commit 0c74741 into master Nov 18, 2016
@jimfulton jimfulton deleted the data-for-TransactionMetaData-and-TransactionRecord branch November 18, 2016 17:32
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.

None yet

3 participants