A list for the developers of CellML tools

Text archives Help


[cellml-dev] Python rewrite - does anyone need backwards compatibility?


Chronological Thread 
  • From: ak.miller at auckland.ac.nz (Andrew Miller)
  • Subject: [cellml-dev] Python rewrite - does anyone need backwards compatibility?
  • Date: Wed, 25 Jan 2012 16:03:57 +1300

Hi all,

I'm working on a rewrite of how Python can be used from the CellML API.

The old way is as follows:
* The API build system generates Python bindings from the IDL files
using code included with the API.
* The produced modules are loaded into Python.

The new way is as follows:
* The API includes code for a new API module called the CellML
Generics & Reflection Service (CGRS).
* CGRS modules are produced from the IDL files by the build system.
* A separate package (i.e. not shipped with the API), structured as a
normal Python module, called cgrspy, implements a bridge between Python
and the CGRS. Because it uses the CGRS to dynamically query what is
available on each interface and object, it does not need access to the
IDL files to be built. It provides a much more idiomatic Python
experience than the previous Python bindings generated by CGRS, because
objects in Python correspond to objects in the API implementation,
rather than corresponding to a particular interface of a particular
object. It now also supports the Python iterable protocol. It will also
make it easier to add support for new dynamic languages, and will make
the code size of multiple bindings much smaller.

The new and old approaches to Python bindings are not backwards compatible.

At some point, it would be good to deprecate the old approach; as
changes on the cgrs branch break the old Python support, if no one is
using it, I could simply drop it.

Would anyone be inconvenienced by the removal of the old-style Python
support in the next release of the API?

Best wishes,
Andrew




  • [cellml-dev] Python rewrite - does anyone need backwards compatibility?, Andrew Miller, 01/25/2012

Archive powered by MHonArc 2.6.18.

Top of page