summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorelie <elie>2014-06-14 19:50:13 +0000
committerelie <elie>2014-06-14 19:50:13 +0000
commitf55eeb2072452c7a50a8a301235bc032e71e1238 (patch)
treea815fbf00a8142c0851341ac94f18836ae77264c
parent5c65579de3520153fb48e134a3ec84c30eb0caec (diff)
downloadpysnmp-f55eeb2072452c7a50a8a301235bc032e71e1238.tar.gz
fix to asyncore-based transport not to use asyncore's cheap inheritance
from socket object what caused warnings.
-rw-r--r--CHANGES2
-rw-r--r--pysnmp/carrier/asynsock/base.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 6f75ac3..88e19df 100644
--- a/CHANGES
+++ b/CHANGES
@@ -85,6 +85,8 @@ Revision 4.2.6rc0
- Fix to licensing terms of multiple twisted backend modules to make
the whole pysnmp package licensed under BSD 2-Clause license. This
change has been explicitly permitted by the original modules authors.
+- Fix to asyncore-based transport not to use asyncore's cheap inheritance
+ from socket object what caused warnings.
- Missing wrongLength and wrongEncoding SMI errors added.
Revision 4.2.5
diff --git a/pysnmp/carrier/asynsock/base.py b/pysnmp/carrier/asynsock/base.py
index 6e9d0db..7685367 100644
--- a/pysnmp/carrier/asynsock/base.py
+++ b/pysnmp/carrier/asynsock/base.py
@@ -45,6 +45,8 @@ class AbstractSocketTransport(asyncore.dispatcher, AbstractTransport):
sock.setblocking(0)
self.set_socket(sock)
+ def __hash__(self): return hash(self.socket)
+
# The following two methods are part of base class so here we overwrite
# them to separate socket management from dispatcher registration tasks.
# These two are just for dispatcher registration.