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).
Handling of file data and file metadata in
ll.url has been largely
rewritten. The most significant visible change is that the
finalurl are methods now. A few
properties have been turned into methods and have been renamed:
lastmodified has been renamed to
has been renamed to
stats has been renamed to
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
Processing instruction targets in
ll.xpit now require whitespace after
the target name. This means that you have to replace
<?= foo?> in your xpit strings.
If you’ve been using
ll.make, you have to use a
DecodeAction before the
TOXICAction to decode the
object into a
unicode object and use a
to encode it again as the constructor of
TOXICAction no longer takes an
encoding argument, but operates on unicode strings directly.
The content of the
ll module has been move to
ll.misc, so you have
to replace e.g.
Functions will no longer will turned into
automatically, so you have to decorate them yourself.
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
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()
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)
Target constructors expect to be passed one
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
from the added actions.
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
OracleTarget has been renamed to
The environment variable
MAKE_REPRANSI has been renamed to
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)
Target methods have been renamed:
sources() has been
targets() has been renamed to
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
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
publisher of the
XISTTarget object, which must be an XIST parser and XIST publisher
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).
targets() have been
changed, so that they return the source and target
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
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
Target`s and :meth:`newersourcedeps will return the list of
conditional() no longer exist. Use
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
withconnection has been renamed to
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)
connection = nightshade.Connect(connectstring=connectstring) proc = nightshade.Call(orasql.Procedure("proc"), connection) @cherrypy.expose def foo(arg): return proc(arg)