[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, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/IHIRFXDMJ25IEOX74L5A5KSGAO4GWMQG/
Code of Conduct: http://python.org/psf/codeofconduct/


[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 something else or even removing it.
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/XEKHBJRPTE2DIV5HHHQRENYXJPBK3N7Y/
Code of Conduct: http://python.org/psf/codeofconduct/


[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 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 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 to discover that BZ2File (at least in 3.7)
>>> doesn't have a name attribute.  Is there some fundamental reason name
>>> couldn't be supported, or is it just a bug that it wasn't implemented?
>>> ___
>>> Python-Dev mailing list -- python-dev@python.org
>>> To unsubscribe send an email to python-dev-le...@python.org
>>> https://mail.python.org/mailman3/lists/python-dev.python.org/
>>> Message archived at
>>> https://mail.python.org/archives/list/python-dev@python.org/message/N3Q7AN5ISRGKS76GT4YSJX2SV6BNQIWM/
>>> Code of Conduct: http://python.org/psf/codeofconduct/
>>>
>> ___
>> Python-Dev mailing list -- python-dev@python.org
>> To unsubscribe send an email to python-dev-le...@python.org
>> https://mail.python.org/mailman3/lists/python-dev.python.org/
>> Message archived at
>> https://mail.python.org/archives/list/python-dev@python.org/message/NCGH6EYRIDFANEAWDQ3KVE6LFXNS4ROV/
>> Code of Conduct: http://python.org/psf/codeofconduct/
>>
>
>
> --
> OpenPGP: https://hasan.d8u.us/openpgp.asc
> If you wish to request my time, please do so using 
> *bit.ly/hd1AppointmentRequest
> *.
> Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
> *.
>
> Sent
> from my mobile device
> Envoye de mon portable
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/B3CCQRW7UKPK3GD7A6ZSRYNRV3CVXG6V/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/EHDAR5JN2NIV4NEQXWJG525XUPZYNYTQ/
Code of Conduct: http://python.org/psf/codeofconduct/


[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 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 to discover that BZ2File (at least in 3.7)
>> doesn't have a name attribute.  Is there some fundamental reason name
>> couldn't be supported, or is it just a bug that it wasn't implemented?
>> ___
>> Python-Dev mailing list -- python-dev@python.org
>> To unsubscribe send an email to python-dev-le...@python.org
>> https://mail.python.org/mailman3/lists/python-dev.python.org/
>> Message archived at
>> https://mail.python.org/archives/list/python-dev@python.org/message/N3Q7AN5ISRGKS76GT4YSJX2SV6BNQIWM/
>> Code of Conduct: http://python.org/psf/codeofconduct/
>>
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/NCGH6EYRIDFANEAWDQ3KVE6LFXNS4ROV/
> Code of Conduct: http://python.org/psf/codeofconduct/
>


-- 
OpenPGP: https://hasan.d8u.us/openpgp.asc
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
*.

Sent
from my mobile device
Envoye de mon portable
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/B3CCQRW7UKPK3GD7A6ZSRYNRV3CVXG6V/
Code of Conduct: http://python.org/psf/codeofconduct/


[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 to discover that BZ2File (at least in 3.7)
> doesn't have a name attribute.  Is there some fundamental reason name
> couldn't be supported, or is it just a bug that it wasn't implemented?
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/N3Q7AN5ISRGKS76GT4YSJX2SV6BNQIWM/
> Code of Conduct: http://python.org/psf/codeofconduct/
>
___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/NCGH6EYRIDFANEAWDQ3KVE6LFXNS4ROV/
Code of Conduct: http://python.org/psf/codeofconduct/


[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
Python 3.9.3 (default, Apr  8 2021, 23:35:02) 
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import bz2
>>> f = bz2.BZ2File("test.bz2")
>>> f._fp.name
'test.bz2'
>>> 

Paul


On Tue, 2021-04-27 at 04:04 +, r...@panix.com wrote:
> I was surprised recently to discover that BZ2File (at least in 3.7)
> doesn't have a name attribute.  Is there some fundamental reason name
> couldn't be supported, or is it just a bug that it wasn't
> implemented?
> ___
> Python-Dev mailing list -- python-dev@python.org
> To unsubscribe send an email to python-dev-le...@python.org
> https://mail.python.org/mailman3/lists/python-dev.python.org/
> Message archived at
> https://mail.python.org/archives/list/python-dev@python.org/message/N3Q7AN5ISRGKS76GT4YSJX2SV6BNQIWM/
> Code of Conduct: http://python.org/psf/codeofconduct/

___
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/S4KSWVFLM5JEZCI3OFWJSEKR3JUJL6XL/
Code of Conduct: http://python.org/psf/codeofconduct/