- kernel controller class detects terminated kernel process while waiting for an evaluation result instead of hanging.
- update Wolfram Language code with latest addition from 12.3.
- fix various deprecated naming convention in class names.
- Async cloud evaluator based on
aiohttpnow usecertifito create a defaultSSLContextif none is provided. Other cloud evaluator are based on therequestsmodule which also uses this library. - Updating dependency list accordingly in
setup.py.certifiwas already listed as arequestsdependency, so this should have no direct impact on user site package.
- Update asynchronous evaluator classes. Remove the
loopparameter. Most optional loop parameters are deprecated in the Python standart libraryasyncioand in most libraries, mainly because it is misleading and lead to misuses and bugs. The loop parameter is useful when instantiating asynchronous evaluators outside the scope of an event loop. It's implementation was not good enough and was relying on usages deprecated in 3.8. - Removing four asynchronous generators in asynchronous evaluation result classes:
iter_messages,iter_messages_name,iter_messages_tupleanditer_output. These coroutines are only working on python 3.6+ and are not critical enough to drop support for 3.5. Asynchronous properties:messages,messages_nameandoutputprovide the same information.
- Fix a backward incompatible change introduced in 12.1. Make sure the library works with any kernel version starting with 11.3.
- Minor changes and tweaks.
- WXF deserialization maps
Listtotuple, waslistbefore for two reasons.Listand tuple are immutable.tuplecontrary tolistare hashable object and as such can be keys indict. - WXF deserialization maps numeric arrays to
NumPyarrays. Numpy being a pre-requisite of the library, and lazily loaded, this change will boost performances while causing very little trouble, if any. - Fix bug in
WolframLanguageSessionthat was preventing Python interpreter from exiting. - Add new class
PackedArray, a wrapper on top of NumPyndarray. Instances ofPackedArrayare serialized as... WL packed array (!). This fixes the issue of having a WL packed array (say the output ofRange[3]), being serialized to andarray(arange(3)), and send back to the kernel as aNumericArray. - Use
blackcode formatter.
- Add two new optional flags to
testcommand called-xor--xmland-dor--xml-dir. It produces an xml output of the test results using theunittest-xml-reportinglibrary.-dexpects the filepath of the output directory, default istest-reports. Also add-vor--verbosityto control theverbosityoption of the test suite. Checkpython run.py test -hfor more info.
- Bug fix in
WXFConsumer. - Update some URLs.
- Introducing a new class
WolframKernelController. Major code change to ensure ZMQ sockets are isolated in a given thread. Add a new controller class, aThread, that own the sockets connected to the kernel. Interaction with this thread is done through a Queue. - Merge
WolframLanguageFutureSessionintoWolframLanguageSession. All evaluate methods have a future counterpart. - Merge
WolframCloudFutureSessionintoWolframCloudSession. Add relevant future methods. - Rename
WolframAPICallmethodadd_parametertoset_parametersince setting is exactly what it does. - Result of API call, the
WolframAPIResponsefamily of classes, now automatically deserialize the response content using the content-type, if it'sWXForJSON. The content type remains accessible in theresponsemember of those classes. - rename evaluator parameters
STARTUP_READ_TIMEOUTtoSTARTUP_TIMEOUT, andTERMINATE_READ_TIMEOUTtoTERMINATE_TIMEOUT. - CPU consumption reduced to ~1% with the latest ZMQLink version.
- Local session checks for the Wolfram Kernel version at startup and fails with a specific message.
- Local session supports instant logging for messages, with severity
warn, and prints, with severityinfo. This only works for kernel with akernel_loglevelset on initialization, and allows real time feedbacks, even if the kernel evaluation is not yet completed. - Change mapping of WXF symbols to Python objects. The only symbols that are deserialized to Python objects are the one that round trips:
Null,True,False.PiandNoneare no more deserialized to, respectively,math.piandNone.
- Inconsistent class name
WolframCloudSessionFuturereplaced withWolframCloudFutureSession. - Rework completely
Dispatchclass. Add aDispatchinstance calledwolfram_encoderrepresenting the multi dispatch function that encodes Python object. - Add an entry point allowing new encoders to be registered as separated libraries (plugins).
- Add support for pandas classes:
SeriesandDataFrame. - Extend support for NumPy numbers.
- Local evaluators can be initialized without a Wolfram Kernel path, in which case default paths are scanned to find the most recent product.
- Add
CHANGELOG.mdto the repository to help users track the changes. - Major refactoring of the evaluation module.
- add base classes for synchronous and asynchronous evaluation, specifying the evaluation scheme.
- add cloud session implementation based on event loop using the aiohttp library.
- rename asynchronous session based on future module from
WolframCloudAsyncSessiontoWolframCloudSessionFuture. - add new implementation of
WolframCloudAsyncSessionbased on asyncio and coroutines.
- Cloud session named option
authenticationrenamedcredentials. - Significant improvement of
PIL.Imagesupport. Speed up serialization and deserialization of images, and add support for more input formats.
First released version of the library as a release candidate.