python-aspectlib
python-aspectlib copied to clipboard
An aspect-oriented programming, monkey-patch and decorators library. It is useful when changing behavior in existing code is desired. It includes tools for debugging and testing: simple mock/record an...
The following tests fail with Python 3.10 due to a slightly different error message: ``` [ 27s] =================================== FAILURES =================================== [ 27s] ______________________ test_story_empty_play_proxy_class _______________________ [ 27s] tests/test_aspectlib_test.py:411: in test_story_empty_play_proxy_class...
I wonder if we can retrieve the invocation location info from aspect? For example, when patching `open()`, there could be several places where `open()` is invoked. Is it possible to...
Python 3.10 adds the class name to the exception; adjust two tests affected by this change.
Can intercept os.popen and os.system method? Both methods are not being invoked in the script
tornado.gen.Task was removed in Tornado 6. ``` =================================== FAILURES =================================== _______________________ test_decorate_tornado_coroutine ________________________ tests/test_integrations_py3.py:43: in test_decorate_tornado_coroutine loop.run_sync(coro) /usr/lib/python3.8/site-packages/tornado/ioloop.py:532: in run_sync return future_cell[0].result() /usr/lib/python3.8/site-packages/tornado/gen.py:209: in wrapper yielded = next(result) src/aspectlib/py35support.py:90: in...
```console + sphinx-build -b man -d aspectlib docs . Running Sphinx v3.5.3 building [mo]: targets for 0 po files that are out of date building [man]: all manpages updating environment:...
Hello, I have the following piece of code: ``` if __name__ == '__main__': weaving_list = [ShannonDBClient, columns.create_columns_in_bulk, columns.create_single_column] with weave(weaving_list, print_debug_log, lazy=True): loop = asyncio.get_event_loop() loop.run_until_complete(main(args)) ``` I would like...
I believe this is the correct fix. I'm still testing, will update as it goes. I fear that yhis project is inactive.
Hi! Great library - thanks for your work! I'm hosting some Python 3.6 code on AWS Lambda and I have a strangely intermittent error (occurs about 80% of the time)...
``` python In [1]: def foo_factory(foo_name): def foo(): pass foo.__name__ = foo_name return foo ...: In [2]: foo_func = foo_factory('foo_func') In [3]: import aspectlib.contrib In [4]: import aspectlib In [5]:...