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

Dependency issue on Py 3.9 due to click._bashcomplete #877

Closed
loleg opened this issue Jul 8, 2021 · 6 comments · Fixed by #878
Closed

Dependency issue on Py 3.9 due to click._bashcomplete #877

loleg opened this issue Jul 8, 2021 · 6 comments · Fixed by #878
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@loleg
Copy link

loleg commented Jul 8, 2021

Importing frictionless-py at 4.12.4 into a Python 3.9.6 environment fails due to an issue in Typer. You might want to log this upstream at https://pypi.org/project/typer/

remote:   File "/app/dribdat/public/api.py", line 312, in <module>
remote:     from frictionless import Package, Resource
remote:   File "/app/.heroku/python/lib/python3.9/site-packages/frictionless/__init__.py", line 21, in <module>
remote:     from .program import program
remote:   File "/app/.heroku/python/lib/python3.9/site-packages/frictionless/program/__init__.py", line 1, in <module>
remote:     from .api import program_api
remote:   File "/app/.heroku/python/lib/python3.9/site-packages/frictionless/program/api.py", line 1, in <module>
remote:     from typer import Option as Opt
remote:   File "/app/.heroku/python/lib/python3.9/site-packages/typer/__init__.py", line 29, in <module>
remote:     from .main import Typer as Typer
remote:   File "/app/.heroku/python/lib/python3.9/site-packages/typer/main.py", line 11, in <module>
remote:     from .completion import get_completion_inspect_parameters
remote:   File "/app/.heroku/python/lib/python3.9/site-packages/typer/completion.py", line 10, in <module>
remote:     import click._bashcomplete
remote: ModuleNotFoundError: No module named 'click._bashcomplete'

Please preserve this line to notify @roll (lead of this repository)

@roll roll added bug Something isn't working help wanted Extra attention is needed labels Jul 8, 2021
@loleg
Copy link
Author

loleg commented Jul 8, 2021

This is a known issue, linked to the version of the Click library: fastapi/typer#280

Workaround: include the latest v7 release by adding click==7.1.2 to your requirements.

@roll
Copy link
Member

roll commented Jul 8, 2021

Thanks! I saw this but it doesn't look they are going to solve it.

Yea we might need to limit click version

@loleg
Copy link
Author

loleg commented Jul 8, 2021

Works fine for me by limiting the click version. Not sure how much of a security issue this is though.

@loleg
Copy link
Author

loleg commented Jul 9, 2021

Thanks @roll !

@tiangolo
Copy link

I just released Typer 0.4.0, which is compatible with both Click 7 and Click 8. 🎉

@roll
Copy link
Member

roll commented Aug 30, 2021

@tiangolo Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants