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

DeprecationWarning: Switch to Plugin API v2 #770

Closed
bootsmann opened this issue Jul 2, 2015 · 3 comments
Closed

DeprecationWarning: Switch to Plugin API v2 #770

bootsmann opened this issue Jul 2, 2015 · 3 comments

Comments

@bootsmann
Copy link

I am using bottle v0.12.8 with bottle-sqlite and whenever I start the server I get a warrning:

/usr/local/lib/python2.7/dist-packages/bottle.py:527: DeprecationWarning: Switch to Plugin API v2 and access the Route object directly.
context = self if api > 1 else self._context

@camconn
Copy link

camconn commented Jul 3, 2015

You should set a class value for the api key. This is used by bottle to detect whether or not the older or newer API is being used.

For example

class MyPlugin(object):
    '''Example Plugin '''

    name = 'MyPluginName'
    api = 2  # You need to set this

    def __init__(args):
    ...

@bootsmann
Copy link
Author

Thx.
It is an bottle-sqlite problem. On pypi there is an old version.

@camconn
Copy link

camconn commented Jul 8, 2015

This bug is now filed in bottlepy/bottle-sqlite#10.

I recommend closing this issue.

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

2 participants