[issue44095] Add suffix property to zipfile.Path

2021-05-14 Thread Jason R. Coombs
Jason R. Coombs added the comment: Thanks for the excellent patch. I've created https://github.com/jaraco/zipp/issues/74 to track the backport of these changes. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Pyt

[issue44095] Add suffix property to zipfile.Path

2021-05-14 Thread Jason R. Coombs
Jason R. Coombs added the comment: Sounds good to me. In general, it's easier to contribute first to https://github.com/jaraco/zipp and those changes can be readily merged into CPython. No worries, though. If these changes can be accepted here, I should be able to graft them onto jaraco/zipp

[issue44095] Add suffix property to zipfile.Path

2021-05-14 Thread Miguel Brito
Miguel Brito added the comment: I prototyped something by adding `suffix`, `suffixes`, and `stem`. To me these are the most obvious ones and would be useful right away. Regarding the others I'm not so sure. It seems that zipfile.Path is just a convenient class to provide basic navigational o

[issue44095] Add suffix property to zipfile.Path

2021-05-14 Thread Miguel Brito
Change by Miguel Brito : -- keywords: +patch pull_requests: +24768 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26129 ___ Python tracker ___ ___

[issue44095] Add suffix property to zipfile.Path

2021-05-14 Thread Jakub Nowak
Jakub Nowak added the comment: Thank for your interest Miguel. I have no experience with CPython codebase so I'll be glad if you work on this. I think treating ZipFile's like a separate drive would be the best. If we agree on this then probably all of the properties and methods from pathlib

[issue44095] Add suffix property to zipfile.Path

2021-05-14 Thread Miguel Brito
Miguel Brito added the comment: +1. The docstring says: ``` class Path: """ A pathlib-compatible interface for zip files. ``` but only a few methods are supported. It'd be nice to have at least `stem`, `parents`, `suffixes`, `parts`, which IMHO would make sense here. I'd love to wor

[issue44095] Add suffix property to zipfile.Path

2021-05-10 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +jaraco ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue44095] Add suffix property to zipfile.Path

2021-05-09 Thread Jakub Nowak
New submission from Jakub Nowak : suffix property is present on pathlib.Path (specifically pathlib.PurePath) and it could also be added to zipfile.Path for consistency. My use case is filtering files by suffix: patch_files = list(filter(lambda file: file.suffix == '.patch', files)) Beside