8000 Release version will not run on current release of Flask! · Issue #168 · flask-api/flask-api · GitHub
[go: up one dir, main page]

Skip to content

Release version will not run on current release of Flask! #168

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

Open
MrBillium opened this issue Feb 20, 2024 · 6 comments
Open

Release version will not run on current release of Flask! #168

MrBillium opened this issue Feb 20, 2024 · 6 comments

Comments

@MrBillium
Copy link

Flask 3.0.2 relies on Werkzeug 3 which removed werkzeug.urls that Flask-api Release relies on, resulting in
cannot import name 'url_decode_stream' from 'werkzeug.urls

Looks like the issue was fixed in Oct in Develop branch (161?) and I can confirm the error is gone with a manual Pip install from the develop branch zip.

But, since your setup just requires ["Flask >= 2.0.0"] a simple hello world using pip install flask flask-api will get Flask 3.02 and Flask-api will break.

Please consider an urgent merge & release since for the average new user ( not developer) Flask-api just won't work!

@auvipy
Copy link
Collaborator
auvipy commented Feb 20, 2024

what about #166?

@UnderGrounder96
Copy link
UnderGrounder96 commented Feb 21, 2024

I can confirm that this issue still persists, and flask cannot be started:

la back-end dev* [venv]
λ grep -i flask requirements.txt
Flask==3.0.2
Flask-API==3.1
Flask-PyMongo==2.3.0
Flask-Session==0.6.0

la back-end dev* [venv]
λ flask run
Usage: flask run [OPTIONS]
Try 'flask run --help' for help.

Error: While importing 'server', an ImportError was raised:

Traceback (most recent call last):
  File "/Users/la/wksc/todo_app/back-end/.venv/lib/python3.11/site-packages/flask/cli.py",
 line 247, in locate_app
    __import__(module_name)
  File "/Users/la/wksc/todo_app/back-end/server.py", line 7, in <module>
    from flask_api import status
  File "/Users/la/wksc/todo_app/back-end/.venv/lib/python3.11/site-packages/flask_api/__init__.py", line 1, in <module>
    from flask_api.app import FlaskAPI
  File "/Users/la/wksc/todo_app/back-end/.venv/lib/python3.11/site-packages/flask_api/app.py", line 10, in <module>
    from flask_api.request import APIRequest
  File "/Users/la/wksc/todo_app/back-end/.venv/lib/python3.11/site-packages/flask_api/request.py", line 5, in <module>
    from werkzeug.urls import url_decode_stream
ImportError: cannot import name 'url_decode_stream' from 'werkzeug.urls' (/Users/la/wksc/t
odo_app/back-end/.venv/lib/python3.11/site-packages/werkzeug
8000
/urls.py)

@jacebrowning @auvipy are you able to make a new release for flask-api?
This way we would not rely on develop branch installation. Thanks!

@UnderGrounder96
Copy link

Current workaround until new release:

la back-end dev* [venv]
λ pip install git+https://github.com/flask-api/flask-api/
  Stored in directory: /private/var/folders/2g/pc0vmzvs0y33s_fc5ydprf580000gn/T/pip-ephem-
wheel-cache-ix7tei7g/wheels/19/d3/c4/f7c1be5a7ffa839186862dd8426b531992b7e487a37c34c3e9
Successfully built Flask-API
Installing collected packages: Flask-API
  Attempting uninstall: Flask-API
    Found existing installation: Flask-API 3.1
    Uninstalling Flask-API-3.1:
      Successfully uninstalled Flask-API-3.1
Successfully installed Flask-API-3.2

[notice] A new release of pip is available: 23.3.1 -> 24.0
[notice] To update, run: pip install --upgrade pip

la back-end dev* [venv]
λ flask run
 * Serving Flask app 'server'
 * Debug mode: on
WARNING: This is a development server. Do not use it in a production deployment. Use a pro
duction WSGI server instead.
 * Running on http://127.0.0.1:9000
Press CTRL+C to quit
 * Restarting with stat
 * Debugger is active!

@fangrobinson
Copy link

Hi! I'm currently having the same issue. I've seen v3.2 might have been completed on February. Is there any plan to upload it to Pypi? Thanks in advance!

@LeXofLeviafan
Copy link

…Is this repo dead? The last commit was made over a year ago, and even though said commit (which happens to be the only commit made in the last year) changes the package version number to v3.2, there was neither a release on PyPI nor even a git tag for it 🤔

@fcorneli
Copy link
fcorneli commented May 1, 2025

I get a similar error:

ImportError: cannot import name 'url_decode_stream' from 'werkzeug.urls'

After doing,

pip install git+https://github.com/flask-api/flask-api/

it works. Could someone release a new version of flask_api?

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

No branches or pull requests

6 participants
0