Skip to content

Make the prevent sync pattern generated from default_pattern.ignore stable#3147

Merged
vxgmichel merged 1 commit intomasterfrom
issue-3145
Sep 28, 2022
Merged

Make the prevent sync pattern generated from default_pattern.ignore stable#3147
vxgmichel merged 1 commit intomasterfrom
issue-3145

Conversation

@vxgmichel
Copy link
Copy Markdown
Contributor

@vxgmichel vxgmichel commented Sep 26, 2022

Fix issue #3147

@vxgmichel vxgmichel changed the title Make the prevent sync pattern generated from default_pattern.ignore s… Make the prevent sync pattern generated from default_pattern.ignore stable Sep 26, 2022
@vxgmichel vxgmichel marked this pull request as ready for review September 26, 2022 16:45
try:
# We need to reset `fnmatch._nextgroupnum` in order to make the pattern
# of the form `*a*` stable.
# Note: the `_nextgroupnum` counter has been removed in python 3.11
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So from python 3.11 this bug is going to disappear no matter what ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes and no. The reason why the need for this groupnum counter disappear is the introduction of atomic grouping here:
python/cpython#31982
But those (?>...) groups are probably not going to be supported by the regex crate we're using in rust.

But I think it's something we can consider later.

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