-
Notifications
You must be signed in to change notification settings - Fork 0
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
Reach 100% coverage #31
Conversation
…nager when we have (and are testing with) a perfectly good implementation already.
Fix WithRepr when passed a default repr function. Make the generated repr function handle more errors and provide the full class name.
…tastructers.py Note that AbstractDynamicObjectIO had an uncovered branch in updateFromExternalObject where it wanted to set the creator property, but it had the internal and external field names confused. (It tried to get and set the external id on the internal object.) That was fixed.
- Remove weird legacy behaviour that caught a POSError coming from a *module*. How on Earth...? - Simplify implementation.
The implementation was dramatically simplified and sped up. The previous complicated behaviour of manually checking sys.modules is gone, replaced with just resolve. And the hiding of import errors is gone, since that indicates a programming error that needs to be fixed.
…d_object_factory_finder Note that the corner case of {'Class': ''} which could previously find a default adapter or utility is no longer supported. There was a lurking bug here if it was {'Class': None}. We shouldn't have any such adapter or utility anyway.
Speed up the __external_resolvers__ branch for instance functions by a lot.
…precate the hook functions.
…s need to be no-cover
OK, we've hit 100% coverage (line, not branch; I did best-effort with branch coverage for now). Ready for serious review. |
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.
LGTM .. for this pass we will not have a hookable for the get_current request?
Separate issue, separate PR my man. It's a best practice to try to keep commits and PRs as focused on a single issue as possible. Or, as ESR says "To do large code changes correctly, factor them into a series of smaller steps such that each revision has a well-defined and provable relationship to the last." (That's one reason that I don't like squashing commits on merge unless they are trivial.) |
@@ -417,8 +416,8 @@ def choose_field(result, self, ext_name, | |||
|
|||
if value is not None: | |||
# If the creator is the system user, catch it here | |||
if ext_name is StandardExternalFields_CREATOR and is_system_user(value): | |||
value = to_unicode(SYSTEM_USER_NAME) | |||
if ext_name == StandardExternalFields_CREATOR and is_system_user(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.
'is' with strings is tricky on PyPy. They don't guarantee identity in the same way CPython does.
Fixes #16.
Opening now so reviewers can start reviewing. There's still one function in internalization.py to complete.
There are a bunch of individual commits here. I try to keep it to one file per commit (roughly). It may be easier to review that way. There are very few semantic changes, but there are a very few corner cases that are handled differently...I don't expect them to be any issue. When there was one like that, I tried to call it out in the commit note (look for the ellipsis).