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

src: resolve deprecation warnings for sre_constants #7460

Merged
merged 1 commit into from
May 16, 2024

Conversation

MaxXor
Copy link
Contributor

@MaxXor MaxXor commented May 16, 2024

On boot with python 3.11 a new deprecation warning appears:

configd.py	[e3c1a4e0-1dec-4667-a300-0ceff7926539] Script action stderr returned "b"/usr/local/opnsense/scripts/syslog/queryLog.py:36: DeprecationWarning: module 'sre_constants' is deprecated\n import sre_constants""

It's only used to have an exception class sre_constants.error it can be safely replaced with re.error since it is also imported from regex compiler there.

@AdSchellevis AdSchellevis merged commit e21159a into opnsense:master May 16, 2024
@AdSchellevis AdSchellevis self-assigned this May 16, 2024
@AdSchellevis AdSchellevis requested review from AdSchellevis and removed request for AdSchellevis May 16, 2024 17:28
@AdSchellevis AdSchellevis added the cleanup Low impact changes label May 16, 2024
@AdSchellevis
Copy link
Member

@MaxXor thanks!

@MaxXor MaxXor deleted the patch-deprecation-warning branch May 16, 2024 17:56
fichtner pushed a commit that referenced this pull request May 17, 2024
@John-AZ
Copy link

John-AZ commented May 18, 2024

Thanks.
I had this error too and it was fixed by changing the code listed e21159a973

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Low impact changes
Development

Successfully merging this pull request may close these issues.

None yet

3 participants