flask-lambda icon indicating copy to clipboard operation
flask-lambda copied to clipboard

werkzeug.BaseRequest Deprecated

Open erdem opened this issue 3 years ago • 4 comments

I have discovered BaseRequest class removed from werkzeug later 2.1.0 version.

Related discussion here.

The package works fine in 2.0.3 version as well as tested. However, would be great if you can specify the exact dependent werkzeug version or fix the deprecated implementation.

Thanks

erdem avatar Mar 28 '22 23:03 erdem

from werkzeug.wrappers import BaseRequest
>>> from werkzeug.wrappers import BaseRequest
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'BaseRequest' from 'werkzeug.wrappers' (E:\flask-webhook-creator\venv\lib\site-packages\werkzeug\wrappers\__init__.py) 

joranbeasley avatar Apr 06 '22 04:04 joranbeasley

see: https://github.com/sivel/flask-lambda/pull/14 for potential fix

joranbeasley avatar Apr 06 '22 04:04 joranbeasley

I've installed the package and tried to run the app and its throw same error

{"errorMessage": "Unable to import module 'run': cannot import name 'BaseRequest' from 'werkzeug.wrappers' (/var/task/werkzeug/wrappers/__init__.py)", "errorType": "Runtime.ImportModuleError"

Thanks to @erdem, I fixed it by downgrading the package to Werkzeug==2.0.3 in requirements.txt

yalattas avatar Jun 13 '22 18:06 yalattas

Question is a 0.0.5 pkg going to be released?

iitow avatar Mar 16 '23 01:03 iitow