-
Notifications
You must be signed in to change notification settings - Fork 249
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
Fixes issues #150, #151, #156 and #160 #153
Conversation
ionelmc/python-tblib#7 fixed that should deal with 2.6 compatibility once accepted |
You're absolutely correct, let me fix this. |
Is it a first runtime dependency or I'm missing something? @mriehl |
Well it's required if someone |
I think merge is fine and I think we can release this, although I'm thinking of at least a couple more improvements (fairly minor) at this point. If you grant me PyPi access it would be great as well! |
I'll need your PyPI user name to grant you permissions - you can send it via email if you don't want to disclose it publicly. |
It's the same - arcivanov. Thanks! |
Right, thanks! Should work now. |
8102ae8
to
0fe9b55
Compare
Forking option in coverage and unittest is now deprecated (removed in unittest since never made public) Coverage will always fork Unittest will always fork unless is already forked in coverage utils.fork_process is now used in both to capture exit code, returned value and possible exception (with traceback) from a forked process Module reloading is removed since it doesn't ever work when modules keep state and rely on intermodule dependencies This should be a problem since coverage and unittests run in different forks and will reinitialize the modules anyway Closes pybuilder#150, closes pybuilder#151
https://hg.python.org/cpython-fullhistory/diff/2230/Python/import.c Cases that are now also handled are: .pyw, module.so, module.dll, .o, module.o
@@ -56,12 +54,14 @@ def __init__(self, first, second=None): | |||
CircularTaskDependencyException, self).__init__("Circular task dependency detected between %s and %s", | |||
first, | |||
second) | |||
else: | |||
super(CircularTaskDependencyException, self).__init__(first) |
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.
Why is this required? e.G. how can we have a cycle but only one node is known?
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.
By not calling an init we don't call a super into exceptions. This makes the exception unpicklable.
PS: Python serialization sucks worse than Java 😄
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.
I reworked this block
There's a problem when building a new project (
Looks like some reimport related problem with pickling being too picky about types when adding errors to the queue. Also note the build hangs afterwards due to the process not terminating normally - we need to fix this before pushing out a release. |
Code LGTM aside from the comment above. This contribution is fantastic - thank you. I never gave it much thought before you brought up the issue but of course self-bootstrapping while running coverage is totally nontrivial... |
11dca24
to
93e2790
Compare
@mriehl Thanks for tracking down |
63bc4f5
to
920abf1
Compare
Fix "syntax error/compile" warning Rework message queue mechanism in forking making it more robust Cover the new exception handling in forking with more tests
41f0662
to
8b02606
Compare
branch tracking is added html report generation is added in $dir_reports/<execution_prefix>_html/ modules to be covered are explicitly passed to report generator ensure modules have no duplicates
8b02606
to
ab6488f
Compare
I think it's good to go, LGTM! |
Super, thanks! |
Forking option in coverage and unittest is now deprecated (removed in unittest since never made public)
Coverage will always fork
Unittest will always fork unless is already forked in coverage
utils.fork_process is now used in both to capture exit code, returned value and possible exception (with traceback) from a forked process
Module reloading is removed since it doesn't ever work when modules keep state and rely on intermodule dependencies
This should be a problem since coverage and unittests run in different forks and will reinitialize the modules anyway
Closes #150, closes #151