This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients dom1310df, ezio.melotti, gvanrossum, malin, mrabarnett, serhiy.storchaka
Date 2022-03-30.07:23:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1648625035.16.0.237293362239.issue47152@roundup.psfhosted.org>
In-reply-to
Content
It turns out that pip uses sre_constants in its copy of pyparsing. The problem is already fixed in the upstream of pyparsing and soon should be fixed in pip. We still need to keep sre_constants and maybe other sre_* modules, but deprecate them.

> Could the sre_parse and sre_constants modules be kept with public names (i.e. without the leading underscore) but within the re namespace?

It is a good idea which will allow to minimize breakage in short term. You can write "from re import sre_parse", and it would work in old and new versions because sre_parse and sre_compile were imported in the re module. This trick does not work with sre_constants, you still need try/except.

But the code that depends on these modules is fragile and can be broken by other ways.

> Please don't merge too close to the 3.11 beta1 release date, I'll submit PRs after this merged.

I am going to implement step 2 only after merging your changes for issue23689.
History
Date User Action Args
2022-03-30 07:23:55serhiy.storchakasetrecipients: + serhiy.storchaka, gvanrossum, ezio.melotti, mrabarnett, malin, dom1310df
2022-03-30 07:23:55serhiy.storchakasetmessageid: <1648625035.16.0.237293362239.issue47152@roundup.psfhosted.org>
2022-03-30 07:23:55serhiy.storchakalinkissue47152 messages
2022-03-30 07:23:55serhiy.storchakacreate