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

pyyaml is a required dependency? #419

Closed
sidneygijzen opened this issue Mar 26, 2023 · 2 comments · Fixed by #420
Closed

pyyaml is a required dependency? #419

sidneygijzen opened this issue Mar 26, 2023 · 2 comments · Fixed by #420
Labels
bug Something isn't working
Milestone

Comments

@sidneygijzen
Copy link

sidneygijzen commented Mar 26, 2023

On upgrading from version 1.1.3 to 1.3.0 my app generates the following error ModuleNotFoundError: No module named 'yaml'.

While researching it a bit further, I could trace it back to this commit. I also saw pyyaml is currently in the extras_require list in setup.py. I am wondering, is pyyaml now a required dependency with the introduction of the dict_to_yaml import in the aforementioned commit?

When downgrading to version 1.2.3, the app works without any problems.

Environment:

  • Python version: 3.7 (via docker image: python:3.7-slim-bullseye)
  • Flask version: 2.2.3
  • APIFlask version: 1.3.0

Stack trace:

File "/app/src/app/__init__.py", line 3, in <module>
  from apiflask import APIFlask
File "/opt/venv/lib/python3.7/site-packages/apiflask/__init__.py", line 3, in <module>
  from .app import APIFlask as APIFlask
File "/opt/venv/lib/python3.7/site-packages/apiflask/app.py", line 16, in <module>
  from apispec.yaml_utils import dict_to_yaml
File "/opt/venv/lib/python3.7/site-packages/apispec/yaml_utils.py", line 5, in <module>
  import yaml
ModuleNotFoundError: No module named 'yaml'
@sidneygijzen sidneygijzen added the bug Something isn't working label Mar 26, 2023
@sidneygijzen sidneygijzen changed the title pyyaml is a required package? pyyaml is a required dependency? Mar 26, 2023
@greyli greyli mentioned this issue Mar 27, 2023
5 tasks
@greyli greyli added this to the 1.3.1 milestone Mar 27, 2023
@greyli
Copy link
Member

greyli commented Mar 27, 2023

Thanks for reporting this! It has been fixed in 1.3.1:

pip install -U apiflask

@sidneygijzen
Copy link
Author

Thanks for the quick fix & release 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants