wrapt
wrapt copied to clipboard
A Python module for decorators, wrappers and monkey patching.
Looks like some code can be removed now ```console [tkloczko@pers-jacek wrapt-1.16.0]$ grep -rE "PY2|PY3" src/wrapt/decorators.py:PY2 = sys.version_info[0] == 2 src/wrapt/decorators.py:if PY2: src/wrapt/decorators.py: if PY2: src/wrapt/decorators.py: if PY2: src/wrapt/decorators.py: if PY2:...
This issue is similar to #256 , but throws a different exception that might be easier to resolve. ## Reproducer ``` > python --version Python 3.9.6 ``` ``` > pip...
Hello and thank you for you this amazing library! I started using `wrapt` because I wanted access to the `instance` inside my decorator. I'd now like to take this a...
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account. - `python3 -sBm...
According to https://endoflife.date/python python 3.8.x support will be EOSed in 31 Oct 2024. This PR removed python
Similarily to https://github.com/GrahamDumpleton/wrapt/issues/160 the tests now fail with Python 3.13.0a4. To reproduce, I did: ``` $ git clone [email protected]:GrahamDumpleton/wrapt.git $ cd wrapt/ [wrapt (develop)]$ tox -e py313 py313: failed with...
Fixes https://github.com/GrahamDumpleton/wrapt/issues/259 The failures were: =================================== FAILURES =================================== _____________ TestCallingOuterClassMethod.test_class_call_function _____________ self = def test_class_call_function(self): # Test calling classmethod. Prior to Python 3.9, the instance # and class passed to...
Currently, wrapping via e.g. `wrap_function_wrapper` import wrapped modules right away https://github.com/GrahamDumpleton/wrapt/blob/develop/src/wrapt/patches.py#L17 I was wondering if it could make sense to instead register a import hook using `register_import_hook`. Conceptually, Before ```python...
First, thank you for your work on wrapt! Is there an existing pattern for using wrapt for creating an object proxy that is evaluated once, lazily? I saw some discussion...
When I run the test suite on 3.13, I see the following failures. ``` $ tox -e py313 ... ============================================================================================================================================== FAILURES =============================================================================================================================================== _______________________________________________________________________________________________________________________________ TestWeakFunctionProxy.test_classmethod ________________________________________________________________________________________________________________________________ self = def test_classmethod(self): class...