Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

manager.command, deprecation warning #183

Open
rbw opened this issue Mar 12, 2018 · 1 comment
Open

manager.command, deprecation warning #183

rbw opened this issue Mar 12, 2018 · 1 comment

Comments

@rbw
Copy link

rbw commented Mar 12, 2018

Hello,

I'm getting the following deprecation warning when decorating a function with manager.command in Python 3.6:

/usr/local/lib/python3.6/dist-packages/flask_script/commands.py:118: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec()
  args, varargs, keywords, defaults = inspect.getargspec(func)
from flask_script import Manager

manager = Manager(app)

@manager.command
def hello():
    print('hello')
pip3 freeze | grep -i flask-script
Flask-Script==2.0.6

Btw - where do you store version info in flask_script? I noticed __version__ isn't available.

@sybrenstuvel
Copy link

I see the same, changing that line to this fixes the warning:

args, varargs, keywords, defaults, _, _, _ = inspect.getfullargspec(func)

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

No branches or pull requests

2 participants