Release notes for 1.11
The release notes for 1.11 are here: https://github.com/sympy/sympy/wiki/Release-Notes-for-1.11
This issue is to track improving the release notes.
@eagleoflqj, @xrmx, @asmeurer there are a couple of release notes about the antlr version.
-
Regenerate autolev and latex parsers with antlr 4.10.1 (#23369 by @eagleoflqj and @xrmx)
-
Bump required antlr4 python runtime to 4.10.* (#23369 by @eagleoflqj and @xrmx)
Can you combine and expand the release notes there? (You can just edit the wiki directly)
I think we need to make this a bit clearer for users, downstream libraries etc. Anyone depending on this needs to upgrade their antlr version. We should make it clear how exactly they can do that e.g. with pip and also what functionality they might be using that would mean they have a dependency on this. Note that there is no formal dependency of SymPy on antlr so anyone using this needs to manually manage the versions. I just found for example that running the sympy core tests failed with an obscure error message:
_____________________ sympy/core/tests/test_args.py:test_all_classes_are_tested _____________________
Traceback (most recent call last):
File "/home/oscar/current/sympy/sympy.git/sympy/core/tests/test_args.py", line 64, in test_all_classes_are_tested
mod = __import__(submodule, fromlist=names)
File "/home/oscar/current/sympy/sympy.git/sympy/parsing/autolev/_antlr/autolevparser.py", line 180, in <module>
class AutolevParser ( Parser ):
File "/home/oscar/current/sympy/sympy.git/sympy/parsing/autolev/_antlr/autolevparser.py", line 184, in AutolevParser
atn = ATNDeserializer().deserialize(serializedATN())
File "/home/oscar/current/sympy/sympy.git/38venv/lib/python3.8/site-packages/antlr4/atn/ATNDeserializer.py", line 60, in deserialize
self.reset(data)
File "/home/oscar/current/sympy/sympy.git/38venv/lib/python3.8/site-packages/antlr4/atn/ATNDeserializer.py", line 90, in reset
temp = [ adjust(c) for c in data ]
File "/home/oscar/current/sympy/sympy.git/38venv/lib/python3.8/site-packages/antlr4/atn/ATNDeserializer.py", line 90, in <listcomp>
temp = [ adjust(c) for c in data ]
File "/home/oscar/current/sympy/sympy.git/38venv/lib/python3.8/site-packages/antlr4/atn/ATNDeserializer.py", line 88, in adjust
v = ord(c)
TypeError: ord() expected string of length 1, but int found
=============== tests finished: 914 passed, 70 skipped, 1 exceptions, in 6.27 seconds ===============
DO *NOT* COMMIT!
Also maybe there should be some runtime version checking to give a better error message.
Runtime version checking for ANTLR seems impossible before https://github.com/antlr/antlr4/pull/3658.
Runtime version checking for ANTLR seems impossible before antlr/antlr4#3658.
You can use importlib for this:
In [1]: from importlib.metadata import version
In [2]: version('antlr4-python3-runtime')
Out[2]: '4.7.2'
https://discuss.python.org/t/dynamic-versions-in-editable-installations/15220
Also I notice from grepping that there are different things listed around:
$ git grep antlr | grep runtime
.github/workflows/runtests.yml: 'antlr4-python3-runtime==4.10.*'
doc/src/guides/contributing/dependencies.md:- **antlr-python-runtime**: [Antlr](https://www.antlr.org/) is used for the
doc/src/guides/contributing/dependencies.md: `antlr4-python-runtime` with conda and `antlr4-python3-runtime` with pip).
doc/src/modules/parsing.rst: $ pip3 install antlr4-python3-runtime
doc/src/modules/parsing.rst: $ pip install antlr4-python2-runtime
doc/src/modules/parsing.rst: $ conda install --channel=conda-forge antlr-python-runtime
release/requirements.txt:antlr4-python3-runtime==4.10
release/rever.xsh: 'python-symengine=0.3.*', 'numexpr', 'antlr-python-runtime>=4.7,<4.8',
release/update_requirements.sh: 'antlr4-python3-runtime==4.10.*'\
sympy/parsing/autolev/_parse_autolev_antlr.py: " provided by pip (antlr4-python2-runtime or"
sympy/parsing/autolev/_parse_autolev_antlr.py: " antlr4-python3-runtime) or"
sympy/parsing/autolev/_parse_autolev_antlr.py: " conda (antlr-python-runtime)")
sympy/parsing/latex/_parse_latex_antlr.py: " provided by pip (antlr4-python2-runtime or"
sympy/parsing/latex/_parse_latex_antlr.py: " antlr4-python3-runtime) or"
sympy/parsing/latex/_parse_latex_antlr.py: " conda (antlr-python-runtime)")
sympy/parsing/tests/test_latex.py:# disable tests if antlr4-python*-runtime is not present
sympy/parsing/tests/test_latex_deps.py:# disable tests if antlr4-python*-runtime is not present
Probably the python2 references can be removed. Is antlr-python-runtime correct? Maybe it's a different name with conda...
Use pip install antlr4-python3-runtime or conda install -c conda-forge antlr-python-runtime, but either case version('antlr4-python3-runtime') should be used to check version.
I had a go of extracting some highlights and summarize the deprecations and removals (with the idea that one can find the details in the long list). Feel free to edit as appropriate.