
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2017-08-30 14:15 byvxgmichel, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 3420 | merged | vxgmichel,2017-09-07 12:06 | |
| Messages (5) | |||
|---|---|---|---|
| msg301026 -(view) | Author: Vincent Michel (vxgmichel)* | Date: 2017-08-30 14:15 | |
Calling `config_parser.read` with `'test'` is equivalent to: config_parser.read(['test'])while calling `config_parser.read` with `b'test'` is treated as: config_parser.read([116, 101, 115, 116])which means python will try to open the file descriptors 101, 115 and 116.I don't know if byte path should be supported, but this is probably not the expected behavior.The method code:https://github.com/python/cpython/blob/master/Lib/configparser.py#L678-L702 | |||
| msg301149 -(view) | Author: Łukasz Langa (lukasz.langa)*![]() | Date: 2017-09-01 19:48 | |
Good catch. Supporting bytes passed as a path is a reasonable request since the builtin `open()` supports this, too. Go ahead and create a pull request! We only need to modify line 690 to also list `bytes`. | |||
| msg301192 -(view) | Author: David Ellis (David Ellis)* | Date: 2017-09-03 14:02 | |
This is related to the issue I'd brought up previously here so closing this would also close that issue:http://bugs.python.org/issue29627I did originally attempt to add support for bytes in PR where I added support for Path-like objects:https://github.com/python/cpython/pull/242 but I was asked to take it back out. | |||
| msg305421 -(view) | Author: Berker Peksag (berker.peksag)*![]() | Date: 2017-11-02 12:47 | |
New changesete314853d57450b2b9523157eebd405289a795a0e by Berker Peksag (Vincent Michel) in branch 'master':bpo-31307: Make ConfigParser.read() accept bytes objects (GH-3420)https://github.com/python/cpython/commit/e314853d57450b2b9523157eebd405289a795a0e | |||
| msg305422 -(view) | Author: Berker Peksag (berker.peksag)*![]() | Date: 2017-11-02 12:49 | |
Thanks! I went ahead and mergedPR 3420 since Łukasz (the configparser maintainer) has accepted the idea. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:51 | admin | set | github: 75488 |
| 2017-11-02 12:49:05 | berker.peksag | set | status: open -> closed type: behavior -> enhancement messages: +msg305422 resolution: fixed stage: resolved |
| 2017-11-02 12:47:06 | berker.peksag | set | nosy: +berker.peksag messages: +msg305421 |
| 2017-09-07 12:06:27 | vxgmichel | set | pull_requests: +pull_request3417 |
| 2017-09-05 17:52:56 | lukasz.langa | link | issue29627 superseder |
| 2017-09-03 14:02:16 | David Ellis | set | nosy: +David Ellis messages: +msg301192 |
| 2017-09-01 19:48:23 | lukasz.langa | set | messages: +msg301149 |
| 2017-08-31 12:01:28 | cryvate | set | nosy: +cryvate |
| 2017-08-30 15:32:59 | r.david.murray | set | nosy: +lukasz.langa |
| 2017-08-30 14:15:47 | vxgmichel | create | |