-
Notifications
You must be signed in to change notification settings - Fork 167
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
Implement dynamic class provenance tracking to fix isinstance semantics and add support for dynamically defined enums #246
Merged
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
0ea5c42
Add support for dynamically defined enums
ogrisel 0c92537
Fix Python 2 support
ogrisel a602573
Add entry to changelog
ogrisel 0af2d33
Enum is already supported in Python 2.7
ogrisel 0c76780
Fix docstring
ogrisel ea34466
Test with IntEnum
ogrisel 6b3fd45
Lookup enum classes from __main__ module at unpickling time
ogrisel b42144a
Better test for interactively defined enums
ogrisel 90ab1d7
Restore changelog from master
ogrisel ed34c4f
Fix test under Windows
ogrisel 658a7f7
WIP: dynamic class defintion tracking
ogrisel b9adfc8
Fix provenance tracking + add more tests
ogrisel 1979d52
Add more tests for class provenance tracking
ogrisel 3876c3f
Update changelog
ogrisel 4dba4d9
Make enum dependency optional
ogrisel 90b345f
Small improvements + better comments
ogrisel e525cea
Expand stored instance test + rename some tests
ogrisel c5be1d4
Handle enums that inherit from a class and rehydrate methods
ogrisel 5bab490
More complex type hierarchy
ogrisel 37260e4
Cleanup
ogrisel 0235a8b
Compat with older Python versions
ogrisel ed8649d
Filter inherited dict members
ogrisel 959b82a
Filter inherited methods on Python 2
ogrisel 4057b59
Simplify handling of dynamic enums' __doc__
ogrisel 7f2b464
Phrasing
ogrisel 5c11202
[ci downstream]
ogrisel b5e28af
Cleanup old, useless code
ogrisel fd3c475
Merge branch 'master' into dynamic-enum-class
ogrisel 2346e69
Merge branch 'master' into dynamic-enum-class
ogrisel 237aeff
Merge remote-tracking branch 'origin/master' into dynamic-enum-class
ogrisel 0cbd071
Plan provenance tracking for 1.1.0 release
ogrisel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
how can this be None if we are always passing in
_ensure_tracking(obj)
on line 590. The enum case also appears to pass this as a non-None value.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.
It used to be the case in a former version of this PR. However I wonder if it's not a good idea to make it possible to disable tracking by passing None for forward compatibility.
I am not sure. Would this be a YAGNI?
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.
Hmm, this seems fine given that it is already implemented.