~~~~~~~~~~~~~~~~~~~
New features
------------
+ `11`_: Support discovery of info about available ICAT
authenticators.
If supported by the ICAT server (icat.server 4.9.0 and newer), the
:mod:`icat.config` module queries the server for information on
available authenticators and the credential keys they require for
login. The configuration variables for these keys are then adapted
accordingly. Note incompatible changes below.
+ Review :ref:`wipeicat`. This was an example script, but is now
promoted to be a regular utility script that gets installed.
+ `32`_: Add support for using aggregate functions in class
:class:`icat.query.Query`.
+ `30`_: Add a predefined config variable type
:func:`icat.config.cfgpath`.
+ `31`_: Add a flag to add the default variables to the
:class:`icat.config.Config` constructor (default: True).
+ :class:`icat.dumpfile_xml.XMLDumpFileReader` also accepts a XML tree
object as input.
+ Verify support for ICAT 4.9.0. Add new ICAT API method
:meth:`icat.client.Client.getVersion`.
Incompatible changes and deprecations
-------------------------------------
+ As a consequence of the discovery of available authenticators, the
workflow during configuration need to be changed. Until now, the
beginning of a typical python-icat program would look like::
config = icat.config.Config()
Optionally, add custom configuration variables:
config.add_variable(...)
conf = config.getconfig()
client = icat.Client(conf.url, **conf.client_kwargs)
E.g. first the configuration variables are set up, then the
configuration is applied and finally the :class:`icat.client.Client`
object is created using the configuration values. With the
discovery of authenticators, the :class:`icat.config.Config` object
itself needs a working :class:`icat.client.Client` object in order
to connect to the ICAT server and query the authenticator info. The
:class:`icat.client.Client` object will now be created in the
:class:`icat.config.Config` constructor and returned along with the
configuration values by :meth:`icat.config.Config.getconfig`. You
will need to replace the code from above by::
config = icat.config.Config()
Optionally, add custom configuration variables:
config.add_variable(...)
client, conf = config.getconfig()
The derived configuration variable `client_kwargs` that was used to
pass additional arguments from the configuration to the Client
constructor is no longer needed and has been removed.
The optional argument `args` has been moved from the
:meth:`icat.config.Config.getconfig` call to the
:class:`icat.config.Config` constructor, retaining the same
semantics. E.g. you must change in your code::
config = icat.config.Config()
conf = config.getconfig(args)
client = icat.Client(conf.url, **conf.client_kwargs)
to::
config = icat.config.Config(args)
client, conf = config.getconfig()
+ Deprecate support for ICAT 4.2.*.
Note that already now significant parts of python-icat require
features from ICAT 4.3 such as the JPQL like query language. The
only workaround is to upgrade your icat.server.
+ Deprecate module :mod:`icat.cgi`.
It is assumed that this has never actually been used in production.
For web applications it is recommended to use the Python Web Server
Gateway Interface (WSGI) rather then CGI.
+ Deprecate the predefined configuration variable `configDir`.
The main use case for this variable was to be substituted in the
default value for the path of an additional configuration file. The
typical usage was the definition of a configuration variable like::
config = icat.config.Config()
config.add_variable('extracfg', ("--extracfg",),
dict(help="Extra config file"),
default="%(configDir)s/extra.xml", subst=True)
This set the default path for the extra config file to the same
directory the main configuration file was found in. Using the new
config variable type :func:`icat.config.cfgpath` you can replace
this by::
config = icat.config.Config()
config.add_variable('extracfg', ("--extracfg",),
dict(help="Extra config file"),
default="extra.xml", type=icat.config.cfgpath)
This will search the extra config file in all the default config
directories, regardless where the main configuration file was found.
+ The fixes for `35`_ and `36`_ require some changes in the
semantics in the `f` and the `mode` argument to
:func:`icat.dumpfile.open_dumpfile`. Most users will probably not
notice the difference.
Bug fixes and minor changes
---------------------------
+ Changed the default for the :class:`icat.config.Config` constructor
argument `ids` from :const:`False` to ``"optional"``.
+ Improved :meth:`icat.client.Client.searchChunked`. This version is
not susceptible to `Issue icatproject/icat.server128`__ anymore.
+ Move the management of dependencies of tests into a separate package
`pytest-dependency`_ that is distributed independently.
+ `34`_: :exc:`TypeError` in the :class:`icat.client.Client`
constructor if setting the `sslContext` keyword argument.
+ `35`_: :exc:`io.UnsupportedOperation` is raised if
:func:`icat.dumpfile.open_dumpfile` is called with an in-memory
stream.
+ `36`_: :class:`icat.dumpfile.DumpFileReader` and
:class:`icat.dumpfile.DumpFileWriter` must not close file.
+ `37`_: :exc:`TypeError` is raised when writing a YAML dumpfile to
:class:`io.StringIO`.
.. __: https://github.com/icatproject/icat.server/issues/128
.. _11: https://github.com/icatproject/python-icat/issues/11
.. _30: https://github.com/icatproject/python-icat/issues/30
.. _31: https://github.com/icatproject/python-icat/issues/31
.. _32: https://github.com/icatproject/python-icat/issues/32
.. _34: https://github.com/icatproject/python-icat/issues/34
.. _35: https://github.com/icatproject/python-icat/issues/35
.. _36: https://github.com/icatproject/python-icat/issues/36
.. _37: https://github.com/icatproject/python-icat/issues/37
.. _pytest-dependency: https://pypi.python.org/pypi/pytest_dependency/
.. _changes-0_12_0: