Closed greschd closed 5 months ago
@greschd is this expected given that PyMAPDL supports Python 3.8-3.11?
https://mapdl.docs.pyansys.com/version/stable/getting_started/install_pymapdl.html
Not being a developer I don't keep up with all the changes between Python releases so this is a genuine question. Mike
@mikerife this happens on the latest development version of PyMAPDL version, which supports Python 3.12: https://mapdl.docs.pyansys.com/version/dev/getting_started/install_pymapdl.html
This is not actively a problem when using PyMAPDL, but it
SyntaxError
instead of only a warning@greschd Ah you're cheating! That is the Development document site. Not the 0.68.0 version document site. I stick with what has been released, not what is being developed. 0.68.0 supports up to Python 3.11. Guess @germa89 will need to weigh in. Mike
@greschd is right. I will have to fix this eventually.
Python 3.12 started warning about improperly escaped strings, for example
"\B"
, see the second entry in https://docs.python.org/3/whatsnew/3.12.html#other-language-changesThe PyMAPDL code contains many instances of these. Note that they appear only on a fresh install; after the byte code is generated they do not re-appear.
Steps to reproduce:
pip install -e .
python -c 'import ansys.mapdl.core'
To re-reproduce:
git clean -dfx src/
python -c 'import ansys.mapdl.core'
There are two ways to fix this:
\
) with double backslashes (\\
).Personally I like to avoid raw strings when possible since they are stranger than one might think, but both options generally work.
Output: