Message288378
Trying to use configparser.ConfigParser.read on a pathlib object results in a TypeError. If supplied in a list it works as expected.
Repro:
>>> import pathlib, configparser
>>> configparser.ConfigParser().read(pathlib.Path('some.ini'))
TypeError: 'PosixPath' object is not iterable
The issue appears to be line 690 which checks for str before attempting to iterate and doesn't check for os.PathLike (or bytes?).
This was actually mentioned as an example where pathlib did not work here: https://bugs.python.org/issue22570 |
|
Date |
User |
Action |
Args |
2017-02-22 18:48:55 | David Ellis | set | recipients:
+ David Ellis |
2017-02-22 18:48:55 | David Ellis | set | messageid: <1487789335.63.0.00643279339965.issue29623@psf.upfronthosting.co.za> |
2017-02-22 18:48:55 | David Ellis | link | issue29623 messages |
2017-02-22 18:48:55 | David Ellis | create | |
|