Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-mathics-pygments for 
openSUSE:Factory checked in at 2026-05-23 23:23:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-mathics-pygments (Old)
 and      /work/SRC/openSUSE:Factory/.python-mathics-pygments.new.2084 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-mathics-pygments"

Sat May 23 23:23:22 2026 rev:4 rq:1354527 version:10.0.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-mathics-pygments/python-mathics-pygments.changes
  2025-02-10 18:27:09.515924563 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-mathics-pygments.new.2084/python-mathics-pygments.changes
        2026-05-23 23:23:46.379883652 +0200
@@ -1,0 +2,8 @@
+Fri May 15 12:38:17 UTC 2026 - Atri Bhattacharya <[email protected]>
+
+- Update to version 10.0.0:
+  * Simplify understanding compatibility across all Mathics3 10
+    API components.
+- Drop a useless hashbang.
+
+-------------------------------------------------------------------

Old:
----
  mathics_pygments-1.0.4.tar.gz

New:
----
  mathics_pygments-10.0.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-mathics-pygments.spec ++++++
--- /var/tmp/diff_new_pack.7OnVHk/_old  2026-05-23 23:23:47.775940644 +0200
+++ /var/tmp/diff_new_pack.7OnVHk/_new  2026-05-23 23:23:47.791941297 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package python-mathics-pygments
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,10 +17,8 @@
 
 
 %define modname mathics_pygments
-# Mathics-Scanner does not support python2
-%define skip_python2 1
 Name:           python-mathics-pygments
-Version:        1.0.4
+Version:        10.0.0
 Release:        0
 Summary:        Mathematica/Wolfram Language Lexer for Pygments
 License:        MIT
@@ -29,15 +27,16 @@
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  python-rpm-macros
 # SECTION test requirements
-BuildRequires:  %{python_module Mathics-Scanner >= 1.2.0}
+BuildRequires:  %{python_module Mathics-Scanner >= 10.0.0}
 BuildRequires:  %{python_module Pygments >= 2}
 BuildRequires:  %{python_module pip}
 BuildRequires:  %{python_module pytest}
 BuildRequires:  %{python_module wheel}
 # /SECTION
 BuildRequires:  fdupes
-Requires:       python-Mathics-Scanner >= 1.2.0
+Requires:       python-Mathics-Scanner >= 10.0.0
 Requires:       python-Pygments >= 2
+Provides:       python-Mathics3-pygments
 BuildArch:      noarch
 %python_subpackages
 
@@ -46,7 +45,8 @@
 pygments engine.
 
 %prep
-%setup -q -n mathics-pygments-%{version}
+%autosetup -n Mathics3-pygments-%{version}
+sed -Ei "1{\@/usr/bin/env@d}" 
mathics_pygments/generate/build_pygments_tables.py
 
 %build
 %pyproject_wheel
@@ -62,5 +62,5 @@
 %doc CHANGES.rst README.md
 %license LICENSE
 %{python_sitelib}/%{modname}/
-%{python_sitelib}/%{modname}-%{version}*.*-info/
+%{python_sitelib}/mathics3_pygments-%{version}*.*-info/
 

++++++ mathics_pygments-1.0.4.tar.gz -> mathics_pygments-10.0.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mathics-pygments-1.0.4/.github/workflows/isort-and-black-checks.yml 
new/Mathics3-pygments-10.0.0/.github/workflows/isort-and-black-checks.yml
--- old/mathics-pygments-1.0.4/.github/workflows/isort-and-black-checks.yml     
2025-01-28 23:24:03.000000000 +0100
+++ new/Mathics3-pygments-10.0.0/.github/workflows/isort-and-black-checks.yml   
2026-04-19 13:25:02.000000000 +0200
@@ -9,17 +9,17 @@
   build:
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/checkout@v4
-      - name: Set up Python 3.11
-        uses: actions/setup-python@v5
+      - uses: actions/checkout@v6
+      - name: Set up Python 3.14
+        uses: actions/setup-python@v6
         with:
-          python-version: 3.11
+          python-version: 3.14
       - name: Install click, black and isort
-        run: pip install 'click==8.0.4' 'black==23.12.1' 'isort==5.13.2'
+        run: pip install 'click==8.2.1' 'black==25.11.0' 'isort==5.13.2'
       - name: Run isort --check .
         run: isort --check .
-      - name: Run black --check .
-        run: black --check .
+      - name: Run black --check --diff .
+        run: black --check --diff .
         # run: |
         #   black .
         #   git config --global user.name 'autoblack'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mathics-pygments-1.0.4/.github/workflows/macos.yml 
new/Mathics3-pygments-10.0.0/.github/workflows/macos.yml
--- old/mathics-pygments-1.0.4/.github/workflows/macos.yml      1970-01-01 
01:00:00.000000000 +0100
+++ new/Mathics3-pygments-10.0.0/.github/workflows/macos.yml    2026-04-19 
13:25:02.000000000 +0200
@@ -0,0 +1,38 @@
+name: mathics-pygments (MacOS)
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+  build:
+    runs-on: macos-latest
+    strategy:
+      matrix:
+        os: [macOS]
+        python-version: ['3.14', '3.13', '3.12']
+    steps:
+    - uses: actions/checkout@v6
+    - name: Set up Python ${{ matrix.python-version }}
+      uses: actions/setup-python@v6
+      with:
+        python-version: ${{ matrix.python-version }}
+    - name: Install Mathics3 Pygments dependencies
+      run: |
+        python -m pip install --upgrade pip setuptools wheel
+        # We can comment out after next Mathics3-Scanner release
+        # python -m pip install -e 
git+https://github.com/Mathics3/Mathics3-scanner#egg=Mathics3-Scanner[full]
+        # git clone --depth 1 https://github.com/Mathics3/Mathics3-scanner.git
+        # cd Mathics3-scanner/
+        # pip install -e .
+        # bash -x admin-tools/make-JSON-tables.sh
+        # cd ..
+    - name: Install Mathics3 Pygments
+      run: |
+        python -m pip install --no-build-isolation -e .
+    - name: Test Mathics3 Pygments
+      run: |
+        pip install pytest
+        make check
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mathics-pygments-1.0.4/.github/workflows/osx.yml 
new/Mathics3-pygments-10.0.0/.github/workflows/osx.yml
--- old/mathics-pygments-1.0.4/.github/workflows/osx.yml        2025-01-28 
23:24:03.000000000 +0100
+++ new/Mathics3-pygments-10.0.0/.github/workflows/osx.yml      1970-01-01 
01:00:00.000000000 +0100
@@ -1,31 +0,0 @@
-name: mathics-pygments (OSX)
-
-on:
-  push:
-    branches: [ master ]
-  pull_request:
-    branches: [ master ]
-
-jobs:
-  build:
-    runs-on: macos-latest
-    strategy:
-      matrix:
-        os: [macOS]
-        python-version: ['3.9', '3.10', '3.11']
-    steps:
-    - uses: actions/checkout@v4
-    - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v5
-      with:
-        python-version: ${{ matrix.python-version }}
-    - name: Install dependencies
-      run: |
-        python -m pip install --upgrade pip
-    - name: Install Mathics Pygments
-      run: |
-        pip install -e .
-    - name: Test Mathics Pygments
-      run: |
-        pip install pytest
-        make check
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mathics-pygments-1.0.4/.github/workflows/ubuntu.yml 
new/Mathics3-pygments-10.0.0/.github/workflows/ubuntu.yml
--- old/mathics-pygments-1.0.4/.github/workflows/ubuntu.yml     2025-01-28 
23:24:03.000000000 +0100
+++ new/Mathics3-pygments-10.0.0/.github/workflows/ubuntu.yml   2026-04-19 
13:25:02.000000000 +0200
@@ -11,20 +11,27 @@
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        python-version: ['3.8', '3.9', '3.10', '3.11']
+        python-version: ['3.14', '3.11', '3.12', '3.13']
     steps:
-    - uses: actions/checkout@v4
+    - uses: actions/checkout@v6
     - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v5
+      uses: actions/setup-python@v6
       with:
         python-version: ${{ matrix.python-version }}
-    - name: Install dependencies
+    - name: Install Mathics3 Pygments dependencies
       run: |
-        python -m pip install --upgrade pip
-    - name: Install Mathics Pygments
+        python -m pip install --upgrade pip setuptools wheel
+        # We can comment out after next Mathics3-Scanner release
+        # python -m pip install -e 
git+https://github.com/Mathics3/Mathics3-scanner#egg=Mathics3-Scanner[full]
+        # git clone --depth 1 https://github.com/Mathics3/Mathics3-scanner.git
+        # cd Mathics3-scanner/
+        # pip install -e .
+        # bash -x admin-tools/make-JSON-tables.sh
+        # cd ..
+    - name: Install Mathics3 Pygments
       run: |
-        pip install -e .
-    - name: Test Mathics Pygments
+        python -m pip install --no-build-isolation -e .
+    - name: Test Mathics3 Pygments
       run: |
         pip install pytest
         make check
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mathics-pygments-1.0.4/.github/workflows/windows.yml 
new/Mathics3-pygments-10.0.0/.github/workflows/windows.yml
--- old/mathics-pygments-1.0.4/.github/workflows/windows.yml    2025-01-28 
23:24:03.000000000 +0100
+++ new/Mathics3-pygments-10.0.0/.github/workflows/windows.yml  2026-04-19 
13:25:02.000000000 +0200
@@ -1,4 +1,4 @@
-name: Mathics (Windows)
+name: Mathics3 pygments (Windows)
 
 on:
   push:
@@ -12,20 +12,27 @@
     strategy:
       matrix:
         os: [windows]
-        python-version: ['3.9', '3.11']
+        python-version: ['3.11', '3.14']
     steps:
-    - uses: actions/checkout@v4
+    - uses: actions/checkout@v6
     - name: Set up Python ${{ matrix.python-version }}
-      uses: actions/setup-python@v5
+      uses: actions/setup-python@v6
       with:
         python-version: ${{ matrix.python-version }}
-    - name: Install dependencies
+    - name: Install Mathics3 Pygments dependencies
       run: |
-        python -m pip install --upgrade pip
-    - name: Install Mathics Pygments
+        python -m pip install --upgrade pip setuptools wheel
+        # We can comment out after next Mathics3-Scanner release
+        # python -m pip install -e 
git+https://github.com/Mathics3/Mathics3-scanner#egg=Mathics3-Scanner[full]
+        # git clone --depth 1 https://github.com/Mathics3/Mathics3-scanner.git
+        # cd Mathics3-scanner/
+        # pip install -e .
+        # bash -x admin-tools/make-JSON-tables.sh
+        # cd ..
+    - name: Install Mathics3 Pygments
       run: |
-        python setup.py install
-    - name: Test Mathics Pygments
+        python -m pip install --no-build-isolation -e .
+    - name: Test Mathics3 Pygments
       run: |
         pip install pytest
         make check
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mathics-pygments-1.0.4/.pre-commit-config.yaml 
new/Mathics3-pygments-10.0.0/.pre-commit-config.yaml
--- old/mathics-pygments-1.0.4/.pre-commit-config.yaml  2025-01-28 
23:24:03.000000000 +0100
+++ new/Mathics3-pygments-10.0.0/.pre-commit-config.yaml        2026-04-19 
13:25:02.000000000 +0200
@@ -23,7 +23,7 @@
         stages: [pre-commit]
         args: ["--profile", "black"]
 -   repo: https://github.com/psf/black
-    rev: 23.12.1
+    rev: 25.11.0
     hooks:
     - id: black
       language_version: python3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mathics-pygments-1.0.4/CHANGES.rst 
new/Mathics3-pygments-10.0.0/CHANGES.rst
--- old/mathics-pygments-1.0.4/CHANGES.rst      2025-01-28 23:24:03.000000000 
+0100
+++ new/Mathics3-pygments-10.0.0/CHANGES.rst    2026-04-19 13:25:02.000000000 
+0200
@@ -1,12 +1,21 @@
 CHANGES
 =======
 
+10.0.0
+------
+
+"Mathics" has been renamed to "Mathics3".
+
+The bump in version number from 1.0.4 to 10.0.0 is to simplify understaning 
compatibility between all Mathics3 10 API components.
+
+Small administrative changes have been made for the ever-changing Python 
environment.
+
 1.0.4
 -----
 
 This is a Transitional release.
 
-Although there is a dependency on mathics-scanner, we don't use it since 
tables have changed. There is some code for reading the YAML takes from the 
project though. With a newer and better mathics-scanner, we should be able to 
revise this code, use the tokenizer from mathics-scanner, and simplify things 
greatly.
+Although there is a dependency on Mathics3-scanner, we don't use it since 
tables have changed. There is some code for reading the YAML takes from the 
project though. With a newer and better mathics-scanner, we should be able to 
revise this code, use the tokenizer from mathics-scanner, and simplify things 
greatly.
 
 1.0.3
 -----
@@ -44,8 +53,8 @@
 
 First public release. Is largely the same thing as
 pygments-mathematica, but we are geared for CLI use in mathicsscript and
-we get operator information from Mathics Scanner.
+we get operator information from Mathics3 Scanner.
 
 For uses outside of terminal use, pygments-mathematica is probably better.
 But over time I expect this will change since we will draw more power from
-Mathics Scanner.
+Mathics3 Scanner.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mathics-pygments-1.0.4/Makefile 
new/Mathics3-pygments-10.0.0/Makefile
--- old/mathics-pygments-1.0.4/Makefile 2025-01-28 23:24:03.000000000 +0100
+++ new/Mathics3-pygments-10.0.0/Makefile       2026-04-19 13:25:02.000000000 
+0200
@@ -52,7 +52,10 @@
 rmChangeLog:
        $(RM) ChangeLog || true
 
+#: Create ChangeLog from version control without corrections
+ChangeLog-without-corrections:
+       git log --pretty --numstat --summary | $(GIT2CL) >ChangeLog
+
 #: Create a ChangeLog from git via git log and git2cl
-ChangeLog: rmChangeLog
-       git log --pretty --numstat --summary | $(GIT2CL) >$@
+ChangeLog: rmChangeLog ChangeLog-without-corrections
        patch ChangeLog < ChangeLog-spell-corrected.diff
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mathics-pygments-1.0.4/README.md 
new/Mathics3-pygments-10.0.0/README.md
--- old/mathics-pygments-1.0.4/README.md        2025-01-28 23:24:03.000000000 
+0100
+++ new/Mathics3-pygments-10.0.0/README.md      2026-04-19 13:25:02.000000000 
+0200
@@ -1,37 +1,34 @@
 # Mathematica lexer and highlighter for Pygments
 
-[![mathics-pygments 
(OSX)](https://github.com/Mathics3/mathics-pygments/actions/workflows/osx.yaml/badge.svg)](https://github.com/Mathics3/mathics-pygments/actions/workflows/osx.yaml)
-[![mathics-pygments 
(ubuntu)](https://github.com/Mathics3/mathics-pygments/actions/workflows/ubuntu.yaml/badge.svg)](https://github.com/Mathics3/mathics-pygments/actions/workflows/ubuntu.yaml)
-![](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)
-[![Packaging 
status](https://repology.org/badge/tiny-repos/mathics-pygments.svg)](https://repology.org/project/mathics-pygments/versions)
-
+[![Mathics3-pygments 
(ubuntu)](https://github.com/Mathics3/Mathics3-pygments/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/Mathics3/Mathics3-pygments/actions/workflows/ubuntu.yml)
+[![Mathics3-pygments 
(MacOS)](https://github.com/Mathics3/Mathics3-pygments/actions/workflows/macos.yml/badge.svg)](https://github.com/Mathics3/Mathics3-pygments/actions/workflows/macos.yml)
+![MIT 
license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)
 
 
 A lexer and highlighter for 
[_Mathematica_](http://wolfram.com/mathematica)/Wolfram Language
  source code using the [pygments](http://pygments.org) engine.
 
- This code is based on 
[pygments-mathematica](https://pypi.org/project/pygments-mathematica/) but has 
been specially revised so it interacts with 
[mathicsscript](https://pypi.org/project/mathicsscript/). As such it works 
better that pygments-mathematica for this use, and possibly might not be as 
good in other contexts. Over time though this should get address.
+ This code is based on 
[pygments-mathematica](https://pypi.org/project/pygments-mathematica/) but has 
been specially revised so it interacts with 
[mathicsscript](https://pypi.org/project/mathicsscript/). As such, it works 
better than Pygments-Mathematica for this use, and possibly might not be as 
good in other contexts. Over time, this will be addressed.
 
- Another difference, is the fact that this package relegates knowledge about 
operator names to [Mathics-Scanner](https://pypi.org/project/Mathics-Scanner/).
+ Another difference is the fact that this package delegates knowledge about 
operator names to [Mathics-Scanner](https://pypi.org/project/Mathics-Scanner/).
 
 
 ## Features
 
 It can currently lex and highlight:
 
-  - All builtin functions in the ``System` `` context including Unicode 
symbols like `π` except those
-  that use characters from the private Unicode space (e.g. `\[FormalA]`).
-  - User defined symbols, including those in a context.
-  - All operators including Unicode operators like `∈` and `⊕`.
-  - Comments, including multi line and nested.
-  - Strings, including multi line and escaped quotes.
-  - Patterns, slots (including named slots `#name` introduced in version 10) 
and slot sequences.
-  - Message names (e.g. the `ivar` in `General::ivar`)
+  - All built-in functions in the `System` context, including Unicode symbols 
like `π`, except those that use characters from the private Unicode space (e.g. 
`\[FormalA]`).
+  - User-defined symbols, including those in a context.
+  - All operators, including Unicode operators like `∈` and `⊕`.
+  - Comments, including multi-line and nested.
+  - Strings, including multi-line and escaped quotes.
+  - Patterns, slots (including named slots `#name` introduced in version 10), 
and slot sequences.
+  - Message names (e.g., the `ivar` in `General::ivar`)
   - Numbers including base notation (e.g. `8 ^^ 23 == 19`) and scientific 
notation (e.g. `1 *^ 3 == 1000`).
-  - Local variables in `Block`, `With` and `Module`.
+  - Local variables in `Block`, `With`, and `Module`.
 
 ### Example:
-```
+```mathematica
 (* An example highlighting the features of
    this Pygments plugin for Mathematica *)
 lissajous::usage = "An example Lissajous curve.\n" <>
@@ -52,23 +49,20 @@
 
 ### From source code
 
-If you'd like to make modifications to the color scheme for personal use or if 
you'd like to try the
-most recent release that might not yet be available in PyPi, download and 
unzip the source code
-from the [latest 
release](https://github.com/Mathics3/mathics-pygments/releases/latest). After
-you've [installed Pygments](http://pygments.org/download/) (`pip install 
Pygments` works well
-if you already have python setup on your system), run the following from the 
repo's root directory:
+If you'd like to make modifications to the color scheme for personal use or if 
you'd like to try the most recent release that might not yet be available in 
PyPi, download and unzip the source code from the [latest 
release](https://github.com/Mathics3/Mathics3-pygments/releases/latest). After
+you've [installed Pygments](http://pygments.org/download/) (`pip install 
Pygments` works well if you already have Python set up on your system), run the 
following from the repo's root directory:
 
 ```bash
-python setup.py install
+pip install -e . 
 ```
 
 ## Usage
 
-### Server-side syntax highlighting in Jekyll, Octopress and other static 
websites
+### Server-side syntax highlighting in Jekyll, Octopress, and other static 
websites
 
 To highlight _Mathematica_ code using this lexer, enclose the code between 
these liquid tags:
 
-```
+```Jinja
 {% highlight wl %}
 <your code here>
 {% endhighlight %}
@@ -83,9 +77,7 @@
 Pygments.start('<path to your python env>/site-packages/pygments/')
 ```
 
-> **NOTE:** Although this lexer is registered with the names `mathematica` and 
`mma` for use as language hints, the
-default lexer that ships with Pygments overrides this. Hence until this is 
incorporated into the main Pygments repository
-please use `wl` or `wolfram` or `wolfram-language` as the language hint.
+> **NOTE:** Although this lexer is registered with the names `mathematica` and 
`mma` for use as language hints, the default lexer that ships with Pygments 
overrides this. Hence, until this is incorporated into the main Pygments 
repository, please use `wl` or `wolfram` or `wolfram-language` as the language 
hint.
 
 ### Highlighting in LaTeX documents
 
@@ -120,9 +112,9 @@
 
 ### Pelican static page generator
 
-The [Pelican static generator](http://blog.getpelican.com/) is written in 
Python and uses Pygments by default. To use it there, you mark code blocks with 
the usual 4 spaces indent and you prepend it with `:::wl` if you are using 
Markdown
+The [Pelican static generator](http://blog.getpelican.com/) is written in 
Python and uses Pygments by default. To use it there, you mark code blocks with 
the usual 4 spaces indent, and you prepend it with `:::wl` if you are using 
Markdown
 
-```
+```wl
     :::wl
     FileNames["CodeGenerator.m", {$InstallationDirectory}, 4]
     (*
@@ -132,7 +124,7 @@
 
 If you are using ReStructuredText, please mark your *Mathematica* code with
 
-```
+```RsT
 .. code-block:: wl
 
    <indented code block goes here>
@@ -140,8 +132,7 @@
 
 ### Command line usage
 
-The `pygmentize` command can be used to invoke this lexer and convert any 
_Mathematica_ file to an appropriately
-highlighted file in a different format. For example, to convert a file 
`package.m` to a HTML file, run
+The `pygmentize` command can be used to invoke this lexer and convert any 
_Mathematica_ file to an appropriately highlighted file in a different format. 
For example, to convert a file `package.m` to an HTML file, run
 
 ```bash
 pygmentize -O full,style=mathematica -f html -l wl -o package.html package.m
@@ -158,7 +149,7 @@
 make mma.css  # Same thing as: sass mma.scss mma.css
 ```
 
-For other applications including command line usage, the lexer ships with a 
style named `mathematica`.
+For other applications, including command line usage, the lexer ships with a 
style named `mathematica`.
 (See the arguments to the `pygmentize` command in the section above.) To use 
different colors, modify
 the style in `mathics_pygemnts/style.py` and run `python setup.py install` 
again.
 
@@ -166,12 +157,9 @@
 
 ## Limitations
 
-It cannot highlight lexically and dynamically scoped variables (e.g. the `x` 
in `With[{x = 1}, x + 1]` or
-the `Plus` in `Block[{Plus = Times}, 2 + 3]`, etc.) consistently throughout 
their scope. This would require a
-parser that further processes the stream of tokens and builds an AST that 
captures the semantics of the language.
+It cannot highlight lexically and dynamically scoped variables (e.g., the `x` 
in `With[{x = 1}, x + 1]` or the `Plus` in `Block[{Plus = Times}, 2 + 3]`, 
etc.) consistently throughout their scope. This would require a parser that 
further processes the stream of tokens and builds an AST that captures the 
semantics of the language.
 
-This is currently not a high priority since it is non-trivial to implement it 
within the framework
-by Pygments, but I am interested in supporting this eventually, so 
collaborations/pull requests are welcome :)
+This is currently not a high priority since it is non-trivial to implement 
within the framework by Pygments, but I am interested in supporting this 
eventually, so collaborations/pull requests are welcome :)
 
 ## Acknowledgments
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mathics-pygments-1.0.4/admin-tools/make-JSON-tables.sh 
new/Mathics3-pygments-10.0.0/admin-tools/make-JSON-tables.sh
--- old/mathics-pygments-1.0.4/admin-tools/make-JSON-tables.sh  2025-01-28 
23:24:03.000000000 +0100
+++ new/Mathics3-pygments-10.0.0/admin-tools/make-JSON-tables.sh        
2026-04-19 13:25:02.000000000 +0200
@@ -3,5 +3,6 @@
 json_tables_owd=$(pwd)
 mydir=$(dirname $bs)
 cd $mydir
+# Code needs to be gone over for this to work. So add "-new" to filename.
 python ../mathics_pygments/generate/build_pygments_tables.py -o 
$mydir/../mathics_pygments/data/mma-tables-new.json
 cd $json_tables_owd
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mathics-pygments-1.0.4/admin-tools/make-dist.sh 
new/Mathics3-pygments-10.0.0/admin-tools/make-dist.sh
--- old/mathics-pygments-1.0.4/admin-tools/make-dist.sh 2025-01-28 
23:24:03.000000000 +0100
+++ new/Mathics3-pygments-10.0.0/admin-tools/make-dist.sh       2026-04-19 
13:25:02.000000000 +0200
@@ -19,15 +19,7 @@
 cd ..
 source mathics_pygments/version.py
 echo $__version__
-
-for pyversion in $PYVERSIONS; do
-    if ! pyenv local $pyversion ; then
-       exit $?
-    fi
-    rm -fr build
-    python setup.py bdist_egg
-done
-python setup.py bdist_wheel --universal
-mv -v dist/${package}-${__version__}-{py2.,}py3-none-any.whl
+pyenv local 3.13
+python -m build --wheel --no-isolation
 python ./setup.py sdist
 finish
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mathics-pygments-1.0.4/admin-tools/pyenv-versions 
new/Mathics3-pygments-10.0.0/admin-tools/pyenv-versions
--- old/mathics-pygments-1.0.4/admin-tools/pyenv-versions       2025-01-28 
23:24:03.000000000 +0100
+++ new/Mathics3-pygments-10.0.0/admin-tools/pyenv-versions     2026-04-19 
13:25:02.000000000 +0200
@@ -5,4 +5,4 @@
     echo "This script should be *sourced* rather than run directly through 
bash"
     exit 1
 fi
-export PYVERSIONS='3.6 3.7 3.8 pypy3.7 3.9 3.10 3.11 3.12 3.13'
+export PYVERSIONS='3.11 pypy3.11-7.3.20 3.12 3.13 3.14'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mathics-pygments-1.0.4/mathics_pygments/builtins.py 
new/Mathics3-pygments-10.0.0/mathics_pygments/builtins.py
--- old/mathics-pygments-1.0.4/mathics_pygments/builtins.py     2025-01-28 
23:24:03.000000000 +0100
+++ new/Mathics3-pygments-10.0.0/mathics_pygments/builtins.py   2026-04-19 
13:25:02.000000000 +0200
@@ -6550,8 +6550,8 @@
     "$WolframUUID",
 }
 
-# The Mathics parser can't handle Degree ("uB0") as an operator, so we'll add 
it here.
-UNICODE_OPERATORS = set(list(_data["unicode-operators"].keys()) + ["\u00B0"])
+# The Mathics3 parser can't handle Degree ("uB0") as an operator, so we'll add 
it here.
+UNICODE_OPERATORS = set(list(_data["unicode-operators"].keys()) + ["\u00b0"])
 
 UNICODE_OPERATORS_OLD = {
     "·",  # \[CenterDot]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mathics-pygments-1.0.4/mathics_pygments/data/.gitignore 
new/Mathics3-pygments-10.0.0/mathics_pygments/data/.gitignore
--- old/mathics-pygments-1.0.4/mathics_pygments/data/.gitignore 1970-01-01 
01:00:00.000000000 +0100
+++ new/Mathics3-pygments-10.0.0/mathics_pygments/data/.gitignore       
2026-04-19 13:25:02.000000000 +0200
@@ -0,0 +1 @@
+/mma-tables-new.json
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mathics-pygments-1.0.4/mathics_pygments/data/mma-tables.json 
new/Mathics3-pygments-10.0.0/mathics_pygments/data/mma-tables.json
--- old/mathics-pygments-1.0.4/mathics_pygments/data/mma-tables.json    
2025-01-28 23:24:03.000000000 +0100
+++ new/Mathics3-pygments-10.0.0/mathics_pygments/data/mma-tables.json  
2026-04-19 13:25:02.000000000 +0200
@@ -1 +1 @@
-{"ascii-operators": ["!", "!", "!!", "!=", "&", "&&", "'", "*", "**", "*=", 
"+", "++", "+=", "-", "--", "-=", "->", ".", "..", "...", "/", "/*", "/.", 
"//", "//.", "//=", "//@", "/:", "/;", "/=", "/@", ":", "::", ":=", ":>", ";", 
";;", "<", "<->", "<<", "<=", "<>", "=", "=!=", "=.", "==", "===", ">", ">=", 
">>", ">>>", "?", "?", "??", "@*", "@@", "@@@", "\\!", "^", "^:=", "^=", "_", 
"__", "___", "|", "|->", "||", "~", "~~"], "unicode-operators": {"\u2227": 
"And", "\u2235": "Because", "\u00b7": "CenterDot", "\u2299": "CircleDot", 
"\u2296": "CircleMinus", "\u2295": "CirclePlus", "\u2297": "CircleTimes", 
"\u2232": "ClockwiseContourIntegral", "\u2236": "Colon", "\u2261": "Congruent", 
"\u222e": "ContourIntegral", "\u2210": "Coproduct", "\u2233": 
"CounterClockwiseContourIntegral", "\u2323": "Cup", "\u224d": "CupCap", 
"\u2207": "Del", "\u00f7": "Divide", "\u2250": "DotEqual", "\u222f": 
"DoubleContourIntegral", "\u21d3": "DoubleDownArrow", "\u21d0": 
"DoubleLeftArrow", "\u21d4": "DoubleLeftR
 ightArrow", "\u2ae4": "DoubleLeftTee", "\u27f8": "DoubleLongLeftArrow", 
"\u27fa": "DoubleLongLeftRightArrow", "\u27f9": "DoubleLongRightArrow", 
"\u21d2": "DoubleRightArrow", "\u22a8": "DoubleRightTee", "\u21d1": 
"DoubleUpArrow", "\u21d5": "DoubleUpDownArrow", "\u2225": "DoubleVerticalBar", 
"\u2193": "DownArrow", "\u2913": "DownArrowBar", "\u21f5": "DownArrowUpArrow", 
"\u2950": "DownLeftRightVector", "\u295e": "DownLeftTeeVector", "\u21bd": 
"DownLeftVector", "\u2956": "DownLeftVectorBar", "\u25be": "DownPointer", 
"\u295f": "DownRightTeeVector", "\u21c1": "DownRightVector", "\u2957": 
"DownRightVectorBar", "\u22a4": "DownTee", "\u21a7": "DownTeeArrow", "\u2208": 
"Element", "\u2a75": "Equal", "\u2242": "EqualTilde", "\u21cc": "Equilibrium", 
"\u29e6": "Equivalent", "\u2203": "Exists", "\u2200": "ForAll", "\u21a6": 
"Function", "\u2265": "GreaterEqual", "\u22db": "GreaterEqualLess", "\u2267": 
"GreaterFullEqual", "\u226b": "GreaterGreater", "\u2277": "GreaterLess", 
"\u2a7e": "GreaterSlantEq
 ual", "\u2273": "GreaterTilde", "\u224e": "HumpDownHump", "\u224f": 
"HumpEqual", "\u222b": "Integral", "\u22c2": "Intersection", "\u2190": 
"LeftArrow", "\u21e4": "LeftArrowBar", "\u21c6": "LeftArrowRightArrow", 
"\u2308": "LeftCeiling", "\u2961": "LeftDownTeeVector", "\u21c3": 
"LeftDownVector", "\u2959": "LeftDownVectorBar", "\u230a": "LeftFloor", 
"\u25c2": "LeftPointer", "\u2194": "UndirectedEdge", "\u294e": 
"LeftRightVector", "\u22a3": "LeftTee", "\u21a4": "LeftTeeArrow", "\u295a": 
"LeftTeeVector", "\u22b2": "LeftTriangle", "\u29cf": "LeftTriangleBar", 
"\u22b4": "LeftTriangleEqual", "\u2951": "LeftUpDownVector", "\u2960": 
"LeftUpTeeVector", "\u21bf": "LeftUpVector", "\u2958": "LeftUpVectorBar", 
"\u21bc": "LeftVector", "\u2952": "LeftVectorBar", "\u2264": "LessEqual", 
"\u22da": "LessEqualGreater", "\u2266": "LessFullEqual", "\u2276": 
"LessGreater", "\u226a": "LessLess", "\u2a7d": "LessSlantEqual", "\u2272": 
"LessTilde", "\u2014": "LongDash", "\u27f5": "LongLeftArrow", "\u27f7": "Lon
 gLeftRightArrow", "\u27f6": "LongRightArrow", "\u2199": "LowerLeftArrow", 
"\u2198": "LowerRightArrow", "\u2aa2": "NestedGreaterGreater", "\u2aa1": 
"NestedLessLess", "\u22bd": "Nor", "\u00ac": "Not", "\u2262": "NotCongruent", 
"\u226d": "NotCupCap", "\u2226": "NotDoubleVerticalBar", "\u2209": 
"NotElement", "\u2260": "NotEqual", "\u2204": "NotExists", "\u226f": 
"NotGreater", "\u2271": "NotGreaterEqual", "\u2269": "NotGreaterFullEqual", 
"\u2279": "NotGreaterLess", "\u2275": "NotGreaterTilde", "\u22ea": 
"NotLeftTriangle", "\u22ec": "NotLeftTriangleEqual", "\u226e": "NotLess", 
"\u2270": "NotLessEqual", "\u2268": "NotLessFullEqual", "\u2278": 
"NotLessGreater", "\u2274": "NotLessTilde", "\u2280": "NotPrecedes", "\u22e0": 
"NotPrecedesSlantEqual", "\u22e8": "NotPrecedesTilde", "\u220c": 
"NotReverseElement", "\u22eb": "NotRightTriangle", "\u22ed": 
"NotRightTriangleEqual", "\u22e2": "NotSquareSubsetEqual", "\u22e3": 
"NotSquareSupersetEqual", "\u2284": "NotSubset", "\u2288": "NotSubsetEqual", "\
 u2281": "NotSucceeds", "\u22e1": "NotSucceedsSlantEqual", "\u22e9": 
"NotSucceedsTilde", "\u2285": "NotSuperset", "\u2289": "NotSupersetEqual", 
"\u2241": "NotTilde", "\u2244": "NotTildeEqual", "\u2247": "NotTildeFullEqual", 
"\u2249": "NotTildeTilde", "+": "Plus", "^": "Power", "\u227a": "Precedes", 
"\u2aaf": "PrecedesEqual", "\u227c": "PrecedesSlantEqual", "\u227e": 
"PrecedesTilde", "\u220f": "Product", "\u2237": "Proportion", "\u221d": 
"Proportional", ">": "RawGreater", "\u220b": "ReverseElement", "\u21cb": 
"ReverseEquilibrium", "\u296f": "ReverseUpEquilibrium", "\u2192": "Rule", 
"\u21e5": "RightArrowBar", "\u21c4": "RightArrowLeftArrow", "\u2309": 
"RightCeiling", "\u2016": "RightDoubleBracketingBar", "\u295d": 
"RightDownTeeVector", "\u21c2": "RightDownVector", "\u2955": 
"RightDownVectorBar", "\u230b": "RightFloor", "\u25b8": "RightPointer", 
"\u22a2": "RightTee", "\u295b": "RightTeeVector", "\u22b3": "RightTriangle", 
"\u29d0": "RightTriangleBar", "\u22b5": "RightTriangleEqual", "\u2
 94f": "RightUpDownVector", "\u295c": "RightUpTeeVector", "\u21be": 
"RightUpVector", "\u2954": "RightUpVectorBar", "\u21c0": "RightVector", 
"\u2953": "RightVectorBar", "\u2970": "RoundImplies", "\u29f4": "RuleDelayed", 
"=": "Set", "\u221a": "Sqrt", "\u2293": "SquareIntersection", "\u228f": 
"SquareSubset", "\u2291": "SquareSubsetEqual", "\u2290": "SquareSuperset", 
"\u2292": "SquareSupersetEqual", "\u2294": "SquareUnion", "\u2282": "Subset", 
"\u2286": "SubsetEqual", "\u227b": "Succeeds", "\u2ab0": "SucceedsEqual", 
"\u227d": "SucceedsSlantEqual", "\u227f": "SucceedsTilde", "\u220d": 
"SuchThat", "\u2211": "Sum", "\u2283": "Superset", "\u2287": "SupersetEqual", 
"\u2234": "Therefore", "\u2243": "TildeEqual", "\u2245": "TildeFullEqual", 
"\u2248": "TildeTilde", "\u00d7": "Times", "\u22c3": "Union", "\u228e": 
"UnionPlus", "\u2191": "UpArrow", "\u2912": "UpArrowBar", "\u21c5": 
"UpArrowDownArrow", "\u2195": "UpDownArrow", "\u296e": "UpEquilibrium", 
"\u22a5": "UpTee", "\u21a5": "UpTeeArrow", "\u
 2196": "UpperLeftArrow", "\u2197": "UpperRightArrow", "\u22c1": "Vee", 
"\u2240": "VerticalTilde", "\u22c0": "Wedge", "\u22bb": "Xor"}}
\ No newline at end of file
+{"ascii-operators": ["!", "!", "!!", "!=", "&", "&&", "'", "*", "**", "*=", 
"+", "++", "+=", "-", "--", "-=", "->", ".", "..", "...", "/", "/*", "/.", 
"//", "//.", "//=", "//@", "/:", "/;", "/=", "/@", ":", "::", ":=", ":>", ";", 
";;", "<", "<->", "<<", "<=", "<>", "=", "=!=", "=.", "==", "===", ">", ">=", 
">>", ">>>", "?", "?", "??", "@*", "@@", "@@@", "\\!", "^", "^:=", "^=", "_", 
"__", "___", "|", "|->", "||", "~", "~~"], "unicode-operators": {"\u2227": 
"And", "\u2235": "Because", "\u00b7": "CenterDot", "\u2299": "CircleDot", 
"\u2296": "CircleMinus", "\u2295": "CirclePlus", "\u2297": "CircleTimes", 
"\u2232": "ClockwiseContourIntegral", "\u2236": "Colon", "\u2261": "Congruent", 
"\u222e": "ContourIntegral", "\u2210": "Coproduct", "\u2233": 
"CounterClockwiseContourIntegral", "\u2323": "Cup", "\u224d": "CupCap", 
"\u2207": "Del", "\u00f7": "Divide", "\u2250": "DotEqual", "\u222f": 
"DoubleContourIntegral", "\u21d3": "DoubleDownArrow", "\u21d0": 
"DoubleLeftArrow", "\u21d4": "DoubleLeftR
 ightArrow", "\u2ae4": "DoubleLeftTee", "\u27f8": "DoubleLongLeftArrow", 
"\u27fa": "DoubleLongLeftRightArrow", "\u27f9": "DoubleLongRightArrow", 
"\u21d2": "DoubleRightArrow", "\u22a8": "DoubleRightTee", "\u21d1": 
"DoubleUpArrow", "\u21d5": "DoubleUpDownArrow", "\u2225": "DoubleVerticalBar", 
"\u2193": "DownArrow", "\u2913": "DownArrowBar", "\u21f5": "DownArrowUpArrow", 
"\u2950": "DownLeftRightVector", "\u295e": "DownLeftTeeVector", "\u21bd": 
"DownLeftVector", "\u2956": "DownLeftVectorBar", "\u25be": "DownPointer", 
"\u295f": "DownRightTeeVector", "\u21c1": "DownRightVector", "\u2957": 
"DownRightVectorBar", "\u22a4": "DownTee", "\u21a7": "DownTeeArrow", "\u2208": 
"Element", "\u2a75": "Equal", "\u2242": "EqualTilde", "\u21cc": "Equilibrium", 
"\u29e6": "Equivalent", "\u2203": "Exists", "\u2200": "ForAll", "\u21a6": 
"Function", "\u2265": "GreaterEqual", "\u22db": "GreaterEqualLess", "\u2267": 
"GreaterFullEqual", "\u226b": "GreaterGreater", "\u2277": "GreaterLess", 
"\u2a7e": "GreaterSlantEq
 ual", "\u2273": "GreaterTilde", "\u224e": "HumpDownHump", "\u224f": 
"HumpEqual", "\u222b": "Integral", "\u22c2": "Intersection", "\u2190": 
"LeftArrow", "\u21e4": "LeftArrowBar", "\u21c6": "LeftArrowRightArrow", 
"\u2308": "LeftCeiling", "\u2961": "LeftDownTeeVector", "\u21c3": 
"LeftDownVector", "\u2959": "LeftDownVectorBar", "\u230a": "LeftFloor", 
"\u25c2": "LeftPointer", "\u2194": "UndirectedEdge", "\u294e": 
"LeftRightVector", "\u22a3": "LeftTee", "\u21a4": "LeftTeeArrow", "\u295a": 
"LeftTeeVector", "\u22b2": "LeftTriangle", "\u29cf": "LeftTriangleBar", 
"\u22b4": "LeftTriangleEqual", "\u2951": "LeftUpDownVector", "\u2960": 
"LeftUpTeeVector", "\u21bf": "LeftUpVector", "\u2958": "LeftUpVectorBar", 
"\u21bc": "LeftVector", "\u2952": "LeftVectorBar", "\u2264": "LessEqual", 
"\u22da": "LessEqualGreater", "\u2266": "LessFullEqual", "\u2276": 
"LessGreater", "\u226a": "LessLess", "\u2a7d": "LessSlantEqual", "\u2272": 
"LessTilde", "\u2014": "LongDash", "\u27f5": "LongLeftArrow", "\u27f7": "Lon
 gLeftRightArrow", "\u27f6": "LongRightArrow", "\u2199": "LowerLeftArrow", 
"\u2198": "LowerRightArrow", "\u2aa2": "NestedGreaterGreater", "\u2aa1": 
"NestedLessLess", "\u22bd": "Nor", "\u00ac": "Not", "\u2262": "NotCongruent", 
"\u226d": "NotCupCap", "\u2226": "NotDoubleVerticalBar", "\u2209": 
"NotElement", "\u2260": "NotEqual", "\u2204": "NotExists", "\u226f": 
"NotGreater", "\u2271": "NotGreaterEqual", "\u2269": "NotGreaterFullEqual", 
"\u2279": "NotGreaterLess", "\u2275": "NotGreaterTilde", "\u22ea": 
"NotLeftTriangle", "\u22ec": "NotLeftTriangleEqual", "\u226e": "NotLess", 
"\u2270": "NotLessEqual", "\u2268": "NotLessFullEqual", "\u2278": 
"NotLessGreater", "\u2274": "NotLessTilde", "\u2280": "NotPrecedes", "\u22e0": 
"NotPrecedesSlantEqual", "\u22e8": "NotPrecedesTilde", "\u220c": 
"NotReverseElement", "\u22eb": "NotRightTriangle", "\u22ed": 
"NotRightTriangleEqual", "\u22e2": "NotSquareSubsetEqual", "\u22e3": 
"NotSquareSupersetEqual", "\u2284": "NotSubset", "\u2288": "NotSubsetEqual", "\
 u2281": "NotSucceeds", "\u22e1": "NotSucceedsSlantEqual", "\u22e9": 
"NotSucceedsTilde", "\u2285": "NotSuperset", "\u2289": "NotSupersetEqual", 
"\u2241": "NotTilde", "\u2244": "NotTildeEqual", "\u2247": "NotTildeFullEqual", 
"\u2249": "NotTildeTilde", "+": "Plus", "^": "Power", "\u227a": "Precedes", 
"\u2aaf": "PrecedesEqual", "\u227c": "PrecedesSlantEqual", "\u227e": 
"PrecedesTilde", "\u220f": "Product", "\u2237": "Proportion", "\u221d": 
"Proportional", ">": "RawGreater", "\u220b": "ReverseElement", "\u21cb": 
"ReverseEquilibrium", "\u296f": "ReverseUpEquilibrium", "\u2192": "Rule", 
"\u21e5": "RightArrowBar", "\u21c4": "RightArrowLeftArrow", "\u2309": 
"RightCeiling", "\u2016": "RightDoubleBracketingBar", "\u295d": 
"RightDownTeeVector", "\u21c2": "RightDownVector", "\u2955": 
"RightDownVectorBar", "\u230b": "RightFloor", "\u25b8": "RightPointer", 
"\u22a2": "RightTee", "\u295b": "RightTeeVector", "\u22b3": "RightTriangle", 
"\u29d0": "RightTriangleBar", "\u22b5": "RightTriangleEqual", "\u2
 94f": "RightUpDownVector", "\u295c": "RightUpTeeVector", "\u21be": 
"RightUpVector", "\u2954": "RightUpVectorBar", "\u21c0": "RightVector", 
"\u2953": "RightVectorBar", "\u2970": "RoundImplies", "\u29f4": "RuleDelayed", 
"=": "Set", "\u221a": "Sqrt", "\u2293": "SquareIntersection", "\u228f": 
"SquareSubset", "\u2291": "SquareSubsetEqual", "\u2290": "SquareSuperset", 
"\u2292": "SquareSupersetEqual", "\u2294": "SquareUnion", "\u2282": "Subset", 
"\u2286": "SubsetEqual", "\u227b": "Succeeds", "\u2ab0": "SucceedsEqual", 
"\u227d": "SucceedsSlantEqual", "\u227f": "SucceedsTilde", "\u220d": 
"SuchThat", "\u2211": "Sum", "\u2283": "Superset", "\u2287": "SupersetEqual", 
"\u2234": "Therefore", "\u2243": "TildeEqual", "\u2245": "TildeFullEqual", 
"\u2248": "TildeTilde", "\u00d7": "Times", "\u22c3": "Union", "\u228e": 
"UnionPlus", "\u2191": "UpArrow", "\u2912": "UpArrowBar", "\u21c5": 
"UpArrowDownArrow", "\u2195": "UpDownArrow", "\u296e": "UpEquilibrium", 
"\u22a5": "UpTee", "\u21a5": "UpTeeArrow", "\u
 2196": "UpperLeftArrow", "\u2197": "UpperRightArrow", "\u22c1": "Vee", 
"\u2240": "VerticalTilde", "\u22c0": "Wedge", "\u22bb": "Xor"}}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/mathics-pygments-1.0.4/mathics_pygments/generate/build_pygments_tables.py 
new/Mathics3-pygments-10.0.0/mathics_pygments/generate/build_pygments_tables.py
--- 
old/mathics-pygments-1.0.4/mathics_pygments/generate/build_pygments_tables.py   
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/Mathics3-pygments-10.0.0/mathics_pygments/generate/build_pygments_tables.py 
    2026-04-19 13:25:02.000000000 +0200
@@ -0,0 +1,101 @@
+#!/usr/bin/env python
+# This scripts reads the data from named-characters and converts it to the
+# format used by the library internally
+
+import json
+import os.path as osp
+import sys
+from pathlib import Path
+from typing import Any, Dict, Set
+
+import click
+import mathics_scanner
+import yaml
+
+try:
+    from mathics_pygments.version import __version__
+except ImportError:
+    import ast
+
+    version_file = Path(__file__).parent.parent / "version.py"
+    version_content = version_file.read_text()
+    version_line = [
+        line for line in version_content.split("\n") if 
line.startswith("__version__")
+    ][0]
+    __version__ = 
ast.literal_eval(version_line.split("=")[1].strip().split("#")[0])
+
+OPERATOR_FIELDS = [
+    "ascii-operators",
+    "unicode-operators",
+]
+
+DEFAULT_DATA_DIR = Path(osp.join(osp.dirname(mathics_scanner.__file__), 
"data"))
+
+def get_srcdir() -> str:
+    filename = osp.normcase(osp.dirname(osp.abspath(__file__)))
+    return osp.realpath(filename)
+
+
+def read(*rnames) -> str:
+    return open(osp.join(get_srcdir(), *rnames)).read()
+
+
+def compile_tables(
+    operator_data: Dict[str, dict], character_data: Dict[str, dict]
+) -> Dict[str, Any]:
+    """
+    Compiles the general table into the tables used internally by the library.
+    This facilitates fast access of this information by clients needing this
+    information.
+    """
+    ascii_operators: Set[str] = set()
+    unicode_operators: Dict[str, str] = {}
+
+    operator_names = {operator_name for operator_name in operator_data.keys()}
+    for name, character_info in character_data.items():
+        operator_name = character_info.get("operator-name")
+        if name in operator_names or operator_name:
+            if operator_name:
+                name = operator_name
+            if "unicode-equivalent" in character_info.keys():
+                unicode_operators[character_info["unicode-equivalent"]] = name
+            if "ascii" in character_info.keys():
+                ascii_operators.add(character_info["ascii"])
+
+    return {
+        "ascii-operators": sorted(ascii_operators),
+        "unicode-operators": unicode_operators,
+    }
+
+
[email protected]()
[email protected]_option(version=__version__)  # NOQA
[email protected](
+    "--output",
+    "-o",
+    show_default=True,
+    type=click.Path(writable=True),
+    default=DEFAULT_DATA_DIR / "operators.json",
+)
[email protected](
+    "data_dir", type=click.Path(readable=True), default=DEFAULT_DATA_DIR, 
required=False
+)
+def main(output, data_dir):
+    with (
+        open(data_dir / "operators.yml", "r", encoding="utf8") as operator_f,
+        open(data_dir / "named-characters.yml", "r", encoding="utf8") as 
character_f,
+        open(output, "w") as o,
+    ):
+        # Load the YAML data.
+        operator_data = yaml.load(operator_f, Loader=yaml.FullLoader)
+        character_data = yaml.load(character_f, Loader=yaml.FullLoader)
+
+        # Precompile the tables.
+        data = compile_tables(operator_data, character_data)
+
+        # Dump the preprocessed dictionaries to disk as JSON.
+        json.dump(data, o)
+
+
+if __name__ == "__main__":
+    main(sys.argv[1:])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mathics-pygments-1.0.4/mathics_pygments/lexer.py 
new/Mathics3-pygments-10.0.0/mathics_pygments/lexer.py
--- old/mathics-pygments-1.0.4/mathics_pygments/lexer.py        2025-01-28 
23:24:03.000000000 +0100
+++ new/Mathics3-pygments-10.0.0/mathics_pygments/lexer.py      2026-04-19 
13:25:02.000000000 +0200
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright (c) 2021, 2024 Rocky Bernstein
+# Copyright (c) 2021, 2024, 2026 Rocky Bernstein
 # Copyright (c) 2016 rsmenon
 # Licensed under the MIT License (https://opensource.org/licenses/MIT)
 
@@ -32,9 +32,9 @@
 
 class MToken:
     """
-    Mathics Tokens. Like Pygments Token but for Mathics.
+    Mathics3 Tokens. Like Pygments Token but for Mathics3.
 
-    Class variables contain Mathics tokens like BUILTIN, COMMENT.
+    Class variables contain Mathics3 tokens like BUILTIN, COMMENT.
     These variables hold the corresponding Pygments token-name value.
 
     The style, e.g. "colorful", "zenburn", "xcode", ultimately determines
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mathics-pygments-1.0.4/mathics_pygments/version.py 
new/Mathics3-pygments-10.0.0/mathics_pygments/version.py
--- old/mathics-pygments-1.0.4/mathics_pygments/version.py      2025-01-28 
23:24:03.000000000 +0100
+++ new/Mathics3-pygments-10.0.0/mathics_pygments/version.py    2026-04-19 
13:25:02.000000000 +0200
@@ -5,4 +5,4 @@
 # space around "=" below.
 
 # fmt: off
-__version__="1.0.4"  # noqa
+__version__="10.0.0"  # noqa
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mathics-pygments-1.0.4/pyproject.toml 
new/Mathics3-pygments-10.0.0/pyproject.toml
--- old/mathics-pygments-1.0.4/pyproject.toml   1970-01-01 01:00:00.000000000 
+0100
+++ new/Mathics3-pygments-10.0.0/pyproject.toml 2026-04-19 13:25:02.000000000 
+0200
@@ -0,0 +1,63 @@
+[build-system]
+requires = [
+    "setuptools>=70.0.0", # CVE-2024-38335 recommends this
+    # needed for building tables for the sdist:
+    "PyYAML",
+    "click",
+]
+build-backend = "setuptools.build_meta"
+
+[project]
+name = "Mathics3_pygments"
+description = "Mathics3/Mathematica/Wolfram Language Lexer for Pygments"
+dependencies = [
+    "Pygments >= 2.9",     # Used in mathics-generate-json-table
+    "Mathics3_Scanner>=10.0.0",
+    "click",      # Using in CLI: build_pygments_tables.py
+]
+requires-python = ">=3.11"
+readme = "README.md"
+license = "MIT"
+keywords = ["Mathematica", "Syntax highlighting"]
+maintainers = [
+    {name = "Mathics3 Group"},
+]
+classifiers = [
+    "Development Status :: 5 - Production/Stable",
+    "Intended Audience :: End Users/Desktop",
+    "Intended Audience :: Developers",
+    "Intended Audience :: Science/Research",
+    "Programming Language :: Python",
+    "Programming Language :: Python :: 3.11",
+    "Programming Language :: Python :: 3.12",
+    "Programming Language :: Python :: 3.13",
+    "Programming Language :: Python :: 3.14",
+    "Programming Language :: Python :: Implementation :: CPython",
+    "Programming Language :: Python :: Implementation :: PyPy",
+    "Topic :: Scientific/Engineering :: Mathematics",
+    "Topic :: Text Processing",
+]
+dynamic = ["version"]
+
+[project.urls]
+Homepage = "https://mathics.org/";
+
+[project.optional-dependencies]
+dev = [
+    "pytest",
+]
+
+[tool.setuptools]
+packages = [
+    "mathics_pygments",
+    "mathics_pygments.generate",
+]
+
+[tool.setuptools.package-data]
+"mathics_pygments" = [
+    "data/mma-tables.json",
+    "data/mma-tables-new.json", # Not used yet, but eventually will replace 
mma-tables.json
+]
+
+[tool.setuptools.dynamic]
+version = {attr = "mathics_pygments.version.__version__"}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mathics-pygments-1.0.4/requirements.txt 
new/Mathics3-pygments-10.0.0/requirements.txt
--- old/mathics-pygments-1.0.4/requirements.txt 2025-01-28 23:24:03.000000000 
+0100
+++ new/Mathics3-pygments-10.0.0/requirements.txt       2026-04-19 
13:25:02.000000000 +0200
@@ -1,3 +1,3 @@
 Pygments>=2.1
 wheel==0.38.1
-Mathics_Scanner
+Mathics3_Scanner>=10.0.0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mathics-pygments-1.0.4/setup.cfg 
new/Mathics3-pygments-10.0.0/setup.cfg
--- old/mathics-pygments-1.0.4/setup.cfg        2025-01-28 23:24:03.000000000 
+0100
+++ new/Mathics3-pygments-10.0.0/setup.cfg      2026-04-19 13:25:02.000000000 
+0200
@@ -1,8 +1,5 @@
-[bdist_wheel]
-universal = 1
-
 [metadata]
-description_file = README.rst
+description_file = README.md
 
 # Recommended flake8 settings while editing zoom, we use Black for the final
 # linting/say in how code is formatted
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mathics-pygments-1.0.4/setup.py 
new/Mathics3-pygments-10.0.0/setup.py
--- old/mathics-pygments-1.0.4/setup.py 2025-01-28 23:24:03.000000000 +0100
+++ new/Mathics3-pygments-10.0.0/setup.py       2026-04-19 13:25:02.000000000 
+0200
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright (c) 2021, 2024 Rocky Bernstein
+# Copyright (c) 2021, 2024, 2026 Rocky Bernstein
 # Copyright (c) 2016 rsmenon
 # Licensed under the MIT License (https://opensource.org/licenses/MIT)
 
@@ -21,80 +21,48 @@
 A Sass file containing the styles can be obtained from the package repository 
for use in static \
 website generators such as Jekyll, Octopress, Pelican, etc.
 
-Copyright 2021, 2024 Rocky Bernstein
+Copyright 2021, 2024, 2026 Rocky Bernstein
 (C) 2016 rsmenon
 """
 
-import sys
-
-from setuptools import setup
-
-# Ensure user has the correct Python version
-if sys.version_info < (3, 6):
-    print("mathicsscript does not support Python %d.%d" % sys.version_info[:2])
-    sys.exit(-1)
-
-
+import os
 import os.path as osp
-
+from setuptools import setup
+from setuptools.command.build_py import build_py as setuptools_build_py
 
 def get_srcdir():
+    """Return the directory of the location if this code"""
     filename = osp.normcase(osp.dirname(osp.abspath(__file__)))
     return osp.realpath(filename)
 
 
-def read(*rnames):
-    return open(osp.join(get_srcdir(), *rnames)).read()
-
-
-# stores __version__ in the current namespace
-exec(
-    compile(read("mathics_pygments/version.py"), 
"mathics_pygments/version.py", "exec")
-)
-
-setup(
-    name="mathics_pygments",
-    version=__version__,  # noqa
-    description="Mathematica/Wolfram Language Lexer for Pygments",
-    long_description=__doc__,
-    long_description_content_type="text/x-rst",
-    author="Rocky Bernstein",
-    author_email="[email protected]",
-    license="MIT",
-    keywords="syntax highlighting mathematica",
-    url="http://github.com/Mathics3/mathics-pygments/";,
-    classifiers=[
-        "Development Status :: 4 - Beta",
-        "Intended Audience :: End Users/Desktop",
-        "License :: OSI Approved :: MIT License",
-        "Operating System :: OS Independent",
-        "Programming Language :: Python",
-        "Programming Language :: Python :: 3.6",
-        "Programming Language :: Python :: 3.7",
-        "Programming Language :: Python :: 3.8",
-        "Programming Language :: Python :: 3.9",
-        "Programming Language :: Python :: 3.10",
-        "Programming Language :: Python :: 3.11",
-        "Programming Language :: Python :: 3.12",
-        "Programming Language :: Python :: 3.13",
-        "Topic :: Text Processing",
-        "Topic :: Utilities",
-    ],
-    packages=["mathics_pygments"],
-    package_data={
-        "mathics_pygments": [
-            "data/mma-tables.json",
-        ],
-    },
-    install_requires=["Pygments >= 2.9.0", "Mathics_Scanner>=1.3.0"],
-    include_package_data=False,
-    platforms=["any"],
-    entry_points={
-        "pygments.lexers": ["MathematicaLexer = 
mathics_pygments:MathematicaLexer"],
-        "pygments.styles": [
-            "mathematica = mathics_pygments:MathematicaStyle",
-            "mathematicanotebook = mathics_pygments:MathematicaNotebookStyle",
-        ],
-    },
-    zip_safe=False,
-)
+class build_py(setuptools_build_py):
+    """
+    The "run" method below of class gets invoked when setup.py is run through
+    setuptools.
+
+    Here, we just invoke ./admin-tools/make-JSON-tables.sh.
+    """
+
+    def run(self):
+        """
+        If you need to debug this, just extract this method, remove "self" 
above
+        and save it in a standalone Python file without the 
setuptools_build_py.run(self)
+        call below.
+        """
+        srcdir = get_srcdir()
+        cmd = f"bash {osp.join(srcdir, 'admin-tools', 'make-JSON-tables.sh')}"
+        print(cmd)
+        os.system(cmd)
+        setuptools_build_py.run(self)
+
+
+CMDCLASS = {"build_py": build_py}
+
+
+if __name__ == "__main__":
+    setup(
+        cmdclass=CMDCLASS,  # Set up to run build_py.run()
+        # don't pack Mathics3 an in egg because of media files, etc.
+        zip_safe=False,
+    )

Reply via email to