we-like-parsers / pegen

PEG parser generator for Python
https://we-like-parsers.github.io/pegen/
MIT License
150 stars 32 forks source link

Support Python 3.11 and 3.12 #95

Closed MatthieuDartiailh closed 9 months ago

phorward commented 10 months ago

Hello @MatthieuDartiailh, thanks for starting on this issue. I've already updated pegen in my fork unipeg to Python 3.10 and Python 3.11, maybe you can use parts of it here as well. Generally, my advise is to drop support for Python < 3.11, and stay up-to-date.

Also, I would like to turn pegen (or unipeg) into a drop-in replacement of the peg provided with CPython. I know this isn't the right place for discussions, but we should start to discuss about it and bring this project further.

MatthieuDartiailh commented 10 months ago

I personally use pegen in a project implementing a strict superset of Python and I need to support 3.9+ ATM. Also my own bandwidth is really low ATM so I won't be able to engage in any large endeavour.

MatthieuDartiailh commented 10 months ago

All ast parsing tests are now passing on Python 3.12 and I added a bunch from CPython for tryexcept group, type params and f-strings.

I still need to fix syntax error related tests in a manner compatible both with 3.12 and earlier version.

I would welcome an early review.

MatthieuDartiailh commented 9 months ago

Tests for Python 3.11 and 3.12 specific syntax error messages are missing but everything else is good and those tests could be added in a follow up PR.

A review would be welcome.

MatthieuDartiailh commented 9 months ago

I added some extra tests. I believe this is ready to go from my end.

phorward commented 9 months ago

@MatthieuDartiailh for me, this looks well so far. I don't know, what about @pablogsal and @lysnikolaou ?

MatthieuDartiailh commented 9 months ago

Thanks for checking the PR @phorward

lysnikolaou commented 9 months ago

@MatthieuDartiailh Thanks for working on this! I'll probably try to review this tomorrow.

MatthieuDartiailh commented 9 months ago

@lysnikolaou friendly ping