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

Include the module in the C repr #97

Merged
merged 2 commits into from
Oct 22, 2018
Merged

Include the module in the C repr #97

merged 2 commits into from
Oct 22, 2018

Conversation

jamadden
Copy link
Member

Fix the repr of the persistent objects to include the module name when using the C extension. This matches the pure-Python behaviour and the behaviour prior to 4.4.0.

Do so by getting the __module__ and __name__ attributes of the type, just like the Python version. Credit to @mgedmin for the suggestion.

Fixes #92

Fix the repr of the persistent objects to include the module name when
using the C extension. This matches the pure-Python behaviour and the
behaviour prior to 4.4.0.

Fixes #92
Copy link
Member

@mgedmin mgedmin left a comment

Choose a reason for hiding this comment

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

Nice!

persistent/cPersistence.c Show resolved Hide resolved
jamadden added a commit that referenced this pull request Oct 20, 2018
Fixes #95

Built on #97 as they touch the same code.
Copy link
Member

@mgedmin mgedmin left a comment

Choose a reason for hiding this comment

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

LGTM, but I don't feel confident enough about the Python C API to be a good reviewer for this.

@Rotonen
Copy link

Rotonen commented Oct 22, 2018

@jamadden I owe you a $BEVERAGE should our paths ever cross.

@jamadden jamadden merged commit f16a5aa into master Oct 22, 2018
@jamadden jamadden deleted the issue92 branch October 22, 2018 13:01
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