Skip to content

[Python3 Runtime] Release 4.10 breaks support for Python 3.5 #3650

@amykyta3

Description

@amykyta3

The latest 4.10 runtime release breaks support for Python 3.5.
It looks like the codebase introduces the use of f-strings, which are only available in Python 3.6 and newer. Not sure if use of f-strings is limited to the setup.py, or whether they are also widely used in the runtime.

I strongly recommend you yank the release from PyPi and re-release with a proper version constraint in your runtime/Python3/setup.py:

setup(
    ...
    python_requires='>=3.6.0',
)

Currently, any users still using Python 3.5 will have pip blindly fetch the v4.10 runtime despite it not being compatible.

pip install fails with the following:

$ python3.5 -m pip install antlr4-python3-runtime
Collecting antlr4-python3-runtime
  Using cached antlr4-python3-runtime-4.10.tar.gz (116 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3.5 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4ktmdclk/antlr4-python3-runtime_a1ff11eada524b8993affbd53054989d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4ktmdclk/antlr4-python3-runtime_a1ff11eada524b8993affbd53054989d/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-vs2ia4lj
         cwd: /tmp/pip-install-4ktmdclk/antlr4-python3-runtime_a1ff11eada524b8993affbd53054989d/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-4ktmdclk/antlr4-python3-runtime_a1ff11eada524b8993affbd53054989d/setup.py", line 18
        description=f'ANTLR {v} runtime for Python 2.7.12'
                                                         ^
    SyntaxError: invalid syntax
    ----------------------------------------

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions