Werkzeug's user agend parser is deprecated #21

Closed
opened 2021-12-21 23:42:16 +00:00 by ferfissimo · 1 comment
Owner

Detected by CI tests:

The user agend parser of werkzeug is deprecated and will get removed with werkzeug 2.1.
So until then we have to replace it, there should be a replacement as the warning says:

  /home/ferdinand/Dokumente/Projekte/Flaschengeist/backend/flaschengeist/utils/decorators.py:17: DeprecationWarning: The built-in user agent parser is deprecated and will be removed in Werkzeug 2.1. The 'browser' property will be 'None'. Subclass 'werkzeug.user_agent.UserAgent' and set 'Request.user_agent_class' to use a different parser.
    session = sessionController.validate_token(token, request.user_agent, permission)

tests/test_auth.py::test_login_decorator
tests/test_auth.py::test_login
  /home/ferdinand/Dokumente/Projekte/Flaschengeist/backend/flaschengeist/utils/decorators.py:17: DeprecationWarning: The built-in user agent parser is deprecated and will be removed in Werkzeug 2.1. The 'platform' property will be 'None'. Subclass 'werkzeug.user_agent.UserAgent' and set 'Request.user_agent_class' to use a different parser.
    session = sessionController.validate_token(token, request.user_agent, permission)

tests/test_auth.py::test_login
  /home/ferdinand/Dokumente/Projekte/Flaschengeist/backend/flaschengeist/plugins/auth/__init__.py:44: DeprecationWarning: The built-in user agent parser is deprecated and will be removed in Werkzeug 2.1. The 'browser' property will be 'None'. Subclass 'werkzeug.user_agent.UserAgent' and set 'Request.user_agent_class' to use a different parser.
    session = sessionController.create(user, user_agent=request.user_agent)

tests/test_auth.py::test_login
  /home/ferdinand/Dokumente/Projekte/Flaschengeist/backend/flaschengeist/plugins/auth/__init__.py:44: DeprecationWarning: The built-in user agent parser is deprecated and will be removed in Werkzeug 2.1. The 'platform' property will be 'None'. Subclass 'werkzeug.user_agent.UserAgent' and set 'Request.user_agent_class' to use a different parser.
    session = sessionController.create(user, user_agent=request.user_agent)
Detected by CI tests: The user agend parser of werkzeug is deprecated and will get removed with werkzeug 2.1. So until then we have to replace it, there should be a replacement as the warning says: ```shell /home/ferdinand/Dokumente/Projekte/Flaschengeist/backend/flaschengeist/utils/decorators.py:17: DeprecationWarning: The built-in user agent parser is deprecated and will be removed in Werkzeug 2.1. The 'browser' property will be 'None'. Subclass 'werkzeug.user_agent.UserAgent' and set 'Request.user_agent_class' to use a different parser. session = sessionController.validate_token(token, request.user_agent, permission) tests/test_auth.py::test_login_decorator tests/test_auth.py::test_login /home/ferdinand/Dokumente/Projekte/Flaschengeist/backend/flaschengeist/utils/decorators.py:17: DeprecationWarning: The built-in user agent parser is deprecated and will be removed in Werkzeug 2.1. The 'platform' property will be 'None'. Subclass 'werkzeug.user_agent.UserAgent' and set 'Request.user_agent_class' to use a different parser. session = sessionController.validate_token(token, request.user_agent, permission) tests/test_auth.py::test_login /home/ferdinand/Dokumente/Projekte/Flaschengeist/backend/flaschengeist/plugins/auth/__init__.py:44: DeprecationWarning: The built-in user agent parser is deprecated and will be removed in Werkzeug 2.1. The 'browser' property will be 'None'. Subclass 'werkzeug.user_agent.UserAgent' and set 'Request.user_agent_class' to use a different parser. session = sessionController.create(user, user_agent=request.user_agent) tests/test_auth.py::test_login /home/ferdinand/Dokumente/Projekte/Flaschengeist/backend/flaschengeist/plugins/auth/__init__.py:44: DeprecationWarning: The built-in user agent parser is deprecated and will be removed in Werkzeug 2.1. The 'platform' property will be 'None'. Subclass 'werkzeug.user_agent.UserAgent' and set 'Request.user_agent_class' to use a different parser. session = sessionController.create(user, user_agent=request.user_agent) ```
ferfissimo added the
🎒 backend
label 2021-12-21 23:42:16 +00:00
Owner

ua-parser is now in used
fixed in commit cb0795a6ac

ua-parser is now in used fixed in commit cb0795a6acbce7eac63998d57b615d37060f4377
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Flaschengeist/flaschengeist#21
No description provided.