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

py311 compatibility #72

Merged
merged 1 commit into from
Jul 13, 2023
Merged

py311 compatibility #72

merged 1 commit into from
Jul 13, 2023

Conversation

braingram
Copy link
Contributor

@braingram braingram commented Jul 7, 2023

python 3.11 does not allow global regex flags unless they are at the start of the expression. mistune appears to do something with the regex before compiling which causes sphinx-asdf to fail under some circumstances in python 3.11 (as can be seen in this PR: spacetelescope/stdatamodels#178 and docs build: https://readthedocs.org/projects/stdatamodels/builds/21235549/)

This PR uses [\w\W] instead of the dotall flag to be compatible with python 3.11 and adds 3.11 to the CI.

@braingram braingram marked this pull request as ready for review July 7, 2023 19:11
python 3.11 prevents use of global flags not at the start
of the regex. Mistune does something with the regex that
conflicts with the use of a global flag (even at the start
of the regex) and pre-compiling does not work. Instead
of using DOTALL use [\w\W].
@braingram braingram changed the title pre-compile mistune block regex for py311 compatibility py311 compatibility Jul 7, 2023
@braingram braingram requested a review from zacharyburnett July 7, 2023 19:23
@braingram braingram requested a review from nden July 12, 2023 13:54
@braingram braingram merged commit 56036e7 into asdf-format:main Jul 13, 2023
@braingram braingram deleted the 3p11 branch July 13, 2023 19:30
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.

2 participants