neogeny / TatSu

竜 TatSu generates Python parsers from grammars in a variation of EBNF
https://tatsu.readthedocs.io/
Other
403 stars 48 forks source link

Backport recent fixes to 5.7.5 release with Python 3.8 and later compatibility #340

Closed dnicolodi closed 3 months ago

dnicolodi commented 3 months ago

Similarly to what we did with the 5.7.4 release, I would like to backport the recent improvements and bug fixes in a release compatible with Python 3.8 and later. This PR contains the changes required on top of the current master branch to support Python 3.8 and later. It would be great if this could become a 5.7.5 release. @apalala What do you think?

dnicolodi commented 3 months ago

One of the reported linter errors is present on the master branch too, fixed in #341. The others emerge after the changes in this PR, but AFAICT they are not related to the changes proposed here.

apalala commented 3 months ago

@dnicolodi, I don't remember how we did this the last time.

Merging to master is out of the question.

I can create a release_5.7.5 branch, and maybe the pull request can be re-targeted to it?

All tests should pass, even if it means patching them on the branch .

apalala commented 3 months ago

I looked at the few warnings from ruff, and it looks like they should be fixed in the mater branch.

dnicolodi commented 3 months ago

Sure, I didn't want to propose to merge this into master, but I wanted to provide a preview of the changes required for Python 3.8 compatibility, to have something concrete to discuss.

Creating a release branch would be the way forward. If there would be more tweaks required, we could have a 5.7 (or other name) branch for the backports and cut 5.7.x releases from that branch every now and then. However, with only an handful of changes required, it is easier to forward port the Python 3.8 support. In summary: a release_5.7.5 branch would be great.

Sure, all the test should pass before merging.

dnicolodi commented 3 months ago

I looked at the few warnings from ruff, and it looks like they should be fixed in the mater branch.

With master and latest ruff I still get the warning resolved in #341

apalala commented 3 months ago

The PERF203 by ruff is not always accurate, so I'll turn it off in master.

You'll have to merge from upstream to update the pull request.

dnicolodi commented 3 months ago

Rebased on master and added two commits preparing a 5.7.5 release. @apalala Please let me know if there is anything else I can do to help with a release.

apalala commented 3 months ago

@dnicolodi I need to create a branch so you can target this pull request there, and it's done!

The branch is for_python_38.

Target the pull request there so there is no interference with master, which should be considered the upstream for the work you are doing.

dnicolodi commented 3 months ago

I changed the target branch for the PR to for_python_38.

apalala commented 3 months ago

Merged!

Let me take a moment to think about the release process (I don't remember what I did the last time).

dnicolodi commented 2 months ago

Thanks @apalala !

I may be stating the obvious, but it looks like you can simply select the branch to tag when creating a new release. I don't think TatSu uses automation for building wheels, thus uploading to PyPI would also require checking out the tag, building sdisgt and wheel and upload them to PyPI.

apalala commented 3 days ago

Sorry for the delay. I'll get onto this shortly.