diff --git a/lib/logitech/unifying_receiver/hidpp20.py b/lib/logitech/unifying_receiver/hidpp20.py index 0fe1feb1..b70ff831 100644 --- a/lib/logitech/unifying_receiver/hidpp20.py +++ b/lib/logitech/unifying_receiver/hidpp20.py @@ -4,6 +4,10 @@ from __future__ import absolute_import, division, print_function, unicode_literals +from logging import getLogger, DEBUG as _DEBUG +_log = getLogger('LUR.hidpp20') +del getLogger + from struct import pack as _pack, unpack as _unpack try: unicode @@ -15,11 +19,7 @@ try: except: pass -from weakref import proxy as _proxy - -from logging import getLogger, DEBUG as _DEBUG -_log = getLogger('LUR.hidpp20') -del getLogger +# from weakref import proxy as _proxy from .common import (FirmwareInfo as _FirmwareInfo, ReprogrammableKeyInfo as _ReprogrammableKeyInfo, @@ -133,7 +133,7 @@ class FeaturesArray(object): def __init__(self, device): assert device is not None - self.device = _proxy(device) + self.device = device # _proxy(device) self.supported = True self.features = None @@ -265,7 +265,7 @@ class KeysArray(object): def __init__(self, device, count): assert device is not None - self.device = _proxy(device) + self.device = device # _proxy(device) self.keys = [None] * count def __getitem__(self, index): diff --git a/lib/logitech/unifying_receiver/receiver.py b/lib/logitech/unifying_receiver/receiver.py index eabb9ff7..b3cdf982 100644 --- a/lib/logitech/unifying_receiver/receiver.py +++ b/lib/logitech/unifying_receiver/receiver.py @@ -5,7 +5,7 @@ from __future__ import absolute_import, division, print_function, unicode_literals import errno as _errno -from weakref import proxy as _proxy +# from weakref import proxy as _proxy from logging import getLogger _log = getLogger('LUR.receiver') @@ -28,7 +28,7 @@ MAX_PAIRED_DEVICES = 6 class PairedDevice(object): def __init__(self, receiver, number, link_notification=None): assert receiver - self.receiver = _proxy(receiver) + self.receiver = receiver # _proxy(receiver) assert number > 0 and number <= receiver.max_devices self.number = number self.online = None diff --git a/lib/logitech/unifying_receiver/settings.py b/lib/logitech/unifying_receiver/settings.py index 28dc82c1..1a1dfd8f 100644 --- a/lib/logitech/unifying_receiver/settings.py +++ b/lib/logitech/unifying_receiver/settings.py @@ -4,7 +4,7 @@ from __future__ import absolute_import, division, print_function, unicode_literals -from weakref import proxy as _proxy +# from weakref import proxy as _proxy from copy import copy as _copy from .common import NamedInt as _NamedInt, NamedInts as _NamedInts @@ -35,7 +35,7 @@ class _Setting(object): def __call__(self, device): o = _copy(self) o._value = None - o._device = _proxy(device) + o._device = device # _proxy(device) return o @property diff --git a/lib/logitech/unifying_receiver/status.py b/lib/logitech/unifying_receiver/status.py index a60ce5c2..abde0110 100644 --- a/lib/logitech/unifying_receiver/status.py +++ b/lib/logitech/unifying_receiver/status.py @@ -5,7 +5,7 @@ from __future__ import absolute_import, division, print_function, unicode_literals from time import time as _timestamp -from weakref import proxy as _proxy +# from weakref import proxy as _proxy from struct import unpack as _unpack try: @@ -58,7 +58,7 @@ class ReceiverStatus(dict): """ def __init__(self, receiver, changed_callback): assert receiver - self._receiver = _proxy(receiver) + self._receiver = receiver # _proxy(receiver) assert changed_callback self._changed_callback = changed_callback @@ -125,7 +125,7 @@ class DeviceStatus(dict): """ def __init__(self, device, changed_callback): assert device - self._device = _proxy(device) + self._device = device #_proxy(device) assert changed_callback self._changed_callback = changed_callback