factset / quart-openapi

Module for Quart to add Flask-RESTPlus like functionality
https://factset.github.io/quart-openapi/
Other
82 stars 22 forks source link

Update to support Quart 0.11.0 #38

Closed ttran closed 4 years ago

ttran commented 4 years ago

New version released today from Quart 0.10.0 to 0.11.0 breaks quart-openapi.

basilfx commented 4 years ago

+1.

In my case, it fails with:

  File "foo/server/webserver.py", line 3, in <module>
    from quart_openapi import Pint, Resource
  File "env/lib/python3.7/site-packages/quart_openapi/__init__.py", line 13, in <module>
    from .swagger import Swagger
  File "env/lib/python3.7/site-packages/quart_openapi/swagger.py", line 13, in <module>
    from quart.routing import ROUTE_VAR_RE
ImportError: cannot import name 'ROUTE_VAR_RE' from 'quart.routing' (env/lib/python3.7/site-packages/quart/routing.py)
pgjones commented 4 years ago

I think you'd need to switch the code to use werkzeug.routing._rule_re (Quart's routing is now done by Werkzeug).

Sorry about this, it has never occurred to me that ROUTE_VAR_RE would be used outside of Quart itself.

zeroshade commented 4 years ago

@pgjones thanks, I planned on getting to this today so your comment saves me some work. I should have something up and push out the new version in the next hour or so

zeroshade commented 4 years ago

https://github.com/factset/quart-openapi/releases/tag/v1.5.2 has been released fixing this issue

YaoJusheng commented 2 years ago

Are you sure this problem has been fixed? In my code, it has a similar error. By the way, the quart-openapi version I used is 1.7.2.

The error message is as follows:

...
  from werkzeug.routing import _rule_re as ROUTE_VAR_RE
ImportError: cannot import name '_rule_re' from 'werkzeug.routing' ...
Havanero commented 1 year ago

ImportError: cannot import name '_rule_re' from 'werkzeug.routing' quart-openapi version I used is 1.7.2.

tomerh2001 commented 1 year ago

Am still getting this, any updates?

carusyte commented 1 year ago

same issue. quart-openapi==1.7.2