Old migration info

The following is migration info for modules and packages that where merged into XIST (starting with XIST 3.2) or into the former core package (starting with XIST 2.12).

Migration info for ll-core

Migrating to ll-core 1.6

Handling of file data and file metadata in ll.url has been largely rewritten. The most significant visible change is that the ReadResource properties resdata, resheaders, imagesize, mimetype, encoding and finalurl are methods now. A few properties have been turned into methods and have been renamed: lastmodified has been renamed to mdate(), contentlength has been renamed to size() and stats has been renamed to stat().

Migrating to ll-core 1.5

The functions ll.url.Dirname() and ll.url.Filename() have been removed (use ll.url.Dir() and ll.url.File() instead).

The methods ll.url.URL.isLocal() and ll.url.URL.asFilename() have been removed (use ll.url.URL.islocal() and ll.url.URL.local() instead).

Migrating to ll-core 1.3

ll.make has been largely rewritten, so you have to adapt your make scripts. For examples demonstrating how to do this, take a look at either the small example in the module itself or the make script for the website.

Migrating to ll-core 1.2

Processing instruction targets in ll.xpit now require whitespace after the target name. This means that you have to replace <?=foo?> with <?= foo?> in your xpit strings.

Migrating to ll-core 1.1

If you’ve been using TOXICAction from ll.make, you have to use a DecodeAction before the TOXICAction to decode the str object into a unicode object and use a EncodeAction afterwards to encode it again as the constructor of TOXICAction no longer takes an encoding argument, but operates on unicode strings directly.

Migrating to ll-core 1.0

The content of the ll module has been move to ll.misc, so you have to replace e.g. ll.notimplemented() with misc.notimplemented() etc.

Migrating to ll-core 0.3

Changes to namespaces

Functions will no longer will turned into staticmethod objects automatically, so you have to decorate them yourself.

Migration info for ll-make

Migrating to ll-make 1.0

Targets now have four action chains instead of one, so you have to rewrite your Target constructors. How the new call looks depends on the target itself. For example a simple copy operation might look like this:

source = make.FileTarget(project, "foo", readaction=make.ReadAction())
target = make.FileTarget(project, "bar", convertaction=make.SelectMainAction(), writeaction=make.WriteAction())
target.dependOn(make.MainDep, source)

Importing modules from other modules can now be done like this:

from ll import make

foo = make.currentproject["build/foo.py"].getdata()

Furthermore if build/foo.py itself is generated by other actions, these actions will be executed before build/foo.py is imported. For this to work you need to use the correct action chains for your target:

srcfoo = make.PythonTarget(
        project,
        "src/foo.py",
        readaction=make.ReadAction()
)
buildfoo = make.PythonTarget(
        project,
        "build/foo.py",
        cache=True,
        convertaction=make.SelectMainAction()+make.WriteAction()+make.ImportAction()+make.UseModuleAction(),
        readaction=make.ImportAction()+make.UseModuleAction(),
        useaction=make.UseModuleAction()
)
buildfoo.dependOn(make.MainDep, srcfoo)

Migrating to ll-make 0.26

All Target constructors expect to be passed one Action instance only now, so instead of:

t = make.FileTarget(project, id, action1, action2, action3)

you should use:

t = make.FileTarget(project, id, action=action1+action2+action3)

Adding targets will create an appropriate ChainedAction object from the added actions.

Migrating to ll-make 0.23

A class variable name in an action class will be ignored now. You have to implement a method desc() (and might implement fulldesc() to give a longer description).

Migrating to ll-make 0.17

OracleTarget has been renamed to DBTarget.

Migrating to ll-make 0.15

The environment variable MAKE_REPRANSI has been renamed to LL_MAKE_REPRANSI.

Migrating to ll-make 0.14

The way actions are handled has changed completely. Instead of a single action that loads the input, does something and saves to output, each of these steps is done by a separate action.

XIST transformations will now look something like this:

from ll import make
p = make.Project()
t0 = make.XISTTarget(p, url.File("foo.htmlxsc"))
t1 = make.XISTTarget(p,
        url.File("../install/foo.html",
        make.ReadAction(),
        make.XISTParseAction(base=url.File("root:foo.html")),
        make.XISTConvertAction(),
        make.XISTPublishAction(
                publisher=publishers.Publisher(encoding="us-ascii"),
                base=url.File("root:foo.html")
        ),
        make.WriteAction(),
        make.ModeAction(0644)
)
t1.dependOn(make.MainDep, t0)

Several Target methods have been renamed: sources() has been renamed to inputs(). targets() has been renamed to outputs(). Several related methods and options have been renamed too.

The output during the build has changed. Instead of newer sources, the main sources will always be displayed now.

The options controlling the output during the build have beed changed and joined into one option, where letters in the option value switch certain output on and off. For more info simply invoke the build script with the option --help.

Migrating to ll-make 0.12

make has been updated for XIST 2.4: Parsing and publishing XIST files is now no longer the job of the XISTAction class itself, but is done through the attributes parser and publisher of the XISTTarget object, which must be an XIST parser and XIST publisher respectively.

Migrating to ll-make 0.8

All dictionary access method now try the literal id first, and if it’s a string, they will retry with an &url; and an absolute &url;. So now you can no longer have a phony target and a file target with the same name (which shouldn’t be a problem anyway, because a file target should include the full path).

Migrating to ll-make 0.6

The Target methods sources() and targets() have been changed, so that they return the source and target Target objects instead of the dependency objects.

This should be more convenient, because in most cases the targets are needed anyway. The old functionality is available through the new methods sourcedeps() and targetdeps(). If you’ve defined your own action classes you’ll probably have to update them.

The same change has been made for the method newerSources() (and the method name has been made lowercase). So newersources() will return a list of Target`s and :meth:`newersourcedeps will return the list of dependencies accordingly.

Migration info for ll-nightshade

Migrating to ll-nightshade version 0.13

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

Migrating to ll-nightshade 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 explicitly.

Migrating to ll-nightshade 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)