-
-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
Remove deprecated sre_*
modules
#105456
Comments
Do they have much use in the top 5k PyPI packages? For example: https://dev.to/hugovk/how-to-search-5000-python-projects-31gk |
It is still used, yes. Notice, that some results are from vendored dependencies that would be quite hard to update. Full results of |
It's interesting that exrex already uses
Another project is using the private
Another example:
pyparsing was using sre_constants, it's no longer the case:
There are vendored copies of pyparsing which still use sre_constants. coverage test suite explicitly ignores the deprecation, tests/conftest.py: warnings.filterwarnings(
"ignore",
category=DeprecationWarning,
message=r"module 'sre_constants' is deprecated",
) Similar example:
or:
|
I would prefer that people don't use private APIs. But well, as soon as it's technically possible, people just continue to do that.
At the least, it's unclear to me if it's ok or not to remove these modules right now. I would say that it's ok since we respected PEP 387 deprecation period. But @serhiy-storchaka may have a different opinion. |
Initially I was going to not keep old modules. But it was shown that they are used in some third-party projects, so it would be nicer from us to keep them for a time. Now we can remove them at any time. But it would be even more nicer if we first add public API for things used in third-party code. It is not always feasible, for example |
sre_* modules like sre_constants, sre_compile, and sre_parse were deprecated in 3.11 refer python/cpython#105456 Change-Id: Iee2ef2658ae12bd5c48c11dccaa84b360ee19d26
sre_* modules like sre_constants, sre_compile, and sre_parse were deprecated in 3.11 refer python/cpython#105456 Change-Id: Iee2ef2658ae12bd5c48c11dccaa84b360ee19d26
commit 312cd04 upgrade python to 3.11 sre_* modules like sre_constants, sre_compile, and sre_parse were deprecated in 3.11 refer python/cpython#105456 Bug: chromium:1517834 Change-Id: Iee2ef2658ae12bd5c48c11dccaa84b360ee19d26
commit 312cd04 upgrade python to 3.11 sre_* modules like sre_constants, sre_compile, and sre_parse were deprecated in 3.11 refer python/cpython#105456 Change-Id: Iee2ef2658ae12bd5c48c11dccaa84b360ee19d26
refer python/cpython#105456 Change-Id: Iee2ef2658ae12bd5c48c11dccaa84b360ee19d26
commit 312cd04 upgrade python to 3.11 sre_* modules like sre_constants, sre_compile, and sre_parse were deprecated in 3.11 refer python/cpython#105456 Bug: chromium:1517834 Change-Id: Iee2ef2658ae12bd5c48c11dccaa84b360ee19d26
Feature or enhancement
sre_*
modules likesre_constants
,sre_compile
, andsre_parse
were deprecated in3.11
in 1be3260Our 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:
re._parser
,re._constants
, andre._compiler
modules that are used insteadThe only argument agaist removing them:
I will send a PR once we settle it:
@vstinner @serhiy-storchaka what's your opinion?
The text was updated successfully, but these errors were encountered: