Graham Dumpleton

Results 765 comments of Graham Dumpleton

You can't even use a trick like: ``` import wrapt class LiteralObjectProxy(wrapt.ObjectProxy): pass class A: a = LiteralObjectProxy(10) b = 10 def __setattr__(self, name, value): if type(value) is LiteralObjectProxy: value...

So this issue really relates only to builtin scalar types. ``` is_builtin_scalar = type(obj) in (int, float, str, bool, complex, bytes) ``` A `list` in Python also has `__iadd__`, but...

One question with this though is why anyone would deliberately wrap a scalar type (likely intended as a constant), which appears on the class.

In the really strange circumstance that someone wants to wrap a scalar which is class attribute and a constant, they could do: ``` import wrapt class ConstantObjectProxy(wrapt.ObjectProxy): def __get__(self, instance,...

Can you provide me the original code you were using when using the `adapter` function of `@wrapt.decorator` before introducing your special decorator factory? I want to see what you were...

The `wrapt.adapter_factory` is implemented as: ``` class AdapterFactory: def __call__(self, wrapped): raise NotImplementedError() class DelegatedAdapterFactory(AdapterFactory): def __init__(self, factory): super(DelegatedAdapterFactory, self).__init__() self.factory = factory def __call__(self, wrapped): return self.factory(wrapped) adapter_factory =...

If not using mod_wsgi daemon mode already, for a start use that. Configure each separate WSGI application you may have to use a separate mod_wsgi daemon process group. At the...

Have you definitively determined that the memory spike is in your WSGI application processes (the mod_wsgi managed daemon mode processes)? You need to rule out whether it isn't Apache child...

Forgot one thing. If it is your Python code and how it works that just causes these spikes, and you can't fix the code immediately, you can add the `restart-interval`...

Hopefully this is addressed by changes in `wrapt` package. Can you install wrapt as: ``` pip install --no-index https://github.com/GrahamDumpleton/wrapt/archive/refs/heads/develop.zip ``` and verify. Thanks.