WolframResearch / WolframClientForPython

Call Wolfram Language functions from Python
https://wolfr.am/wolframclientdoc
MIT License
446 stars 47 forks source link

Fix bug in utils.py occuring since python version 3.12.3 #40

Closed Okarin99 closed 5 months ago

Okarin99 commented 6 months ago

In python version 3.12.3 PEP 701 they changed how f strings get parsed. As a result "\.00" gives an error now instead of \\.00. I tested that the bug fix also works with python version 3.11.9.

riccardodivirgilio commented 6 months ago

Thanks for the PR, indeed python 3.12 introduced a bug here.

Okarin99 commented 6 months ago

Your right! They even noted in the PEP that it should be backwards compatible.

Okarin99 commented 6 months ago

It seems like that the change was introduced with this commit 3483299a24e4 and has nothing to do with PEP 701. So I'm not sure if it is an python bug, since I don't know pythons backward compatibility rules.

riccardodivirgilio commented 5 months ago

The issue has been fixed by another branch. Thanks for the pr but this is superseded, the bug should be fixed now on master.

riccardodivirgilio commented 5 months ago

a new version of wolframclient has been pushed to pypi, let me know if that works for you

https://pypi.org/project/wolframclient/1.4.0/