- Dropped support for Python 3.6; Python 3.7+ is officially supported (3.6 may still work but is not tested).
- Prevent needless line-wrapping of exception messages. This was inspired by similar code in GAP.jl.
- Fixed segmentation fault that could occur upon all GAPErrors after a large number of errors from GAP have been caught and handled [#12].
- Improved error handling around more parts of the code, particularly around any code that can result in executing arbitrary GAP code.
- Renamed the special method
_gap_
, for converting arbitrary Python objects to GAP objects, to__gap__
as inspired by the discussion at https://trac.sagemath.org/ticket/31297#comment:23- Likewise, the special method
_gap_init_
is now named__gap_eval__
to emphasize that it returns a string to be passed toGap.eval()
. It still does not take any arguments.
- Likewise, the special method
- Added
GapObj.python()
method for converting aGapObj
to its equivalent type if one exists (it does not always, but it does in the cases where there is an equivalent type built into Python).GapList.python()
andGapRecord.python()
also recursively convert the values they contain to equivalent Python types if possible.
- New interface for registering converters to/from GAP object types:
Gap.register_converter
is replaced with theGap.convert_from
decorator.- The
GapObj.convert_to
decorator can be used to register new conversion methods onGapObj
, or specific subclasses thereof.
- Added some C-level utility methods on
GapInteger
to help convert to different integer types (C long ints and mpz_t, depending on the size of the int). This helps with more efficient conversion to Sage Integers without having to pass through an intermediary Pythonint
. - Implemented the
__invert__
and__neg__
magic methods forGapObj
. - Implemented a default
__bool__
for allGapObj
which returnsFalse
if its value is equal to zero. - Install the
.pyx
sources so that Cython tracebacks can work better.
- When converting a
GapRecord
to adict
withdict(rec)
the keys remain asGapString
instead ofstr
. This is more consistent with the fact that the values are not converted to Python equivalents. - If an arbitrary GAP error occurs while looking up a global variable with
Gap.__getattr__
it is handled and re-raised as anAttributeError
. - The
Gap.__repr__
method displays names of subclasses correctly.
- Made fixes for MacOS and Cygwin support.
- Added LRU cache for functions defined with
gap.gap_functions
, restoring some of the caching functionality from Sage'sGap.function_factory
.
- Fixed bug in multi-indexing of nested lists.
- Fixed minor formatting difference in the IndexError message when indexing single lists versus multi-indexing nested lists.
- Fixed a bug when using functions defined with
gap.gap_function
as arguments to another GAP function before they have been called once.
- Initial alpha release for testing against SageMath.