Python-icat

Latest version: v1.5.1

Safety actively analyzes 715032 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 6

0.11.0

~~~~~~~~~~~~~~~~~~~

New features
------------

+ `12`_, `23`_: add support for ICAT 4.7.0 and IDS 1.6.0. ICAT
4.7.0 had some small schema changes that have been taken into
account.

Incompatible changes
--------------------

+ Remove the `autoget` argument from
:meth:`icat.entity.Entity.getUniqueKey`. Deprecated since 0.9.0.

Bug fixes and minor changes
---------------------------

+ `21`_: configuration variable `promptPass` is ignored when set in
the configuration file.

+ `18`_: Documentation: missing stuff in the module index.

+ `20`_: add test on compatibility with icat.server.

+ `24`_, `25`_: test failures caused by different timezone settings
of the test server.

+ Use a separate module `distutils_pytest`_ to run the tests from
`setup.py`.

+ :mod:`icat.icatcheck`: move checking of exceptions into a separate
method :meth:`icat.icatcheck.ICATChecker.checkExceptions`. Do not
report exceptions defined in the client, but not found in the
schema.

+ Many fixes in the example script :ref:`wipeicat`.

+ Fix a missing import in the `icatexport.py` example script.

+ Somewhat clearer error messages for some special cases of
:exc:`icat.exception.SearchAssertionError`.

Misc
----

+ Change license to Apache 2.0.

.. _12: https://github.com/icatproject/python-icat/issues/12
.. _18: https://github.com/icatproject/python-icat/issues/18
.. _20: https://github.com/icatproject/python-icat/issues/20
.. _21: https://github.com/icatproject/python-icat/issues/21
.. _23: https://github.com/icatproject/python-icat/issues/23
.. _24: https://github.com/icatproject/python-icat/issues/24
.. _25: https://github.com/icatproject/python-icat/issues/25
.. _distutils_pytest: https://github.com/RKrahl/distutils-pytest


.. _changes-0_10_0:

0.10.0

~~~~~~~~~~~~~~~~~~~

New features
------------

+ Add a method :meth:`icat.entity.Entity.copy`.

+ Implement setting an INCLUDE 1 clause equivalent in class
:class:`icat.query.Query`.

+ Add an optional argument `includes` to
:meth:`icat.client.Client.searchMatching`.

+ Add a hook for a custom method to validate entity objects before
creating them at the ICAT server.

0.9.0

~~~~~~~~~~~~~~~~~~

New features
------------

+ `4`_: Extend :ref:`icatrestore <icatingest>` to become a generic
ingestion tool.

Rename :ref:`icatrestore <icatingest>` to :ref:`icatingest`.

Allow referencing of objects by attribute rather then by unique key
in the input file for :ref:`icatingest` (only in the XML backend).

Allow adding references to already existing objects in the input
file for :ref:`icatingest` (only in the XML backend).

Change the name of the root element in the input file for
:ref:`icatingest` (and the output of :ref:`icatdump`) from
`icatdump` to `icatdata` (only in the XML backend).

+ Implement upload of Datafiles to IDS rather then only creating the
ICAT object from :ref:`icatingest`.

+ Implement handling of duplicates in :ref:`icatingest`. The same
options (`THROW`, `IGNORE`, `CHECK`, and `OVERWRITE`) as in the
import call in the ICAT restful interface are supported.

+ `1`_: add a test suite.

+ `3`_: use Sphinx to generate the API documentation.

+ Add method :meth:`icat.client.Client.searchMatching`.

+ Add the :meth:`icat.ids.IDSClient.getIcatUrl` call introduced with
IDS 1.4.0.

Incompatible changes and deprecations
-------------------------------------

+ The Lucene calls that have been removed in ICAT 4.5.0 are also
removed from the client.

+ Deprecate the use of the `autoget` argument in
:meth:`icat.entity.Entity.getUniqueKey`.

Bug fixes and minor changes
---------------------------

+ `6`_: :class:`icat.query.Query`: adding a condition on a meta
attribute fails.

+ `10`_: client.putData: IDSInternalError is raised if
datafile.datafileCreateTime is set.

+ Ignore import errors from the backend modules in :ref:`icatingest` and
:ref:`icatdump`. This means one can use the scripts also if the
prerequisites for some backends are not fulfilled, only the
concerned backends are not available then.

+ `5`_, compatibility with ICAT 4.5: entity ids are not guaranteed to
be unique among all entities, but only for entities of the same
type.

0.8.0

~~~~~~~~~~~~~~~~~~

New features
------------

+ Enable verification of the SSL server certificate in HTTPS
connections. Add a new configuration variable `checkCert` to
control this. It is set to :const:`True` by default.

Note that this requires either Python 2.7.9 or 3.2 or newer. With
older Python version, this configuration option has no effect.

+ Add type conversion of configuration variables.

+ Add substituting the values of configuration variables in other
variables.

+ Add another derived configuration variable `configDir`.

+ Default search path for the configuration file: add an appropriate
path on Windows, add ``/etc/icat`` and ``~/.config/icat`` to the
path if not on Windows.

+ Add `icatexport.py` and `icatimport.py` example scripts that use the
corresponding calls to the ICAT RESTful interface to dump and
restore the ICAT content.

+ The constructor of :exc:`icat.exception.ICATError` and the
:func:`icat.exception.translateError` function are now able to
construct exceptions based on a dict such as those returned by the
ICAT RESTful interface in case of an error.

Unified handling of errors raised from the ICAT and the IDS server.

Incompatible changes
--------------------

+ As a consequence of the unified handling of errors, the exception
class hierarchy has been reviewed, with a somewhat more clear
separation of exceptions raised by other libraries, exceptions
raised by the server, and exceptions raised by python-icat
respectively.

If you put assumptions on the exception hierarchy in your code, this
might need a review. In particular,
:exc:`icat.exception.IDSResponseError` is not derived from
:exc:`icat.exception.IDSError` any more.
:exc:`icat.exception.IDSServerError` has been removed.

I.e., replace all references to :exc:`icat.exception.IDSServerError`
by :exc:`icat.exception.IDSError` in your code. Furthermore, if you
catch :exc:`icat.exception.IDSError` in your code with the intention
to catch both, errors from the IDS server and
:exc:`icat.exception.IDSResponseError` in one branch, replace::

try:
...
except IDSError:
...

by ::

try:
...
except (IDSError, IDSResponseError):
...

Bug fixes and minor changes
---------------------------

+ The :class:`icat.query.Query` class now checks the attributes
referenced in conditions and includes for validity.

+ Fix a regression introduced with version 0.7.0 that caused non-ASCII
characters in queries not to work.

+ Fix :exc:`icat.exception.ICATError` and
:exc:`icat.exception.IDSError` to gracefully deal with non-ASCII
characters in error messages. Add a common abstract base class
:exc:`icat.exception.ICATException` that cares about this.

+ Fix: the string representation operator
:meth:`icat.query.Query.__str__` should not modify the query object.

+ Cosmetic improvement in the formal representation operator
:meth:`icat.query.Query.__repr__`.


.. _changes-0_7_0:

0.7.0

~~~~~~~~~~~~~~~~~~

New features
------------

+ Add a module :mod:`icat.query` with a class
:class:`icat.query.Query` that can be used to build ICAT search
expressions. Instances of the class may be used in place of search
expression strings where appropriate.

Numerous examples on how to use this new class can be found in
`querytest.py` in the examples.

+ Add a class method :meth:`icat.entity.Entity.getNaturalOrder` that
returns a list of attributes suitable to be used in an ORDER BY
clause in an ICAT search expression.

+ Add a class method :meth:`icat.entity.Entity.getAttrInfo` that
queries the EntityInfo from the ICAT server and extracts the
information on an attribute.

+ Add a method :meth:`icat.client.Client.getEntityClass` that returns
the :class:`icat.entity.Entity` subclass corresponding to a name.

+ Add a warning class :exc:`icat.exception.QueryNullableOrderWarning`.

+ Add an optional argument `username` to the
:meth:`icat.ids.IDSClient.getLink` method.


.. _changes-0_6_0:

0.6.0

~~~~~~~~~~~~~~~~~~

New features
------------

+ Add support for ICAT 4.4.0: add new :class:`icat.entity.Entity` type
`InvestigationGroup`, `role` has been added to the constraint in
`InvestigationUser`.

+ Add new API method :meth:`icat.ids.IDSClient.getApiVersion` that
will be introduced with the upcoming version 1.3.0 of IDS. This
method may also be called with older IDS servers: if it is not
available because the server does not support it yet, the server
version is guessed from visible features in the API.

:class:`icat.ids.IDSClient` checks the API version on init.

+ Add new API methods :meth:`icat.ids.IDSClient.isReadOnly`,
:meth:`icat.ids.IDSClient.isTwoLevel`,
:meth:`icat.ids.IDSClient.getLink`, and
:meth:`icat.ids.IDSClient.getSize` introduced with IDS 1.2.0.

+ Add `no_proxy` support. The proxy configuration variables,
`http_proxy`, `https_proxy`, and `no_proxy` are set in the
environment. [Suggested by Alistair Mills]

+ Rework the dump file backend API for :ref:`icatdump` and
:ref:`icatrestore <icatingest>`. As a result, writing custom dump
or restore scripts is much cleaner and easier now.

This may cause compatibility issues for users who either wrote their
own dump file backend or for users who wrote custom dump or restore
scripts, using the XML or YAML backends. In the first case, compare
the old XML and YAML backends with the new versions and you'll
easily see what needs to get adapted. In the latter case, have a
look into the new versions of :ref:`icatdump` and :ref:`icatrestore
<icatingest>` to see how to use the new backend API.

+ Add method :meth:`icat.client.Client.searchChunked`.

+ Add method :meth:`icat.entity.Entity.getAttrType`.

Incompatible changes
--------------------

+ Move the `group` argument to method
:meth:`icat.client.Client.createRules` to the last position and make
it optional, having default :const:`None`.

In the client code, replace::

client.createRules(group, crudFlags, what)

by ::

client.createRules(crudFlags, what, group)

+ The :meth:`icat.client.Client.putData` method returns the new
Datafile object created by IDS rather then only its id.

If you depend on the old behavior in the client code, replace::

dfid = client.putData(file, datafile)

by ::

df = client.putData(file, datafile)
dfid = df.id

Minor changes and fixes
-----------------------

+ The :meth:`icat.client.Client.searchText` and
:meth:`icat.client.Client.luceneSearch` client method have been
deprecated. They are destined to be dropped from the ICAT server or
at least changed in version 4.5.0 and might get removed from
python-icat in a future release as well.

The methods now emit a deprecation warning when called. Note
however that Python by default ignores deprecation warnings, so you
won't see this unless you switch them on.

+ Fixed overly strict type checking in the constructor arguments of
:class:`icat.ids.DataSelection` and as a consequence also in the
arguments of the ICAT client methods
:meth:`icat.client.Client.getData`,
:meth:`icat.client.Client.getDataUrl`,
:meth:`icat.client.Client.prepareData`, and
:meth:`icat.client.Client.deleteData`: now, any
:class:`Sequence` of entity objects will be accepted, in particular
an :class:`icat.entity.EntityList`.

+ Change :meth:`icat.ids.IDSClient.archive` and
:meth:`icat.ids.IDSClient.restore` to not to return anything. While
formally, this might be considered an incompatible change, these
methods never returned anything meaningful in the past.

+ Slightly modified the `==` and `!=` operator for
:class:`icat.entity.Entity`. Add a
:meth:`icat.entity.Entity.__hash__` method. The latter means that
you will more likely get what you expect when you create a set of
:class:`icat.entity.Entity` objects or use them as keys in a dict.

+ The module :mod:`icat.eval` now only does its work (parsing command
line arguments and connecting to an ICAT server) when called from
the Python command line. When imported as a regular module, it will
essentially do nothing. This avoids errors to occur when imported.

+ `setup.py` raises an error with Python 2.6 if python2_6.patch has
not been applied.

+ Add missing `MANIFEST.in` in the source distribution.

+ Remove the work around the Suds datetime value bug (setting the
environment variable TZ to ``UTC``) from :mod:`icat`. Instead,
document it along with other known issues in the README.

+ Minor fixes in the sorting of entity objects.

+ Add an optional argument args to
:meth:`icat.config.Config.getconfig`. If set to a list of strings,
it replaces :attr:`sys.argv`. Mainly useful for testing.

+ Add comparison operators to class :class:`icat.listproxy.ListProxy`.


.. _changes-0_5_1:

Page 5 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.