[issue24258] BZ2File objects do not have name attribute

2021-04-27 Thread Roy Smith
Roy Smith added the comment: The https://bitbucket.org/cliff/cpython#python24258 URL 404's Looking at the attached bz2.py diff, I would change: if isinstance(filename, (str, bytes, os.PathLike)): self._fp = _builtin_open(filename, mode) +self.filename =

[issue24258] BZ2File objects do not have name attribute

2021-04-27 Thread Steve Stagg
Steve Stagg added the comment: Please may you add a test that uses "io.BytesIO()" as the filename argument. BytesIO() objects do not have a 'name' attribute -- nosy: +stestagg ___ Python tracker

[issue24258] BZ2File objects do not have name attribute

2021-04-27 Thread Hasan Diwan
Hasan Diwan added the comment: Patch adds a bz2.BZ2File.name property corresponding to the filename passed in. -- keywords: +patch nosy: +Hasan Diwan versions: +Python 3.10, Python 3.11, Python 3.8, Python 3.9 -Python 3.6 Added file: https://bugs.python.org/file49991/bz2.name.patch

[issue24258] BZ2File objects do not have name attribute

2021-04-27 Thread Shatabarto Bhattacharya
Change by Shatabarto Bhattacharya : -- nosy: +hrik2001 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24258] BZ2File objects do not have name attribute

2021-04-26 Thread Roy Smith
Change by Roy Smith : -- nosy: +roysmith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24258] BZ2File objects do not have name attribute

2015-06-01 Thread Cliff Dyer
Cliff Dyer added the comment: I've got a fix for this now. In working on it, I've discovered that not all file-like objects have a .name attribute. io.BytesIO (which is used all over the test suite) does not. I've written a patch that always creates a .name attribute on BZ2File, but sets

[issue24258] BZ2File objects do not have name attribute

2015-06-01 Thread Cliff Dyer
Cliff Dyer added the comment: It's probably too late for this to get into 3.5, since we're already in betas. Pushing back to 3.6. -- versions: +Python 3.6 -Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24258

[issue24258] BZ2File objects do not have name attribute

2015-05-26 Thread Cliff Dyer
Cliff Dyer added the comment: I'd be happy to take a look at this one, if no one else is working on it. -- nosy: +jcd ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24258 ___

[issue24258] BZ2File objects do not have name attribute

2015-05-21 Thread Jozef Sivek
New submission from Jozef Sivek: Unlike GzipFile the BZ2File does not have defined name attribute. The reading of this attribute results in: AttributeError: 'BZ2File' object has no attribute 'name'. This is truly missing feature and wrong behaviour, compare:

[issue24258] BZ2File objects do not have name attribute

2015-05-21 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24258 ___ ___ Python-bugs-list mailing