Skip to content

Commit

Permalink
Enable deprecation warnings lib-wide
Browse files Browse the repository at this point in the history
These generally should be visible and fixed.

+ fix deprecated setDaemon warnings
  • Loading branch information
gemenerik committed Dec 5, 2024
1 parent fba6170 commit 965f3d2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions cflib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
cf.close_link()
```
"""
import warnings

warnings.simplefilter('always', DeprecationWarning) # Enbable DeprecationWarnings

__pdoc__ = {}
__pdoc__['cflib.crtp.cflinkcppdriver'] = False
__pdoc__['cflib.cpx.transports'] = False
2 changes: 1 addition & 1 deletion cflib/crazyflie/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def __init__(self, link=None, ro_cache=None, rw_cache=None):
rw_cache=rw_cache)

self.incoming = _IncomingPacketHandler(self)
self.incoming.setDaemon(True)
self.incoming.daemon = True
if self.link:
self.incoming.start()

Expand Down
2 changes: 1 addition & 1 deletion cflib/crazyflie/param.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ class _ParamUpdater(Thread):
def __init__(self, cf, useV2, updated_callback):
"""Initialize the thread"""
Thread.__init__(self)
self.setDaemon(True)
self.daemon = True
self.wait_lock = Lock()
self.cf = cf
self._useV2 = useV2
Expand Down

0 comments on commit 965f3d2

Please sign in to comment.