Skip to content
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

Fix: Flask 2.2 'MethodViewType' Removal #387

Merged
merged 1 commit into from Aug 9, 2022

Conversation

0x78f1935
Copy link

@0x78f1935 0x78f1935 commented Aug 4, 2022

Fixes: #384

Traceback (most recent call last):
  File "/var/lib/jenkins/workspace/development/development/tests/dist/webserver.py", line 9, in <module>
    from backend import Webserver
  File "/var/lib/jenkins/workspace/development/development/tests/dist/backend/__init__.py", line 15, in <module>
    from backend.extensions import init_app as _init_extensions
  File "/var/lib/jenkins/workspace/development/development/tests/dist/backend/extensions/__init__.py", line 9, in <module>
    from flask_smorest import Api  # noqa: E402
  File "/var/lib/jenkins/workspace/development/.pyenv-python3/lib/python3.9/site-packages/flask_smorest/__init__.py", line 6, in <module>
    from .blueprint import Blueprint  # noqa
  File "/var/lib/jenkins/workspace/development/.pyenv-python3/lib/python3.9/site-packages/flask_smorest/blueprint.py", line 46, in <module>
    from flask.views import MethodViewType
ImportError: cannot import name 'MethodViewType' from 'flask.views'

Same issue flask_apispec has
Fix inspired by this topic.
Might fix #386 PR too.

@lafrech
Copy link
Member

lafrech commented Aug 8, 2022

Thanks. Currently AFK. Will look into this when back from holidays.

@codecov
Copy link

codecov bot commented Aug 8, 2022

Codecov Report

Merging #387 (82859f8) into master (fb94390) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #387   +/-   ##
=======================================
  Coverage   99.87%   99.87%           
=======================================
  Files          13       13           
  Lines         819      819           
  Branches      179      179           
=======================================
  Hits          818      818           
  Partials        1        1           
Impacted Files Coverage Δ
flask_smorest/blueprint.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us.

@lafrech
Copy link
Member

lafrech commented Aug 9, 2022

For the record, same fix was applied to apiflask.

Thanks.

@lafrech lafrech merged commit ceb0d34 into marshmallow-code:master Aug 9, 2022
@0x78f1935 0x78f1935 deleted the bugfix/MethodViewType branch August 10, 2022 12:04
@AbdealiLoKo
Copy link

Hi, is there a plan to publish this on pypi ?

@lafrech
Copy link
Member

lafrech commented Aug 16, 2022

See #384 (comment).

I need to fix other Flask 2.2 issues first (work in progress).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flask 2.2.0 removes MethodViewType
3 participants