Open heyman opened 1 year ago
Looks good, tested against Ubuntu Lunar + Python 3.11.
Applies the same fix as an accepted pull request for python-glob2
(miracle2k/python-glob2#22), and I too think this looks good.
Maybe someone with commit access could press the merge button?
@heyman could you update the description to add the text Resolves #98
? (so that it can close that issue if-and-when merged)
@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)
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)
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.
cc @miracle2k
@heyman since this project is not maintained anymore, should we fork it under an organization and apply requires patches?
@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 :).
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