[issue35453] pathlib.Path: glob and rglob should accept PathLike patterns

2019-11-15 Thread Batuhan
Batuhan added the comment: > From what I see, there is no consensus yet. @serhiy.storchaka said this isn't an issue. I can add tests about this behavior (as you mentioned) or this issue can be directly resolved as not a bug. What are you thinking @nanjekyejoannah and @serhiy.storchaka?

[issue35453] pathlib.Path: glob and rglob should accept PathLike patterns

2019-11-15 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: @BTaskaya From what I see, there is no consensus yet.If you are interested in exploring, go on. -- ___ Python tracker ___

[issue35453] pathlib.Path: glob and rglob should accept PathLike patterns

2019-11-15 Thread Batuhan
Batuhan added the comment: @nanjekyejoannah, are you still interested in adding tests or can i add tests? -- nosy: +BTaskaya ___ Python tracker ___ ___

[issue35453] pathlib.Path: glob and rglob should accept PathLike patterns

2019-05-28 Thread Joannah Nanjekye
Joannah Nanjekye added the comment: Since this is not considered an issue, I will just add tests to confirm this behavior and close this. -- nosy: +nanjekyejoannah ___ Python tracker ___

[issue35453] pathlib.Path: glob and rglob should accept PathLike patterns

2018-12-14 Thread Terry J. Reedy
Change by Terry J. Reedy : -- stage: -> test needed type: -> enhancement versions: +Python 3.8 -Python 3.7 ___ Python tracker ___

[issue35453] pathlib.Path: glob and rglob should accept PathLike patterns

2018-12-10 Thread Cristian Ciupitu
Cristian Ciupitu added the comment: Err, I meant os.path.join instead of os.path.combine. -- ___ Python tracker ___ ___ Python-bugs

[issue35453] pathlib.Path: glob and rglob should accept PathLike patterns

2018-12-10 Thread Cristian Ciupitu
Cristian Ciupitu added the comment: What if the pattern has some directories in it, e.g. "SourceArt/**/*.png", how do you compose it? The traditional way is to either hardcode the separator (e.g. / or \) or use os.path.combine. I don't see why PurePath can't be used for this, e.g. PurePath('

[issue35453] pathlib.Path: glob and rglob should accept PathLike patterns

2018-12-10 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is for purpose. Path is not a glob pattern, and glob pattern is not a path. '*.txt' is aт ordinary file name on Linux and is invalid file name on Windows. If we wanted to accept Path in any place that accepts a string, we would make Path a subclass of

[issue35453] pathlib.Path: glob and rglob should accept PathLike patterns

2018-12-10 Thread Cristian Ciupitu
New submission from Cristian Ciupitu : pathlib.Path.glob and pathlib.Path.rglob don't work with os.PathLike patterns. Short example: from pathlib import Path, PurePath # fails tuple(Path('/etc').glob(PurePath('passwd')))# TypeError tuple(Path('/etc').rglob(PurePath('passwd'))) # TypeErro