This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate sage.libs.gap.element and convert Sage to use
gappy.gapobj.GapObj directly as the primary wrapper for GAP objects. The sage.libs.gap.element module is kept for now but deprecated, and GapElement and all its subclasses are just aliases for the equivalent GapObjs, so existing code using these classes might still work as long as they're not using them at the C/Cython level. So it's not perfect backwards-compatibility but it's better than nothing. By necessity this is something of a patchbomb, but most of the changes are simply changing GapElement -> GapObj. A few changes deserve specific mention, however: * Added sage.libs.gap.converters--this uses gappy's GapObj.convert_to API to add `.sage()` methods to most of the GapObj subclasses, so they behave the same as their GapElement progenitors w.r.t. conversion to equivalent Sage types. * Integer, Rational, and IntegerMod all have explicit cases in their constructors for construction from equivalent GapObjs. * As mentioned in the ticket #31404, Polynomial.__call__ has a special case for handling GapObjs, since nothing else can be coerced to them when evaluating a polynomial on a GapObj. * MatrixArgs now has an explicit case for converting GapLists to Sage matrices. * sage.groups.class_function had some doctests for ClassFunction_libgap which were copy/pasted from ClassFunction_gap without modification, so it was not properly testing the libgap implementation of ClassFunction; this has been fixed * Added an explicit _libgap_ method for efficient conversion of NumberFields to their GAP equivalents. Also cleaned up the existing _gap_ implementation. * Fixed a bit of code in sage.groups.matrix_gps.matrix_group.MatrixGroup_gap that was using libgap inefficiently. * Ditto in sage.groups.perm_gps.partn_ref2.refinement_generic * Removed the late_import stuff from sage.rings.universal_cyclotomic_field since it does not appear to be necessary any longer. * In PermutationGroup_generic some doctests which compared libgap objects to gap (pexpect) objects had to be changed--previously they did not compare as equal, but as a surprising but welcome change (perhaps due to going outside the coercion system) GapObjs now compare equal to their equivalent pexect GapElements. * Updated more tests to account for slight differences in iteration order on groups.
- Loading branch information
Showing
38 changed files
with
1,176 additions
and
3,472 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.