nightshade migration

How to update your code to new versions of nightshade

Home › Python software › ll.nightshade › MigrationText · XIST

Migrating to version 0.13

The decorators cache and conditional no longer exist. Use CherryPy's tools tools.etag and tools.caching instead.

Migrating to version 0.10

When a Connect object is used as a decorator the database connection is no longer passed to the decorated function. You have to store the Connect object somewhere and call it's new cursor method explicitely.

Migrating to version 0.8

The class withconnection has been renamed to Connect.

Calling functions and procedures has changed a bit. Replace the following old code:

proc = nightshade.Call(orasql.Procedure("proc"), connectstring=connectstring)

@cherrypy.expose
def foo(arg):
    return proc(arg)

with:

connection = nightshade.Connect(connectstring=connectstring)
proc = nightshade.Call(orasql.Procedure("proc"), connection)

@cherrypy.expose
def foo(arg):
    return proc(arg)