Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…iidateam#4399) The return value of `Node.open` was wrapped in `WarnWhenNotEntered` in `aiida-core==1.4.0` in order to warn users that use the method without a context manager, which will start to raise in v2.0. Unfortunately, the raising came a little early as the wrapper does not implement the `__iter__` and `__next__` methods, which can be called by clients. An example is `numpy.getfromtxt` which will notice the return value of `Node.open` is filelike and so will wrap it in `iter`. Without the current fix, this raises a `TypeError`. The proper fix would be to forward all magic methods to the wrapped filelike object, but it is not clear how to do this.
- Loading branch information