Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sre_parse and sre_constants modules are deprecated #1739

Closed
jwodder opened this issue Apr 10, 2023 · 2 comments · Fixed by #1743
Closed

sre_parse and sre_constants modules are deprecated #1739

jwodder opened this issue Apr 10, 2023 · 2 comments · Fixed by #1743

Comments

@jwodder
Copy link

jwodder commented Apr 10, 2023

traits makes use of the sre_parse and sre_constants modules here; however, these modules are deprecated, and a deprecation warning is emitted when they are imported. They should be replaced with something more up-to-date.

@mdickinson
Copy link
Member

mdickinson commented Apr 17, 2023

Thanks for the report. It looks as though regenerating the parser with the latest version of Lark should address this. (Upstream PR: lark-parser/lark#1140)

mdickinson added a commit that referenced this issue Apr 17, 2023
This PR regenerates the parser for the `observe` mini-language using the
newest version of Lark. This should fix some deprecation warnings coming
from imports used by the old parser.

The parser was regenerated using Lark 1.1.5, via

python -m lark.tools.standalone traits/observation/_dsl_grammar.lark
--out traits/observation/_generated_parser.py

Closes #1739
@mdickinson
Copy link
Member

The parser was updated in #1743; I've double checked that python -Wd -c "import traits.api" reproduces the DeprecationWarnings on my machine on Python 3.11, and that those warnings are now gone on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants