Skip to content

Conversation

@geoffw0
Copy link
Contributor

@geoffw0 geoffw0 commented Jul 20, 2023

Understand / correctly parse multiple parse mode flags specified in a regular expression string, for example i and s in:

(?is)abc.*

Previously we were only recognizing the first flag (i).

This is a backport of part of the Swift PR #13715 .

@geoffw0 geoffw0 added the Python label Jul 20, 2023
@geoffw0 geoffw0 requested a review from a team as a code owner July 20, 2023 11:02
@calumgrant calumgrant requested a review from yoff July 24, 2023 09:08
yoff
yoff previously approved these changes Jul 24, 2023
Copy link
Contributor

@yoff yoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice PR, good choice of tests. Also, thanks for doing this 🙏

@yoff
Copy link
Contributor

yoff commented Jul 24, 2023

The test failures can be explained by flag_group_start now only matching (? and not also the first mode character.
They do pose the question if mode characters should not be considered normal characters. They do not seem like good candidates for first and last items to be matched...

@yoff
Copy link
Contributor

yoff commented Aug 9, 2023

In summary, I think you can just fix the test expectations and then we can merge :-)

@geoffw0
Copy link
Contributor Author

geoffw0 commented Aug 14, 2023

Sorry, my notification on this got lost somewhere. Thank you for reviewing.

There's some related investigation / discussion going on in the Java version of this PR (#13778), so I'll wait until everything's settled and port any fixes that arise back to here.

@geoffw0
Copy link
Contributor Author

geoffw0 commented Aug 24, 2023

I've added a commit accepting the test changes. @yoff it's my understanding that #13975 will fix these?

@yoff
Copy link
Contributor

yoff commented Aug 24, 2023

I've added a commit accepting the test changes. @yoff it's my understanding that #13975 will fix these?

Yes. I will rebase, then we shall see :-)

@yoff
Copy link
Contributor

yoff commented Aug 24, 2023

I've added a commit accepting the test changes. @yoff it's my understanding that #13975 will fix these?

Yes. I will rebase, then we shall see :-)

Scratch that, no need to rebase. We have a PR on top where these tests pass without change.

Copy link
Contributor

@yoff yoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let us merge this now, and then let us merge #13975 soon.

@yoff yoff merged commit a834703 into github:main Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants