Replace calls with generators as a variadic args, when passing large data into the collection #7
>>> def f(a): ... raise Exception ... >>> def seq(*args): ... return args ... >>> seq(*(f(i) for i in 'asdf')) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 1, in <genexpr> File "<stdin>", line 1, in f Exception >>> def f(a): ... raise TypeError ... >>> seq(*(f(i) for i in 'asdf')) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: seq() argument after * must be a sequence, not generator >>>
This pattern was occured in the collection's update method, like this code.
As you can see, this bug is still in Python 3.3, even if this issue will be fixed in the near future, Python 2.x will not be fixed forever. So it should be avoided by hand.
`redis.client.BasePipeline` (and its children) always return itself except `BasePipeline.execute()` is called. Because `MULTI/EXEC` commands of Redis does like this. And, `sider.session.Session.client` can be replaced with pipeline object in the transaction. Therefore, sometimes `Session.server_version` returns pipeline object rather than a version string.
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.