GetData-0.9.3 adds support for PHP7 and Python3. It also fixes bugs found
since the release of GetData-0.9.2.
---------------------------------------------------------------------------
Four packages are available:
* getdata-0.9.3.tar.bz2/.gz: the full source code to the library, with
bindings. This package uses the GNU autotools build system, and is
designed for POSIX systems (UNIX, Linux, BSD, MacOS X, Cygwin, MSys,
&c.)
* getdata_win-0.9.3.zip: a reduced source code package, with the CMake
build system designed to be built on Microsoft Windows, either using
the free MinGW compiler, or else Microsoft's Visual C++ compiler.
(The full source package above can also be built using MinGW, if the
MSys shell is used to run the build system.) Currently, the only
bindings provided by this package are the C++ bindings, and the
package lacks support for compressed dirfiles, the Legacy API, and a
few other features. This build is used in native Microsoft Windows
builds of kst2.
* idl_getdata-0.9.3.tar.bz2/.gz: the Interactive Data Language (IDL)
bindings, packaged separately with an autotools build system, designed
to be built against an already installed version of GetData. Due to
licensing restrictions, pre-built packages rarely come with these
bindings, and this package allows end-users to add support for IDL
without having to recompile the whole GetData package.
* matlab_getdata-0.9.3.tar.bz2/.gz: the MATLAB bindings, packaged
separately with an autotools build system, designed to be built against
an already installed version of GetData. Due to licensing
restrictions, pre-built packages rarely come with these bindings, and
this package allows end- users to add support for MATLAB without having
to recompile the whole GetData package.
---------------------------------------------------------------------------
New in version 0.9.3:
API Changes:
* gd_verbose_prefix() can now be used on invalid dirfiles. Previously,
this function would return GD_E_BAD_DIRFILE when passed an invalid
DIRFILE pointer.
* BUG FIX: When trying to access a LINTERP table file in a non-existent
directory, GetData now reports the correct error (No such file or
directory). Reported by Johanna Nagy.
Library Changes:
* GetData can now read SIE files containing the optional nine-byte header
(which can be created by daisie). When read by GetData, information in
the header is completely ignored (because the GetData metadata contains
all the necessary information). GetData never writes the header, but
calls to gd_putdata() will preserve an existing header. Calls which
re-code the file (like gd_alter_endianness(), gd_alter_raw(), &c.) will
result in an existing header being deleted.
* BUG FIX: Filenames and line numbers appearing in GD_E_FORMAT error
strings returned by gd_error_string() are correct again. This bug
also affected parser metadata sent to a registered parser callback.
* BUG FIX: On platforms where char is signed, the library no longer
rejects field names containing bytes with the top bit set.
Bindings Changes:
* PHP: PHP7 support has been added.
* PYTHON: Python3 support has been added based on a patch from Matthew
Petroff. The earliest supported Python3 version is 3.2. Python2 is
still supported from version 2.4, but Unicode support must be enabled
in Python2. Support for Python 2.3 has been dropped.
* PYTHON: Under Python3, the bindings run into the issue of GetData not
knowing the character encoding of Dirfile metadata (the C library
just deals with bytes). As a result, under Python3, by default,
most strings returned by the library are returned as encoded bytes()
objects, instead of native Unicode str() objects. (This is true
under Python2 as well, but less obvious since the native Python2
str() object is encoded.)
To help deal with this, dirfile and entry objects now have a
character_encoding attribute which can be set to inform pygetdata of
the character encoding to use to decode the strings returned by the
C library into Unicode strings. There is also a global
pygetdata.character_encoding object which can be used to set the
default encoding for newly-created pygetdata objects. See the module
documentation for details. The default for character_encoding is None,
implying no decoding should occur. In Python3, paths are handled
separately (since the filesystem encoding may be different than the
GetData metadata encoding). Error strings are decoded if possible, and
then ASCII encoded to ensure they're always available, regardless of
the capabilities of standard error.
* PYTHON: As a side-effect to the above, pygetdata now accepts unicode
strings (both in Python2 and in Python3). The specified
character_encoding will be used to encode them to C strings before
being passed to the C library. If no character_encoding is specified,
the current locale's default encoding will be used.
* PYTHON: When using Python 2.6 or newer, calling repr() on a
pygetdata.entry object now returns an eval()able string.
* PYTHON: When using Python 2.7 or newer, a very small C API is produced
for pygetdata. It is defined in pygetdata.h installed alongside the
pygetdata module. This C API is needed by daisie, the stand-alone SIE
encoding library.
* C++ BUG FIX: Including another GetData header before getdata/dirfile.h
no longer results in a fatal circular dependency.
* PHP BUG FIX: The numbits parameter to gd_madd_sbit() is now optional
and defaults to 1, as with other similar functions.
* PHP BUG FIX: Fixed a memory leak on error in gd_getdata().
* PYTHON BUG FIX: Calling pygetdata.dirfile.[m]carrays no longer crashes
if return_type=pygetdata.NULL. In this case, None is returned in place
of the data arrays.
* PYTHON BUG FIX: Entry objects returned by dirfile.entry() now properly
represent scalar field codes.
* PYTHON BUG FIX: An out-of-memory condition encountered by the
underlying C library is now reported using the standard MemoryError
exception. Previously, the bindings would attempt to instantiate a new
pygetdata.AllocError exception when this happened, which wouldn't work
if no memory was available. (The CPython interpreter pre-allocates an
instance of MemoryError to deal with this situation.) For backwards
compatibility, pygetdata.AllocError is now an alias for MemoryError.
* PYTHON BUG FIX: a scalar field code string can now be assigned to the
threshold attribute of WINDOW entries.
* PYTHON BUG FIX: Attempting to delete various attributes from
pygetdata objects now either succeeds or else raises an exception,
instead of crashing.
Miscellaneous:
* The default install directory for the IDL, Perl, PHP, and Python
bindings has changed: they are now all installed under ${exec_prefix}
when possible. The install directories can still be overridden by
./configure options.