New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using class-based views with Flask 2.2 causes TypeError: view() takes 0 positional arguments but 1 was given #341
Comments
I compare the source code of |
The change in pallets/flask#4624 (Flask 2.2) caused this issue. Before 2.2, the view function created by view classes accepts both positional arguments and keyword arguments. 2.2 changed to accept keyword-only arguments, while APIFlask always passes Pin Flask to 2.1 will fix this temporarily:
|
I just released 1.1.3 to pin Flask < 2.2 as a temporal workaround for this issue. For the real fix to this issue, these are the possible solutions:
I prefer solution 1 now, while solution 3 seems a better option for the long term. |
It seems solution 1 can compat with current user project, 2 and 3 are both broken change. |
Error when using class-based views for compliance documentation
Environment:
The text was updated successfully, but these errors were encountered: