Skip to content

fix(enable_assoc): replace deprecated Werkzeug user_agent attributes#28

Open
CoderFX wants to merge 3 commits intoSniffleupagus:mainfrom
CoderFX:fix/enable-assoc-werkzeug
Open

fix(enable_assoc): replace deprecated Werkzeug user_agent attributes#28
CoderFX wants to merge 3 commits intoSniffleupagus:mainfrom
CoderFX:fix/enable-assoc-werkzeug

Conversation

@CoderFX
Copy link
Copy Markdown

@CoderFX CoderFX commented Mar 12, 2026

Summary

ok204_or_redirect() used ua.browser and ua.platform which were removed in newer Werkzeug versions, causing crashes on Python 3.12+.

Replace with simple string check on the full user_agent string. Also adds iPad detection and a fallback URL if request.referrer is None.

Builds on #27. Related to #23.

CoderFX added 3 commits March 12, 2026 14:17
- Replace bare `except Exception` with `except ImportError` for Touch_UI import
- Replace deprecated `logging.warn()` with `logging.warning()`
- Fix double space typo in __description__
- Add consistent [Enable_Assoc] prefix to all log messages
- Remove trailing semicolons
- Use logging.warning for errors instead of logging.info
- Simplify on_ui_update to use str()
- Remove redundant pass statement
- Bump version to 1.0.1
- Initialize self._ui = None in __init__ to prevent AttributeError
  if on_webhook is called before on_ui_setup
- Remove unused `method` and shadowed `path` variables in on_webhook
- Fix logging.exception() usage (pass message string, not exception)
- Remove unused Touch_Screen import
- Remove empty on_touch_press handler (only logged debug)
- Fix on_ui_update indentation/comment alignment
- Bump version to 1.0.2
ok204_or_redirect() used ua.browser, ua.platform which were removed
in newer Werkzeug versions. Replace with simple string check on the
full user_agent string. Also adds iPad detection and a fallback URL
if request.referrer is None.

- Bump version to 1.0.3
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.

1 participant