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

Fix issue with Python 3.11 #104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

heyman
Copy link

@heyman heyman commented Nov 10, 2022

This fixes a crash on Python 3.11. Global flags in regexes must now be put at the beginning.

This is the error message for the exception that this PR fixes:
re.error: global flags not at the start of the expression at position 12

Resolves #98

@dbungert
Copy link

Looks good, tested against Ubuntu Lunar + Python 3.11.

@jayaddison
Copy link

Applies the same fix as an accepted pull request for python-glob2 (miracle2k/python-glob2#22), and I too think this looks good.

@heyman
Copy link
Author

heyman commented Jan 25, 2023

Maybe someone with commit access could press the merge button?

@jayaddison
Copy link

@heyman could you update the description to add the text Resolves #98? (so that it can close that issue if-and-when merged)

@heyman
Copy link
Author

heyman commented Jan 25, 2023

@heyman could you update the description to add the text Resolves #98? (so that it can close that issue if-and-when merged)

Hmm, I can't reproduce the issue in #98. How can I reproduce it? (just want to verify that my PR actually fixes the issue)

@jayaddison
Copy link

Yep, good thinking. The following should replicate the problem:

fnmatch_filter(names=["__init__.py"], pat="*.py")

(on Python3.10, this emits a DeprecationWarning -- in Python 3.11, it fails -- your fix should address both, I think)

@heyman
Copy link
Author

heyman commented Jan 27, 2023

Ok, done!

Hopefully someone with commit access can press the merge button for this tiny fix that makes it possible to use the package on Python 3.11.

@jayaddison
Copy link

cc @miracle2k

@vad
Copy link

vad commented May 16, 2023

@heyman since this project is not maintained anymore, should we fork it under an organization and apply requires patches?

@heyman
Copy link
Author

heyman commented May 16, 2023

@vad I'm currently using my fork. I don't have time to make it any more "official" than that, but if someone would setup a proper fork (and perhaps even create a new PyPI package) I'd applaud it :).

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.

DeprecationWarning: invalid escape sequence \Z
4 participants