Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove deprecated no_type_check_decorator #316

Merged
merged 1 commit into from
Oct 5, 2024

Conversation

cdce8p
Copy link
Contributor

@cdce8p cdce8p commented Sep 26, 2024

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)

@cdce8p cdce8p changed the title Remove deprecated no_type_check_decorator fix: remove deprecated no_type_check_decorator Sep 26, 2024
@bdraco bdraco merged commit 0f04a79 into Bluetooth-Devices:main Oct 5, 2024
18 checks passed
@bdraco
Copy link
Member

bdraco commented Oct 5, 2024

Thanks @cdce8p

@cdce8p cdce8p deleted the python-313 branch October 5, 2024 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants