[Python2 Runtime] Release 4.10 breaks support for Python 2.7 - antlr4-python2-runtime 4.10 leading f in setup.py for python2

255 views
Skip to first unread message

Лапоть

unread,
Apr 15, 2022, 4:08:05 PM4/15/22
to antlr-discussion
Hello, 
new version(4.10) of antlr4-python2-runtime is broken cause of leading f in setup.py for python2 

pip2 install antlr4-python2-runtime
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Defaulting to user installation because normal site-packages is not writeable
Collecting antlr4-python2-runtime
  Using cached antlr4-python2-runtime-4.10.tar.gz (113 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-UVcSlF/antlr4-python2-runtime/setup.py'"'"'; __file__='"'"'/tmp/pip-install-UVcSlF/antlr4-python2-runtime/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-MEkYRY
         cwd: /tmp/pip-install-UVcSlF/antlr4-python2-runtime/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-UVcSlF/antlr4-python2-runtime/setup.py", line 13
        description=f'ANTLR {v} runtime for Python 2.7.12'
                                                         ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.


maybe it could be fixed via changing it to 

description='ANTLR %s runtime for Python 2.7.12' % v

Terence Parr

unread,
Apr 15, 2022, 5:22:47 PM4/15/22
to antlr-di...@googlegroups.com
good catch! I’ll fix.
Ter
Dictation in use. Please excuse homophones, malapropisms, and nonsense.


--
You received this message because you are subscribed to the Google Groups "antlr-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to antlr-discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/antlr-discussion/0a9d6780-a4c7-4b45-9b53-fe343c201fa9n%40googlegroups.com.

Andrii Lapchyk

unread,
Apr 15, 2022, 5:36:19 PM4/15/22
to antlr-discussion
Thank you, Terence, I appreciate it
Andrii

Terence Parr

unread,
Apr 15, 2022, 5:37:08 PM4/15/22
to antlr-di...@googlegroups.com
Sure. you can use python3 setup.py install for now. pushing 4.10.1 shortly though.
Ter
Dictation in use. Please excuse homophones, malapropisms, and nonsense.


Reply all
Reply to author
Forward
0 new messages