Skip to content

Warnings in console with Python 3.13 coming from the ply/yacc dependencies #115

@peterlevi

Description

@peterlevi

With Python 3.13, I am getting warnings to stderr when importing luqum, coming from the ply dependency. This was not the case with Python 3.12.

The warnings I see are the following:

    "Generating LALR tables",
    "WARNING: 2 shift/reduce conflicts",
    "WARNING: 2 reduce/reduce conflicts",
    "WARNING: reduce/reduce conflict in state 24 resolved using rule (phrase_or_possibly_negative_term -> PHRASE)",
    "WARNING: rejected rule (phrase_or_term -> PHRASE) in state 24",

The easiest way to reproduce is to run:

docker run --rm --network host python:3.13-alpine3.23 sh -c 'pip install ply==3.11 luqum==1.0.0 && python -c "import luqum.parser;print(luqum)"'

I don't get warnings with Python 3.12:

docker run --rm --network host python:3.12-alpine3.23 sh -c 'pip install ply==3.11 luqum==1.0.0 && python -c "import luqum.parser;print(luqum)"'

Any suggestions how to suppress these?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions