diff options
| author | amajorek <devnull@localhost> | 2010-03-09 08:45:37 -0500 |
|---|---|---|
| committer | amajorek <devnull@localhost> | 2010-03-09 08:45:37 -0500 |
| commit | 37e992ceeea780f77674ef303d2d248b5db82c65 (patch) | |
| tree | cb81d746c0b7176d92ec5e226761932a578e73b5 /eventlet/tpool.py | |
| parent | fcafbbf322c3c38079bf05ab21db0b7a3139e867 (diff) | |
| download | eventlet-37e992ceeea780f77674ef303d2d248b5db82c65.tar.gz | |
py3k - corrections for deprecation warnings reported by python2.6 -3.
- integer division
- repr instead of `
Added __hash__ to speedy Proxy funtions - 3.x requires __hash__ if __eq__ is defined.
Found problem with comparing two proxy objects.
Diffstat (limited to 'eventlet/tpool.py')
| -rw-r--r-- | eventlet/tpool.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/eventlet/tpool.py b/eventlet/tpool.py index 0b95e45..b9b2e11 100644 --- a/eventlet/tpool.py +++ b/eventlet/tpool.py @@ -169,7 +169,7 @@ class Proxy(object): def __getattr__(self,attr_name): f = getattr(self._obj,attr_name) - if not callable(f): + if not hasattr(f, '__call__'): if (isinstance(f, self._autowrap) or attr_name in self._autowrap_names): return Proxy(f, self._autowrap) @@ -199,6 +199,8 @@ class Proxy(object): # wrapped object in such a way that they would block def __eq__(self, rhs): return self._obj.__eq__(rhs) + def __hash__(self): + return self._obj.__hash__() def __repr__(self): return self._obj.__repr__() def __str__(self): |
