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 · 3 comments · May be fixed by #263
Open

sre_constants is deprecated #229

oliver-sanders opened this issue May 2, 2023 · 3 comments · May be fixed by #263
Assignees
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
@ColemanTom
Copy link

Just to note two things

  1. sre_constants is still in python 3.13, which does go against their usual approach, but anyway, its still there
  2. You maybe should pin the max python version in the conda feedstock to be <3.14 as a safety feature.

@MetRonnie
Copy link
Contributor

MetRonnie commented Jan 8, 2025

@MetRonnie MetRonnie self-assigned this Jan 14, 2025
@MetRonnie MetRonnie modified the milestones: 4.0.0, 3.2.0 Jan 14, 2025
@MetRonnie MetRonnie linked a pull request Jan 14, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants