rollbar / pyrollbar

Error tracking and logging from Python to Rollbar
https://docs.rollbar.com/docs/python/
MIT License
213 stars 133 forks source link

Fix Werkzeug DeprecationWarning #410

Closed compyman closed 1 year ago

compyman commented 2 years ago

Description of the change

This PR changes the flask integration setup to import Request instead of BaseRequest from Werkzeug.

This is motivated by the deprecation warning I'm receiving that says:

{pyenv_dir}/site-packages/rollbar/__init__.py:1160: DeprecationWarning: 'BaseRequest' is deprecated and will be removed in Werkzeug 2.1. Use 'isinstance(obj, Request)' instead.
if WerkzeugRequest and isinstance(request, WerkzeugRequest):

All the tests pass, and I can't on the face of it see a reason to prefer BaseRequest over Request generally

Type of change

Checklists

Development

Code review

nk9 commented 1 year ago

This is showing up in my unit tests as a warning whenever I run them. Would love to see this PR accepted so I can get back to the land of green. 😄