[Python-Dev] Re: bz2.BZ2File doesn't support name?

2021-04-27 Thread Hasan Diwan
[response inline] On Tue, 27 Apr 2021 at 04:55, Senthil Kumaran wrote: > why did you have a self.filename and (getter?) as name. You could set the > attribute as name. > I wasn't aware that this was an option. -- H -- OpenPGP: https://hasan.d8u.us/openpgp.asc If you wish to request my time,

[Python-Dev] Re: bz2.BZ2File doesn't support name?

2021-04-27 Thread Rik
I am new and I am just lurking here, so please pardon me if I say or do anything out of place. I saw your patch Mr. Diwan and I want to say that instead of making `filename` attribute, it would be better to change it to `name`, just to adhere to standards. And changing the name method to

[Python-Dev] Re: bz2.BZ2File doesn't support name?

2021-04-27 Thread Senthil Kumaran
Hello Hasan, Thank you. Please submit your patch as a PR in Github. https://devguide.python.org/pullrequest/ Also, why did you have a self.filename and (getter?) as name. You could set the attribute as name. Thank you, Senthil On Tue, Apr 27, 2021 at 12:32 AM Hasan Diwan wrote: > I just added

[Python-Dev] Re: bz2.BZ2File doesn't support name?

2021-04-27 Thread Hasan Diwan
I just added the .name property to bz2.Bzip2File and added a test to verify it. -- H On Mon, 26 Apr 2021 at 21:40, Senthil Kumaran wrote: > There is an open bug report https://bugs.python.org/issue24258 > > I guess it was overlooked. It could be a good task for someone > interested. > Please

[Python-Dev] Re: bz2.BZ2File doesn't support name?

2021-04-26 Thread Senthil Kumaran
There is an open bug report https://bugs.python.org/issue24258 I guess it was overlooked. It could be a good task for someone interested. Please add me as a reviewer if you submit a patch, I can help review and move it forward. On Mon, Apr 26, 2021 at 9:22 PM wrote: > I was surprised recently

[Python-Dev] Re: bz2.BZ2File doesn't support name?

2021-04-26 Thread Paul Bryan
I think one of the issues is that BZ2File accepts the filename as a name or as a file-like object! I don't see why it couldn't be enhanced to provide the filename though (by pulling it from the fp). Meanwhile, the ugly way to get the filename from a BZ2File object: pbryan@dynamo:~$ python3