Migration info for ll-core
##########################

Migrating to ll-core 1.6
========================

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


Migrating to ll-core 1.5
========================

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

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


Migrating to ll-core 1.3
========================

:mod:`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`_.

	.. _make script for the website: http://hg.livinglogic.de/LivingLogic.Python.WWW/


Migrating to ll-core 1.2
========================

Processing instruction targets in :mod:`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 :class:`TOXICAction` from :mod:`ll.make`, you have to use a
:class:`DecodeAction` before the :class:`TOXICAction` to decode the :class:`str`
object into a :class:`unicode` object and use a :class:`EncodeAction` afterwards
to encode it again as the constructor of :class:`TOXICAction` no longer takes an
:var:`encoding` argument, but operates on unicode strings directly.


Migrating to ll-core 1.0
========================

The content of the :mod:`ll` module has been move to :mod:`ll.misc`, so you have
to replace e.g. :func:`ll.notimplemented` with :func:`misc.notimplemented` etc.


Migrating to ll-core 0.3
========================

Changes to namespaces
---------------------

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


Migration info for ll-make
##########################

Migrating to ll-make 1.0
========================

:class:`Target`s now have four action chains instead of one, so you
have to rewrite your :class:`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 :class:`Target` constructors expect to be passed *one* :class:`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 :class:`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 :meth:`desc` (and might implement :meth:`fulldesc` to give a
longer description).


Migrating to ll-make 0.17
=========================
:class:`OracleTarget` has been renamed to :class:`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 :class:`Target` methods have been renamed: :meth:`sources` has been
renamed to :meth:`inputs`. :meth:`targets` has been renamed to :meth:`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
=========================

:mod:`make` has been updated for XIST 2.4: Parsing and publishing XIST files
is now no longer the job of the :class:`XISTAction` class itself, but is done
through the attributes :attr:`parser` and :attr:`publisher` of the
:class:`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 :class:`Target` methods :meth:`sources` and :meth:`targets` have been
changed, so that they return the source and target :class:`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
:meth:`sourcedeps` and :meth:`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 :meth:`newerSources` (and the
method name has been made lowercase). So :meth:`newersources` will return a list
of :class:`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 :func:`cache` and :func:`conditional` no longer exist. Use
CherryPy's tools ``tools.etag`` and ``tools.caching`` instead.


Migrating to ll-nightshade version 0.10
=======================================

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


Migrating to ll-nightshade version 0.8
======================================

The class :class:`withconnection` has been renamed to :class:`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)
