Restore support for py3.5 by removing f-string in setup.py#3662
Restore support for py3.5 by removing f-string in setup.py#3662
Conversation
e7405cc to
e6b3f68
Compare
Signed-off-by: Alex Mykyta <amykyta3@users.noreply.github.com>
|
@parrt: Fixed the DCO and merge conflict issues. |
|
hi. This shouldn't really be a necessary change given that installing Python 3 code should be able to use the python three syntax right? |
|
That's not universally true for Python3. Given that the In the future if you plan on doing a more wholesale refactoring that introduces Python 3.6+ features, recommend adding a minimum Python version constraint in the setup(
...
python_requires=">=3.6.0"
)When published, this version constraint gets annotated in the project's JSON index in pypi. Eg: https://pypi.org/pypi/antlr4-python3-runtime/json |
In this case I'd also recommend dropping support of Python 2 (#3266) |
|
Hi @amykyta3 sorry about that. It's hard to keep track of which language version has white and there are like nine targets for ANTLR to keep track of. |
|
@parrt Is there a current planned date for the 4.10.2 release, or is there a workaround for Python version <=3.5? Without one, there's no clean way to install 4.10.x in affected Python versions today. |
|
Oh actually I'm realizing the problem isn't even fixed for Python 2: https://github.com/antlr/antlr4/blob/master/runtime/Python2/setup.py#L13 |
|
Maybe now is the right time to deprecate Python 2 runtime since it doesn't look working now? #3266 |
|
If this is the only thing standing between 4.10, which is a major version with new features, and Python 2 support, then it makes more sense to fix this literally one-line bug so we have a working Python 2 version. Obviously it doesn't make sense to support Python 2 in perpetuity, but I think we can be more deliberate about removing support than that. Especially since here literally 99.9999999% of the work to get a Py2-compatible 4.10 version is done. |
|
If @parrt doesn't want to rush out a 4.10.2 version I can try to do so on a fork. Are there any other known problems with 4.10.1 for Python 2? |
|
hi. can you be more specific about what the install issue is? It works on my mac box for 2 and 3: Oh. I'm 3.9 python. Is that the issue? I need like 3.4? |
|
You can't install this with a Python 2 version of pip, since it doesn't know how to read the F string. So right now the Python 2 runtime is not installable under any Python 2 version. |
|
Ah I see. Yeah, i don't even have python2. Yeah, I'm hoping to get 4.10.2 soon but I'm in process with a bunch of stuff. :( |
|
We should tweak the setup file though to support earlier python 3 too. |
|
I'll send a PR and try to get a version out on a fork |
I think this was already covered by the PR we're commenting on. |
|
Oh right. read the diff wrong. So you just need it to run with python2, is that the issue? (Sorry 8 conversations going in my head simultaneously this morning) |
|
There are separate |
|
Seems to be working in Py2 with the setup.py fix, I've published a fork for now while we wait for official 4.10.2 release: |
Python3 runtime's setup.py introduces the use of an f-string which needlessly breaks compatibility with Python3.5 (#3650)
Remove the use of an f-string to restore ability to use runtime in python3.5