Message392069
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 = filename
self._closefp = True
self._mode = mode_code
to special-case os.PathLike and do:
self.filename = str(filename)
I would expect BZ2File.name to be a string. Returning a PathLike means lots of legitimate string methods will not work on it. Also, it should be "name" as an attribute, not "name()" as a method, to match other existing interfaces. |
|
Date |
User |
Action |
Args |
2021-04-27 13:05:23 | roysmith | set | recipients:
+ roysmith, nadeem.vawda, jcd, jojko.sivek, Hasan Diwan, stestagg, hrik2001 |
2021-04-27 13:05:23 | roysmith | set | messageid: <1619528723.76.0.994509240222.issue24258@roundup.psfhosted.org> |
2021-04-27 13:05:23 | roysmith | link | issue24258 messages |
2021-04-27 13:05:23 | roysmith | create | |
|