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_constants is deprecated #229

Open
oliver-sanders opened this issue May 2, 2023 · 1 comment
Open

sre_constants is deprecated #229

oliver-sanders opened this issue May 2, 2023 · 1 comment
Labels
Milestone

Comments

@oliver-sanders
Copy link
Member

The sre_constants module is now deprecated at Python 3.11 for removal in Python 3.13.

https://docs.python.org/3/whatsnew/3.11.html#modules

@oliver-sanders oliver-sanders added this to the 3.0.1 milestone May 2, 2023
@MetRonnie MetRonnie added the small label May 2, 2023
@MetRonnie
Copy link
Contributor

try:
compiled_regex = re.compile(regex)
except sre_constants.error:
raise StrptimeConversionError(source, regex)

Probably can just replace with Exception. The line in question is showing as not covered by tests so could do with adding a few while we're at it

@MetRonnie MetRonnie modified the milestones: 3.0.1, 3.1.0 Jul 20, 2023
@MetRonnie MetRonnie modified the milestones: 3.1.0, 4.0.0 Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants