Mathics3 / mathics-core

An open-source Mathematica. This repository contains the Python modules for WL Built-in functions, variables, core primitives, e.g. Symbol, a parser to create Expressions, and an evaluator to execute them.

Home Page:https://mathics.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mathics 6.0.2 on PyPI different from that on GitHub ``can only concatenate str (not "_UnionGenericAlias") to str``

Li-Xiang-Ideal opened this issue · comments

Description

Mathics 6.0.2 on PyPI Mathics3-6.0.2.tar.gz is different from that on GitHub, resulting in a series of bugs can only concatenate str (not "_UnionGenericAlias") to str

How to Reproduce

  1. Install Mathics3 v6.0.2 from PyPI (pip install Mathics3)
  2. Enter from mathics.session import MathicsSession
  3. Enter session = MathicsSession()

Output Given

can only concatenate str (not "_UnionGenericAlias") to str
    Not able to load strings. Check your installation.
    mathics.builtin loads from C:\Program Files\Python311\Lib\site-packages\mathics\builtin\
can only concatenate str (not "_UnionGenericAlias") to str
    Not able to load symbols. Check your installation.
    mathics.builtin loads from C:\Program Files\Python311\Lib\site-packages\mathics\builtin\
can only concatenate str (not "_UnionGenericAlias") to str
    Not able to load io. Check your installation.
    mathics.builtin loads from C:\Program Files\Python311\Lib\site-packages\mathics\builtin\
can only concatenate str (not "_UnionGenericAlias") to str
    Not able to load htmlformat. Check your installation.
can only concatenate str (not "_UnionGenericAlias") to str
    Not able to load xmlformat. Check your installation.
    mathics.builtin loads from C:\Program Files\Python311\Lib\site-packages\mathics\builtin\
can only concatenate str (not "_UnionGenericAlias") to str
    Not able to load files. Check your installation.
    mathics.builtin loads from C:\Program Files\Python311\Lib\site-packages\mathics\builtin\
can only concatenate str (not "_UnionGenericAlias") to str
    Not able to load filesystem. Check your installation.
can only concatenate str (not "_UnionGenericAlias") to str
    Not able to load charcodes. Check your installation.
    mathics.builtin loads from C:\Program Files\Python311\Lib\site-packages\mathics\builtin\
can only concatenate str (not "_UnionGenericAlias") to str
    Not able to load operations. Check your installation.
    mathics.builtin loads from C:\Program Files\Python311\Lib\site-packages\mathics\builtin\
can only concatenate str (not "_UnionGenericAlias") to str
    Not able to load patterns. Check your installation.
    mathics.builtin loads from C:\Program Files\Python311\Lib\site-packages\mathics\builtin\

Expected behavior

No output

Your Environment

Windows 10, Python 3.11

Source of this bug

In Mathics3 v6.0.2 on GitHub, mathics\session.py, line 63, it is
character_encoding: Optional[str] = None,
but in Mathics3 v6.0.2 on PyPI, mathics\session.py, line 63, it is
character_encoding=Optional[str],

Resolution

Replace character_encoding=Optional[str], by character_encoding: Optional[str] = None,, than the bug is fixed

Thanks - I will try to put out a 6.0.3 version when I get a chance.

Thanks a lot!

No source distribution package is available at https://pypi.org/project/Mathics3/#files for 6.0.3, only a wheel package for Mathics3-6.0.3-py3-none-any.whl.
Please see Generating distribution archives.

Thanks!

Thanks!

And as before, thanks for handling the packaging on FreeBSD!

It seems that in Mathics3 v6.0.3 on PyPI, mathics\session.py, line 63, it is still character_encoding=Optional[str], instead of character_encoding: Optional[str] = None,

Sorry. Please look over what what is in the release-6.0.4 branch and if that is okay, another release will go out this weekend.

Both release-6.0.3 and relesae-6.0.4 branches are correct now. Thanks for corrections.

release-6.0.4 is OK now.