lark-parser / lark

Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
MIT License
4.8k stars 409 forks source link

Deprecation Warning #1417

Closed MohammedShokr closed 4 months ago

MohammedShokr commented 4 months ago

I am getting the following deprecation warnings while I am using the latest version of lark 1.1.9

.venv/lib/python3.11/site-packages/lark/utils.py:163: DeprecationWarning: module 'sre_parse' is deprecated
  import sre_parse
.venv/lib/python3.11/site-packages/lark/utils.py:164: DeprecationWarning: module 'sre_constants' is deprecated
  import sre_constants`
MegaIng commented 4 months ago

Are you sure you are importing version 1.1.9?

MohammedShokr commented 4 months ago

Yes, I am using version 1.1.9 Here's a snap shot from my poetry.lock file image

And here are the lines causing the issue image

MegaIng commented 4 months ago

What does import lark; print(lark.__version__) show? There is a reason I asked for the imported version, not what you have installed.

Clearly, the file you have does not come from our 1.1.9 distribution, you can check that manually by opening of the tar.gz/.whl files yourself and checking the utils.py file: https://pypi.org/project/lark/#files

MohammedShokr commented 4 months ago

Yes you are right, I found out that the imported version is 0.12.0

MegaIng commented 4 months ago

You probably have lark-parser installed as well. That's the old install name of this package.

MohammedShokr commented 4 months ago

Yes, I had lark-parser with version 0.12.0 and that what caused the confusion. Thanks for the clarification, Closing the issue.