Bluetooth-Devices / dbus-fast

A faster version of dbus-next
MIT License
38 stars 12 forks source link

fix: remove deprecated no_type_check_decorator #316

Closed cdce8p closed 1 month ago

cdce8p commented 2 months ago

typing.no_type_check_decorator was never implemented in any major type checker and as such will be deprecated in Python 3.13. It's recommended to decorate functions with typing.no_type_check instead.

https://docs.python.org/3.13/library/typing.html#typing.no_type_check_decorator

This will fix a few DeprecationWarnings for bleak:

  /.../bleak/backends/bluezdbus/advertisement_monitor.py:63:
      DeprecationWarning: 'typing.no_type_check_decorator' is deprecated and slated for removal in Python 3.15
    @method()

  /.../bleak/backends/bluezdbus/advertisement_monitor.py:67:
      DeprecationWarning: 'typing.no_type_check_decorator' is deprecated and slated for removal in Python 3.15
    @method()

  /.../bleak/backends/bluezdbus/advertisement_monitor.py:74:
      DeprecationWarning: 'typing.no_type_check_decorator' is deprecated and slated for removal in Python 3.15
    @method()

  /.../bleak/backends/bluezdbus/advertisement_monitor.py:80:
      DeprecationWarning: 'typing.no_type_check_decorator' is deprecated and slated for removal in Python 3.15
    @method()

  /.../bleak/backends/bluezdbus/advertisement_monitor.py:86:
      DeprecationWarning: 'typing.no_type_check_decorator' is deprecated and slated for removal in Python 3.15
    @dbus_property(PropertyAccess.READ)

  /.../bleak/backends/bluezdbus/advertisement_monitor.py:92:
      DeprecationWarning: 'typing.no_type_check_decorator' is deprecated and slated for removal in Python 3.15
    @dbus_property(PropertyAccess.READ, disabled=True)

  /.../bleak/backends/bluezdbus/advertisement_monitor.py:97:
      DeprecationWarning: 'typing.no_type_check_decorator' is deprecated and slated for removal in Python 3.15
    @dbus_property(PropertyAccess.READ, disabled=True)

  /.../bleak/backends/bluezdbus/advertisement_monitor.py:102:
      DeprecationWarning: 'typing.no_type_check_decorator' is deprecated and slated for removal in Python 3.15
    @dbus_property(PropertyAccess.READ, disabled=True)

  /.../bleak/backends/bluezdbus/advertisement_monitor.py:107:
      DeprecationWarning: 'typing.no_type_check_decorator' is deprecated and slated for removal in Python 3.15
    @dbus_property(PropertyAccess.READ, disabled=True)

  /.../bleak/backends/bluezdbus/advertisement_monitor.py:112:
      DeprecationWarning: 'typing.no_type_check_decorator' is deprecated and slated for removal in Python 3.15
    @dbus_property(PropertyAccess.READ, disabled=True)

  /.../bleak/backends/bluezdbus/advertisement_monitor.py:117:
      DeprecationWarning: 'typing.no_type_check_decorator' is deprecated and slated for removal in Python 3.15
    @dbus_property(PropertyAccess.READ)
bdraco commented 1 month ago

Thanks @cdce8p