Peter Lazorchak
Peter Lazorchak
Sorry, I was trying to simplify as much as possible and used `__add__` strictly as an example. The exact method that is causing issues for me is `__iter__`, as you...
That's an interesting idea. I won't have a chance to try it out until next week, but it sounds promising. I'll let you know how it goes.
The following update to the pure-python implementation seems to be working for my case, and the `without-extensions` tests are passing locally. ```py class ObjectProxy(with_metaclass(_ObjectProxyMetaType)): # [...] def __init__(self, wrapped): #...
Thanks for the guidance so far. Unfortunately I haven't yet been able to get something similar working in the C extension. Do you have any hints or ideas for what...
Here's the diff: https://github.com/GrahamDumpleton/wrapt/compare/develop...lazorchakp:wrapt:conditionally-iterable-object-proxies The full error from `WRAPT_INSTALL_EXTENSIONS=true pip install . && pytest` is: ``` ================================ FAILURES ================================= ___________________ TestIterObjectProxy.test_iteration ____________________ self = def test_iteration(self): items = [1, 2]...
This fails with the same error: ``` self.assertTrue(hasattr(wrapper, "__iter__")) > _ = iter(wrapper) E TypeError: 'ObjectProxy' object is not iterable ```
cc @Fidget-Spinner This might need some labels. I also looked around for a parent ticket, but didn't find anything particularly obvious
Sorry everyone - I've been busier than anticipated and haven't made concrete progress on this yet. If it's alright though, I'd still like to try it, and I should be...
That sounds great. It makes sense to me that we'd now need `_CHECK_STACK_SPACE` to know up-front how much space it's looking for. I'll see if I can take your suggestion...
I'm at the point where I have the operand for each `_CHECK_STACK_SPACE` being correctly assigned to its corresponding function's framesize (pushed a rough branch). Before I implement the actual optimization...