Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/autoblack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: 3.13
python-version: 3.14
- name: Install click, black and isort
run: pip install 'click==8.2.1' 'black==25.11.0' 'isort==5.13.2'
- name: Run isort --check .
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/isort-and-black-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.13
- uses: actions/checkout@v5
- name: Set up Python 3.14
uses: actions/setup-python@v5
with:
python-version: 3.13
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
strategy:
matrix:
os: [macOS]
python-version: ['3.12', '3.13']
python-version: ['3.13', '3.14']
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand All @@ -27,7 +27,7 @@ jobs:
brew install llvm
python -m pip install --upgrade pip
python -m pip install pytest
# # Go over and comment out stuff when next Mathics core and Mathics-scanner are released
# # Go over and comment out stuff when next Mathics3 core and Mathics-scanner are released
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
# git clone https://github.com/Mathics3/mathics-core
# (cd mathics-core && pip3 install -e .[full])
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12', '3.13']
python-version: ['3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
Expand All @@ -23,7 +23,7 @@ jobs:
sudo apt install libicu-dev
python -m pip install --upgrade pip
python -m pip install pytest
# # Go over and comment out stuff when next Mathics core and Mathics-scanner are released
# # Go over and comment out stuff when next Mathics3 core and Mathics-scanner are released
# python -m pip install -e git+https://github.com/Mathics3/mathics-scanner#egg=Mathics-Scanner[full]
# git clone https://github.com/Mathics3/mathics-core
# (cd mathics-core && pip3 install -e .[full])
Expand Down
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RM ?= rm
LANG = en

.PHONY: all build \
ChangeLog-without-corrections \
check clean \
develop dist doc doc-data \
pypi-setup \
Expand Down Expand Up @@ -56,15 +57,18 @@ pytest:
pytest test $o


# #: Make Mathics PDF manual
# doc mathics.pdf: mathics/doc/tex/data
# #: Make Mathics3 PDF manual
# doc mathics3.pdf: mathics/doc/tex/data
# (cd mathics/doc/tex && $(MAKE) mathics.pdf)

#: Create ChangeLog from version control without corrections
ChangeLog-without-corrections:
git log --pretty --numstat --summary | $(GIT2CL) >ChangeLog

#: Remove ChangeLog
rmChangeLog:
$(RM) ChangeLog || true

#: Create a ChangeLog from git via git log and git2cl
ChangeLog: rmChangeLog
git log --pretty --numstat --summary | $(GIT2CL) >$@
patch ChangeLog < ChangeLog-spell-corrected.diff
ChangeLog: rmChangeLog ChangeLog-without-corrections
patch -p0 ChangeLog < ChangeLog-spell-corrected.diff
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
10.0.0
------

April 20, 2026

Revise for 10.0.0 Mathics3 API. Python 3.14 supported. Python for 3.10 dropped. Python 3.10 may still work, but it's not supported.


9.0.0
-----

Expand Down
15 changes: 14 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
|Pypi Installs| |Latest Version| |Supported Python Versions|

Mathics3 Natural Language Toolkit module.


Mathics3 Module for ICU — International Components for Unicode

Functions that provide information from the `Python ICU library <https://pypi.org/project/pyicu/>`_.

Example Session
---------------

::
.. code:: mathematica

$ mathicsscript
In[1]:= LoadModule["pymathics.icu"]
Expand Down Expand Up @@ -34,3 +39,11 @@ Example Session

In[8]:= AlphabeticOrder["Papá", ""Papá", "Spanish"]
Out[8]= 0


.. |Latest Version| image:: https://badge.fury.io/py/Mathics3-Module-PyICU.svg
:target: https://badge.fury.io/py/Mathics3-Module-PyICU
.. |Pypi Installs| image:: https://pepy.tech/badge/Mathics3-Module-PyICU
.. |Supported Python Versions| image:: https://img.shields.io/pypi/pyversions/Mathics3-Module-PyICU.svg
.. |Packaging status| image:: https://repology.org/badge/vertical-allrepos/Mathics3-Module-PyICU.svg
:target: https://repology.org/project/Mathics3-Module-PyICU/versions
8 changes: 7 additions & 1 deletion pymathics/icu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,10 @@
"requires": ["PyICU"],
}

__all__ = ["Alphabet", "AlphabeticOrder", "Language", "pymathics_version_data", "__version__"]
__all__ = [
"Alphabet",
"AlphabeticOrder",
"Language",
"pymathics_version_data",
"__version__",
]
12 changes: 10 additions & 2 deletions pymathics/icu/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,17 @@ def eval(self, string1: String, string2: String, evaluation: Evaluation):
"""AlphabeticOrder[string1_String, string2_String]"""
return Integer(eval_alphabetic_order(string1.value, string2.value))

def eval_with_lang(self, string1: String, string2: String, lang: String, evaluation: Evaluation):
def eval_with_lang(
self, string1: String, string2: String, lang: String, evaluation: Evaluation
):
"""AlphabeticOrder[string1_String, string2_String, lang_String]"""
return Integer(eval_alphabetic_order(string1.value, string2.value, lang.value, ))
return Integer(
eval_alphabetic_order(
string1.value,
string2.value,
lang.value,
)
)


## FIXME: move to mathics-core. Will have to change references to Pymathics`$Language to $Language
Expand Down
2 changes: 1 addition & 1 deletion pymathics/icu/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# well as importing into Python. That's why there is no
# space around "=" below.
# fmt: off
__version__="9.0.1.dev0" # noqa
__version__="10.0.0" # noqa
11 changes: 5 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
requires = [
"setuptools",
"Mathics3-Module-Base >= 9.0.0",
"Mathics3>=9.0.0",
"Mathics3>=10.0.0",
"PyICU>=2.9",
]
build-backend = "setuptools.build_meta"
Expand All @@ -12,26 +12,25 @@ name = "Mathics3-Module-PyICU"
description = 'Mathics3 Module ICU - Human-Language Alphabets and Locales via PyICU'
dependencies = [
"Mathics3-Module-Base >= 9.0.0",
"Mathics3 >= 9.0.0",
"Mathics3 >= 10.0.0",
"PyICU>=2.9",
]
requires-python = ">=3.10"
requires-python = ">=3.11"
readme = "README.rst"
license = "GPL-3.0-or-later"
keywords = ["Mathematica", "Wolfram", "Interpreter", "Shell", "Math", "CAS"]
maintainers = [
{name = "Mathics Group", email = "mathics-devel@googlegroups.com"},
{name = "Mathics3 Group", email = "mathics-devel@googlegroups.com"},
]
classifiers = [
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python :: 3.10",
"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",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development :: Interpreters",
Expand Down
Loading