runner.gevent: Shift None check for topic_func earlier#115
Open
wking wants to merge 1 commit intoheynemann:masterfrom
Open
runner.gevent: Shift None check for topic_func earlier#115wking wants to merge 1 commit intoheynemann:masterfrom
wking wants to merge 1 commit intoheynemann:masterfrom
Conversation
wking
added a commit
to wking/tornado_pyvows
that referenced
this pull request
Oct 8, 2014
1d264b9 (Pyvows 2.0.5 has broken tornado_pyvows, 2014-05-19) mentioned pyVows 2.0.5, but also blocked 2.0.4. Since then, there has been a 2.0.6 release which tried to fix this issue 59e67374 (topics can be none, we need to validate against that, 2014-06-02, [1]) but failed [2]. Instead of ignoring all future pyVows development, only blacklist the versions we know to be broken. [1]: heynemann/pyvows@59e6737 [2]: heynemann/pyvows#115 Summary: runner.gevent: Shift None check for topic_func earlier Date: 2014-10-08
Avoid:
Traceback (most recent call last):
File "/.../pyvows/runner/gevent.py", line 97, in _run_setup_and_topic
topic_list = get_topics_for(topic_func, ctx_obj)
File "/.../pyvows/runner/utils.py", line 46, in get_topics_for
'Function %s does not have a code property' % topic_function)
RuntimeError: Function None does not have a code property
because VowsParallelRunner._run_setup_and_topic was calling
get_topics_for (which chokes when its topic_function is None) before
checking for a None value.
The fixes a broken check from 59e6737 (topics can be none, we need to
validate against that, 2014-06-02).
Collaborator
|
This seems pretty innocuous, but I'm a little confused about when topic_func could ever be None? Maybe @heynemann could explain the original change? It seems like topic_func must always be a function. If ctx_obj.topic can be a non-function, we should be guarding against more than just None. |
Contributor
Author
|
On Wed, Oct 08, 2014 at 05:41:53PM -0700, coreypobrien wrote:
I hit this from the thumbor vows, but I didn't look into the |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Avoid:
Traceback (most recent call last):
File "/.../pyvows/runner/gevent.py", line 97, in _run_setup_and_topic
topic_list = get_topics_for(topic_func, ctx_obj)
File "/.../pyvows/runner/utils.py", line 46, in get_topics_for
'Function %s does not have a code property' % topic_function)
RuntimeError: Function None does not have a code property
because VowsParallelRunner._run_setup_and_topic was calling
get_topics_for (which chokes when it's topic_function is None) before
checking for a None value.
The fixes a broken check from 59e6737 (topics can be none, we need to
validate against that, 2014-06-02).