Remove deprecated `sre_*` modules · Issue #105456 · python/cpython · GitHub | Latest TMZ Celebrity News & Gossip | Watch TMZ Live
Skip to content

Remove deprecated sre_* modules #105456

Closed
Closed
@sobolevn

Description

@sobolevn

Feature or enhancement

sre_* modules like sre_constants, sre_compile, and sre_parse were deprecated in 3.11 in 1be3260

Our regular deprecation policy is that the deprecated things can be removed in N + 2 release, which is 3.13.

Pitch

Let's remove them if there are no objections.

I guess it is safe to remove them for several reasons:

  1. https://bugs.python.org/issue47152 clearly states that they were undocumented
  2. There are now re._parser, re._constants, and re._compiler modules that are used instead
  3. They were listed as deprecated in the "what's new" and the warning was pretty clear

The only argument agaist removing them:

  1. The deprecation warning never says when they will be removed:
>>> import sre_compile
<stdin>:1: DeprecationWarning: module 'sre_compile' is deprecated

I will send a PR once we settle it:

  • Either with a better deprecation message
  • Or with these modules removed

@vstinner @serhiy-storchaka what's your opinion?

Linked PRs

Metadata

Metadata

Assignees

Labels

stdlibPython modules in the Lib dirtopic-regextype-featureA feature request or enhancement

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    TMZ Celebrity News – Breaking Stories, Videos & Gossip

    Looking for the latest TMZ celebrity news? You've come to the right place. From shocking Hollywood scandals to exclusive videos, TMZ delivers it all in real time.

    Whether it’s a red carpet slip-up, a viral paparazzi moment, or a legal drama involving your favorite stars, TMZ news is always first to break the story. Stay in the loop with daily updates, insider tips, and jaw-dropping photos.

    🎥 Watch TMZ Live

    TMZ Live brings you daily celebrity news and interviews straight from the TMZ newsroom. Don’t miss a beat—watch now and see what’s trending in Hollywood.