New submission from anthony shaw <anthony.p.s...@gmail.com>:
The documentation for pathlib PurePath.match(needle) says it accepts "glob-style pattern.". For an absolute path with a recursive pattern (**) it doesn't match correct for more than 1 directory level. All of the assertions in the attached file should pass. The issue I've seen is on the attached file. I'm using Python 3.7.1 and have also tested this against Python 3.6.6 with the pathlib module on PyPi. Absolute path glob'ing with a recursive pattern works as expected: entries = pathlib.Path('/var').glob('/var/**/*.log') Once this issue is confirmed, I would be happy to test & contribute a fix ---------- components: Library (Lib) files: test_pathlib.py messages: 331782 nosy: anthony shaw priority: normal severity: normal status: open title: pathlib Path.match does not behave as described versions: Python 3.7 Added file: https://bugs.python.org/file47996/test_pathlib.py _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35488> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com