diff --git a/.github/workflows/macos.yaml b/.github/workflows/macos.yaml index 7c0bd21..691a7cc 100644 --- a/.github/workflows/macos.yaml +++ b/.github/workflows/macos.yaml @@ -12,7 +12,7 @@ jobs: strategy: matrix: os: [macOS] - python-version: ['3.9', '3.10', 3.11] + python-version: ['3.9', '3.10', '3.11'] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index f39a4b9..fd19f71 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11'] + python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} @@ -28,7 +28,8 @@ jobs: # git clone https://github.com/Mathics3/mathics-core # (cd mathics-core && pip3 install -e .[full]) # (cd mathics-core && bash ./admin-tools/make-op-tables.sh) - python -m pip install Mathics3[full] + # python -m pip install Mathics3[full] + pip install -e . - name: Install mathicsscript run: | make diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index f519d3f..9d7f5ab 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: os: [windows] - python-version: ['3.9', '3.11'] + python-version: ['3.10', '3.12'] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d463052..b06e761 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,16 +2,19 @@ default_language_version: python: python repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 + rev: v4.5.0 hooks: - id: check-merge-conflict - id: debug-statements - stages: [commit] + stages: [pre-commit] + exclude: ChangeLog-spell-corrected.diff - id: end-of-file-fixer + exclude: ChangeLog-spell-corrected.diff stages: [commit] - id: trailing-whitespace + exclude: ChangeLog-spell-corrected.diff - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 24.10.0 hooks: - id: black language_version: python3 diff --git a/ChangeLog-spell-corrected.diff b/ChangeLog-spell-corrected.diff index fff30ce..c4e658a 100644 --- a/ChangeLog-spell-corrected.diff +++ b/ChangeLog-spell-corrected.diff @@ -9,97 +9,7 @@ flake8 things 2023-02-25 rocky -@@ -83,7 +83,7 @@ - - 2022-12-10 rocky - -- * mathicsscript/termshell.py, mathicsscript/termshell_prompt.py: -+ * mathicsscript/termshell.py, mathicsscript/termshell_prompt.py: - black - - 2022-11-28 rocky -@@ -189,7 +189,7 @@ - 2022-02-15 rocky - - * NEWS.md, mathicsscript/bindkeys.py, -- mathicsscript/termshell_gnu.py, mathicsscript/termshell_prompt.py: -+ mathicsscript/termshell_gnu.py, mathicsscript/termshell_prompt.py: - Handle keybindings in GNU Readline - - 2022-02-15 R. Bernstein -@@ -227,7 +227,7 @@ - - 2022-02-06 rocky - -- * mathicsscript/completion.py, mathicsscript/termshell_gnu.py: -+ * mathicsscript/completion.py, mathicsscript/termshell_gnu.py: - Imports in core have changed Specifically where strip_context is located - - 2021-12-19 rocky -@@ -253,7 +253,7 @@ - 2021-09-04 rocky - - * mathicsscript/data/inputrc-no-unicode, -- mathicsscript/data/inputrc-unicode, mathicsscript/termshell_gnu.py: -+ mathicsscript/data/inputrc-unicode, mathicsscript/termshell_gnu.py: - GNU readline was reading inputrc from wrong place Update readline tables. Warning: input-no-unicode is probably wrong - - 2021-09-04 rocky -@@ -415,7 +415,7 @@ - - 2021-06-30 rocky - -- * .pre-commit-config.yaml, mathicsscript/asymptote.py, setup.py: -+ * .pre-commit-config.yaml, mathicsscript/asymptote.py, setup.py: - Start using Asymptote - - 2021-06-30 rocky -@@ -500,7 +500,7 @@ - - 2021-06-15 rocky - -- * mathicsscript/bindkeys.py, requirements-extra.txt, setup.py: -+ * mathicsscript/bindkeys.py, requirements-extra.txt, setup.py: - PyQT5: extra module for matplotlib - - 2021-06-15 rocky -@@ -621,7 +621,7 @@ - - 2021-05-27 rocky - -- * mathicsscript/mmalexer.py, mathicsscript/termshell.py, setup.py: -+ * mathicsscript/mmalexer.py, mathicsscript/termshell.py, setup.py: - WIP start using prompt-toolkit - - 2021-05-15 R. Bernstein -@@ -959,7 +959,7 @@ - - 2021-01-09 rocky - -- * NEWS.md, mathicsscript/__main__.py, mathicsscript/termshell.py: -+ * NEWS.md, mathicsscript/__main__.py, mathicsscript/termshell.py: - `-e` `--execute` is better suited for embedded use This options adds `--quiet` and shows just evaluation output as - text--execute - -@@ -988,7 +988,7 @@ - - 2021-01-03 rocky - -- * mathicsscript/termshell.py: Guard agains None eval returns -+ * mathicsscript/termshell.py: Guard against "None" eval returns - - 2021-01-02 rocky - -@@ -1071,7 +1071,7 @@ - - 2020-12-22 R. Bernstein - -- * : Merge pull request #7 from Mathics3/unicode-option Start to suport Unicode as a CLI option -+ * : Merge pull request #7 from Mathics3/unicode-option Start to support Unicode as a CLI option - - 2020-12-22 rocky - -@@ -1088,13 +1088,13 @@ +@@ -1088,12 +1088,12 @@ * mathicsscript/__main__.py, mathicsscript/format.py, mathicsscript/inputrc, mathicsscript/inputrc-no-unicode, mathicsscript/inputrc-unicode, mathicsscript/termshell.py, @@ -115,25 +25,7 @@ 2020-12-12 rocky -@@ -1112,7 +1112,7 @@ - - 2020-12-08 rocky - -- * mathicsscript/format.py: Use equal aspect ratio on ciruclar graphs -+ * mathicsscript/format.py: Use equal aspect ratio on circular graphs - - 2020-12-07 rocky - -@@ -1120,7 +1120,7 @@ - - 2020-12-07 rocky - -- * mathicsscript/__main__.py, mathicsscript/format.py: -+ * mathicsscript/__main__.py, mathicsscript/format.py: - FindSpannngTree: use layout style of parent graph - - 2020-12-07 rocky -@@ -1154,7 +1154,7 @@ +@@ -1154,6 +1154,6 @@ 2020-12-04 rocky @@ -141,36 +33,3 @@ + * mathicsscript/format.py: Handle labeled nodes better Change color to white if we have node labels Change code slightly to facilitate expanding. 2020-12-04 rocky - -@@ -1226,7 +1226,7 @@ - - 2020-11-27 rocky - -- * mathicsscript/mmalexer.py, mathicsscript/termshell.py, setup.py: -+ * mathicsscript/mmalexer.py, mathicsscript/termshell.py, setup.py: - Can't use mathematica.lexer for now.. Sigh. It has promise. But recent Python gives now gives these... FutureWarning: Possible nested set at position ... - - 2020-11-27 rocky -@@ -1309,7 +1309,7 @@ - 2020-11-18 rocky - - * mathicsscript/__main__.py, mathicsscript/settings.m, -- mathicsscript/termshell.py, settings/settings.m, setup.py: -+ mathicsscript/termshell.py, settings/settings.m, setup.py: - Miscellaneous changes Settings`$ShowFullForm -> Settings`$ShowFullFormInput The old name has already caused too much confusion. Check Pygments style and give a columnized list when the name is - invalid. Also make sure to reset the Mathics variable to a the last - valid value when an invalid one is set. -@@ -1401,7 +1401,7 @@ - - * NEWS.md, admin-tools/git2cl, admin-tools/make-dist.sh, - admin-tools/pyenv-versions, mathicsscript/term_background.py, -- mathicsscript/version.py, setup.py, test/test_term_background.py: -+ mathicsscript/version.py, setup.py, test/test_term_background.py: - Get ready for release 1.1.0rc1 - - 2020-10-21 R. Bernstein -@@ -1492,4 +1492,3 @@ - - * Cull code from Mathics/main and revise ... colorama is no longer optional. We'll be using click soon. Start - to pull in my better terminal-detection script. -- diff --git a/NEWS.md b/NEWS.md index dfe2395..1409b29 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,22 @@ +8.0.0 +----- + +Jan 26, 2025 + +This release tracks the API changes in the Mathics Kernel, and to support enhanged debugging + +* `--edit-mode [emacs|vi]` or was added to `mathicsscript` to specify which initial edit mode for prompt-toolkit to start in +* `--post-mortem` was added `mathicsscript` to go into a trepan3k debugger on error +* Add aliases for all of the 100 or so "no-meaning" operators +* Allow 2D rendering from asymptote + + + 7.0.0 ----- +Aug 10, 2025 + * Adjust for Mathics3 core 7.0.0 API * Drop support for 3.6 and 3.7 and add support for 3.11 * Use pyproject.toml for packaging to be able to support 3.12 diff --git a/mathicsscript/version.py b/mathicsscript/version.py index 7dd816e..a6d4eb4 100644 --- a/mathicsscript/version.py +++ b/mathicsscript/version.py @@ -4,4 +4,4 @@ # well as importing into Python. That's why there is no # space around "=" below. # fmt: off -__version__="7.0.1dev0" # noqa +__version__="8.0.0" # noqa diff --git a/pyproject.toml b/pyproject.toml index d6d2cd1..0118d42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,8 +11,8 @@ build-backend = "setuptools.build_meta" name = "mathicsscript" description = "Command-line interface to Mathics3" dependencies = [ - "Mathics_Scanner>=1.3.0", - "Mathics3 >= 7.0.0dev0", + "Mathics_Scanner>=1.4.1", + "Mathics3 >= 8.0.0", "click", "colorama", "columnize", @@ -38,11 +38,11 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Mathematics", - "Topic :: Scientific/Engineering :: Physics", "Topic :: Software Development :: Interpreters", ] dynamic = ["version"] diff --git a/screenshots/README.md b/screenshots/README.md index b82b14e..2651571 100644 --- a/screenshots/README.md +++ b/screenshots/README.md @@ -43,12 +43,12 @@ The "cast" screenshot was made with asciienema and then running through `asciica For example: ``` -$ asciinema play mathicsscript1.cast +$ asciinema play mathicsscript1.caste ``` You can edit the `.cast` files. The specific commands used after this were: ```console -$ asciicast2gif -w 93 -h 37 mathicsscript1.{cast,gif} -$ asciicast2gif -w 93 -h 19 mathicsscript2.{cast,gif} +$ agg mathicsscript1.{cast,gif} +$ agg mathicsscript2.{cast,gif} ``` diff --git a/screenshots/mathicsscript1.cast b/screenshots/mathicsscript1.cast index 67a0ba2..663c276 100644 --- a/screenshots/mathicsscript1.cast +++ b/screenshots/mathicsscript1.cast @@ -4,7 +4,7 @@ [1.062212, "o", "ics"] [1.502028, "o", "script"] [2.034574, "o", "\r\n"] -[2.82522, "o", "\r\nMathics 1.1.0rc1\r\non CPython 3.9.0 (default, Oct 23 2020, 23:15:06) \r\nusing SymPy 1.6.2, mpmath 1.1.0, cython 0.29.21\r\n\r\nCopyright (C) 2011-2020 The Mathics Team.\r\nThis program comes with ABSOLUTELY NO WARRANTY.\r\nThis is free software, and you are welcome to redistribute it\r\nunder certain conditions.\r\nSee the documentation for the full license.\r\n\r\nQuit by pressing CONTROL-D\r\n\r\n"] +[2.82522, "o", "\r\nMathicsscript: 8.0.0, Mathics 8.0.0\r\non CPython 3.12.8 (main, Dec 9 2024, 11:38:23) [GCC 13.2.0]\r\nusing SymPy 1.13.3, mpmath 1.130, cython 3.0.11\r\n\r\nCopyright (C) 2011-2025 The Mathics Team.\r\nThis program comes with ABSOLUTELY NO WARRANTY.\r\nThis is free software, and you are welcome to redistribute it\r\nunder certain conditions.\r\nSee the documentation for the full license.\r\n\r\nQuit by pressing CONTROL-D\r\n\r\n"] [2.825361, "o", "\u001b[32mIn[\u001b[1m1\u001b[22m]:= \u001b[39m"] [3.695122, "o", "I"] [3.967145, "o", "n"] diff --git a/screenshots/mathicsscript1.gif b/screenshots/mathicsscript1.gif index 771b0b0..1c6552e 100644 Binary files a/screenshots/mathicsscript1.gif and b/screenshots/mathicsscript1.gif differ