antlr4 icon indicating copy to clipboard operation
antlr4 copied to clipboard

Clarify supported Python runtime language version

Open gricey432 opened this issue 1 year ago • 9 comments

Just after some clarification on what the supported Python versions are.

The docs specify Python 3.6 or higher, however the readme says Python 3.4 or higher

Python 3.4 went end of life in early 2019, 3.5 in late 2020, and 3.6 in late 2021

I'm happy to submit a PR either removing the 3.4 & 3.5 support code or updating the docs to say 3.4, just need some guidance on the project's status / goals here.

gricey432 avatar May 06 '24 23:05 gricey432

It is unclear what it could be because the tester uses the latest available. https://github.com/antlr/antlr4/blob/380ce4b8b1658df16ada45e1d56d5aa476052376/.github/workflows/hosted.yml#L247 The plugin itself recommends setting an explicit version: (we recommend always setting Python version explicitly using the python-version or python-version-file inputs). In addition, to properly qualify a version range, you need to test each and every version in a range of versions in a test matrix in Github Actions workflow. In grammars-g4, I set the version explicitly to 3.10 because I had problems with version 3.8. https://github.com/antlr/grammars-v4/blob/153d66809d26425e5ac49cec77294f034d99eb0b/.github/workflows/main.yml#L113 However, that may be because some of the grammars have base class support code that relies on 3.10, and not with the generated parsers themselves. I don't test a range because it takes a long time to do this testing with each PR. And it can be expensive.

kaby76 avatar May 11 '24 10:05 kaby76

Thanks for the response @kaby76, it's raised some further questions.

The plugin itself recommends setting an explicit version: (we recommend always setting Python version explicitly using the python-version or python-version-file inputs).

Where'd you find that line? The readme for the Python target doesn't seem to have that text in it and I'm unsure what a 'plugin' is in the ANTLR ecosystem. Also don't get any code matches on a Github search.

In addition, to properly qualify a version range, you need to test each and every version in a range of versions in a test matrix in Github Actions workflow. ... I don't test a range because it takes a long time to do this testing with each PR. And it can be expensive.

Hmm yeah having a look at the GitHub actions it looks like this repo is using one giant sequential job for the bulk of the Workflow. I feel like there'd be huge benefit in making a larger number of small jobs, but that's probably a different ticket.

The kind of code I'm proposing removal of (if 3.6 is minimum supported) is blocks like https://github.com/antlr/antlr4/blob/380ce4b8b1658df16ada45e1d56d5aa476052376/runtime/Python3/src/antlr4/Parser.py#L6

gricey432 avatar May 13 '24 03:05 gricey432

Where'd you find that line?

Sorry, it is from https://github.com/actions/setup-python , the first big paragraph under "Basic usage".

Yes, validating the supported versions of a runtime environment is another problem. The change in the Antlr source code is also something that needs to be fixed with the correct value or removed.

kaby76 avatar May 13 '24 10:05 kaby76

Sorry, it is from https://github.com/actions/setup-python , the first big paragraph under "Basic usage".

Ah I misunderstood; thought you were talking about ANTLR suggesting pinning Python.

gricey432 avatar May 14 '24 05:05 gricey432

@gricey432 Thanks for this, please submit a PR

ericvergnaud avatar Jul 25 '24 19:07 ericvergnaud

@gricey432 Thanks for this, please submit a PR

Happy to do so, but I don't think there's been any feedback on which direction the PR should go. Which place is the source of truth?

gricey432 avatar Jul 27 '24 03:07 gricey432

Let’s refer to whichever version is LTS ?Envoyé de mon iPhoneLe 27 juil. 2024 à 05:19, Mitchell Grice @.***> a écrit :

@gricey432 Thanks for this, please submit a PR

Happy to do so, but I don't think there's been any feedback on which direction the PR should go. Which place is the source of truth?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

ericvergnaud avatar Jul 27 '24 16:07 ericvergnaud

Let’s refer to whichever version is LTS ?

Unlike Java, Python doesn't have LTS versions https://devguide.python.org/versions/

They just continuously roll through

gricey432 avatar Jul 28 '24 01:07 gricey432

That would be 3.8 thenEnvoyé de mon iPhoneLe 28 juil. 2024 à 03:33, Mitchell Grice @.***> a écrit :

Let’s refer to whichever version is LTS ?

Unlike Java, Python doesn't have LTS versions https://devguide.python.org/versions/ They just continuously roll through

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

ericvergnaud avatar Jul 28 '24 14:07 ericvergnaud