- 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 aGapObjto 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_converteris replaced with theGap.convert_fromdecorator.- The
GapObj.convert_todecorator can be used to register new conversion methods onGapObj, or specific subclasses thereof.
- Added some C-level utility methods on
GapIntegerto 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 allGapObjwhich returnsFalseif its value is equal to zero. - Install the
.pyxsources so that Cython tracebacks can work better.
- When converting a
GapRecordto adictwithdict(rec)the keys remain asGapStringinstead 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_functionas arguments to another GAP function before they have been called once.
- Initial alpha release for testing against SageMath.