Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
f27d9ea
since Python 3.13, get_functions must check if the method is callable
mmatera Jan 28, 2025
bcd883a
In Python 3.13 margin spaces in docstrings are trimmed
mmatera Jan 28, 2025
eb2232e
Python 3.13 converts tabs into simple spaces in docstrings
mmatera Jan 28, 2025
f73364b
push workflows
mmatera Jan 28, 2025
48070e9
Merge branch 'master' into fixes_for_3_13
mmatera Jan 28, 2025
29706ae
Update windows.yml
mmatera Jan 28, 2025
b5b8857
Reinforce in get_functions that eval/format methods are indeed callab…
mmatera Jan 29, 2025
275a3b8
More robust docstring parsing (#1323)
mmatera Jan 29, 2025
d446ead
A couple of doc tagging corrections (#1324)
rocky Jan 29, 2025
df448b1
improve LaTeX processing. Fix inconsistencies in the docstring format…
mmatera Jan 31, 2025
cb97bd4
Improve cone rendering plus some lint... (#1326)
rocky Jan 31, 2025
70d245b
More about latex in online doc (#1329)
mmatera Jan 31, 2025
377ca28
Dd fixes 02 (#1330)
mmatera Jan 31, 2025
a663d11
Trailing changes (#1334)
mmatera Jan 31, 2025
1d8d2fc
5th bunch (#1333)
mmatera Jan 31, 2025
13e4e4f
<dd> fixes 06 (#1335)
mmatera Feb 1, 2025
cf7eca0
Dd fixes 07 (#1336)
mmatera Feb 1, 2025
7f6f7be
Dd fixes 08 (#1337)
mmatera Feb 1, 2025
74c8559
Adjust the plain-text form of documentation (#1340)
mmatera Feb 1, 2025
fe31042
Remove duplicated doctest (#1343)
mmatera Feb 1, 2025
4d29659
not show Out[]=Null as in wolframscript (#1344)
mmatera Feb 1, 2025
80b4bcb
Update procedural.py (#1342)L
mmatera Feb 1, 2025
6739cc4
More docstrings to TeX Math mode when appropriate (#1338)
rocky Feb 2, 2025
13975f6
Try using numpy < 2.3 (#1348)
rocky Feb 2, 2025
2472e56
doc tagging and links for combinatorial builtins (#1347)
rocky Feb 2, 2025
e2d2461
More doc fixes2 (#1349)
rocky Feb 2, 2025
77ca343
use eval_Close, and some fs lint (#1350
rocky Feb 3, 2025
aa326a4
Sort methods in DocElement classes. Add a base class. (#1352)
mmatera Feb 3, 2025
c720e12
removing <CON>...</CON> in favor of <CONSOLE>...</CONSOLE> and single…
mmatera Feb 3, 2025
fa44dfd
Another pass over the latex/mathml doc tagging (#1353)
rocky Feb 3, 2025
8e999f1
Last changes in documentation system (#1356)
mmatera Feb 4, 2025
8874890
Add asymptote-formatted dodecahedron, icosahedron, octahedron and tet…
rocky Feb 4, 2025
0809fcf
More doc tagging (#1357)
rocky Feb 4, 2025
ea44d3b
Update angular.py (#1359)
mmatera Feb 4, 2025
9fd4deb
Update bessel.py (#1360)
mmatera Feb 5, 2025
7108d16
Remove double loading of rules, from times of apply_ methods (#1361)
mmatera Feb 5, 2025
09c88dc
Update list_oriented.py (#1364)
mmatera Feb 5, 2025
0d2b4f9
Update list_oriented.py (#1363)
mmatera Feb 5, 2025
de9227c
Update zeta.py (#1362)
mmatera Feb 5, 2025
b973956
More links to Wiki descriptions (#1366)
rocky Feb 5, 2025
4f2a910
small fix to the CONSOLE_RE. Several fixes for typos in documentation…
mmatera Feb 5, 2025
2ae7b1e
Update expintegral.py (#1368)
mmatera Feb 5, 2025
5349006
More docfixes (#1369)
mmatera Feb 5, 2025
46521af
Fix handling subsection tags in input files (#1371)
mmatera Feb 6, 2025
33fd261
Add links to DLMF and add some more plots (#1370)
rocky Feb 6, 2025
28a130b
Add autoload/rules/*.m to package and other tweaks (#1372)
rocky Feb 7, 2025
ba90dfa
Note Mathics Live and Trepan Debugger (#1358)
rocky Feb 8, 2025
ec5dd08
Add more DMLF links and example plots (#1373)
rocky Feb 8, 2025
8829514
Adjust for type mismatch... (#1374)
rocky Feb 8, 2025
69d8b1f
Add mathics.pdf to wheel and tarball (#1375)
rocky Feb 8, 2025
bdc3cb7
Get ready for release 8.0.1 (#1376)
rocky Feb 8, 2025
1eb8cfc
Administrivia
rocky Feb 8, 2025
ccb933c
Merge branch 'master' of github.com:Mathics3/mathics-core
rocky Feb 8, 2025
367e5f0
Bump version
rocky Feb 8, 2025
513c5e8
Bug: an association was confused with an option (#1379)
rocky Feb 11, 2025
5c6e46a
Add $SessionID... (#1382)
rocky Feb 12, 2025
d641864
Option management tweaks (#1384)
rocky Feb 13, 2025
fea63df
Small lint-like changes to BinaryRead and Import (#1385)
rocky Feb 13, 2025
634dcbe
Revise Pochhammer for negative n values. (#1389)
rocky Feb 16, 2025
4643026
Split out eval_Open to mathics.eval.files (#1386)
rocky Feb 16, 2025
6edcf54
Add `BinaryReadList[]` (#1391)
rocky Feb 18, 2025
47e82c7
Go over docs for gamma and no-meaning infix ops (#1394)
rocky Feb 21, 2025
58457c3
Match WMA for Gamma[1+x] and Product[...] (#1395)
rocky Feb 21, 2025
414161b
Support for hypergeometric functions (#1383)
aravindh-krishnamoorthy Apr 22, 2025
e8b6e76
some fixes for rst syntax in core/ (#1399)
fchapoton May 23, 2025
b2c018a
fix encoding of one file and some typos (#1400)
fchapoton May 23, 2025
b3a7663
more typos fixed and no self-assignment (#1401)
fchapoton May 23, 2025
30d5759
typos in test and a few other details (#1402)
fchapoton May 24, 2025
9a2c3e2
Track scanner (partial) refactor changes (#1398)
rocky May 25, 2025
8485c2f
Adjustments for escape-sequence scanning changes (#1403)
rocky Jun 3, 2025
d936d73
In CI, go back to using master branch (#1404)
rocky Jun 3, 2025
5bc5311
remove unused parentheses in for etc (#1408)
fchapoton Jun 7, 2025
2d48746
Address bug in structure cache `None `accessed as a `dict` (#1406)
rocky Jun 7, 2025
867f623
Split out fn from print_evaluate (#1407)
rocky Jun 7, 2025
87f24f1
Add a couple of "See also" links. (#1409)
rocky Jun 8, 2025
0c1e8c1
More trace evaluation filtering (#1410)
rocky Jun 21, 2025
620049d
Adjust trace API to be able to set expr values (#1411)
rocky Jun 28, 2025
253e925
Lesser changes and possible bugs encountered adding location informat…
rocky Jul 4, 2025
454610e
Use solely or include 3.13 testing (#1416)
rocky Jul 4, 2025
39acb51
Use ".value" in expr.to_python() and more often (#1417)
rocky Jul 8, 2025
ae82c9f
Miscellaneous small evaluation improvements.. (#1418)
rocky Jul 10, 2025
2fba7db
Revise API for position tracking (#1413)
rocky Jul 12, 2025
b74fbde
Sync with mathics-scanner ...
rocky Jul 12, 2025
721a644
Save SymPy Integer value in Integer() and some lint. (#1420)
rocky Jul 14, 2025
5e21311
Merge branch 'master' into fixes_for_3_13
rocky Jul 16, 2025
b74ac00
Merge stuff
rocky Jul 16, 2025
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
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.12', '3.11', '3.8', '3.9', '3.10']
python-version: ['3.13', '3.12', '3.11', '3.8', '3.9', '3.8']

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should keep 3.8? Maybe 3.8, 3.10, 3.12 and 3.13 would be enough?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am for dropping 3.8.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, so ['3.13', '3.12', '3.11', '3.10', '3.9'] in all the workflows?

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
Expand Down
20 changes: 10 additions & 10 deletions mathics/builtin/files_io/importexport.py
Original file line number Diff line number Diff line change
Expand Up @@ -1060,16 +1060,16 @@ class RegisterImport(Builtin):
>> FilePrint["ExampleData/ExampleData.txt"]
| Example File Format
| Created by Angus
| 0.629452 0.586355
| 0.711009 0.687453
| 0.246540 0.433973
| 0.926871 0.887255
| 0.825141 0.940900
| 0.847035 0.127464
| 0.054348 0.296494
| 0.838545 0.247025
| 0.838697 0.436220
| 0.309496 0.833591
| 0.629452 0.586355

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In docstrings, use 4 spaces instead of a tab character.

| 0.711009 0.687453
| 0.246540 0.433973
| 0.926871 0.887255
| 0.825141 0.940900
| 0.847035 0.127464
| 0.054348 0.296494
| 0.838545 0.247025
| 0.838697 0.436220
| 0.309496 0.833591

>> Import["ExampleData/ExampleData.txt", {"ExampleFormat1", "Elements"}]
= {Data, Header}
Expand Down
2 changes: 2 additions & 0 deletions mathics/core/builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,8 @@ def get_functions(self, prefix="eval", is_pymodule=False):
for name in dir(self):
if name.startswith(prefix):
function = getattr(self, name)
if not hasattr(function, "__call__"):

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now, NoneType has a docstring, so we need to check that function is indeed a function.

continue
pattern = function.__doc__
if pattern is None: # Fixes PyPy bug
continue
Expand Down
14 changes: 8 additions & 6 deletions mathics/doc/doc_entries.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
r"""(?mx)^ # re.MULTILINE (multi-line match)
# and re.VERBOSE (readable regular expressions
((?:.|\n)*?)
^\s+([>#SX])>[ ](.*) # test-code indicator
^\s*([>#SX])>[ ](.*) # test-code indicator

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Python 3.13, doctrings are trimmed of "margin" spaces.

((?:\n\s*(?:[:|=.][ ]|\.).*)*) # test-code results"""
)
TESTCASE_OUT_RE = re.compile(r"^\s*([:|=])(.*)$")
Expand Down Expand Up @@ -216,10 +216,7 @@ def parse_docstring_to_DocumentationEntry_items(
logging.warning("``key_part`` is deprecated. Its value is discarded.")

# Remove commented lines.
doc = filter_comments(doc).strip(r"\s")

# Remove leading <dl>...</dl>
# doc = DL_RE.sub("", doc)
doc = filter_comments(doc) # .strip("\s")

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not remember the reason of the r"\s" strip, but it breaks some tests now.


# pre-substitute Python code because it might contain tests
doc, post_substitutions = pre_sub(
Expand Down Expand Up @@ -394,11 +391,16 @@ def compare_out(self, outs: tuple = tuple()) -> bool:
# Mismatched number of output lines, and we don't have "..."
return False

# Python 3.13 replaces tabs by a single space in docstrings.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 3.13 converts tab characters in docstrings to simple spaces. This "hack" helps to keep the doctests compatible with this change.

# In doctests we replace tabs by sequences of four spaces.
def tabs_to_spaces(val):
return val.text.replace("\t", 4 * " ")

# Need to check all output line by line
for got, wanted in zip(outs, wanted_outs):
if wanted.text == "...":
return True
if not got == wanted:
if not tabs_to_spaces(got) == tabs_to_spaces(wanted):
return False

return True
Expand Down