Skip to content

The python PEG parser generator doesn't allow f-strings anymore in actions #125588

Closed

Description

@pablogsal

After the changes in 3.12 to the f-string formalisation, the PEG parser doesn't recognise the new tokens.

Linked PRs

Activity

  1. added 3 commits that reference this issue on Oct 16, 2024
  2. changed the title [-]The python PEG parser generator doesn't allow strings anymore in actions[/-] [+]The python PEG parser generator doesn't allow f-strings anymore in actions[/+] on Oct 16, 2024
  3. added 2 commits that reference this issue on Oct 16, 2024
  4. added 2 commits that reference this issue on Oct 29, 2024
  5. db3l commented on Nov 22, 2024

    @db3l
    Contributor

    Just ran into this today when trying to test a clean build of main on my buildbot. My buildbot has a system python of 3.11, but with this change, it needs to be 3.12+ otherwise there's an exception on non-existent FSTRING_* attributes in the token module. The issue hasn't yet presented itself on any of the regular builder builds, I guess due to re-generation not usually being necessary, but presumably it will the next time the grammar is touched.

    It appears 3.10+ is the current minimum enforced by find_python.bat under Windows (and I believe configure under Linux). I can fix things by adding a default "None" parameter to the new getattr() calls (together with the existing "if not" checks) but am unsure if this would still produce the right final output, or if the minimum system python version just needs to be bumped.

  6. added a commit that references this issue on Dec 8, 2024
  7. pablogsal commented on Dec 15, 2024

    @pablogsal
    MemberAuthor

    Just ran into this today when trying to test a clean build of main on my buildbot. My buildbot has a system python of 3.11, but with this change, it needs to be 3.12+ otherwise there's an exception on non-existent FSTRING_* attributes in the token module. The issue hasn't yet presented itself on any of the regular builder builds, I guess due to re-generation not usually being necessary, but presumably it will the next time the grammar is touched.

    I think that has been an oversight in #125589 I will fix it soon

  8. added 3 commits that reference this issue on Dec 15, 2024
  9. added a commit that references this issue on Jan 8, 2025
  10. added a commit that references this issue on Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions