Skip to content

7.0.0

Latest
Compare
Choose a tag to compare
@rocky rocky released this 09 Aug 17:11
· 80 commits to master since this release

Some work was done here in support of planned future improvements like lazy loading of builtin functions. A bit of effort was also spent to modernize Python code and style, add more type annotations, remove spelling errors, and use newer versions of important software like SymPy and Python itself.

New Builtins

  • $MaxLengthIntStringConversion
  • Elements
  • ComplexExpand (thanks to vitrun)
  • ConjugateTranspose
  • LeviCivitaTensor
  • RealAbs and RealSign
  • RealValuedNumberQ

Documentation

Many formatting issues with the PDF file have been addressed. In particular, the spacing of section numbers in chapter and section table of contents has been increased. The margin space around builtin definitions has a also been increased. Numerous spelling corrections to the document have been applied.

The code to run doctests and produce LaTeX documentation has been revised and refactored to allow incremental builtin update, and to DRY the code.

Section Head-Related Operations is a new section off of "Expression Structure". The title of the PDF has changed from Mathics to Mathics3 and the introduction has been updated and revised.

Compatibility

  • *Plot does not show messages during the evaluation.
  • Range[] now handles a negative di PR #951
  • Improved support for DirectedInfinity and Indeterminate.
  • Graphics and Graphics3D including wrong primitives and
    directives are shown with a pink background. In the Mathics-Django
    interface, a tooltip error message is also shown.
  • Improving support for $CharacterEncoding. Now it is possible to
    change it from inside the session.

Internals ---

  • eval_abs and eval_sign extracted from Abs and Sign and added to mathics.eval.arithmetic.
  • Maximum number of digits allowed in a string set to 7000 and can be adjusted using environment variable MATHICS_MAX_STR_DIGITS on Python versions that don't adjust automatically (like pyston).
  • Real number comparisons implemented is based now in the internal implementation of RealSign.
  • For Python 3.11, the variable $MaxLengthIntStringConversion controls the maximum size of the literal conversion between large integers and Strings.
  • Older style non-appearing and non-pedagogical doctests have been converted to pytest
  • Built-in code is directed explicitly rather than implicitly. This facilitates the ability to lazy load builtins or "autoload" them via GNU Emacs autoload.
  • add mpmath lru cache
  • Some works was done to make it possible so that in the future we can speed up initial loading and reduce the initial memory footprint

Bugs

  • Definitions is compatible with pickle.
  • Improved support for Quantity expressions, including conversions, formatting and arithmetic operations.
  • Background option for Graphics and Graphics3D is operative again.
  • Numeric comparisons against expressions involving Strings; Issue #797)
  • Switch[] involving Infinity. Issue #956
  • Outer[] on SparseArray. Issue #939
  • ArrayQ[] detects SparseArray PR #947
  • BoxExpressionError exceptions handled Issue. PR #970
  • Derivative evaluation of True, False and List[] corrected. PR #971, #973
  • Combinatorica package fixes. PR #974
  • Exit[] not working. PR #998
  • BaseForm is now listed as in $OutputForms

API

We now require an explicit call to a new functionimport_and_load_builtins(). Previously loading was implicit and
indeterminate as to when this occurred as it was based on import order.

We need this so that we can support in the future lazy loading of builtin modules.

Package updates

  1. Python 3.11 is now supported
  2. Sympy 1.12 is now supported