honeybadger-io / honeybadger-python

Send Python and Django errors to Honeybadger.
https://www.honeybadger.io/
MIT License
15 stars 25 forks source link

signals_available is missing from Flask 3.0 #160

Closed KamilMroczek closed 7 months ago

KamilMroczek commented 7 months ago

When starting a Flask 3.0 application, Honeybadger crashes the application due to "signals_available" is missing from flask.signals.

  File "/Users/user/workspace/anapp/app/__init__.py", line 24, in create_app
    FlaskHoneybadger(app, report_exceptions=True)
  File "/Users/user/.pyenv/versions/3.11.2/envs/anapp/lib/python3.11/site-packages/honeybadger/contrib/flask.py", line 97, in __init__
    self.init_app(app,
  File "/Users/user/.pyenv/versions/3.11.2/envs/anapp/lib/python3.11/site-packages/honeybadger/contrib/flask.py", line 121, in init_app
    self._register_signal_handler('auto-reporting exceptions',
  File "/Users/user/.pyenv/versions/3.11.2/envs/anapp/lib/python3.11/site-packages/honeybadger/contrib/flask.py", line 141, in _register_signal_handler
    if not signals.signals_available:
           ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'flask.signals' has no attribute 'signals_available'

I was testing using

Python 3.11.2 Flask==3.0 honeybadger==0.17.0

This was working in Flask 2.3.2. The property was removed in this commit:

https://github.com/pallets/flask/commit/04994df59f2f642e52ba46ca656088bcdb931262

subzero10 commented 7 months ago

Hey @KamilMroczek, thanks for reporting this! I will see if we can completely remove this check or simply ignore it when the attribute is missing.

subzero10 commented 7 months ago

Hey @KamilMroczek, this should be fixed with v0.18.0!

KamilMroczek commented 7 months ago

@subzero10 great thank you for the quick turnaround!