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

No longer use undocumented module "sre_constants" #379

Merged
merged 1 commit into from Mar 29, 2022

Conversation

serhiy-storchaka
Copy link
Contributor

Closes #378.

@serhiy-storchaka
Copy link
Contributor Author

It is my first contribution so I do not know some things.

Should I add an entry in the CHANGES file?

What about pyparsing_archive.py? Should I change it too or it is some historical artifact?

@ptmcg
Copy link
Member

ptmcg commented Mar 29, 2022

Very nice PR, thanks, I can merge it as-is.
No, do not update pyparsing_archive.py - it is there as a reference artifact that pre-dates the refactoring into multiple files.
I'll take care of the CHANGES blurb before the next release.
(How did the helpers.py code even work, since there is no import of sre_constants? Maybe it gets pulled in when importing re.)

For future reference:
It is good to test changes like this going back to the oldest supported Python version (currently 3.6.8). Not necessary for this case, I just confirmed that re.error works on Py3.6.8.

I'll add notes to the CONTRIBUTING file with these details.

@ptmcg ptmcg merged commit 3c03942 into pyparsing:master Mar 29, 2022
@serhiy-storchaka serhiy-storchaka deleted the sre_constants branch March 30, 2022 10:05
@serhiy-storchaka
Copy link
Contributor Author

re.error is available since Python 2.0.

helpers.py get sre_constants from from .core import *.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not use "sre_constants"
2 participants