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

Avoid using `flask._compat`

Open arusahni opened this issue 5 years ago • 3 comments

Hi! requirements.py currently uses a portion of Flask's internal API (flask._compat.with_metaclass). I'm currently using a Flask-compatible framework (Quart) that doesn't replicate this module.

I understand that you're under no responsibility to support non-Flask frameworks, but I was wondering if you'd accept a pull request to eliminate the import? The function being imported appears to be fairly trivial to vendor/inline.

arusahni avatar Mar 25 '19 22:03 arusahni

I'm considering doing a major release that drops python 2 later this year so that's something that can actually just go away since there won't be too be any metaclass metamagic.

justanr avatar Mar 26 '19 03:03 justanr

I used flask._compat report an error ,what can I solve this mistake,thank you

zhanghuize-git avatar May 15 '21 03:05 zhanghuize-git

I used flask._compat report an error ,what can I solve this mistake,thank you

I get flask app to run with changing

from flask._compat import with_metaclass to from six import with_metaclass in flask_allows\requirements.py

after upgraded to flask 2.0.

wyysoft avatar May 26 '21 07:05 wyysoft